Also fix camera reloading in widget mode

This commit is contained in:
Timo
2025-06-23 12:27:35 +02:00
committed by Robin
parent 73ccb38c11
commit e47a743f1e
2 changed files with 13 additions and 0 deletions

View File

@@ -184,6 +184,16 @@ export const LobbyView: FC<Props> = ({
null) as LocalVideoTrack | null,
[tracks],
);
useEffect(() => {
if (videoTrack && videoInputId === undefined) {
// If we have a video track but no videoInputId,
// we have to update the available devices. So that we select the first
// available video input device as the default instead of the `""` id.
devices.requestDeviceNames();
}
}, [devices, videoInputId, videoTrack]);
useTrackProcessorSync(videoTrack);
const showSwitchCamera = useShowSwitchCamera(
useObservable(