From 4d48df96e4df71ea96433ff71da06761e46bba08 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 4 Jun 2026 15:58:59 -0400 Subject: [PATCH] =?UTF-8?q?zebra-spaces:=20role-aware=20playout=20delay=20?= =?UTF-8?q?everywhere=20=E2=80=94=20speaker=200.5s,=20listener=204s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conversation latency for speakers / cohosts / hosts; lean-back cushion for listeners. Every receiver type updated together so audio + video stay in sync (the existing memory rule: video must match audio's playout delay). Changes: 1. SPEAKER_PLAYOUT_DELAY_SEC = 0.5; playoutDelayForRole(role) — listener gets 4s, all others get 0.5s. 2. attachListenerStreamViaAudioContext → attachAudioStreamViaWorklet (generalized). Listener wrapper just calls into it with 4s + the Media Session hook. Every role now routes SFU mic audio through the AudioWorklet + per-role buffer — so a speaker hearing high-bitrate stereo Opus music STILL gets a 0.5s cushion that Firefox's native jitter buffer would have ignored. 3. attachSfuTrack: speakers / cohosts / hosts route through the worklet path with 0.5s buffer;