add back restart

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2025-07-03 15:28:31 +02:00
parent 909f3955f8
commit ff4903faf0

View File

@@ -323,7 +323,13 @@ export function useLivekit(
logger.error("Failed to sync video mute state with LiveKit", e); logger.error("Failed to sync video mute state with LiveKit", e);
}); });
} }
}, [room, muteStates, connectionState]); }, [
room,
muteStates,
connectionState,
devices.audioInput.selected$,
devices.videoInput.selected$,
]);
useEffect(() => { useEffect(() => {
// Sync the requested devices with LiveKit's devices // Sync the requested devices with LiveKit's devices
@@ -369,9 +375,9 @@ export function useLivekit(
devices.audioInput.selected$ devices.audioInput.selected$
.pipe(switchMap((device) => device?.hardwareDeviceChange$ ?? NEVER)) .pipe(switchMap((device) => device?.hardwareDeviceChange$ ?? NEVER))
.subscribe(() => { .subscribe(() => {
if (platform === "ios") { // if (platform === "ios") {
return; // return;
} // }
const activeMicTrack = Array.from( const activeMicTrack = Array.from(
room.localParticipant.audioTrackPublications.values(), room.localParticipant.audioTrackPublications.values(),
).find((d) => d.source === Track.Source.Microphone)?.track; ).find((d) => d.source === Track.Source.Microphone)?.track;