Package com.castlabs.android.player
Class LowLatencyProfile.Builder
java.lang.Object
com.castlabs.android.player.LowLatencyProfile.Builder
- Enclosing class:
LowLatencyProfile
-
Constructor Summary
ConstructorDescriptionBuilder()
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 instancehlsLiveTailSegmentIndex
(int hlsLiveTailSegmentIndex) Defines the HLS segment index counting from the tail from which the live playback should start.hlsPlaylistUpdateTargetDurationCoefficient
(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
-
hlsLiveTailSegmentIndex
Defines the HLS segment index counting from the tail from which the live playback should start. Should be larger or equal to0
. In case the value goes out of the segment size boundaries the very first segment counting from the segments head is used.- Parameters:
hlsLiveTailSegmentIndex
- The HLS live tail segment index- Returns:
- Builder instance
-
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
-