fix:修复测试页面音频重复播放问题

This commit is contained in:
CGD
2025-05-26 11:23:42 +08:00
parent 3f3f3fdaa6
commit 94c92c5f38
+5
View File
@@ -879,6 +879,7 @@
// 流已结束且没有更多数据
log("音频播放完成", 'info');
isAudioPlaying = false;
this.endOfStream = false;
streamingContext = null;
} else {
// 等待更多数据
@@ -1563,6 +1564,10 @@
const message = messageInput.value.trim();
if (message === '' || !websocket || websocket.readyState !== WebSocket.OPEN) return;
audioBufferQueue = [];
isAudioBuffering = false;
isAudioPlaying = false;
try {
// 直接发送listen消息,不需要重复发送hello
const listenMessage = {