LocalJam v2026.09.127
Live Deployment & App Access
- π Web App: https://varun.khaneja.org/LocalJam/
- π·οΈ Release Tag: v2026.09.127
- π¦ Repository Commit: 7b8c5d386c2c6a7775617836f6fef46631fc500e
Commit Details
Subject: player: implement passive event-driven radio stream resilience engine
Date: 2026-09-25 14:30:10 -0700
Commit Message
Replace synthetic polling watchdogs with a passive event-driven state machine adhering to docs/designs/radio-stream-resilience.md.
Bind to native waiting, playing, canplay, and error events on HTMLAudioElement. Arm a 20-second debounced dead-socket timer strictly on waiting during active playback, disarming immediately upon buffer recovery.
Implement exponential backoff reconnection (1s, 2s, 4s, 8s, 16s) with timestamped cache-busting (_lj_retry=) and max 5 attempts before error transition. Handle window online/offline events with 800ms debounce.
Guard asynchronous connection boundaries with monotonic playbackGeneration tokens, ensuring CORS-restricted stream failures cleanly fall back to direct radioAudio playback without token mismatch aborts.
Verified with unit tests in test/player/audio-engine.test.js.