zebra-spaces: log every screen/camera/game ontrack with state — diagnostic

Listener reports seeing host's screen-share but NOT camera-share on
rejoin. SFU log shows both pubs alive + addPubToSub fires for the
new sub, but the listener-side visible result diverges between
screen and camera. Add a log line that captures everything we know
when each video-kind track lands:

  sfu ontrack: kind=camera pub=abc12345
                track=video mute=true state=live

Fields:
- kind: which routing branch we took
- pub: short pubHex prefix
- track.kind: should be 'video' for screen/camera/game
- track.muted: initial mute state (true is normal pre-RTP)
- track.readyState: 'live' = good, anything else = bad

Fox can paste the lines so we can see whether (a) the camera
ontrack never fires (SFU subscribe SDP is dropping it), (b) it
fires with track.muted=true and stays that way (no RTP arriving),
or (c) it fires healthy and gets pruned by some downstream bug.
This commit is contained in:
Russell Ballestrini 2026-06-02 12:46:41 -04:00
parent f9026bf623
commit bc7bbbfc7b
No known key found for this signature in database

View file

@ -2150,6 +2150,10 @@ async function sfuSubscribe(){
}
} catch(_){}
}
if (kind === 'screen' || kind === 'camera' || kind === 'game'){
logLine('', 'sfu ontrack: kind=' + kind + ' pub=' + shortHex(pubHex) +
' track=' + ev.track.kind + ' mute=' + ev.track.muted + ' state=' + ev.track.readyState);
}
if (kind === 'screen'){
screenStreams.set(pubHex, ev.streams[0]);
renderScreenTile(pubHex, ev.streams[0]);
@ -3505,8 +3509,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-02</span><br>
md5 <span class="stamp-md5">d172a155506552a507a4a388667ed5eb</span><br>
sha256 <span class="stamp-sha">79e1fef971301f0514b4a0acda58e8526d8dfb0958d5aa1ce05bb07b1e7e787d</span><br>
md5 <span class="stamp-md5">8c1238b1dd72f2c72d3b3cae9cff676a</span><br>
sha256 <span class="stamp-sha">d900d6562ff205260f2a495858882abc1b66078ecb329d3e9b70be95100c329c</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>