zebra-report: deploy self-listener-mode include-self fix

This commit is contained in:
russell@unturf.com 2026-06-04 10:33:32 -04:00
parent d9e8041a37
commit 5fc18d2423
No known key found for this signature in database

View file

@ -4245,19 +4245,28 @@ async function enableSelfListenerMode(){
try { sendMicState(); } catch(_){}
}
let added = 0;
/* INCLUDE self in the enrolment — listeners hear every speaker
* (including us), so the canonical "what listeners hear" experience
* pulls our own /stream too. Mic is already muted, so the loopback
* doesn't create feedback; the user gets full broadcast monitoring,
* AND a solo-host alone with listeners still has something to play. */
for (const [uuid, mm] of members){
if (uuid === myUUID || !canSpeak(mm.role) || !mm.pubkey) continue;
if (!canSpeak(mm.role) || !mm.pubkey) continue;
let pubHex;
try { pubHex = hex(unb64(mm.pubkey)); } catch(_){ continue; }
if (streamMode.has(pubHex)) continue;
streamMode.add(pubHex);
startStream(uuid, pubHex);
/* mute the matched WebRTC remote so we don't hear both paths.
* Self has no remoteAudio entry (we never subscribe to ourselves
* via SFU — see the self-echo skip in handleRemoteSfuTrack), so
* this is a no-op for the self row. */
const w = remoteAudio.get(uuid);
if (w) try { w.muted = true; } catch(_){}
added++;
}
renderRoom();
logLine('', 'self-listener ON — '+added+' peers on buffered HTTP path, mic muted');
logLine('', 'self-listener ON — '+added+' peers on buffered HTTP path (incl. self), mic muted');
}
function disableSelfListenerMode(){
if (!selfListenerMode) return;
@ -5042,8 +5051,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');
<footer style="margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> &nbsp;·&nbsp; built <span class="stamp-date">2026-06-04</span><br>
md5 <span class="stamp-md5">398d9aaa80adc3b9c5b1b7320f095834</span><br>
sha256 <span class="stamp-sha">151bbeb161be4bffaf10bf71249fe5ba6fd1d4bc22b2c948dbbdb540574b6bf7</span><br>
md5 <span class="stamp-md5">0136a83ef341ade811b60cfc6466d357</span><br>
sha256 <span class="stamp-sha">0ab8c94acd78b1950385cd1abd93aa9bc7f3614dc08b3feddaa6dd9a8b7a746e</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 against these hashes; point at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
</footer>