fix: bug
This commit is contained in:
@@ -91,6 +91,7 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
isPlaying.value = false
|
||||
emit('changePlay', '')
|
||||
}
|
||||
const voiceIsPlaying = ref(false)
|
||||
const playVoice = () =>{
|
||||
emit('changePlay', unref(dataInfo)?.id)
|
||||
|
||||
@@ -147,17 +148,20 @@ import { onUnload } from '@dcloudio/uni-app';
|
||||
talkVoiceObj.value.onPause(()=>{
|
||||
})
|
||||
talkVoiceObj.value.onPlay(()=>{
|
||||
voiceIsPlaying.value = true
|
||||
if(isTesting.value){
|
||||
talkVoiceObj.value.pause()
|
||||
isTesting.value = false
|
||||
isTesting.value = false
|
||||
}
|
||||
})
|
||||
talkVoiceObj.value.onEnded(()=>{
|
||||
emit('changePlay', '')
|
||||
talkVoiceObj.value.src = ''
|
||||
voiceIsPlaying.value = false
|
||||
})
|
||||
talkVoiceObj.value.onError(()=>{
|
||||
talkVoiceObj.value.src = ''
|
||||
voiceIsPlaying.value = false
|
||||
})
|
||||
}
|
||||
const isTesting= ref(false)
|
||||
|
||||
Reference in New Issue
Block a user