playSound(){ let _this = this // _this.playing = true const innerAudioContext = uni.createInnerAudioContext(); innerAudioContext.autoplay = true; innerAudioContext.src = this.note.voice; innerAudioContext.onError((res) => { //如果音频没有正常播放 console.log(res.errCode); }) innerAudioContext.onStop((res)=>{ _this.playing=false _this.$forceUpdate() }) },
uniapp 播放声音
最新推荐文章于 2025-04-10 15:47:38 发布