# HlsMediaPlaylist

Artifact: [androidx.media3:media3-exoplayer-hls](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.java+class:androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist)

*** ** * ** ***


```
@UnstableApi
class HlsMediaPlaylist : HlsPlaylist
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.media3.exoplayer.hls.playlist.HlsPlaylist](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist) ||
|   | ↳ | [androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist) |

*** ** * ** ***

Represents an HLS media playlist.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute` A client defined attribute. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ClientDefinedAttribute.Type` The type of the client defined attribute. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial` An interstitial data range. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial`. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/StringDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.CueTriggerType` The cue trigger type. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/StringDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.NavigationRestriction` The navigation restriction identifier. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/StringDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.SnapType` The snap identifier. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/StringDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.TimelineOccupiesType` The timeline occupies identifier. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/kotlin/androidx/annotation/StringDef(value = ) @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial.TimelineStyleType` The timeline style identifier. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Part : https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.SegmentBase` A media part. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType` Type of the playlist, as defined by #EXT-X-PLAYLIST-TYPE. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.RenditionReport` A rendition report for an alternative rendition defined in another media playlist. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment : https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.SegmentBase` Media segment reference. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.SegmentBase : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html!>` The base for a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment` or a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Part` required for playback. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ServerControl` Server control attributes. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#PLAYLIST_TYPE_EVENT() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#PLAYLIST_TYPE_UNKNOWN() = 0` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#PLAYLIST_TYPE_VOD() = 1` |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#HlsMediaPlaylist(int,java.lang.String,java.util.List<java.lang.String>,long,boolean,long,boolean,int,long,int,long,long,boolean,boolean,boolean,androidx.media3.common.DrmInitData,java.util.List<androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.Segment>,java.util.List<androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.Part>,androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.ServerControl,java.util.Map<android.net.Uri,androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.RenditionReport>,java.util.List<androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.Interstitial>,androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist.Segment)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType playlistType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, baseUri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, tags: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!, startOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, preciseStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, hasDiscontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, discontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mediaSequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, version: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, targetDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, partTargetDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, hasIndependentSegments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, hasEndTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, hasProgramDateTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, protectionSchemes: https://developer.android.com/reference/kotlin/androidx/media3/common/DrmInitData?, segments: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment!>!, trailingParts: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Part!>!, serverControl: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ServerControl!, renditionReports: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/android/net/Uri.html!, https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.RenditionReport!>!, interstitials: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial!>!, lastSeenInitSegment: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment? )` Constructs an instance. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#copy(java.util.List<androidx.media3.common.StreamKey>)(streamKeys: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/StreamKey!>!)` Returns a copy of the manifest including only the streams specified by the given keys. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#copyWith(long,int)(startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, discontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a playlist identical to this one except for the start time, the discontinuity sequence and `hasDiscontinuitySequence` values. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#copyWithEndTag()()` Returns a playlist identical to this one except that an end tag is added. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#getEndTimeUs()()` Returns the result of adding the duration of the playlist to its start time. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#isNewerThan(androidx.media3.exoplayer.hls.playlist.HlsMediaPlaylist)(other: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist?)` Returns whether this playlist is newer than `other`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#discontinuitySequence()` The discontinuity sequence number of the first media segment in the playlist, as defined by #EXT-X-DISCONTINUITY-SEQUENCE. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#durationUs()` The total duration of the playlist in microseconds. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasDiscontinuitySequence()` Whether the playlist contains the #EXT-X-DISCONTINUITY-SEQUENCE tag. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasEndTag()` Whether the playlist contains the #EXT-X-ENDLIST tag. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasPositiveStartOffset()` Whether the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startOffsetUs()` was explicitly defined by #EXT-X-START as a positive value or zero. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasProgramDateTime()` Whether the playlist contains a #EXT-X-PROGRAM-DATE-TIME tag. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#interstitials()` The interstitials declared as `#EXT-X-DATERANGE` with ` CLASS="com.apple.hls.interstitial"` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#lastSeenInitSegment()` The last seen initialization segment defined by `#EXT-X-MAP`, or `null` if no `#EXT-X-MAP` has been declared for the corresponding stream. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#mediaSequence()` The media sequence number of the first media segment in the playlist, as defined by #EXT-X-MEDIA-SEQUENCE. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#partTargetDurationUs()` The target duration for segment parts, as defined by #EXT-X-PART-INF, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if undefined. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#playlistType()` The type of the playlist. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#preciseStart()` Whether the start position should be precise, as defined by #EXT-X-START. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/DrmInitData?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#protectionSchemes()` Contains the CDM protection schemes used by segments in this playlist. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/android/net/Uri.html!, https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.RenditionReport!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#renditionReports()` The rendition reports of alternative rendition playlists. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#segments()` The list of segments in the playlist. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ServerControl!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#serverControl()` The attributes of the #EXT-X-SERVER-CONTROL header. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startOffsetUs()` The start offset in microseconds from the beginning of the playlist, as defined by #EXT-X-START, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if undefined. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startTimeUs()` If `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasProgramDateTime()` is true, contains the datetime as microseconds since epoch. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#targetDurationUs()` The target duration in microseconds, as defined by #EXT-X-TARGETDURATION. |
| `(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Part!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#trailingParts()` The list of parts at the end of the playlist for which the segment is not in the playlist yet. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#version()` The compatibility version, as defined by #EXT-X-VERSION. |

