Don't lie about the type of the video track

This commit is contained in:
Robin
2025-04-28 16:01:34 +02:00
parent cd9035b5fc
commit 7d0117903e

View File

@@ -156,10 +156,12 @@ export const LobbyView: FC<Props> = ({
const tracks = usePreviewTracks(localTrackOptions, onError);
const videoTrack = useMemo(() => {
const track = tracks?.find((t) => t.kind === Track.Kind.Video);
return track as LocalVideoTrack | null;
}, [tracks]);
const videoTrack = useMemo(
() =>
(tracks?.find((t) => t.kind === Track.Kind.Video) ??
null) as LocalVideoTrack | null,
[tracks],
);
useTrackProcessorSync(videoTrack);
const showSwitchCamera = useShowSwitchCamera(
useObservable(