diff --git a/modules/amp-core/pages/17-low-latency.adoc b/modules/amp-core/pages/17-low-latency.adoc index 6a1f28d..bf35b7d 100644 --- a/modules/amp-core/pages/17-low-latency.adoc +++ b/modules/amp-core/pages/17-low-latency.adoc @@ -55,6 +55,23 @@ hls: { The player enables low-latency playback through progressive fragment playback with HTTP chunked-based transfer. Additionally, AMP utilizes dash.js for low-latency live streams using MPEG-DASH. +[source,javascript] +---- +const config = { + autoplay: true, + autoplayPolicy: "muted", + media: { + src: "https://akamaibroadcasteruseast.akamaized.net/cmaf/live/657078/akasource/out.mpd" + }, + dash: { + lowLatencyMode: true, + liveDelay: 3 + } +} +---- + +Alternatively, the client can enable low-latency playback by adjusting the player's default configuration settings. + [source,javascript] ---- const config = { @@ -66,36 +83,29 @@ const config = { dash: { settings: { streaming: { - lowLatencyEnabled: true - } - } + delay: { + liveDelay: 3 + }, + liveCatchup: { + enabled: true, + maxDrift: 0, + playbackRate: { + min: -0.1, + max: 0.1 + } + } + } + } } } ---- -Both `liveDelay` and `playbackRate` values are adjustable to optimize performance and results. +Both `liveDelay` and `liveCatchup` values are adjustable to optimize performance and results. * `liveDelay`: The maximum permissible delay from the live edge, expressed in seconds. -* `playbackRate`: Playback speed percentage to catch up the live edge if the viewer falls behind. - +* `liveCatchup`: This setting in Dash.js helps the player maintain proximity to the live edge by effectively managing playback drift during live streaming. -[source,javascript] ----- -dash: { - settings: { - streaming: { - lowLatencyEnabled: true, - delay: { - liveDelay: 2 - }, - liveCatchup: { - playbackRate: 0.5 - } - } - } -} ----- -:last-revision: May/2024 +:last-revision: Jan/2025 include::ROOT:partial$amp-additional-info.adoc[]