Class LiveConfiguration
- All Implemented Interfaces:
Parcelable
LiveConfiguration.Builder to create instances of this class.- Since:
- 4.1.10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for creating LiveConfiguration instances.Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionlongOverwrite or set the availability start time offset for ultra low latency streams.Defines the catchup configurationstatic final Parcelable.Creator<LiveConfiguration> Creator for Parcelable implementation.Custom CustomUtcTimingElement.static final longDefault value for availability start time offset overwrite.static final longDefault value for time synchronization safety buffer.booleanWhether thehlsPlaylistUpdateTargetDurationCoefficientshould also be applied when the currently loaded manifest is renewed.intDefines the HLS segment index counting from the tail from which the live playback should start.floatThe default coefficient applied to playlist update interval when calculating the playlist update interval.intDefines the number of milliseconds that the playback should lag behind the "live edge" (i.e.longBy default the manifest update period is defined by the manifest.intSets the manifest notify interval in milliseconds.booleanIf set to true, will seek on Live Content to drop startup buffers to be closer to the Live Edge.booleanBy default the start position for a live stream snaps to a segment start.longSet the time synchronization safety buffer to cope with inaccuraciesFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new live configuration using the default valuesLiveConfiguration(CustomUtcTimingElement customUtcTimingElement, int liveEdgeLatencyMs, int hlsLiveTailSegmentIndex, float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration, CatchupConfiguration catchupConfiguration, long minManifestUpdatePeriodMs, boolean snapToSegmentStart, long availabilityStartTimeOffsetOverwriteMs, long timesyncSafetyMs, int notifyManifestIntervalMs, boolean preferLatencyOverBufferSafety) Create a new live configuration -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(LiveConfiguration source) Copies the values from the given live configuration to this configurationintbooleaninthashCode()toString()voidwriteToParcel(Parcel dest, int flags)
-
Field Details
-
CREATOR
Creator for Parcelable implementation. -
DEFAULT_AVAILABILITY_START_TIME_OFFSET_OVERWRITE
public static final long DEFAULT_AVAILABILITY_START_TIME_OFFSET_OVERWRITEDefault value for availability start time offset overwrite. When set to this value, the manifest's default will be used.- See Also:
-
DEFAULT_TIME_SYNC_SAFETY_MS
public static final long DEFAULT_TIME_SYNC_SAFETY_MSDefault value for time synchronization safety buffer. When set to this value, no additional safety buffer is added.- See Also:
-
customUtcTimingElement
Custom CustomUtcTimingElement. This is used for live DASH content. If this is informed and forced withCustomUtcTimingElement.forceit will take prevalence over any otherUtcTimingElementpresent in the DASH manifest. Ifforceis false, it will be used as a fallback. -
liveEdgeLatencyMs
public int liveEdgeLatencyMsDefines the number of milliseconds that the playback should lag behind the "live edge" (i.e. the end of the most recently defined media in the manifest). Choosing a small value will minimize latency introduced by the player. Hence a small value may increase the probability of rebuffering and playback failures.When the key is not set then the manifest specified value is used or otherwise the default value
SdkConsts.DEFAULT_LIVE_EDGE_LATENCY_MSNote that this parameter can also be used to start the live stream at a different position! For example, if you have an event stream with a large seek window and you do not want to start at the live edge but further behind, use this parameter to specify how much behind the live edge you want to start.
This value is also used for HLS live content. In case it is informed, it will override the HLS-specific setting
hlsLiveTailSegmentIndexYou can use the same parameter also to start playback at the beginning of the seek window rather than the live edge. For that, put
Integer.MAX_VALUEas the value. -
hlsLiveTailSegmentIndex
public int hlsLiveTailSegmentIndexDefines 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.The
liveEdgeLatencyMsfield will prevail if it informed. -
hlsPlaylistUpdateTargetDurationCoefficient
public float hlsPlaylistUpdateTargetDurationCoefficientThe default coefficient applied to playlist update interval when calculating the playlist update interval. Applied when the currently loaded playlist is not renewed. see alsohlsForcePlaylistUpdateTargetDuration -
hlsForcePlaylistUpdateTargetDuration
public boolean hlsForcePlaylistUpdateTargetDurationWhether thehlsPlaylistUpdateTargetDurationCoefficientshould also be applied when the currently loaded manifest is renewed. -
catchupConfiguration
Defines the catchup configuration -
minManifestUpdatePeriodMs
public long minManifestUpdatePeriodMsBy default the manifest update period is defined by the manifest. This configuration option can be used to overwrite the manifest setting and force a specific update period. -
snapToSegmentStart
public boolean snapToSegmentStartBy default the start position for a live stream snaps to a segment start. Set this to false to allow starting a live stream in the middle of a segment. This is mostly relevant for ultra low latency live streams. -
availabilityStartTimeOffsetOverwriteMs
public long availabilityStartTimeOffsetOverwriteMsOverwrite or set the availability start time offset for ultra low latency streams. -
timesyncSafetyMs
public long timesyncSafetyMsSet the time synchronization safety buffer to cope with inaccuracies -
notifyManifestIntervalMs
public int notifyManifestIntervalMsSets the manifest notify interval in milliseconds. This only applies for implicit live DASH manifests. Represents the time in between internal Timeline representation updates when manifest updates are not required. Can be particularly helpful for low latency streams. Default is 5000 ms. -
preferLatencyOverBufferSafety
public boolean preferLatencyOverBufferSafetyIf set to true, will seek on Live Content to drop startup buffers to be closer to the Live Edge.
-
-
Constructor Details
-
LiveConfiguration
public LiveConfiguration()Create a new live configuration using the default values -
LiveConfiguration
public LiveConfiguration(CustomUtcTimingElement customUtcTimingElement, int liveEdgeLatencyMs, int hlsLiveTailSegmentIndex, float hlsPlaylistUpdateTargetDurationCoefficient, boolean hlsForcePlaylistUpdateTargetDuration, @Nullable CatchupConfiguration catchupConfiguration, long minManifestUpdatePeriodMs, boolean snapToSegmentStart, long availabilityStartTimeOffsetOverwriteMs, long timesyncSafetyMs, int notifyManifestIntervalMs, boolean preferLatencyOverBufferSafety) Create a new live configuration- Parameters:
customUtcTimingElement- A CustomUTCTimingElementliveEdgeLatencyMs- 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 intervalcatchupConfiguration- Playback catchup configurationminManifestUpdatePeriodMs- Force the update period for live streams or set it toC.TIME_UNSETto use the value define in the manifest (default)snapToSegmentStart- Set this to false to allow starting live streams in the middle of a segmentavailabilityStartTimeOffsetOverwriteMs- Set or overwrite the availability start time offset. Set toC.TIME_UNSETto use the default from the manifesttimesyncSafetyMs- Set the time sync safety to cope with inaccurate time syncsnotifyManifestIntervalMs- Set the manifest notify interval in milliseconds. Only for DASH.preferLatencyOverBufferSafety- If true, will seek on Live Content to drop startup buffers to be closer to the Live Edge
-
-
Method Details
-
describeContents
public int describeContents()- Specified by:
describeContentsin interfaceParcelable
-
toString
-
writeToParcel
- Specified by:
writeToParcelin interfaceParcelable
-
hashCode
public int hashCode() -
equals
-
apply
Copies the values from the given live configuration to this configuration- Parameters:
source- the source
-