Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 33 additions & 23 deletions modules/amp-core/pages/17-low-latency.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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[]