Class LiveConfiguration
- All Implemented Interfaces:
Parcelable
LiveConfiguration.Builder
to create instances of this class.- Since:
- 4.1.10
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
-
Field Summary
Modifier and TypeFieldDescriptionlong
Overwrite or set the availability start time offset for ultra low latency streams.Defines the catchup configurationstatic final Parcelable.Creator
<LiveConfiguration> Custom CustomUtcTimingElement.static final long
static final long
boolean
Whether thehlsPlaylistUpdateTargetDurationCoefficient
should also be applied when the currently loaded manifest is renewed.int
Defines the HLS segment index counting from the tail from which the live playback should start.float
The default coefficient applied to playlist update interval when calculating the playlist update interval.int
Defines the number of milliseconds that the playback should lag behind the "live edge" (i.e.long
By default the manifest update period is defined by the manifest.int
Sets the manifest notify interval in milliseconds.boolean
If set to true, will seek on Live Content to drop startup buffers to be closer to the Live Edge.boolean
By default the start position for a live stream snaps to a segment start.long
Set the time synchronization safety buffer to cope with inaccuraciesFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorDescriptionCreate 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 TypeMethodDescriptionvoid
apply
(LiveConfiguration source) Copies the values from the given live configuration to this configurationint
boolean
int
hashCode()
toString()
void
writeToParcel
(Parcel dest, int flags)
-
Field Details
-
CREATOR
-
DEFAULT_AVAILABILITY_START_TIME_OFFSET_OVERWRITE
public static final long DEFAULT_AVAILABILITY_START_TIME_OFFSET_OVERWRITE- See Also:
-
DEFAULT_TIME_SYNC_SAFETY_MS
public static final long DEFAULT_TIME_SYNC_SAFETY_MS- See Also:
-
customUtcTimingElement
Custom CustomUtcTimingElement. This is used for live DASH content. If this is informed and forced withCustomUtcTimingElement.force
it will take prevalence over any otherUtcTimingElement
present in the DASH manifest. Ifforce
is 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_MS
Note 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
hlsLiveTailSegmentIndex
You 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_VALUE
as 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
liveEdgeLatencyMs
field 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 thehlsPlaylistUpdateTargetDurationCoefficient
should 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_UNSET
to 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_UNSET
to 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.
-
-
Method Details
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceParcelable
-
toString
-
writeToParcel
- Specified by:
writeToParcel
in interfaceParcelable
-
hashCode
public int hashCode() -
equals
-
apply
Copies the values from the given live configuration to this configuration- Parameters:
source
- the source
-