docs/doc/reference/com/google/android/exoplayer2/DefaultLivePlaybackSpeedControl.Builder.html
Package com.google.android.exoplayer2
Enclosing class:DefaultLivePlaybackSpeedControl
public static final classDefaultLivePlaybackSpeedControl.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Builder for a DefaultLivePlaybackSpeedControl.
Constructors | Constructor | Description |
| --- | --- |
| Builder() |
Creates a builder.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| DefaultLivePlaybackSpeedControl | build() |
Builds an instance.
|
| DefaultLivePlaybackSpeedControl.Builder | setFallbackMaxPlaybackSpeed(float fallbackMaxPlaybackSpeed) |
Sets the maximum playback speed that should be used if no maximum playback speed is defined by the media.
|
| DefaultLivePlaybackSpeedControl.Builder | setFallbackMinPlaybackSpeed(float fallbackMinPlaybackSpeed) |
Sets the minimum playback speed that should be used if no minimum playback speed is defined by the media.
|
| DefaultLivePlaybackSpeedControl.Builder | setMaxLiveOffsetErrorMsForUnitSpeed(long maxLiveOffsetErrorMsForUnitSpeed) |
Sets the maximum difference between the current live offset and the target live offset, in milliseconds, for which unit speed (1.0f) is used.
|
| DefaultLivePlaybackSpeedControl.Builder | setMinPossibleLiveOffsetSmoothingFactor(float minPossibleLiveOffsetSmoothingFactor) |
Sets the smoothing factor when smoothing the minimum possible live offset that can be achieved during playback.
|
| DefaultLivePlaybackSpeedControl.Builder | setMinUpdateIntervalMs(long minUpdateIntervalMs) |
Sets the minimum interval between playback speed changes, in milliseconds.
|
| DefaultLivePlaybackSpeedControl.Builder | setProportionalControlFactor(float proportionalControlFactor) |
Sets the proportional control factor used to adjust the playback speed.
|
| DefaultLivePlaybackSpeedControl.Builder | setTargetLiveOffsetIncrementOnRebufferMs(long targetLiveOffsetIncrementOnRebufferMs) |
Sets the increment applied to the target live offset each time the player is rebuffering, in milliseconds.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Builder()
Creates a builder.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setFallbackMinPlaybackSpeed(float fallbackMinPlaybackSpeed)
Sets the minimum playback speed that should be used if no minimum playback speed is defined by the media.
The default is DefaultLivePlaybackSpeedControl.DEFAULT_FALLBACK_MIN_PLAYBACK_SPEED.
Parameters:fallbackMinPlaybackSpeed - The fallback minimum factor by which playback can be sped up.Returns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setFallbackMaxPlaybackSpeed(float fallbackMaxPlaybackSpeed)
Sets the maximum playback speed that should be used if no maximum playback speed is defined by the media.
The default is DefaultLivePlaybackSpeedControl.DEFAULT_FALLBACK_MAX_PLAYBACK_SPEED.
Parameters:fallbackMaxPlaybackSpeed - The fallback maximum factor by which playback can be sped up.Returns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setMinUpdateIntervalMs(long minUpdateIntervalMs)
Sets the minimum interval between playback speed changes, in milliseconds.
The default is DefaultLivePlaybackSpeedControl.DEFAULT_MIN_UPDATE_INTERVAL_MS.
Parameters:minUpdateIntervalMs - The minimum interval between playback speed changes, in milliseconds.Returns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setProportionalControlFactor(float proportionalControlFactor)
Sets the proportional control factor used to adjust the playback speed.
The factor by which playback will be sped up is calculated as 1.0 + proportionalControlFactor x (currentLiveOffsetSec - targetLiveOffsetSec).
The default is DefaultLivePlaybackSpeedControl.DEFAULT_PROPORTIONAL_CONTROL_FACTOR.
Parameters:proportionalControlFactor - The proportional control factor used to adjust the playback speed.Returns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setMaxLiveOffsetErrorMsForUnitSpeed(long maxLiveOffsetErrorMsForUnitSpeed)
Sets the maximum difference between the current live offset and the target live offset, in milliseconds, for which unit speed (1.0f) is used.
The default is DefaultLivePlaybackSpeedControl.DEFAULT_MAX_LIVE_OFFSET_ERROR_MS_FOR_UNIT_SPEED.
Parameters:maxLiveOffsetErrorMsForUnitSpeed - The maximum live offset error for which unit speed is used, in milliseconds.Returns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setTargetLiveOffsetIncrementOnRebufferMs(long targetLiveOffsetIncrementOnRebufferMs)
Sets the increment applied to the target live offset each time the player is rebuffering, in milliseconds.
Parameters:targetLiveOffsetIncrementOnRebufferMs - The increment applied to the target live offset when the player is rebuffering, in millisecondsReturns:This builder, for convenience.
-
@CanIgnoreReturnValue
public[DefaultLivePlaybackSpeedControl.Builder](DefaultLivePlaybackSpeedControl.Builder.html "class in com.google.android.exoplayer2")setMinPossibleLiveOffsetSmoothingFactor(float minPossibleLiveOffsetSmoothingFactor)
Sets the smoothing factor when smoothing the minimum possible live offset that can be achieved during playback.
The live playback speed control keeps track of the minimum possible live offset achievable during playback to know whether it can reduce the current target live offset. The minimum possible live offset is defined as currentLiveOffset - bufferedDuration. As the minimum possible live offset is constantly changing, it is smoothed over recent samples by applying exponential smoothing: smoothedMinPossibleOffset = smoothingFactor x smoothedMinPossibleOffset + (1-smoothingFactor) x currentMinPossibleOffset.
Parameters:minPossibleLiveOffsetSmoothingFactor - The smoothing factor. Must be ≥ 0 and < 1.Returns:This builder, for convenience.
-
public[DefaultLivePlaybackSpeedControl](DefaultLivePlaybackSpeedControl.html "class in com.google.android.exoplayer2")build()
Builds an instance.