LowLatencyApi

LowLatencyApi

interface LowLatencyApi

Provides the means to configure low latency settings and to query the current low latency state. Accessible through Player.lowLatency.

The player will try to keep the latency as close as possible to the current target playback latency while avoiding stalls by changing the playback rate or timeshifting if too far as configured by catchupConfig and fallbackConfig.

There are three related latency values:

  • latency: the current live offset. The offset in seconds between the current position and the current real time
  • targetLatency: the configured, source-specific latency target. It is initialized from SourceLiveConfig.targetLatency or the media-defined target
  • getTargetPlaybackLatency: the effective target latency currently used by the player. The player compares latency to this value to decide whether catchup or fallback correction is needed. This value can differ from targetLatency, for example when playback is paused, when the user timeshifts away from the live edge, or when playback starts at an offset.

Properties

NameSummary
catchupConfigabstract var catchupConfig: LowLatencySynchronizationConfig?
The current LowLatencySynchronizationConfig for catchup or null if no catchup config is set or there is no active playback session.
fallbackConfigabstract var fallbackConfig: LowLatencySynchronizationConfig?
The current LowLatencySynchronizationConfig for fallback or null if no fallback config is set or there is no active playback session.
latencyabstract val latency: Double
The offset in seconds between the current position and the current real time, or -1 if the source is not a live stream or the offset to the current real time is not known.
producerReferenceTimeInfo@ExperimentalBitmovinApi
abstract val producerReferenceTimeInfo: ProducerReferenceTimeInfo?
Information about the producer reference time, based on the ProducerReferenceTime element in the DASH manifest, if available.
targetLatencyabstract var targetLatency: Double
The offset in seconds between the target playhead time and the real time, or window edge, if the offset to current real time is not known.

Functions

NameSummary
getTargetPlaybackLatency@ExperimentalBitmovinApi
abstract fun getTargetPlaybackLatency(callback: TargetPlaybackLatencyCallback)
Triggers a fetch of current target playback latency and provides the value via callback. See TargetPlaybackLatencyCallback for more information.