收藏
回答

调用wx.chooseMedia返回tempFiles:为空?

  bindButtonTap:function(){
    var that = this;
    //调用chooseVideo来实现在本地选择视频
      wx.chooseMedia({
        sourceType:['album','camera'],
        mediaType:['video'],
        maxDuration:60,
        camera:['front','back'],
        // success(res){
        //   that.setData({
        //     src:res.tempFilePath,
        //     show:true,
        //   })
        //   console.log(res);
        // }
        success:(res)=>{
          if(res.errMsg=="chooseMedia:ok"){
            console.log(this.data)
            console.log(res)
          }
        }
      })
  },

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

2 个回答

登录 后发表内容