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