Skip to content

Commit 21c8f6f

Browse files
committed
fix: add self check to resume speech synthesis in ChatOperationButton
--bug=1058777 --user=刘瑞斌 【应用】开启语音自动播放,浏览器播放,暂停第一次对话的播放后,进行第二次对话,自动播放会先继续播放上一次对话 https://www.tapd.cn/62980211/s/1731474
1 parent 95263d1 commit 21c8f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class AudioManage {
464464
this.statusList[index] = AudioStatus.ERROR
465465
}
466466
} else {
467-
if (window.speechSynthesis.paused) {
467+
if (window.speechSynthesis.paused && self) {
468468
window.speechSynthesis.resume()
469469
this.statusList[index] = AudioStatus.PLAY_INT
470470
} else {

0 commit comments

Comments
 (0)