### Inherited properties

From [androidx.media3.exoplayer.hls.playlist.HlsPlaylist](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#baseUri()`

The base uri.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#hasIndependentSegments()`

Whether the media is formed of independent segments, as defined by the #EXT-X-INDEPENDENT-SEGMENTS tag.
`(https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#tags()`

The list of tags in the playlist.

## Constants

### PLAYLIST_TYPE_EVENT

```
const val PLAYLIST_TYPE_EVENT = 2: Int
```

### PLAYLIST_TYPE_UNKNOWN

```
const val PLAYLIST_TYPE_UNKNOWN = 0: Int
```

### PLAYLIST_TYPE_VOD

```
const val PLAYLIST_TYPE_VOD = 1: Int
```

## Public constructors

### HlsMediaPlaylist

```
HlsMediaPlaylist(
    @HlsMediaPlaylist.PlaylistType playlistType: Int,
    baseUri: String!,
    tags: (Mutable)List<String!>!,
    startOffsetUs: Long,
    preciseStart: Boolean,
    startTimeUs: Long,
    hasDiscontinuitySequence: Boolean,
    discontinuitySequence: Int,
    mediaSequence: Long,
    version: Int,
    targetDurationUs: Long,
    partTargetDurationUs: Long,
    hasIndependentSegments: Boolean,
    hasEndTag: Boolean,
    hasProgramDateTime: Boolean,
    protectionSchemes: DrmInitData?,
    segments: (Mutable)List<HlsMediaPlaylist.Segment!>!,
    trailingParts: (Mutable)List<HlsMediaPlaylist.Part!>!,
    serverControl: HlsMediaPlaylist.ServerControl!,
    renditionReports: (Mutable)Map<Uri!, HlsMediaPlaylist.RenditionReport!>!,
    interstitials: (Mutable)List<HlsMediaPlaylist.Interstitial!>!,
    lastSeenInitSegment: HlsMediaPlaylist.Segment?
)
```

Constructs an instance.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType playlistType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#playlistType()`. |
| `baseUri: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#baseUri()`. |
| `tags: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#tags()`. |
| `startOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startOffsetUs()`. |
| `preciseStart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#preciseStart()`. |
| `startTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startTimeUs()`. |
| `hasDiscontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasDiscontinuitySequence()`. |
| `discontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#discontinuitySequence()`. |
| `mediaSequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#mediaSequence()`. |
| `version: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#version()`. |
| `targetDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#targetDurationUs()`. |
| `partTargetDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#partTargetDurationUs()`. |
| `hasIndependentSegments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylist#hasIndependentSegments()`. |
| `hasEndTag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasEndTag()`. |
| `hasProgramDateTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#hasProgramDateTime()`. |
| `protectionSchemes: https://developer.android.com/reference/kotlin/androidx/media3/common/DrmInitData?` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#protectionSchemes()`. |
| `segments: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#segments()`. |
| `trailingParts: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Part!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#trailingParts()`. |
| `serverControl: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.ServerControl!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#serverControl()` |
| `renditionReports: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://developer.android.com/reference/android/net/Uri.html!, https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.RenditionReport!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#renditionReports()`. |
| `interstitials: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Interstitial!>!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#interstitials()`. |
| `lastSeenInitSegment: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.Segment?` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#lastSeenInitSegment()`. |

## Public functions

### copy

```
fun copy(streamKeys: (Mutable)List<StreamKey!>!): HlsMediaPlaylist!
```

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: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/StreamKey!>!` | A non-empty list of stream keys. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist!` | The filtered manifest. |

### copyWith

```
fun copyWith(startTimeUs: Long, discontinuitySequence: Int): HlsMediaPlaylist!
```

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: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The start time for the returned playlist. |
| `discontinuitySequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The discontinuity sequence for the returned playlist. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist!` | An identical playlist including the provided discontinuity and timing information. |

### copyWithEndTag

```
fun copyWithEndTag(): HlsMediaPlaylist!
```

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.

### getEndTimeUs

```
fun getEndTimeUs(): Long
```

Returns the result of adding the duration of the playlist to its start time.

### isNewerThan

```
fun isNewerThan(other: HlsMediaPlaylist?): Boolean
```

Returns whether this playlist is newer than `other`.

| Parameters |
|---|---|
| `other: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist?` | The playlist to compare. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this playlist is newer than `other`. |

## Public properties

### discontinuitySequence

```
val discontinuitySequence: Int
```

The discontinuity sequence number of the first media segment in the playlist, as defined by #EXT-X-DISCONTINUITY-SEQUENCE.

### durationUs

```
val durationUs: Long
```

The total duration of the playlist in microseconds.

### hasDiscontinuitySequence

```
val hasDiscontinuitySequence: Boolean
```

Whether the playlist contains the #EXT-X-DISCONTINUITY-SEQUENCE tag.

### hasEndTag

```
val hasEndTag: Boolean
```

Whether the playlist contains the #EXT-X-ENDLIST tag.

### hasPositiveStartOffset

```
val hasPositiveStartOffset: Boolean
```

Whether the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#startOffsetUs()` was explicitly defined by #EXT-X-START as a positive value or zero.

### hasProgramDateTime

```
val hasProgramDateTime: Boolean
```

Whether the playlist contains a #EXT-X-PROGRAM-DATE-TIME tag.

### interstitials

```
val interstitials: ImmutableList<HlsMediaPlaylist.Interstitial!>!
```

The interstitials declared as `#EXT-X-DATERANGE` with `
CLASS="com.apple.hls.interstitial"`

### lastSeenInitSegment

```
val lastSeenInitSegment: HlsMediaPlaylist.Segment?
```

The last seen initialization segment defined by `#EXT-X-MAP`, or `null` if no `#EXT-X-MAP` has been declared for the corresponding stream.

### mediaSequence

```
val mediaSequence: Long
```

The media sequence number of the first media segment in the playlist, as defined by #EXT-X-MEDIA-SEQUENCE.

### partTargetDurationUs

```
val partTargetDurationUs: Long
```

The target duration for segment parts, as defined by #EXT-X-PART-INF, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if undefined.

### playlistType

```
@HlsMediaPlaylist.PlaylistType
val playlistType: Int
```

The type of the playlist. See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist.PlaylistType`.

### preciseStart

```
val preciseStart: Boolean
```

Whether the start position should be precise, as defined by #EXT-X-START.

### protectionSchemes

```
val protectionSchemes: DrmInitData?
```

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.

### renditionReports

```
val renditionReports: (Mutable)Map<Uri!, HlsMediaPlaylist.RenditionReport!>!
```

The rendition reports of alternative rendition playlists.

### segments

```
val segments: (Mutable)List<HlsMediaPlaylist.Segment!>!
```

The list of segments in the playlist.

### serverControl

```
val serverControl: HlsMediaPlaylist.ServerControl!
```

The attributes of the #EXT-X-SERVER-CONTROL header.

### startOffsetUs

```
val startOffsetUs: Long
```

The start offset in microseconds from the beginning of the playlist, as defined by #EXT-X-START, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if undefined. The value is guaranteed to be between 0 and `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#durationUs()`, inclusive.

### startTimeUs

```
val startTimeUs: Long
```

If `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMediaPlaylist#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.

### targetDurationUs

```
val targetDurationUs: Long
```

The target duration in microseconds, as defined by #EXT-X-TARGETDURATION.

### trailingParts

```
val trailingParts: (Mutable)List<HlsMediaPlaylist.Part!>!
```

The list of parts at the end of the playlist for which the segment is not in the playlist yet.

### version

```
val version: Int
```

The compatibility version, as defined by #EXT-X-VERSION.