From cef405c204fcbfe5bc78c0ca9702beb785a08b64 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Wed, 3 Jun 2026 22:04:10 -0400 Subject: [PATCH] =?UTF-8?q?zebra-report:=20drop=20play=20button=20for=20li?= =?UTF-8?q?steners=20=E2=80=94=20autoplay=20WebRTC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirror of zebra-report 9eb5b82. --- zebra-report/zebra-spaces.html | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/zebra-report/zebra-spaces.html b/zebra-report/zebra-spaces.html index 8bdd112..e955888 100644 --- a/zebra-report/zebra-spaces.html +++ b/zebra-report/zebra-spaces.html @@ -3843,18 +3843,9 @@ function updateScreenShareUI(){ function updateRoleUI(){ $('sec-listener-actions').classList.toggle('hidden', myRole !== 'listener'); updateScreenShareUI(); - /* Listener mute-button repurposed as the audio-unlock gesture + - * local output toggle. Enabled regardless of micStream so a - * listener can tap it to provide the user gesture mobile browsers - * demand before unmuted audio is allowed. Speakers/cohosts/host - * still get the original self-mic-mute behavior (enabled by - * ensureMicAndUI once the mic is live). */ - const btn = $('btn-mute'); - if (myRole === 'listener'){ - btn.disabled = false; - btn.textContent = listenerOutputMuted ? 'play' : 'mute'; - btn.className = listenerOutputMuted ? '' : 'invert'; - } + /* Listeners have no mic — mute button stays disabled. WebRTC + * playback is autoplayed by attachSfuTrack the same way speakers + * get their inbound mesh/SFU audio; no second-gesture button. */ } /* ================================================================== @@ -4635,21 +4626,6 @@ function applyMuteState(){ if (mm){ mm.muted = muted; renderRoom(); } } $('btn-mute').addEventListener('click', () => { - /* Listener path: this click is the user gesture mobile browsers - * demand before unmuted audio is allowed. attachSfuTrack already - * called play() for every WebRTC audio element on attach — that - * call may have silently been rejected (Firefox Android ages out - * the entry-button gesture grace fast). Re-fire play() on each - * existing element inside THIS gesture; one of these tries is - * the one that actually unblocks the speaker output. */ - if (myRole === 'listener'){ - listenerOutputMuted = !listenerOutputMuted; - activateListenerAudio(); - const btn = $('btn-mute'); - btn.textContent = listenerOutputMuted ? 'play' : 'mute'; - btn.className = listenerOutputMuted ? '' : 'invert'; - return; - } if (!micStream) return; muted = !muted; try { sessionStorage.setItem(MUTE_STATE_KEY, muted ? '1' : '0'); } catch(_){} @@ -4904,8 +4880,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');