var innerAudioContext = wx.createInnerAudioContext();
innerAudioContext.src = "https://xiaoquanquan-1257217306.cos.ap-chongqing.myqcloud.com/Q470684f94f9e316e3a448353a66b30122022/07/25/21/56/03cdNbDw9JgWIB2b9d3f0e881fd10ffe0825e5863bf61f.durationTime%3D1700.mp3
",innerAudioContext.obeyMuteSwitch = false, innerAudioContext.play();
不报错误,就是无法播放声音。
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
var innerAudioContext = wx.createInnerAudioContext();
innerAudioContext.src = "https://xiaoquanquan-1257217306.cos.ap-chongqing.myqcloud.com/Q470684f94f9e316e3a448353a66b30122022/07/25/21/56/03cdNbDw9JgWIB2b9d3f0e881fd10ffe0825e5863bf61f.durationTime%3D1700.mp3
"
,innerAudioContext.obeyMuteSwitch = false, innerAudioContext.play(), innerAudioContext.onError(function (t) {
console.log(t); //模拟器及Android 均可正常播放,iphone XR及SE机型下均不能播放,也不报错。(在静音及非静音模式下都不行)
});;
有解决方式了吗老哥
https://developers.weixin.qq.com/miniprogram/dev/api/media/audio/wx.setInnerAudioOption.html
onError监听下呢