wx.choosevideo只能选择视频不能拍视频
发布于 5 年前 作者 sujie 5584 次浏览 来自 问答

我的代码片段如下:

chooseVideo : function() {

var that = this

wx.chooseVideo({

success : function(res) {

that.setData({

video : res.tempFilePath,

addVideShow : 0

})

that.formSubmit();

},

fail : function® {

console.log®;

}

})

}

目前在小米se8,红米5上小程序调用wx.chooseVideo,只能选择本地已存在的视频,无法拍摄视频,拍摄完之后出现卡顿、然后直接跳转到小程序首页去了,拍摄的视频也没有保存到手机上!

3 回复

已知问题哈,感谢反馈。

初步定位原因是部分低配机型,小程序跳入拍视频页时会因为系统内存不足被杀掉,这个是系统行为,暂时无法规避。

最近的版本我们会优化(调整拍摄的流程)来降低被杀的概率,留意微信后续更新。

你好,问题未复现。请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

机型:MI 8 SEarmeabi-v7

微信版本:6.7.3

基础库版本:2.3.2

代码片段:

var that = this;

wx.chooseVideo({

sourceType: [‘album’, ‘camera’],

maxDuration: 60,

camera: ‘back’,

success(res) {

console.log(res.tempFilePath)

that.setData({

src: res.tempFilePath,

videoSrc: res.tempFilePath

})

that.uploadFile(res.tempFilePath);

}

})

回到顶部