我在使用unipp开发微信小程序过程中,实现了按钮按钮拍摄视频的功能,能正常的实现,在手机端调试的时候,发现不能调用cameraContext.stopRecord。电脑端是能正常拍摄的,调试时不可以,希望大佬们能帮忙看一下。
代码如下:
stopShootVideo() {
// console.log("========= 调用结束录像 ===========")
clearInterval(this.timer)
this.cameraContext = uni.createCameraContext();
this.ctx = wx.createCameraContext()
this.cameraContext.stopRecord({//程序走到这就卡住了
success: res => {
console.log("stopShootVideo")
console.log('结束videoSrc')
this.videoSrc.push(res.tempVideoPath)
console.log(this.videoSrc)
console.log(this.videoSrc)
this.hidden = false
this.showvideoimage = true
}
});
},

请移步uni-app官方社区