wx.getBackgroundAudioManager()切换歌曲报错

发布于 7 年前作者 xiejun3600 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

onLoad: function (options) {

   var id = options.id

   db.collection(‘music’).doc(id)

   .get({

     success:res => {

       this.setData({

         music: res.data,

         stickStatus: ‘stick-start’

       })

       innerAudioContext.src = res.data.url

       innerAudioContext.title = res.data.name

       innerAudioContext.onTimeUpdate(() => { })

     }

   })

 },

在播放下一曲等需要执行this.onLoad()操作的时候,innerAudioContext.onTimeUpdate(() => { })就会报以上错误。res.data.name绝对不为空。

1 回复
yangxiong
yangxiong1 楼5 年前

麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html