你好,请问 stopRecord拍摄视频成功后怎么获得视频的宽高值呢
onshow中使用cameraContext.startRecord 报错,闪退先贴代码: [代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]that.ctx = wx.createCameraContext()[代码][代码] [代码][代码]that.ctx.startRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]console.log([代码][代码]'startRecord'[代码][代码])[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]that.ctx.stopRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]src: res.tempVideoPath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}, 5000)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码],这种写法在某一个版本库更新之后,突然如下错误报错: [图片] 然后在onshow中做了1秒延时,初步解决了这个问题,代码如下: [代码]onShow: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]that.ctx = wx.createCameraContext()[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码][代码](){[代码][代码] [代码][代码]that.ctx.startRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]console.log([代码][代码]'startRecord'[代码][代码])[代码][代码] [代码][代码]setTimeout([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]that.ctx.stopRecord({[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]src: res.tempVideoPath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}, 5000)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},1000)[代码][代码] [代码][代码]},[代码],但是经过多次真机测试,发现华为p9plus中,每次就会有一次微信闪退,小米机器未发现闪退现象,oppo中有闪退,但是几率特别小,可能几十次出现一次。请问这种情况该怎么解决? 还有,现在联系官方是在是太费劲了,能不能有客服保证开发人员能联系上呢。
2018-07-07你好,请问 stopRecord拍摄视频成功后怎么获得视频的宽高值呢
请教:stopRecord拍摄视频成功后返回的视频可以改变宽高比例吗- 需求的场景描述(希望解决的问题) - 希望提供的能力 camera组件,拍摄拍摄视频的时候如何更改/设置拍摄的视频的宽高比例
2018-07-07