backgroundAudioManager 安卓系统无法触发onPlay、onPause和onStop,为什么?IOS和微信工具下是可以的,有人知道吗?bug?
//app.js
App({
onLaunch: function () {
var that = this;
backgroundAudioManager.onPlay(function (res) {
console.log('音乐打开')
that.globalData.isPlaying = true;
})
backgroundAudioManager.onPause(function (res) {
console.log('音乐暂停')
that.globalData.isPlaying = false;
})
})
麻烦给个相关的代码片段(https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/minicode.html),我们定位下问题
我知道错在哪了,非常感谢!
wechatide://minicode/geuJ5nm868Yg