This commit is contained in:
SelfRidicule 2024-08-16 14:20:57 +08:00
parent 77765a6215
commit 4a7ca87407

View File

@ -161,10 +161,15 @@ Page({
innerAudioContext.src = _this.data.files.voice[0].url innerAudioContext.src = _this.data.files.voice[0].url
innerAudioContextIsPlay = false innerAudioContextIsPlay = false
innerAudioContext.onEnded(() => { innerAudioContext.onEnded(() => {
console.log('innerAudioContext.onEnded', _this.data.files.voice[0].url);
_this.setData({ _this.setData({
innerAudioContextIsPlay: false innerAudioContextIsPlay: false
}) })
}) })
innerAudioContext.onError((errMsg, errCode) => {
console.log('innerAudioContext.onError', errMsg, errCode);
})
} }
if (innerAudioContextIsPlay) { // 播放中 if (innerAudioContextIsPlay) { // 播放中
innerAudioContext.stop() innerAudioContext.stop()