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
innerAudioContextIsPlay = false
innerAudioContext.onEnded(() => {
console.log('innerAudioContext.onEnded', _this.data.files.voice[0].url);
_this.setData({
innerAudioContextIsPlay: false
})
})
innerAudioContext.onError((errMsg, errCode) => {
console.log('innerAudioContext.onError', errMsg, errCode);
})
}
if (innerAudioContextIsPlay) { // 播放中
innerAudioContext.stop()