From 720d02daee07bab93307dbb22839adc6c9430954 Mon Sep 17 00:00:00 2001 From: Maverick Chacon <114691334+mchacong@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:27:51 -0600 Subject: [PATCH 1/2] Update 17-low-latency.adoc --- modules/amp-core/pages/17-low-latency.adoc | 56 +++++++++++++--------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/modules/amp-core/pages/17-low-latency.adoc b/modules/amp-core/pages/17-low-latency.adoc index 6a1f28d..3d0eed4 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 stay close to the live edge by 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[] From 9ef6346dfd6c2ef82f2ec11fe4761c39be1922ee Mon Sep 17 00:00:00 2001 From: Maverick Chacon <114691334+mchacong@users.noreply.github.com> Date: Fri, 17 Jan 2025 07:58:15 -0600 Subject: [PATCH 2/2] Update 17-low-latency.adoc --- modules/amp-core/pages/17-low-latency.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/amp-core/pages/17-low-latency.adoc b/modules/amp-core/pages/17-low-latency.adoc index 3d0eed4..bf35b7d 100644 --- a/modules/amp-core/pages/17-low-latency.adoc +++ b/modules/amp-core/pages/17-low-latency.adoc @@ -104,7 +104,7 @@ Both `liveDelay` and `liveCatchup` values are adjustable to optimize performance * `liveDelay`: The maximum permissible delay from the live edge, expressed in seconds. -* `liveCatchup`: This setting in Dash.js helps the player stay close to the live edge by managing playback drift during live streaming. +* `liveCatchup`: This setting in Dash.js helps the player maintain proximity to the live edge by effectively managing playback drift during live streaming. :last-revision: Jan/2025