BackgroundAudioManager真机测试异常?

发布于 8 年前作者 jieyao12460 次浏览最后编辑 8 年前来自 ask

真机测试音乐不能继续播放,会从开头重新播放,编辑工具测试正常

let bgAudioManager = wx.getBackgroundAudioManager(),

postId = this.data.postId,

postsData = this.data.postsData

if (this.data.isPlayingMusic) {

bgAudioManager.pause()

this.setData({

isPlayingMusic: false

})

} else {

bgAudioManager.title = postsData[postId].music.title

bgAudioManager.coverImgUrl = postsData[postId].music.coverImg

// 设置了 src 之后会自动播放

bgAudioManager.src = postsData[postId].music.url

this.setData({

isPlayingMusic: true

})

}

2 回复
li74
li741 楼6 年前

请具体描述问题出现的流程,并提供能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

用出现问题的手机扫码提供下截图



agong
agong2 楼6 年前

ios13.3.1