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 Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionWill overrideLiveConfiguration.customUtcTimingElementstatic final booleanstatic final intstatic final floatstatic final intstatic final intstatic final intstatic final CustomUtcTimingElementbooleanWill overrideLiveConfiguration.hlsForcePlaylistUpdateTargetDurationintWill overrideLiveConfiguration.hlsLiveTailSegmentIndexfloatintWill overrideLiveConfiguration.liveEdgeLatencyMsintWill overrideBufferConfiguration.minPlaybackStartMsintWill 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_LIVE_EDGE_LATENCY_MS
public static final int DEFAULT_LIVE_EDGE_LATENCY_MS- See Also:
-
DEFAULT_MIN_PLAYBACK_START_MS
public static final int DEFAULT_MIN_PLAYBACK_START_MS- See Also:
-
DEFAULT_MIN_REBUFFER_START_MS
public static final int DEFAULT_MIN_REBUFFER_START_MS- See Also:
-
DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX
public static final int DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX- See Also:
-
DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
public static final float DEFAULT_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_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
-