CameraContext.startRecord 无法录制5分钟时长视频?
CameraContext.startRecord(Object object)timeoutnumber30否录制时长上限,单位为秒,最长不能超过 5 分钟 实际测试发现正常录制视频在115s,超过120s回调函数均不回调,文档显示支持5分钟以内视频录制。 startRecord() {
let that = this;
let recordTime = 115;
let totalInterval = recordTime * 1000;
let totalTime = 0;
let intervalId;
this.ctx.startRecord({
timeout: recordTime,
timeoutCallback: () => {
console.log('=========>timeoutCallback')
clearInterval(intervalId);
that.stopRecord();
},
success: () => {
console.log('=============>success')
},
fail: () => {
console.log('=============>fail')
},
complete: () => {
console.log('=============>complete')
}
})
intervalId = setInterval(function () {
totalTime++;
console.log('=============>totalTime:' + totalTime)
}, 1000);
},
测试基于官方提供demo进行测试,小程序版本:2.22.0
模拟器版本:iphone 6/7/8 (275*667 Dpr:2)