From 549895292c9bec791e1fa13dd6591d01080c8b20 Mon Sep 17 00:00:00 2001 From: Ramis Date: Sat, 27 Jun 2026 17:34:37 -0700 Subject: [PATCH] fix(frontend): stop screen MediaStreamTrack on PodView unmount room.disconnect() removes the participant from LiveKit but doesn't stop the underlying OS capture. Without track.stop() the screen share indicator keeps running after Leave. beatRef already had cleanup; add the same for screenTrackRef. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01AaCFWMkYQmTcuPsxaaACft --- frontend/src/components/PodView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }; }, []);