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);