HlsMultivariantPlaylist


@UnstableApi
class HlsMultivariantPlaylist : HlsPlaylist


Represents an HLS multivariant playlist.

Summary

Nested types

A rendition (i.e. an #EXT-X-MEDIA tag) in a multivariant playlist.

A variant (i.e. an #EXT-X-STREAM-INF tag) in a multivariant playlist.

Constants

const HlsMultivariantPlaylist!

Represents an empty multivariant playlist, from which no attributes can be inherited.

const Int
const Int
const Int

Public constructors

HlsMultivariantPlaylist(
    baseUri: String!,
    tags: (Mutable)List<String!>!,
    variants: (Mutable)List<HlsMultivariantPlaylist.Variant!>!,
    videos: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    audios: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    subtitles: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    closedCaptions: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    muxedAudioFormat: Format?,
    muxedCaptionFormats: (Mutable)List<Format!>?,
    hasIndependentSegments: Boolean,
    variableDefinitions: (Mutable)Map<String!, String!>!,
    sessionKeyDrmInitData: (Mutable)List<DrmInitData!>!
)

Public functions

HlsMultivariantPlaylist!
copy(streamKeys: (Mutable)List<StreamKey!>!)

Returns a copy of the manifest including only the streams specified by the given keys.

java-static HlsMultivariantPlaylist!

Creates a playlist with a single variant.

Public properties

(Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The audio renditions declared by the playlist.

(Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The closed caption renditions declared by the playlist.

(Mutable)List<Uri!>!

All of the media playlist URLs referenced by the playlist.

Format?

The format of the audio muxed in the variants.

(Mutable)List<Format!>?

The format of the closed captions declared by the playlist.

(Mutable)List<DrmInitData!>!

DRM initialization data derived from #EXT-X-SESSION-KEY tags.

(Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The subtitle renditions declared by the playlist.

(Mutable)Map<String!, String!>!

Contains variable definitions, as defined by the #EXT-X-DEFINE tag.

(Mutable)List<HlsMultivariantPlaylist.Variant!>!

The variants declared by the playlist.

(Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The video renditions declared by the playlist.

Inherited properties

From androidx.media3.exoplayer.hls.playlist.HlsPlaylist
String!

The base uri.

Boolean

Whether the media is formed of independent segments, as defined by the #EXT-X-INDEPENDENT-SEGMENTS tag.

(Mutable)List<String!>!

The list of tags in the playlist.

Constants

EMPTY

const val EMPTYHlsMultivariantPlaylist!

Represents an empty multivariant playlist, from which no attributes can be inherited.

GROUP_INDEX_AUDIO

const val GROUP_INDEX_AUDIO = 1: Int

GROUP_INDEX_SUBTITLE

const val GROUP_INDEX_SUBTITLE = 2: Int

GROUP_INDEX_VARIANT

const val GROUP_INDEX_VARIANT = 0: Int

Public constructors

HlsMultivariantPlaylist

HlsMultivariantPlaylist(
    baseUri: String!,
    tags: (Mutable)List<String!>!,
    variants: (Mutable)List<HlsMultivariantPlaylist.Variant!>!,
    videos: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    audios: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    subtitles: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    closedCaptions: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!,
    muxedAudioFormat: Format?,
    muxedCaptionFormats: (Mutable)List<Format!>?,
    hasIndependentSegments: Boolean,
    variableDefinitions: (Mutable)Map<String!, String!>!,
    sessionKeyDrmInitData: (Mutable)List<DrmInitData!>!
)
Parameters
baseUri: String!

See baseUri.

tags: (Mutable)List<String!>!

See tags.

variants: (Mutable)List<HlsMultivariantPlaylist.Variant!>!

See variants.

videos: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

See videos.

audios: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

See audios.

subtitles: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

See subtitles.

closedCaptions: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

See closedCaptions.

muxedAudioFormat: Format?

See muxedAudioFormat.

muxedCaptionFormats: (Mutable)List<Format!>?

See muxedCaptionFormats.

hasIndependentSegments: Boolean

See hasIndependentSegments.

variableDefinitions: (Mutable)Map<String!, String!>!

See variableDefinitions.

sessionKeyDrmInitData: (Mutable)List<DrmInitData!>!

See sessionKeyDrmInitData.

Public functions

copy

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

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: (Mutable)List<StreamKey!>!

A non-empty list of stream keys.

Returns
HlsMultivariantPlaylist!

The filtered manifest.

createSingleVariantMultivariantPlaylist

java-static fun createSingleVariantMultivariantPlaylist(variantUrl: String!): HlsMultivariantPlaylist!

Creates a playlist with a single variant.

Parameters
variantUrl: String!

The url of the single variant.

Returns
HlsMultivariantPlaylist!

A multivariant playlist with a single variant for the provided url.

Public properties

audios

val audios: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The audio renditions declared by the playlist.

closedCaptions

val closedCaptions: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The closed caption renditions declared by the playlist.

mediaPlaylistUrls

val mediaPlaylistUrls: (Mutable)List<Uri!>!

All of the media playlist URLs referenced by the playlist.

muxedAudioFormat

val muxedAudioFormatFormat?

The format of the audio muxed in the variants. May be null if the playlist does not declare any muxed audio.

muxedCaptionFormats

val muxedCaptionFormats: (Mutable)List<Format!>?

The format of the closed captions declared by the playlist. May be empty if the playlist explicitly declares no captions are available, or null if the playlist does not declare any captions information.

sessionKeyDrmInitData

val sessionKeyDrmInitData: (Mutable)List<DrmInitData!>!

DRM initialization data derived from #EXT-X-SESSION-KEY tags.

subtitles

val subtitles: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The subtitle renditions declared by the playlist.

variableDefinitions

val variableDefinitions: (Mutable)Map<String!, String!>!

Contains variable definitions, as defined by the #EXT-X-DEFINE tag.

variants

val variants: (Mutable)List<HlsMultivariantPlaylist.Variant!>!

The variants declared by the playlist.

videos

val videos: (Mutable)List<HlsMultivariantPlaylist.Rendition!>!

The video renditions declared by the playlist.