Package com.castlabs.android.player
Class LowLatencyProfile.Builder
java.lang.Object
com.castlabs.android.player.LowLatencyProfile.Builder
- Enclosing class:
LowLatencyProfile
Builder class for creating LowLatencyProfile instances.
This builder provides methods to configure all parameters for low latency playback.
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Create a new builder with default valuesBuilder(LowLatencyProfile cfg) Create a new builder starting with the value from the given configuration -
Method Summary
Modifier and TypeMethodDescriptioncustomUtcTimingElement(CustomUtcTimingElement customUtcTimingElement) Custom UTCTiming element to use.get()Builds the instancehlsPlaylistUpdateTargetDurationCoefficient(float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration) Defines the default coefficient applied to playlist update interval when calculating the playlist update interval.liveEdgeLatencyMs(int liveEdgeLatencyMs) Defines the number of milliseconds that the playback should lag behind the "live edge"minPlaybackStartMs(int minPlaybackStartMs) The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seekminRebufferStartMs(int minRebufferStartMs) The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer
-
Constructor Details
-
Builder
public Builder()Create a new builder with default values -
Builder
Create a new builder starting with the value from the given configuration- Parameters:
cfg- The configuration
-
-
Method Details
-
customUtcTimingElement
public LowLatencyProfile.Builder customUtcTimingElement(CustomUtcTimingElement customUtcTimingElement) Custom UTCTiming element to use.- Parameters:
customUtcTimingElement- Custom UTCTiming element to use- Returns:
- The builder
-
liveEdgeLatencyMs
Defines the number of milliseconds that the playback should lag behind the "live edge"- Parameters:
liveEdgeLatencyMs- time to the live edge- Returns:
- The builder
-
hlsPlaylistUpdateTargetDurationCoefficient
public LowLatencyProfile.Builder hlsPlaylistUpdateTargetDurationCoefficient(float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration) Defines the default coefficient applied to playlist update interval when calculating the playlist update interval. Applied when the currently loaded playlist is not renewed or unconditionally when forced.- Parameters:
hlsPlaylistUpdateTargetDurationCoefficient- The target duration coefficient for playlist update interval.hlsForcePlaylistUpdateTargetDuration- Whether to force the target duration coefficient when defining the playlist update interval- Returns:
- Builder instance
-
minPlaybackStartMs
The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seek- Parameters:
minPlaybackStartMs- minimum data duration to start playback- Returns:
- The builder
-
minRebufferStartMs
The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer- Parameters:
minRebufferStartMs- minimum data duration to resume playback- Returns:
- The builder
-
get
Builds the instance- Returns:
- an instance of LowLatencyProfile
-