You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS Watch: Configuring a buffer of more than 0 causes audio sync and play issue #8031
I had a wrong configuration of the buffer aswell as latency which is what the demo only sets. And found it was causing issues with audio sync and playback issues. It won't play or audio is cutting out like it used to before with console warning logs about the audio codec.
So the buffer needs to stay unset as zero and latency changed to 0-500ms. Anything more than 500 I believe causes lipsync issues. I was hoping to create a buffer config option but that causes the error.
const watch = document.createElement("moq-watch") as MoqWatch;
watch.name = name;
watch.echo = `${VIEWER}-${++tileCount}`;
watch.muted = true; // unmuted only while active (see below)
watch.buffer = Milli(500);
#6609 - fix(watch): gate buffered playback on the shared startup floor [merged] #7941 - feat(watch): per-track timelines on the shared Sync clock [closed] #6484 - fix(watch): keep audio above a fixed decoded floor encoded [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Thanks for the report. Short version: buffer isn't a jitter buffer, and on a live stream it should stay at 0.
buffer is a lookahead for media produced faster than real time, such as a TTS reply written in one burst. With a nonzero buffer, the audio ring plays through everything it holds and turns off its catch-up. Any lag it picks up on a live stream (a stall, an "auto" delay rise, publisher clock drift) is therefore permanent: audio drifts behind video, and once it trails by more than delay + buffer, the consumer drops whole audio groups. Those drops are the skipping slow groups: track=2.aac warnings and the cut-outs. The skipping covered group line is a harmless video skip.
Workaround now: leave buffer unset and put the slack in delay, either a fixed value like watch.delay = Milli(500) or "auto" (the default), which sizes it from measured arrival jitter. I couldn't reproduce lip-sync problems from delay above 500 ms in a simulation (300, 800 and 1500 ms all held about 20 ms). If you still see that with buffer at 0, please share the setup.
Decisions:
Buffered audio will converge back onto the shared clock by time-stretching (playing slightly faster), never skipping. Lip sync then returns after a stall, and TTS keeps every word. Tracked by quest/m1/audio-jitter-target/buffered-converge.md; that quest's PR closes this issue.
buffer will be renamed lookahead in the next breaking release so the name stops suggesting a jitter buffer: quest/m2/watch-lookahead.md.
Planned in moq-dev/moq#8034. Anyone who wants to donate tokens can pick one up with /quest-start quest/m1/audio-jitter-target/buffered-converge or /quest-start quest/m2/watch-lookahead. The first waits on the jitter epic's Watch quest, which lands the time stretch it reuses.
Activity
coderabbitai commentedon Nov 6, 2026
🔗 Related PRs
#6609 - fix(watch): gate buffered playback on the shared startup floor [merged]
#7941 - feat(watch): per-track timelines on the shared Sync clock [closed]
#6484 - fix(watch): keep audio above a fixed decoded floor encoded [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
kixelated commentedon Nov 6, 2026
Thanks for the report. Short version:
bufferisn't a jitter buffer, and on a live stream it should stay at 0.bufferis a lookahead for media produced faster than real time, such as a TTS reply written in one burst. With a nonzerobuffer, the audio ring plays through everything it holds and turns off its catch-up. Any lag it picks up on a live stream (a stall, an"auto"delay rise, publisher clock drift) is therefore permanent: audio drifts behind video, and once it trails by more thandelay + buffer, the consumer drops whole audio groups. Those drops are theskipping slow groups: track=2.aacwarnings and the cut-outs. Theskipping covered groupline is a harmless video skip.Workaround now: leave
bufferunset and put the slack indelay, either a fixed value likewatch.delay = Milli(500)or"auto"(the default), which sizes it from measured arrival jitter. I couldn't reproduce lip-sync problems fromdelayabove 500 ms in a simulation (300, 800 and 1500 ms all held about 20 ms). If you still see that withbufferat 0, please share the setup.Decisions:
quest/m1/audio-jitter-target/buffered-converge.md; that quest's PR closes this issue.bufferwill be renamedlookaheadin the next breaking release so the name stops suggesting a jitter buffer:quest/m2/watch-lookahead.md.Planned in moq-dev/moq#8034. Anyone who wants to donate tokens can pick one up with
/quest-start quest/m1/audio-jitter-target/buffered-convergeor/quest-start quest/m2/watch-lookahead. The first waits on the jitter epic's Watch quest, which lands the time stretch it reuses.(Written by Claude Opus 5.5)
fix(watch): buffered audio time-stretches back onto the shared clock
feat(audio): join on the clock, re-measure the replays, finish the quest