b***@qq.com
b***@qq.com
  • 发布:2021-08-23 11:48
  • 更新:2023-04-26 13:43
  • 阅读:940

uni.createInnerAudioContext() 重复播放音频会变慢

分类:uni-app

uni.createInnerAudioContext() 重复播放音频会变慢 怎么解决?

data() {  
return {  
AudioContext: uni.createInnerAudioContext(),  
}  

methods: {  
getSound() {  
                // this.AudioContext = uni.createInnerAudioContext();  
                this.AudioContext.autoplay = false;  
                this.AudioContext.loop = true;  
                // this.AudioContext.src = `${this.host}/static/sound/频率_1分钟重复200次.mp3`;  
                this.AudioContext.onPlay(() => {  
                    console.log('开始播放');  
                });  
                this.AudioContext.onError((res) => {  
                    console.log(res.errMsg);  
                    console.log(res.errCode);  
                });  
            },  
}       
2021-08-23 11:48 负责人:无 分享
已邀请:
2***@qq.com

2***@qq.com

请问楼主解决了吗

要回复问题请先登录注册