wx.getBackgroundAudioManager的onPlay回调了两次
发布于 6 年前 作者 kqiao 8007 次浏览 来自 问答

在安卓机调试时,使用getBackgroundAudioManager时,调用player.pause()之后,在调用payler.play(),onPlay回调会执行两次。

机型:魅族pro 6s

2 回复

你好,请提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

你可以查看下是否提前设置上了backgroundAudioManager.src属性值,正确的应该是在开始播放时才设置.src属性值,因为设置之后,它会自动播放,建议不要提前设置。

回到顶部