fix: prevent overlapping speech synthesis playback

--bug=1058747 --user=刘瑞斌 【应用】应用开启语音播放自动播放,使用移动端提问后没有自动播放 https://www.tapd.cn/62980211/s/1731646
This commit is contained in:
CaptainB 2025-07-15 14:27:11 +08:00
parent 1b94f16e2a
commit 390faf2bf5

View File

@ -474,6 +474,9 @@ class AudioManage {
} }
// //
setTimeout(() => { setTimeout(() => {
if (speechSynthesis.speaking) {
return
}
speechSynthesis.speak(audioElement) speechSynthesis.speak(audioElement)
this.statusList[index] = AudioStatus.PLAY_INT this.statusList[index] = AudioStatus.PLAY_INT
}, 500) }, 500)