收藏
回答

使用 wx.chooseVideo安卓手机说无权限?

wx.chooseVideo({
      sourceType: ['camera'],
      maxDuration30,
      camera'front',
      compressed: true,
      success(res) {
        if (res.errMsg === "chooseVideo:ok") {
          if (res.duration < 3) {
            wx.showToast({
              title"拍摄视频太短,请重新拍摄",
              icon'none',
              duration2000
            });
            return;
          };
          if (res.duration >= 30) {
            wx.showToast({
              title"拍摄视频太长,请重新拍摄",
              icon'none',
              duration2000
            });
            return;
          };
  
          wx.showLoading({
            title'加载中...',
            mask: true
          });


          console.log(277,res,res.tempFilePath)
          that.uploadFile(res.tempFilePath)
        } else {
          wx.hideLoading();
          wx.showToast({
            title"视频上传失败,请重新拍摄上传",
            icon'none',
            duration2000
          });
        }
      },
      fail(res) {
        wx.hideLoading();
        wx.showToast({
          title"视频上传失败,请重新拍摄上传",
          icon'none',
          duration2000
        });
      }
    })
回答关注问题邀请回答
收藏

1 个回答

  • Cjiang
    Cjiang
    2021-01-27

    你好,无权限是什么意思呢?具体返回什么信息?

    2021-01-27
    有用
    回复
登录 后发表内容
问题标签