From 9ef75a1745775274ba53d2c59cde52748c862164 Mon Sep 17 00:00:00 2001 From: Song367 <601337784@qq.com> Date: Tue, 12 Aug 2025 16:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=A6=E5=8F=91=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=BB=98=E8=AE=A4=E7=9A=84=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/minimaxi_stream.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/minimaxi_stream.js b/src/minimaxi_stream.js index f50f201..1bb70d2 100644 --- a/src/minimaxi_stream.js +++ b/src/minimaxi_stream.js @@ -88,13 +88,16 @@ async function processAudioQueue() { isProcessingQueue = false; // 等待当前音频播放完成后再切换回默认视频 - while (isPlaying) { - await new Promise(resolve => setTimeout(resolve, 100)); - } + // while (isPlaying) { + // console.log("触发音频等待") + // await new Promise(resolve => setTimeout(resolve, 1000)); + // } + // console.log("触发音频等待") + // await new Promise(resolve => setTimeout(resolve, 300)); const text = 'default' console.log("音频结束------------------------:", window.webrtcApp.currentVideoTag, isPlaying) - if (window.webrtcApp.currentVideoTag != text) { + if (window.webrtcApp.currentVideoTag != text && !isPlaying) { isFirstChunk = true window.webrtcApp.currentVideoTag = text window.webrtcApp.switchVideoStream(window.webrtcApp.defaultVideo, 'audio', text);