wx.createCameraContext() 明明开始成功了,为什么结束的时候提示未开始录制?
发布于 4 年前 作者 jiagang 3297 次浏览 来自 官方Issues

苹果正常,安卓提示上图错误提示

下面的代码:

//开始录制
  startRecord() {
    var that=this;
    that.ctx.startRecord({
      success: (res) => {
        console.log('开始录像了',res);
        this.countDown()
      },
      timeoutCallback: (res) => {
        console.log('录制超时',res);
        that.lipError();
      },
      fail: (res) => {
        console.log('开始录制异常',res);
        that.lipError();
      }
    })
  },
  //结束录制
  stopRecord() {
    var that = this
    that.ctx.stopRecord({
      success: (res) => {
        console.log('结束录像了');//res = { tempThumbPath, tempVideoPath }
        console.log(res);
        console.log('视频路径:' + res.tempVideoPath);
      },
      fail: (res) => {
        console.log('结束录制异常',res);
        that.lipError();
      }
    })
  },
1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部