zebra-report/web
Russell Ballestrini 8d861e94a6
zebra-spaces: clear DJ-stream state on leave + re-prime audio every entry
Two regressions where the phone went silent across a leave + re-enter
cycle, with no way to recover short of a hard refresh:

1. Leave handler tore down WebRTC + members + tiles but left:
   - streamMode (Set of streaming pubHexes)
   - streamAudio (uuid -> <audio>)
   - audioPath (uuid -> 'dj'|'rtc')
   - autoEnrolRetryTimer running

   On the next entry as listener, autoEnableDjModeForListener would
   skip every pubHex because streamMode.has(pubHex) was still true
   from the prior session → startStream never called → no HTTP /stream
   request → phone falls back to WebRTC and stays there even when the
   host's mic publish is live.

   Fix: stopAutoEnrolRetryLoop + autoDisableDjModeForAll + remove every
   stale streamAudio element from the DOM + clear all three maps as
   part of the leave click handler.

2. primeAudioOnGesture had an audioPrimed=true short-circuit that
   skipped the silent-WAV prime on re-entry. Mobile browsers can
   suspend the audio session on tab background / leave, so a one-shot
   prime doesn't carry across sessions. Drop the gate — every entry
   click re-primes. The primer element self-removes 500ms after
   play() resolves so we don't accumulate hidden <audio> elements.

Tests green (83 fsm + 16 zebra-spaces).
2026-06-03 21:12:51 -04:00
..
blog phase 1: unfirehose reconstruction from session JSONL ingest 2026-05-27 13:51:14 -04:00
fonts phase 2: gap analysis — cat>> append + binary asset recovery 2026-05-27 13:54:19 -04:00
chat.html zebra-spaces: listener mute button doubles as audio-unlock gesture 2026-06-03 20:57:09 -04:00
host-your-own.html zebra-spaces: listener mute button doubles as audio-unlock gesture 2026-06-03 20:57:09 -04:00
how-it-works.html zebra-spaces: listener mute button doubles as audio-unlock gesture 2026-06-03 20:57:09 -04:00
index.html web: bump mobile body padding from 1rem to 1.25rem so the right edge has visible breathing room 2026-05-31 14:13:25 -04:00
kernel.html web: bump mobile body padding from 1rem to 1.25rem so the right edge has visible breathing room 2026-05-31 14:13:25 -04:00
stamp.js web: stamp each zebra-report page with build date + md5/sha256 2026-05-28 17:50:12 -04:00
zebra-audio.html zebra-spaces: listener mute button doubles as audio-unlock gesture 2026-06-03 20:57:09 -04:00
zebra-spaces.html zebra-spaces: clear DJ-stream state on leave + re-prime audio every entry 2026-06-03 21:12:51 -04:00