fix: suppress redundant reconnect sounds and broadcasts during active voice

This commit is contained in:
Jannis Braun
2026-02-20 03:07:53 +01:00
parent 9fed8214c7
commit a8be2dd5da
2 changed files with 22 additions and 2 deletions
@@ -24,11 +24,14 @@ export function SoundController() {
const incomingCallLoop = useRef<AudioBufferSourceNode | null>(null);
const outgoingCallLoop = useRef<AudioBufferSourceNode | null>(null);
// WebSocket Reconnect Sound
// WebSocket Reconnect Sound — suppress during active voice (LiveKit handles its own reconnection)
useEffect(() => {
if (isInitialMount.current) return;
if (isWsConnected && !prevIsWsConnected.current) {
audioManager.playSound('reconnect');
const isInActiveVoice = useVoiceStore.getState().isLiveKitConnected;
if (!isInActiveVoice) {
audioManager.playSound('reconnect');
}
}
prevIsWsConnected.current = isWsConnected;
}, [isWsConnected, audioManager]);