diff --git a/frontend/src/components/PodView.tsx b/frontend/src/components/PodView.tsx index 586f074..191f8f9 100644 --- a/frontend/src/components/PodView.tsx +++ b/frontend/src/components/PodView.tsx @@ -87,11 +87,13 @@ export function PodView({ }; }, [room, me]); - // Stop the beat if we leave/unmount. + // Stop the beat and any active screen capture on leave/unmount. useEffect(() => { return () => { beatRef.current?.stop(); beatRef.current = null; + screenTrackRef.current?.stop(); + screenTrackRef.current = null; }; }, []);