diff --git a/zebra-report/zebra-spaces.html b/zebra-report/zebra-spaces.html index 5f2f5c7..4e650b0 100644 --- a/zebra-report/zebra-spaces.html +++ b/zebra-report/zebra-spaces.html @@ -733,6 +733,20 @@ async function sfuPublishScreen(){ }); } catch(e){ logLine('err','screen share cancelled: '+e.message); return; } sfuScreenStream = stream; + const vTracks = stream.getVideoTracks(), aTracks = stream.getAudioTracks(); + logLine('', 'screen capture: '+vTracks.length+' video + '+aTracks.length+' audio track(s)'); + if (aTracks.length === 0){ + /* Firefox getDisplayMedia never captures tab/window audio — only the + * 'entire screen' source carries system audio, and only on some + * platforms. Chrome captures tab audio when the user ticks 'share + * audio' in the picker. Make the limitation visible instead of + * silently broadcasting video-only. */ + const ua = navigator.userAgent; + const ff = /Firefox/.test(ua); + logLine('err','no audio captured — '+(ff + ? 'Firefox getDisplayMedia ignores tab/window audio. Share "entire screen" with system audio, or stream the audio via mic music mode (toggle music mode + route the tab through your mic).' + : 'tick the "share tab/system audio" checkbox in the picker, or use music-mode mic.')); + } const pc = new RTCPeerConnection(rtcConfig); for (const tr of stream.getTracks()){ if (tr.kind === 'video') tr.contentHint = 'detail'; /* favour pixel fidelity over framerate */ @@ -1693,8 +1707,8 @@ logLine('', 'ready — pick a handle, type a rendezvous code, enter the space');