关于backgroundAudioManager.play()
发布于 5 年前 作者 li26 16052 次浏览 来自 问答

playmusic: function () {

if (backgroundAudioManager.paused){

this.setData({ Imgurl:https://www.art-framework.com/weChat/imgs/stop.png})

backgroundAudioManager.play()

}else{

this.setData({ Imgurl: https://www.art-framework.com/weChat/imgs/play.png })

this.stop()

}

},

如代码playmusic为播放暂停按钮绑定事件,在开发工具上运行正常。在手机上暂停后需要按两次才能再次播放,播放时按一下暂停可以正常运行。

回到顶部