Ensure voice mute/deafen status persists across disconnects and re-joins

This commit is contained in:
Jannis Braun
2026-02-19 18:02:00 +01:00
parent 5fae725675
commit 6deed231ab
4 changed files with 153 additions and 135 deletions
+2 -2
View File
@@ -222,7 +222,7 @@ export function useLiveKit() {
}
} catch (err) { if (gen === _connectGeneration) setConnectionError('Failed to connect'); }
finally { if (gen === _connectGeneration) setIsConnecting(false); }
}, [updateParticipants, handleDataReceived]);
}, [updateParticipants, handleDataReceived, isMuted, isDeafened]);
const connectDm = useCallback(async (dmChannelId: string) => {
const gen = ++_connectGeneration;
@@ -267,7 +267,7 @@ export function useLiveKit() {
}
} catch (err) { if (gen === _connectGeneration) setConnectionError('Failed to connect'); }
finally { if (gen === _connectGeneration) setIsConnecting(false); }
}, [updateParticipants, handleDataReceived]);
}, [updateParticipants, handleDataReceived, isMuted, isDeafened]);
const disconnect = useCallback(async () => {
_connectGeneration++;