From 441c08631abead6534368778418cd6b98f486e61 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Wed, 3 Jun 2026 12:57:28 -0400 Subject: [PATCH] zebra-spaces: log mesh-vs-SFU mic decision so telemetry shows the branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two new logLine calls in the SFU mic ontrack handler: - 'sfu mic skipped for — mesh peer connected' when the mesh is serving (expected silence) - 'sfu mic taking over for — mesh state=' 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. --- web/zebra-spaces.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/web/zebra-spaces.html b/web/zebra-spaces.html index 231fd54..902638d 100644 --- a/web/zebra-spaces.html +++ b/web/zebra-spaces.html @@ -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');