From 92479d8a38ac881d0e1b47ec91fa1db9b6ba6ee8 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Sun, 27 Sep 2026 19:07:41 +0000 Subject: [PATCH] Web: end streams when their server tab is parked (A9) Viewer, publisher and streamInfos are global, so after a tab switch a running stream's signaling went to the new server's socket and stream infos showed up in the other tab under clids that name other people. Parking a tab now stops watching/publishing (still via the old socket) and clears the stream infos. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- web/src/App.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/App.tsx b/web/src/App.tsx index 11fa51f..5aa226f 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -7055,6 +7055,12 @@ function AppInner() { }); stopMic(); stopRecording(); + // Stream state is global, not per tab: left running, its signaling would + // go out on the next tab's socket and its clids would name other people. + handleStopWatchingStream(); + handleStopPublishing(); + setStreamInfos({}); + requestedStreamInfoRef.current.clear(); }; const switchToSession = (id: string) => {