diff --git a/web/zebra-spaces.html b/web/zebra-spaces.html index cef736f..d484a27 100644 --- a/web/zebra-spaces.html +++ b/web/zebra-spaces.html @@ -4124,16 +4124,17 @@ async function startStream(uuid, pubHex){ a = document.createElement('audio'); a.autoplay = true; a.controls = false; a.preload = 'auto'; a.playsInline = true; - /* start muted so autoplay is universally allowed (muted autoplay - * has no gesture requirement on any browser). applyAudioMute() - * unmutes the moment the user gesture lands (btn-mute click) AND - * this peer's canonical path is set to 'dj' by the 'playing' - * listener below. */ - a.muted = true; document.body.appendChild(a); streamAudio.set(uuid, a); await applySinkTo(a); } + /* Toggle click is itself a user gesture, so unmuted play is allowed + * without the muted-autoplay workaround. Older code muted-started and + * relied on applyAudioMute() to unmute later, but that hook is a + * no-op for non-listeners now — host/speaker self-monitor (and host + * DJ-mode on remote speakers) was playing silently. Unmute on every + * call so a reused element from a prior stop also re-monitors. */ + try { a.muted = false; } catch(_){} a.src = wantUrl; const onPlaying = () => { logLine('', 'stream on for '+pubHex.slice(0,12)+' — DJ mode (~2s delay, glitch-free)'); @@ -4940,8 +4941,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');