From abcbdc3568c9aac66b0d1d50ed8bc07280d5d9bd Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Tue, 2 Jun 2026 09:52:31 -0400 Subject: [PATCH] zebra-spaces: auto-rejoin call after hard refresh + camera silent resume + screen resume prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sessionStorage (per-tab, not localStorage — tabs A and B can sit in different spaces and don't fight over a shared slot) carries three keys across a reload: zebra-spaces-active-call-v1 rendezvous code of the active space zebra-spaces-active-cam-v1 '1' if camera was publishing zebra-spaces-active-screen-v1 '1' if screen was publishing Flow: - joinSpace welcome handler writes the code; on leave / boot / role demotion the keys are cleared - on init, after identity restore + URL ?code= handling, autoRejoin() checks sessionStorage. If a code is saved and we have a handle, it populates the rdv-code field and triggers joinSpace(). URL ?code= takes priority (a fresh share-URL navigation overrides). - after welcome lands, if cam flag is set, sfuPublishCamera() runs silently — browsers usually remember per-origin getUserMedia perms. On failure the flag self-clears. - screen cannot be silently resumed (getDisplayMedia requires a fresh user gesture every call — security). A 'resume screen share' button surfaces in the share section instead; clicking it counts as the gesture and re-shares. Multi-tab safe because sessionStorage doesn't bleed across tabs. --- web/zebra-spaces.html | 104 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/web/zebra-spaces.html b/web/zebra-spaces.html index 14822d7..a571b57 100644 --- a/web/zebra-spaces.html +++ b/web/zebra-spaces.html @@ -579,6 +579,10 @@ try {