- BackgroundAudioManager后台播放onEnded回调不走的Bug
安卓系统手机上运行代码片段,在小程序页面时直接手机锁屏,音频在后台播放完成后,不走onEnded回调。测试手机为Mi 11 pro 系统为 MIUI 13.0.13 亲测qq音乐小程序也存在这个Bug引起的单曲循环在播放页面直接手机锁屏,不能循环播放的问题。
2022-12-21 - 安卓手机上 getBackgroundAudioManager 有调用频次限制
如代码所示,一段时间内多次调用 getBackgroundAudioManager,就会被强制 onstop (在两个安卓手机上都是调用 4 次以上,iOS 正常无误)。请问这是 bug 吗?如果不是请麻烦标注在文档上好嘛!!!! [代码]function[代码] [代码]play() {[代码][代码] [代码][代码]const backgroundAudioManager = wx.getBackgroundAudioManager()[代码] [代码] [代码][代码]backgroundAudioManager.onTimeUpdate(() => {[代码][代码] [代码][代码]getBgam1()[代码][代码] [代码][代码]getBgam2()[代码][代码] [代码][代码]getBgam3()[代码][代码] [代码][代码]getBgam4()[代码][代码] [代码][代码]})[代码] [代码] [代码][代码]function[代码] [代码]getBgam1() {[代码][代码] [代码][代码]return[代码] [代码]backgroundAudioManager.duration[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]function[代码] [代码]getBgam2() {[代码][代码] [代码][代码]return[代码] [代码]backgroundAudioManager.duration[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]function[代码] [代码]getBgam3() {[代码][代码] [代码][代码]return[代码] [代码]backgroundAudioManager.duration[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]function[代码] [代码]getBgam4() {[代码][代码] [代码][代码]return[代码] [代码]backgroundAudioManager.duration[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]backgroundAudioManager.title = [代码][代码]'此时此刻'[代码][代码] [代码][代码]backgroundAudioManager.epname = [代码][代码]'此时此刻'[代码][代码] [代码][代码]backgroundAudioManager.singer = [代码][代码]'许巍'[代码][代码] [代码][代码]backgroundAudioManager.coverImgUrl = [代码][代码]'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000'[代码][代码] [代码][代码]// 设置了 src 之后会自动播放[代码][代码] [代码][代码]backgroundAudioManager.src = [代码][代码]'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46'[代码][代码]}[代码]
2019-01-14