docs/doc/reference/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.html
Package com.google.android.exoplayer2.source.hls.playlist
All Implemented Interfaces:FilterableManifest<HlsPlaylist>
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classHlsMediaPlaylistextends[HlsPlaylist](HlsPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Represents an HLS media playlist.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | HlsMediaPlaylist.Part |
Deprecated.
A media part.
|
| static interface | HlsMediaPlaylist.PlaylistType |
Deprecated.
Type of the playlist, as defined by #EXT-X-PLAYLIST-TYPE.
|
| static class | HlsMediaPlaylist.RenditionReport |
Deprecated.
A rendition report for an alternative rendition defined in another media playlist.
|
| static class | HlsMediaPlaylist.Segment |
Deprecated.
Media segment reference.
|
| static class | HlsMediaPlaylist.SegmentBase |
Deprecated.
The base for a HlsMediaPlaylist.Segment or a HlsMediaPlaylist.Part required for playback.
|
| static class | HlsMediaPlaylist.ServerControl |
Deprecated.
Server control attributes. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | discontinuitySequence |
Deprecated.
The discontinuity sequence number of the first media segment in the playlist, as defined by #EXT-X-DISCONTINUITY-SEQUENCE.
|
| long | durationUs |
Deprecated.
The total duration of the playlist in microseconds.
|
| boolean | hasDiscontinuitySequence |
Deprecated.
Whether the playlist contains the #EXT-X-DISCONTINUITY-SEQUENCE tag.
|
| boolean | hasEndTag |
Deprecated.
Whether the playlist contains the #EXT-X-ENDLIST tag.
|
| boolean | hasPositiveStartOffset |
Deprecated.
Whether the startOffsetUs was explicitly defined by #EXT-X-START as a positive value or zero.
|
| boolean | hasProgramDateTime |
Deprecated.
Whether the playlist contains a #EXT-X-PROGRAM-DATE-TIME tag.
|
| long | mediaSequence |
Deprecated.
The media sequence number of the first media segment in the playlist, as defined by #EXT-X-MEDIA-SEQUENCE.
|
| long | partTargetDurationUs |
Deprecated.
The target duration for segment parts, as defined by #EXT-X-PART-INF, or C.TIME_UNSET if undefined.
|
| static int | PLAYLIST_TYPE_EVENT |
Deprecated.
|
| static int | PLAYLIST_TYPE_UNKNOWN |
Deprecated.
|
| static int | PLAYLIST_TYPE_VOD |
Deprecated.
|
| @com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.PlaylistType int | playlistType |
Deprecated.
The type of the playlist.
|
| boolean | preciseStart |
Deprecated.
Whether the start position should be precise, as defined by #EXT-X-START.
|
| DrmInitData | protectionSchemes |
Deprecated.
Contains the CDM protection schemes used by segments in this playlist.
|
| Map<Uri,HlsMediaPlaylist.RenditionReport> | renditionReports |
Deprecated.
The rendition reports of alternative rendition playlists.
|
| List<HlsMediaPlaylist.Segment> | segments |
Deprecated.
The list of segments in the playlist.
|
| HlsMediaPlaylist.ServerControl | serverControl |
Deprecated.
The attributes of the #EXT-X-SERVER-CONTROL header.
|
| long | startOffsetUs |
Deprecated.
The start offset in microseconds from the beginning of the playlist, as defined by #EXT-X-START, or C.TIME_UNSET if undefined.
|
| long | startTimeUs |
Deprecated.
If hasProgramDateTime is true, contains the datetime as microseconds since epoch.
|
| long | targetDurationUs |
Deprecated.
The target duration in microseconds, as defined by #EXT-X-TARGETDURATION.
|
| List<HlsMediaPlaylist.Part> | trailingParts |
Deprecated.
The list of parts at the end of the playlist for which the segment is not in the playlist yet.
|
| int | version |
Deprecated.
The compatibility version, as defined by #EXT-X-VERSION. |
-
baseUri, hasIndependentSegments, tags
Constructors | Constructor | Description |
| --- | --- |
| HlsMediaPlaylist(@com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.PlaylistType int playlistType, String baseUri, List<String> tags, long startOffsetUs, boolean preciseStart, long startTimeUs, boolean hasDiscontinuitySequence, int discontinuitySequence, long mediaSequence, int version, long targetDurationUs, long partTargetDurationUs, boolean hasIndependentSegments, boolean hasEndTag, boolean hasProgramDateTime, DrmInitData protectionSchemes, List<HlsMediaPlaylist.Segment> segments, List<HlsMediaPlaylist.Part> trailingParts, HlsMediaPlaylist.ServerControl serverControl, Map<Uri,HlsMediaPlaylist.RenditionReport> renditionReports) |
Deprecated.
Constructs an instance. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| HlsMediaPlaylist | copy(List<StreamKey> streamKeys) |
Deprecated.
Returns a copy of the manifest including only the streams specified by the given keys.
|
| HlsMediaPlaylist | copyWith(long startTimeUs, int discontinuitySequence) |
Deprecated.
Returns a playlist identical to this one except for the start time, the discontinuity sequence and hasDiscontinuitySequence values.
|
| HlsMediaPlaylist | copyWithEndTag() |
Deprecated.
Returns a playlist identical to this one except that an end tag is added.
|
| long | getEndTimeUs() |
Deprecated.
Returns the result of adding the duration of the playlist to its start time.
|
| boolean | isNewerThan(HlsMediaPlaylist other) |
Deprecated.
Returns whether this playlist is newer than other.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int PLAYLIST_TYPE_UNKNOWN
Deprecated. See Also:Constant Field Values
-
public static final int PLAYLIST_TYPE_VOD
Deprecated. See Also:Constant Field Values
-
public static final int PLAYLIST_TYPE_EVENT
Deprecated. See Also:Constant Field Values
-
public final @com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.PlaylistType int playlistType
Deprecated.
The type of the playlist. See HlsMediaPlaylist.PlaylistType.
-
public final long startOffsetUs
Deprecated.
The start offset in microseconds from the beginning of the playlist, as defined by #EXT-X-START, or C.TIME_UNSET if undefined. The value is guaranteed to be between 0 and durationUs, inclusive.
-
public final boolean hasPositiveStartOffset
Deprecated.
Whether the startOffsetUs was explicitly defined by #EXT-X-START as a positive value or zero.
-
public final boolean preciseStart
Deprecated.
Whether the start position should be precise, as defined by #EXT-X-START.
-
public final long startTimeUs
Deprecated.
If hasProgramDateTime is true, contains the datetime as microseconds since epoch. Otherwise, contains the aggregated duration of removed segments up to this snapshot of the playlist.
-
public final boolean hasDiscontinuitySequence
Deprecated.
Whether the playlist contains the #EXT-X-DISCONTINUITY-SEQUENCE tag.
-
public final int discontinuitySequence
Deprecated.
The discontinuity sequence number of the first media segment in the playlist, as defined by #EXT-X-DISCONTINUITY-SEQUENCE.
-
public final long mediaSequence
Deprecated.
The media sequence number of the first media segment in the playlist, as defined by #EXT-X-MEDIA-SEQUENCE.
-
public final int version
Deprecated.
The compatibility version, as defined by #EXT-X-VERSION.
-
public final long targetDurationUs
Deprecated.
The target duration in microseconds, as defined by #EXT-X-TARGETDURATION.
-
public final long partTargetDurationUs
Deprecated.
The target duration for segment parts, as defined by #EXT-X-PART-INF, or C.TIME_UNSET if undefined.
-
public final boolean hasEndTag
Deprecated.
Whether the playlist contains the #EXT-X-ENDLIST tag.
-
public final boolean hasProgramDateTime
Deprecated.
Whether the playlist contains a #EXT-X-PROGRAM-DATE-TIME tag.
-
@Nullable
public final[DrmInitData](../../../drm/DrmInitData.html "class in com.google.android.exoplayer2.drm")protectionSchemes
Deprecated.
Contains the CDM protection schemes used by segments in this playlist. Does not contain any key acquisition data. Null if none of the segments in the playlist is CDM-encrypted.
-
public final[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Segment](HlsMediaPlaylist.Segment.html "class in com.google.android.exoplayer2.source.hls.playlist")> segments
Deprecated.
The list of segments in the playlist.
-
public final[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Part](HlsMediaPlaylist.Part.html "class in com.google.android.exoplayer2.source.hls.playlist")> trailingParts
Deprecated.
The list of parts at the end of the playlist for which the segment is not in the playlist yet.
-
public final[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[Uri](https://developer.android.com/reference/android/net/Uri.html?is-external=true "class or interface in android.net"),[HlsMediaPlaylist.RenditionReport](HlsMediaPlaylist.RenditionReport.html "class in com.google.android.exoplayer2.source.hls.playlist")> renditionReports
Deprecated.
The rendition reports of alternative rendition playlists.
-
public final long durationUs
Deprecated.
The total duration of the playlist in microseconds.
-
public final[HlsMediaPlaylist.ServerControl](HlsMediaPlaylist.ServerControl.html "class in com.google.android.exoplayer2.source.hls.playlist")serverControl
Deprecated.
The attributes of the #EXT-X-SERVER-CONTROL header.
-
public HlsMediaPlaylist(@com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.PlaylistType int playlistType,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")baseUri,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> tags,
long startOffsetUs,
boolean preciseStart,
long startTimeUs,
boolean hasDiscontinuitySequence,
int discontinuitySequence,
long mediaSequence,
int version,
long targetDurationUs,
long partTargetDurationUs,
boolean hasIndependentSegments,
boolean hasEndTag,
boolean hasProgramDateTime,
@Nullable[DrmInitData](../../../drm/DrmInitData.html "class in com.google.android.exoplayer2.drm")protectionSchemes,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Segment](HlsMediaPlaylist.Segment.html "class in com.google.android.exoplayer2.source.hls.playlist")> segments,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[HlsMediaPlaylist.Part](HlsMediaPlaylist.Part.html "class in com.google.android.exoplayer2.source.hls.playlist")> trailingParts,[HlsMediaPlaylist.ServerControl](HlsMediaPlaylist.ServerControl.html "class in com.google.android.exoplayer2.source.hls.playlist")serverControl,[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[Uri](https://developer.android.com/reference/android/net/Uri.html?is-external=true "class or interface in android.net"),[HlsMediaPlaylist.RenditionReport](HlsMediaPlaylist.RenditionReport.html "class in com.google.android.exoplayer2.source.hls.playlist")> renditionReports)
Deprecated.
Constructs an instance.
Parameters:playlistType - See playlistType.baseUri - See HlsPlaylist.baseUri.tags - See HlsPlaylist.tags.startOffsetUs - See startOffsetUs.preciseStart - See preciseStart.startTimeUs - See startTimeUs.hasDiscontinuitySequence - See hasDiscontinuitySequence.discontinuitySequence - See discontinuitySequence.mediaSequence - See mediaSequence.version - See version.targetDurationUs - See targetDurationUs.partTargetDurationUs - See partTargetDurationUs.hasIndependentSegments - See HlsPlaylist.hasIndependentSegments.hasEndTag - See hasEndTag.hasProgramDateTime - See hasProgramDateTime.protectionSchemes - See protectionSchemes.segments - See segments.trailingParts - See trailingParts.serverControl - See serverControlrenditionReports - See renditionReports.
-
public[HlsMediaPlaylist](HlsMediaPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")copy([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[StreamKey](../../../offline/StreamKey.html "class in com.google.android.exoplayer2.offline")> streamKeys)
Deprecated.
Description copied from interface: FilterableManifest
Returns a copy of the manifest including only the streams specified by the given keys. If the manifest is unchanged then the instance may return itself.
Parameters:streamKeys - A non-empty list of stream keys.Returns:The filtered manifest.
-
public boolean isNewerThan(@Nullable[HlsMediaPlaylist](HlsMediaPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")other)
Deprecated.
Returns whether this playlist is newer than other.
Parameters:other - The playlist to compare.Returns:Whether this playlist is newer than other.
-
public long getEndTimeUs()
Deprecated.
Returns the result of adding the duration of the playlist to its start time.
-
public[HlsMediaPlaylist](HlsMediaPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")copyWith(long startTimeUs,
int discontinuitySequence)
Deprecated.
Returns a playlist identical to this one except for the start time, the discontinuity sequence and hasDiscontinuitySequence values. The first two are set to the specified values, hasDiscontinuitySequence is set to true.
Parameters:startTimeUs - The start time for the returned playlist.discontinuitySequence - The discontinuity sequence for the returned playlist.Returns:An identical playlist including the provided discontinuity and timing information.
-
public[HlsMediaPlaylist](HlsMediaPlaylist.html "class in com.google.android.exoplayer2.source.hls.playlist")copyWithEndTag()
Deprecated.
Returns a playlist identical to this one except that an end tag is added. If an end tag is already present then the playlist will return itself.