fix(audio): cleanly fall back from WebRTC

This commit is contained in:
illusia committed 2026-09-03 01:29:34 +08:00
1 parent a4cf5b5359
commit 40ea30b9e2
2 files changed
+16

No files matched your search

+1
View File
@@ -538,6 +538,7 @@ export function useVoiceWebSocket() {
if (sequence !== connectionSequence || webrtcFallbackStarted) return;
webrtcFallbackStarted = true;
webrtcActive.value = false;
if (socket.readyState === WebSocket.OPEN) socket.send(JSON.stringify({ type: "webrtcStop" }));
stopWebRtcTransport();
if (socket.readyState === WebSocket.OPEN && state.connected) {
try { await startMicrophone(); } catch (error: unknown) {