click_sound:function(){
const innerAudioContext = wx.createInnerAudioContext();
innerAudioContext.autoplay = false;
innerAudioContext.src = '../../sounds/click_sound.mp3';
修改成绝对地址,调整了音量也不行: innerAudioContext.src="/miniprogram//sounds/click_sound.mp3"
innerAudioContext.volume = 1
innerAudioContext.play()
console.log('hh')
}
为什么点击无法触发音效呢,报错如下:
1,播放失败 {errMsg: "operateAudio:fail:play audio fail", errCode: -1}
2,播放失败 {errCode: 10001, errMsg: "errCode:602, err:error, not found param"}
确定你的绝对地址
是/miniprogram//sounds/两个斜杠吗?
等官方修复吧