API音频接口无法播放下载接口所创建的本地临时资源文件?
发布于 5 年前 作者 leilu 18051 次浏览 来自 问答
wx.downloadFile({
  url: url,
  success: res => {
    console.log("---下载完成---");
    console.log(res.tempFilePath);
    // 在data中记录缓存的下一条音频
    // this.setData({
    //   tempFilePath: res.tempFilePath
    // });
    const backgroundAudioManager = wx.getBackgroundAudioManager();
    backgroundAudioManager.src = res.tempFilePath
    // this.playAudio(nextItem);
    // this.play();
  }
});

会报错 10001,

我看到之前有人遇到过此问题:

https://developers.weixin.qq.com/blogdetail?action=get_post_info&docid=c7b223db52aff88b3c3a15f2fb5ddfc6

然后官方更新日志也说明修复了,为什么还是播放失败呢?

回到顶部