Class LatencyConfiguration
-
- All Implemented Interfaces:
public final class LatencyConfigurationThe latency configuration for managing the live offset of the player.
The player might change the latency configuration based on playback events like stalls.
The current latency configuration can be monitored at LatencyManager.currentLatencyConfiguration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classLatencyConfiguration.Builder
-
Field Summary
Fields Modifier and Type Field Description private final DoubletargetOffsetprivate final DoubleminimumOffsetprivate final DoublemaximumOffsetprivate final DoubleforceSeekOffsetprivate final DoubleminimumPlaybackRateprivate final DoublemaximumPlaybackRate
-
Method Summary
Modifier and Type Method Description final DoublegetTargetOffset()The live offset that the player will aim for. final DoublegetMinimumOffset()The start of the target live window. final DoublegetMaximumOffset()The end of the target live window. final DoublegetForceSeekOffset()The live offset at which the player will automatically trigger a live seek. final DoublegetMinimumPlaybackRate()Indicates the minimum playbackRate used to slow down the player. final DoublegetMaximumPlaybackRate()Indicates the maximum playbackRate used to speed up the player. final LatencyConfiguration.BuilderbuildUpon()Creates a new Builder, copying the initial values from this configuration. -
-
Method Detail
-
getTargetOffset
final Double getTargetOffset()
The live offset that the player will aim for. When correcting the offset by tuning the playbackRate, the player will stop correcting when it reaches this value.
This will override the TypedSource.liveOffset value.
-
getMinimumOffset
final Double getMinimumOffset()
The start of the target live window. If the live offset becomes smaller than this value, the player will slow down in order to increase the latency.
Default: 0.66 times the targetOffset.
-
getMaximumOffset
final Double getMaximumOffset()
The end of the target live window. If the live offset becomes higher than this value, the player will speed up in order to decrease the latency.
Default: Value 1.5 times the targetOffset.
-
getForceSeekOffset
final Double getForceSeekOffset()
The live offset at which the player will automatically trigger a live seek.
Default: Value 3 times the targetOffset.
-
getMinimumPlaybackRate
final Double getMinimumPlaybackRate()
Indicates the minimum playbackRate used to slow down the player.
Default: Value
0.92
-
getMaximumPlaybackRate
final Double getMaximumPlaybackRate()
Indicates the maximum playbackRate used to speed up the player.
Default: Value
1.08
-
buildUpon
final LatencyConfiguration.Builder buildUpon()
Creates a new Builder, copying the initial values from this configuration.
-
-
-
-