Part 14 · Applications

Worked case: live event with chat and replay

Learn to: budget live latency across capture, packaging, delivery and playback.

Prerequisites: 09-hlsjs, 10-dashjs

Live latency budget

A conceptual end-to-end budget. No universal millisecond target is claimed; real values depend on capture, encoding, packaging, delivery and playback.
A conceptual end-to-end budget. No universal millisecond target is claimed; real values depend on capture, encoding, packaging, delivery and playback. [S28] [S39] [S41]

On a narrow screen, swipe the diagram horizontally to keep its labels readable.

Scenario and choices synthesis

Proposed design: a broadcast event has many viewers, chat and a replay. Ingest from an encoder into a managed live service or a verified packaging pipeline; distribute HLS/DASH through a CDN. Use hls.js/Mux Player for the matching HLS path, or dash.js for the matching DASH path. Chat travels over a separate WebSocket service.

[S28] [S39]

Latency mechanism verified

Low-latency DASH uses promptly available CMAF chunks and playback/catchup controls. Live performance depends on packaging and delivery as well as player settings. A product latency target is a requirement to test, not a promise implied by a library name.

[S28]

Decision and trade-off synthesis

For broadcast reach and replay, segmented HTTP delivery is a useful baseline. If the core interaction is a real-time conversation, evaluate WebRTC’s different media/session infrastructure. Separate chat timestamps from video time; viewers may be at different live offsets.

[S28] [S41]

Failure → improvement synthesis

A player close to the live edge has less room for slow requests. Test network drops, encoder restarts, a paused viewer returning to live and DVR seeks. Add a clear Go Live control and record both live offset and stalls. Compare candidate latency settings on the same streams and devices.

[S28] [S39]
Keep this: Reducing player buffer alone cannot remove upstream live latency.
Check yourself: Does faster chat delivery make the video lower latency?

No. The two channels have separate delivery paths. Fast chat can arrive before the scene a buffered viewer is seeing.

Sources & further reading

  1. [S28] dash.js low latency

    DASH Industry Forum · official documentation · accessed 2026-10-10 · current docs

    Supports: CMAF chunks, latency targets, catchup and low-latency playback trade-offs.

    Read this page to inspect the API and assumptions behind the cited explanation.

  2. [S39] Start live streaming

    Mux · official documentation · accessed 2026-10-10

    Supports: Live ingest, playback IDs and latency modes.

    Read this page to inspect the API and assumptions behind the cited explanation.

  3. [S41] WebRTC API

    MDN · official documentation · accessed 2026-10-10

    Supports: Real-time peer media and communication; different infrastructure from segmented HTTP delivery.

    Read this page to inspect the API and assumptions behind the cited explanation.