Package com.castlabs.android.player
Class LowLatencyProfile
- java.lang.Object
-
- com.castlabs.android.player.LowLatencyProfile
-
public class LowLatencyProfile extends Object
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 Modifier and Type Class Description static class
LowLatencyProfile.Builder
-
Field Summary
Fields Modifier and Type Field Description CustomUtcTimingElement
customUtcTimingElement
Will overrideLiveConfiguration.customUtcTimingElement
static boolean
DEFAULT_HLS_FORCE_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
static int
DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX
static float
DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
static int
DEFAULT_LIVE_EDGE_LATENCY_MS
static int
DEFAULT_MIN_PLAYBACK_START_MS
static int
DEFAULT_MIN_REBUFFER_START_MS
static CustomUtcTimingElement
DEFAULT_UTC_TIMING_ELEMENT
boolean
hlsForcePlaylistUpdateTargetDuration
Will overrideLiveConfiguration.hlsForcePlaylistUpdateTargetDuration
int
hlsLiveTailSegmentIndex
Will overrideLiveConfiguration.hlsLiveTailSegmentIndex
float
hlsPlaylistUpdateTargetDurationCoefficient
int
liveEdgeLatencyMs
Will overrideLiveConfiguration.liveEdgeLatencyMs
int
minPlaybackStartMs
Will overrideBufferConfiguration.minPlaybackStartMs
int
minRebufferStartMs
Will overrideBufferConfiguration.minRebufferStartMs
-
Constructor Summary
Constructors Constructor Description LowLatencyProfile()
Create 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bundle
applyTo(Bundle bundle)
Apply the profile to the given BundlePlayerConfig
applyTo(PlayerConfig playerConfig)
Apply the profile to the given PlaybackStateString
toString()
-
-
-
Field Detail
-
DEFAULT_UTC_TIMING_ELEMENT
public static final CustomUtcTimingElement DEFAULT_UTC_TIMING_ELEMENT
-
DEFAULT_LIVE_EDGE_LATENCY_MS
public static final int DEFAULT_LIVE_EDGE_LATENCY_MS
- See Also:
- Constant Field Values
-
DEFAULT_MIN_PLAYBACK_START_MS
public static final int DEFAULT_MIN_PLAYBACK_START_MS
- See Also:
- Constant Field Values
-
DEFAULT_MIN_REBUFFER_START_MS
public static final int DEFAULT_MIN_REBUFFER_START_MS
- See Also:
- Constant Field Values
-
DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX
public static final int DEFAULT_HLS_LIVE_TAIL_SEGMENT_INDEX
- See Also:
- Constant Field Values
-
DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
public static final float DEFAULT_HLS_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
- See Also:
- Constant Field Values
-
DEFAULT_HLS_FORCE_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
public static final boolean DEFAULT_HLS_FORCE_PLAYLIST_UPDATE_TARGET_DURATION_COEFFICIENT
- See Also:
- Constant Field Values
-
customUtcTimingElement
public CustomUtcTimingElement customUtcTimingElement
Will overrideLiveConfiguration.customUtcTimingElement
-
liveEdgeLatencyMs
public int liveEdgeLatencyMs
Will overrideLiveConfiguration.liveEdgeLatencyMs
-
hlsLiveTailSegmentIndex
public int hlsLiveTailSegmentIndex
Will overrideLiveConfiguration.hlsLiveTailSegmentIndex
-
hlsPlaylistUpdateTargetDurationCoefficient
public float hlsPlaylistUpdateTargetDurationCoefficient
-
hlsForcePlaylistUpdateTargetDuration
public boolean hlsForcePlaylistUpdateTargetDuration
Will overrideLiveConfiguration.hlsForcePlaylistUpdateTargetDuration
-
minPlaybackStartMs
public int minPlaybackStartMs
Will overrideBufferConfiguration.minPlaybackStartMs
-
minRebufferStartMs
public int minRebufferStartMs
Will overrideBufferConfiguration.minRebufferStartMs
-
-
Constructor Detail
-
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 Detail
-
applyTo
public Bundle applyTo(@NonNull Bundle bundle)
Apply the profile to the given Bundle- Parameters:
bundle
- Bundle where to get the current configuration- Returns:
- a Bundle with the modified configuration
-
applyTo
public PlayerConfig applyTo(@NonNull PlayerConfig playerConfig)
Apply the profile to the given PlaybackState- Parameters:
playerConfig
- where to get the current configuration- Returns:
- a Playbackstate with the modified configuration
-
-