mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-13 22:03:13 -06:00
/player v4 — client-only (served web player). Brings the browser player onto the locked v4 liveness contract, IDENTICAL on the wire to the now-v4 APK and .wgt: - v4 liveness watchdog: consume device:heartbeat-ack, lastServerMessageAt refreshes on ANY inbound (onAny + engine ping) while ARMING gates on the ack (degrade-safe); 45s±10s jittered threshold; backoff 1s/30s/±0.2 on the socket.io Manager; NO status/health poll; teardown-before-reopen (#148). - Browser-specific half-open triggers (the /player-unique part): Page Visibility, sleep/resume (pageshow/bfcache), network change (online) — all drive the SAME #148 teardown-first reconnect. - THROTTLE-AWARE: silence computed by timestamp (not timer-fire-count); watchdog does NOT act while the tab is HIDDEN (throttled-timer gap is expected); on becoming visible, verifyLivenessSoon() resets the grace and reconnects ONLY if genuinely dead — never spuriously tears down a live socket. - v4 client identity block on register (client_type=player / client_version / platform / v4). Verified: arm-after-ack both directions, v4 values MATCH .wgt exactly, browser-trigger no-duplicate- socket, throttle-aware reproduce-then-prove (real extracted checkLiveness/verifyLivenessSoon), foreground-recovery one-socket. Depends on the server device:heartbeat-ack (core pass) — degrade-safe until then. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| debug-overlay.js | ||
| index.html | ||
| sw.js | ||