收藏
回答

video能播放,但下载不了视频?

为啥video能播放这个视频,然后调用下载的时候,保存到相册的时候,就提示 文件无效?

视频连接:https://aweme.snssdk.com/aweme/v1/play/?s_vid=93f1b41336a8b7a442dbf1c29c6bbc56827bba338da58fff9d414d5e0e891260a1c391d356de42072e5c7b4c15e93325052710f7923662532737d5c3f25a856e&line=1


wx.saveVideoToPhotosAlbum

这个方法返回错误:saveVideoToPhotosAlbum:fail invalid file type

wx.downloadFile({
     url: app.globalData.videoUrl,
     header: {
       'Content-Type': 'multipart/form-data',
     },
     success(res) {
       console.log(res.tempFilePath)
       if (res.statusCode === 200) {
         wx.saveVideoToPhotosAlbum({
           filePath: res.tempFilePath,
           success(res) {
             console.log(res)
             wx.showToast({
               title: '下载成功',
             })
           },
           fail(res) {
             console.log(res)
             wx.showModal({
               title: '提示',
               content: res.errMsg,
             })
           }
         })
       }
     }
   })


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

2 个回答

登录 后发表内容
问题标签