const backgroundAudioManager = wx.getBackgroundAudioManager()
backgroundAudioManager.title = 'Berenstain Bears and the Baby Chipmunk'
backgroundAudioManager.coverImgUrl = 'https://oss.baobaobooks.net/images/goods/covers/1498161201534248541.jpg'
// backgroundAudioManager.src = 'http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46' // 设置了 src 之后会自动播放
backgroundAudioManager.src = 'https://v.baobaobooks.net/audio/resources/201706/149691253199951.mp3' // 设置了 src 之后会自动播放
使用文档内的音频地址 “http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7&uin=346897220&vkey=6292F51E1E384E061FF02C31F716658E5C81F5594D561F2E88B854E81CAAB7806D5E4F103E55D33C16F3FAC506D1AB172DE8600B37E43FAD&fromtag=46”可以正常播放。
使用自己的音频资源地址('https://v.baobaobooks.net/audio/resources/201706/149691253199951.mp3
')无法播放。
将相同的自己的音频资源,放到 http 的域名地址下,就能播放。(本地的服务器测试。无法提供地址)
你好,请提供出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。