zebra-spaces: listener mute button doubles as audio-unlock gesture

Fox 2026-06-04, after pulling CLIENT_LOG from the proxy:

  stream for 25cc0aaf7eb0 autoplay blocked: ... — staying on live WebRTC
  autoplay blocked: ... — tap the tile to play

Firefox Android refuses .play() on every <audio> element created
after the entry-button gesture has aged out. Both the HTTP DJ stream
AND the WebRTC fallback were silently dead — the phone heard nothing.

Two-part fix:

 1. Every remoteAudio + streamAudio <audio> element is now created
    with muted=true. Muted autoplay has no gesture requirement on
    any browser — decoding starts the moment the src is set, the
    buffer fills, and audibility is gated entirely by a later
    user gesture.

 2. btn-mute is enabled for listeners (was disabled because there's
    no mic to mute) and re-purposed as the audio-unlock toggle. The
    click is the gesture. applyAudioMute() reads a per-uuid audio-
    Path map ('dj' | 'rtc') and unmutes only the canonical path for
    each peer so the WebRTC duplicate stays silenced while the DJ
    stream plays.

Also picked up while I was in here:
  - startStream onFail clears the pubHex from streamMode so the
    next auto-enrol pass retries.
  - stopStream sets audioPath='rtc' instead of poking remoteAudio
    directly.
This commit is contained in:
Russell Ballestrini 2026-06-03 20:57:09 -04:00
parent 24bfc81ac0
commit 334ee82d6b
No known key found for this signature in database
5 changed files with 101 additions and 61 deletions

View file

@ -507,9 +507,9 @@ handle /zebra-spaces-sfu* { reverse_proxy localhost:8092 { flush_interval -1
</p>
<footer style="max-width:820px;margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
<span style="color:#777">page integrity</span> &nbsp;·&nbsp; built <span class="stamp-date">2026-06-03</span><br>
md5 <span class="stamp-md5">24217bcab41f06970625faecdc0723e2</span><br>
sha256 <span class="stamp-sha">9dda09c0e6405bd71a611c12722235ba1188cd11679575763a3c67d708ff3cc5</span><br>
<span style="color:#777">page integrity</span> &nbsp;·&nbsp; built <span class="stamp-date">2026-06-04</span><br>
md5 <span class="stamp-md5">e4e8e782260db19486c05c042f4f1afc</span><br>
sha256 <span class="stamp-sha">0d6678f32e1c4dcc0dd3adcb052b4b0cc5dc86fb6f2dbc5c9c79775e3feb683e</span><br>
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify it against these hashes; point it at your own servers with ?signal= and ?turncred=</span>
</footer>