o***@qq.com
o***@qq.com
  • 发布:2020-06-04 17:37
  • 更新:2020-06-04 17:37
  • 阅读:1903

uni.createInnerAudioContext()播放声音,返回-99错误信息

分类:uni-app
console.log('播放声音');  
                const innerAudioContext = uni.createInnerAudioContext();  
                innerAudioContext.autoplay = true;  
                innerAudioContext.src = '../static/audio/22.mp3';  
                innerAudioContext.onError((res) => {  
                  console.log(res.errMsg);  
                  console.log(res.errCode);  
                });

这段代码是在index.vue页面中,index.vue在page目录下面。

在android 7.1.2版本下,有那么一会有声音,过了一会,就没有声音,报错误码:-99

2020-06-04 17:37 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复