wx.getBackgroundAudioManager的onPlay回调了两次

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

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

机型:魅族pro 6s

2 回复
xuwei
xuwei1 楼6 年前

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

jkang
jkang2 楼6 年前

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