Lid-close / suspend recovery. When the OS suspends the browser, the SFU sub PC goes 'disconnected' → 'failed' (or just stops carrying RTP silently). On resume the old PC is dead but JS still holds a reference to it, so we get frozen remote screens until the host hard-reboots. Two recovery paths added: 1. pc.onconnectionstatechange — on 'failed' or 'closed' for the active sub PC, sfuUnsubscribe() then sfuSubscribe() to rebuild. The wantConnected guard prevents fighting a deliberate leave. 2. document visibilitychange → 'visible' — Chromium on Linux can silently keep the PC in 'connected' state through a suspend cycle without firing connectionstatechange. So we also probe on tab/lid wake: if the sub PC's connectionState is anything other than 'connected'/'new'/'connecting', force the rebuild. Both paths converge on the same teardown + re-subscribe so the SFU sends a fresh initial SDP with every current publisher's tracks. 83 FSM tests still green; this is runtime-only and doesn't affect the pure state machines yet. |
||
|---|---|---|
| .. | ||
| blog | ||
| fonts | ||
| chat.html | ||
| host-your-own.html | ||
| how-it-works.html | ||
| index.html | ||
| kernel.html | ||
| stamp.js | ||
| zebra-audio.html | ||
| zebra-spaces.html | ||