最近鸿蒙最新的版本都是这样,所有小程序在后台播放音频,自动播放到下一首的时候就报错了。不知道是不是系统权限问题
BackgroundAudioManager不能播放?三个严重报错组件:BackgroundAudioManager 基础库:2.27.2 代码: let t=this; t.backmusic=wx.getBackgroundAudioManager(); t.backmusic.src='https://m.ai-rili.com/static/web/indexCalendar/dazuo_bgm/9-1.mp3; t.backmusic.title='方圆图-'+t.Select.musicName; t.backmusic.coverImgUrl='https://m.ai-rili.com/static/xcximg/touxiangmoren.png'; t.backmusic.play(); 报错: (1)setBackgroundAudioState:fail jsapi has no permission, event=setBackgroundAudioState, runningState=background, permissionMsg=permission got, detail=jsapi permission required playing audio but current not playing audio in background state 涉及机型:iPhone 13、HUAWEI DUB-AL00、HONOR OXF-AN10、iPhone 12、HUAWEI FLA-TL10、iPhone 11、iPhone 12 Pro、NZONE SP200、HUAWEI+LYA-AL00(这里列出的仅仅是12h内用小程序音频的,如果拓宽时间线,人数机型肯定更多) (2)"errMsg": "playerErrCode:3, systemErrCode:560557684, domain:ASCII OSStatus:!int, description:未能完成操作。(ASCII OSStatus:!int错误560557684。)", "errCode": 10001, "src": "https://m.ai-rili.com/static/web/indexCalendar/dazuo_bgm/9-1.mp3" 涉及机型:iPhone 13 Pro Max、iPhone 11、iPhone 12(12h内) (3)播放过程中直接没音乐然后报错 "src": "https://m.ai-rili.com/static/web/indexCalendar/dazuo_bgm/9-1.mp3", "errCode": 10001, "errMsg": "errCode:67, err:decode audio fail" 涉及机型:Xiaomi Mi Note 2、HONOR+ELZ-AN10(12h内)
2022-11-22