'commit'
This commit is contained in:
@@ -216,14 +216,9 @@ const WebSocketManager = {
|
||||
console.log('当前音频队列长度:', AudioState.playback.audioQueue.length);
|
||||
|
||||
// 显示播放界面 - 这是新增的代码
|
||||
UIController.toggleElement('audioPlayer', true);
|
||||
UIController.toggleElement('resultContainer', true);
|
||||
|
||||
// 如果尚未开始流式播放,则开始播放
|
||||
if (!AudioState.playback.isStreamPlaying) {
|
||||
console.log('开始流式播放音频');
|
||||
AudioState.playback.isStreamPlaying = true;
|
||||
AudioPlayer.processAudioQueue();
|
||||
}
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -417,6 +412,9 @@ const AudioPlayer = {
|
||||
|
||||
// 设置音频源并播放
|
||||
AudioState.playback.streamAudioElement.src = audioUrl;
|
||||
// 修改为
|
||||
UIController.toggleElement('audioPlayer', false);
|
||||
|
||||
AudioState.playback.streamAudioElement.play()
|
||||
.then(() => {
|
||||
console.log('开始播放音频块');
|
||||
|
Reference in New Issue
Block a user