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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5.5 committed 2026-09-27 19:07:41 +00:00
1 parent 37a84e4cee
commit 92479d8a38
1 file changed
+6
+6
View File
@@ -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) => {