收藏
回答

视频录制停止stopRecord报错operateCamera:fail operate fail?

1.使用环境:苹果手机 最新版本微信(9月份之前没问题)

2.问题:视频录制停止报错 stopRecord报错operateCamera:fail operate fail

3.使用按钮触发没问题 使用定时任务调用stopRecord报错 安卓手机及开发工具下调用正常

是不是更换了API?

回答关注问题邀请回答
收藏

2 个回答

  • Demons
    Demons
    2023-10-27

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2023-10-27
    有用
    回复
  • 害虫
    害虫
    2023-10-27

    stopShootVideo() {

    let that = this;

    this.ctx.stopRecord({

    compressed: false, //压缩视频

    success: (res) => {

    videoSrc = res.tempVideoPath;

    console.log("压缩录像:"+videoSrc);

    this.handleUploadFile(videoFile);

    if(itemNum > 8){

    console.log("测试结束......");

    //显示查看报告按钮

    this.setData({showStartBtn:false});

    this.removeVedio();

    }else{

    //10秒后开始下一项 正式环境去掉

    setTimeout(() => {

    this.pgTimer();

    },2000)

    }

    },

    fail(err) {

    console.log("PPPPPP:"+err.errMsg);

    wx.showToast({

    title: '结束录像失败${err.errMsg},请重新扫码进入',

    icon: 'none',

    duration: 4000

    });

    that.removeVedio();

    }

    })

    }


    2023-10-27
    有用
    回复
登录 后发表内容