Skip to main content

Latency and Choosing a Protocol

Match the delay your experience can tolerate to the delivery method that fits — the core trade-off is always latency against reach.

Latency is the delay between the moment something happens in front of the camera and the moment a viewer sees it. Lower latency feels more live, but the lowest-latency delivery cannot be cached by a CDN, so it does not scale to very large audiences. Choosing a protocol is choosing where you want to sit on that trade-off. This page names the tiers and maps each one to a use case; for a feature-by-feature comparison of the protocols themselves, see Streaming protocols.

The latency tiers

Native Frame plays a stream through one of several delivery drivers, each in a different latency tier:

TierDelivery driverTypical delayScales via CDNBest for
Real-timeWebRTCUnder 1 secondNoInteractive, two-way experiences: video calls, live auctions, betting, anything where a participant reacts in the moment
Low latencyMEOW (mp4ws)About 3 secondsNoNear-real-time playback on desktop browsers where WebRTC is not required
StandardHLS (native-hls, hls.js)About 6 secondsYesLarge one-to-many broadcasts where a few seconds of delay is acceptable

The HLS delay is a function of segment size: with 2-second segments and roughly three buffered before playback, the result is about 6 seconds. General-purpose HLS commonly runs 5–30 seconds depending on how it is tuned.

note

WebRTC and MEOW deliver over connections that cannot be served from a CDN, so neither scales to very large audiences. HLS is cached at the edge and scales to very large viewer counts, at the cost of higher latency.

How to choose

Work down the tiers from lowest latency and stop at the first one that meets your needs. When you request a player you provide an ordered list of drivers, and the player falls back through them; a sensible default order is WebRTC, then MEOW, then HLS. For large audiences, prefer HLS — it is far lighter on CPU and scales through the CDN.

Four questions settle the choice:

  1. How many viewers might one stream have? Large audiences point to HLS.
  2. What is the minimum latency you need? Two-way interaction needs WebRTC's sub-second tier.
  3. What devices are viewers on? MEOW does not work where Media Source Extensions are unavailable (for example, iOS and iPadOS).
  4. Which browsers are viewers using? Native HLS generally performs better than hls.js where it is supported.

Scale and the WebRTC participant limit

Because WebRTC cannot use a CDN, it is not the way to reach a mass audience. WebRTC calls are currently capped at 50 participants; to broadcast one-to-many beyond that, deliver the stream over HLS. Group and private calls also carry their own producer limits — see Tokens and scopes for the per-scope caps.

See also