zebra-spaces: log mesh-vs-SFU mic decision so telemetry shows the branch

Two new logLine calls in the SFU mic ontrack handler:
- 'sfu mic skipped for <uuid> — mesh peer connected' when the mesh is
  serving (expected silence)
- 'sfu mic taking over for <uuid> — mesh state=<failed|disconnected|
  closed|...>' when SFU stream attaches over a dying mesh PC

Makes the 'why don't I hear them' question one grep away in CLIENT_LOG
next time the cascade happens.
This commit is contained in:
Russell Ballestrini 2026-06-03 12:57:28 -04:00
parent 2f1e4813d2
commit 441c08631a
No known key found for this signature in database

View file

@ -2540,7 +2540,14 @@ function handleRemoteSfuTrack(ev){
* audio at all. */
if (canSpeak(myRole)){
const meshPC = peers.get(uuid);
if (meshPC && meshPC.connectionState === 'connected') return;
const meshState = meshPC ? meshPC.connectionState : 'none';
if (meshPC && meshState === 'connected'){
logLine('', 'sfu mic skipped for '+uuid+' — mesh peer connected');
return;
}
if (meshPC){
logLine('', 'sfu mic taking over for '+uuid+' — mesh state='+meshState);
}
}
attachSfuTrack(uuid, ev.streams[0]);
return;
@ -4022,8 +4029,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-03</span><br>
md5 <span class="stamp-md5">795a19a2ea9d79153d00ac83d499e0df</span><br>
sha256 <span class="stamp-sha">964a8260ab1c11958c6112dbcba47f9dc8e1056214e8ebb7fa6eaca92455075c</span><br>
md5 <span class="stamp-md5">7873563955c603f22be1ccbb9fb2885a</span><br>
sha256 <span class="stamp-sha">d7c50a97445363af36e67d20f719e14ec5b399d3070cc6939eaf5fde3e8ee9fc</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>