HTMLMediaElement latencyHint
- Category
- Multimedia
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- Start prototyping
WPT details: Expected, but not yet available.
Summary
The latencyHint attribute gives web authors influence over how much decoded output must be buffered for a user agent to begin playback or resume following a seek. The most obvious use cases would request lower latency. For certain applications, prioritizing smoothness over latency makes the wrong trade off. Examples include interactive video applications like cloud gaming and desktop streaming, where users must immediately see the effect of their inputs.
Motivation
In the other direction, some sites may prefer latency to be higher than the UA default. For example, the non-real-time video use-cases mentioned earlier (movies, tv, vlogging, ...) may choose values like 300 or 500 msec to reduce the chance of decoder stalls.
Standards & signals
- Specification: https://github.com/WICG/media-latency-hint/blob/master/explainer.md
- Firefox: Positive
- Safari: No signal
- Web developers: Strongly positive
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1018908
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=htmlmediaelement-latencyhint
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+HTMLMediaElement%20latencyHint
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=HTMLMediaElement%20latencyHint
- Baseline status: https://webstatus.dev/?q=HTMLMediaElement%20latencyHint
Explainers: https://github.com/WICG/media-latency-hint/blob/master/explainer.md