diff --git a/web/zebra-spaces.html b/web/zebra-spaces.html index 3f21c53..eeff56f 100644 --- a/web/zebra-spaces.html +++ b/web/zebra-spaces.html @@ -1609,23 +1609,30 @@ function flushSfuStreams(){ * isn't producing RTP — we cancel the removal. * * Window depends on the kind of content (caller passes via windowMs): - * - 15s for cameras: face/motion content keeps RTP flowing - * continuously, so a 15s gap is meaningful. Generous enough to - * weather Wi-Fi stalls and mobile network handoffs. - * - 120s for screen / gameshare: STATIC content (a still desktop, a + * - 60s for cameras: face/motion content keeps RTP flowing most of + * the time, but Firefox Android + cellular handoffs can stall a + * decoded video element on jittery paths well past 15s without + * the publisher being gone. 60s is comfortably above the typical + * NACK + transport-cc recovery window; matches Pion's ICE + * failure timeout, so if the path is genuinely broken the SFU + * fires renegotiation + 'ended' before this anyway. + * - 120s for screen / gameshare: STATIC content (still desktop, a * paused video, a code editor with no caret motion) doesn't push * new RTP for long stretches. The encoder genuinely stops emitting - * packets, the receiver's track goes muted, and the 15s window - * would falsely reap a live tile. 120s lets a static screen - * survive comfortably; a real unshare still resolves through the - * 'ended' path within a frame. + * packets; 120s lets a static screen survive comfortably. + * + * Genuine unshares always resolve through the 'ended' path (within a + * frame of the SFU's removePubFromSub), so these windows only matter + * for slow-failure scenarios (PC dies silently, SSE renegotiation + * dropped, etc.). * * Window history: * - 3s (all kinds): killed live tiles on any transient mute. - * - 15s (all kinds): cameras ok, but static screens vanished after - * 15s of no motion. - * - 15s camera / 120s screen+game (current). */ -const VIDEO_REMOVE_MUTE_WINDOW_MS = 15000; + * - 15s (all kinds): cameras ok on desktop, static screens vanished. + * - 15s camera / 120s screen+game: cameras OK on desktop, phone on + * cellular still occasionally reaped live faces during jitter. + * - 60s camera / 120s screen+game (current). */ +const VIDEO_REMOVE_MUTE_WINDOW_MS = 60000; const VIDEO_REMOVE_MUTE_WINDOW_SCREEN_MS = 120000; function watchVideoTrackForRemoval(track, removeFn, windowMs){ if (!track) return; @@ -3854,8 +3861,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');