Package com.castlabs.android.player
Class LowLatencyProfile
java.lang.Object
com.castlabs.android.player.LowLatencyProfile
Profile that groups all the relevant parameters related to low latency live streaming.
This profile can be applied to an existing Bundle or PlaybackState *before* passing it to
PlayerController.open(Bundle)
.
All the fields defined in this class will override the values from other configurations.
To get an instance use the LowLatencyProfile.Builder
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builder class for creating LowLatencyProfile instances. -
Field Summary
FieldsModifier and TypeFieldDescriptionWill overrideLiveConfiguration.customUtcTimingElement
static final boolean
Default flag for forcing HLS playlist update target duration coefficient.static final int
Default HLS live tail segment index.static final float
Default HLS playlist update target duration coefficient.static final int
Default live edge latency in milliseconds.static final int
Default minimum playback start time in milliseconds.static final int
Default minimum rebuffer start time in milliseconds.static final CustomUtcTimingElement
Default UTC timing element for low latency streaming.boolean
Will overrideLiveConfiguration.hlsForcePlaylistUpdateTargetDuration
int
Will overrideLiveConfiguration.hlsLiveTailSegmentIndex
float
int
Will overrideLiveConfiguration.liveEdgeLatencyMs
int
Will overrideBufferConfiguration.minPlaybackStartMs
int
Will overrideBufferConfiguration.minRebufferStartMs
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new low latency profile with the default paramsLowLatencyProfile
(CustomUtcTimingElement customUtcTimingElement, int liveEdgeLatencyMs, int hlsLiveTailSegmentIndex, float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration, int minPlaybackStartMs, int minRebufferStartMs) Create a low latency profile -
Method Summary
Modifier and TypeMethodDescriptionApply the profile to the given BundleapplyTo
(PlayerConfig playerConfig) Apply the profile to the given PlaybackStatetoString()
-
Field Details
-
DEFAULT_UTC_TIMING_ELEMENT
Default UTC timing element for low latency streaming. -
DEFAULT_LIVE_EDGE_LATENCY_MS
public static final int DEFAULT_LIVE_EDGE_LATENCY_MSDefault live edge latency in milliseconds.- See Also:
-
DEFAULT_MIN_PLAYBACK_START_MS
public static final int DEFAULT_MIN_PLAYBACK_START_MSDefault minimum playback start time in milliseconds.- See Also:
-
DEFAULT_MIN_REBUFFER_START_MS
public static final int DEFAULT_MIN_REBUFFER_START_MSDefault minimum rebuffer start time in milliseconds.- See Also:
-
DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX
public static final int DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEXDefault HLS live tail segment index.- See Also:
-
DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
public static final float DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENTDefault HLS playlist update target duration coefficient.- See Also:
-
DEFAULT_HLS_FORCE_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
public static final boolean DEFAULT_HLS_FORCE_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENTDefault flag for forcing HLS playlist update target duration coefficient.- See Also:
-
customUtcTimingElement
Will overrideLiveConfiguration.customUtcTimingElement
-
liveEdgeLatencyMs
public int liveEdgeLatencyMsWill overrideLiveConfiguration.liveEdgeLatencyMs
-
hlsLiveTailSegmentIndex
public int hlsLiveTailSegmentIndexWill overrideLiveConfiguration.hlsLiveTailSegmentIndex
-
hlsPlaylistUpdateTargetDurationCoefficient
public float hlsPlaylistUpdateTargetDurationCoefficient -
hlsForcePlaylistUpdateTargetDuration
public boolean hlsForcePlaylistUpdateTargetDurationWill overrideLiveConfiguration.hlsForcePlaylistUpdateTargetDuration
-
minPlaybackStartMs
public int minPlaybackStartMsWill overrideBufferConfiguration.minPlaybackStartMs
-
minRebufferStartMs
public int minRebufferStartMsWill overrideBufferConfiguration.minRebufferStartMs
-
-
Constructor Details
-
LowLatencyProfile
public LowLatencyProfile()Create a new low latency profile with the default params -
LowLatencyProfile
public LowLatencyProfile(CustomUtcTimingElement customUtcTimingElement, int liveEdgeLatencyMs, int hlsLiveTailSegmentIndex, float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration, int minPlaybackStartMs, int minRebufferStartMs) Create a low latency profile- Parameters:
customUtcTimingElement
- Custom UTCTiming element to useliveEdgeLatencyMs
- Number of milliseconds that the playback should lag behind the live edgehlsLiveTailSegmentIndex
- The HLS live tail segment indexhlsPlaylistUpdateTargetDurationCoefficient
- The target duration coefficient for playlist update interval.hlsForcePlaylistUpdateTargetDuration
- Whether to force the target duration coefficient when defining the playlist update intervalminPlaybackStartMs
- The minimum duration of data that must be buffered for playback to start or resume following a user action such as a seekminRebufferStartMs
- The minimum duration of data that must be buffered for playback to resume after a player invoked rebuffer
-
-
Method Details
-
toString
-
applyTo
Apply the profile to the given Bundle- Parameters:
bundle
- Bundle where to get the current configuration- Returns:
- a Bundle with the modified configuration
-
applyTo
Apply the profile to the given PlaybackState- Parameters:
playerConfig
- where to get the current configuration- Returns:
- a Playbackstate with the modified configuration
-