HlsMultivariantPlaylist.Variant


public final class HlsMultivariantPlaylist.Variant


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

Summary

Public fields

final @Nullable String

The audio rendition group referenced by this variant, or null.

final @Nullable String

The caption rendition group referenced by this variant, or null.

final Format

Format information associated with this variant.

final @Nullable String

The subtitle rendition group referenced by this variant, or null.

final Uri

The variant's url.

final @Nullable String

The video rendition group referenced by this variant, or null.

Public constructors

Variant(
    Uri url,
    Format format,
    @Nullable String videoGroupId,
    @Nullable String audioGroupId,
    @Nullable String subtitleGroupId,
    @Nullable String captionGroupId
)

Public methods

HlsMultivariantPlaylist.Variant

Returns a copy of this instance with the given Format.

static HlsMultivariantPlaylist.Variant

Creates a variant for a given media playlist url.

Public fields

audioGroupId

public final @Nullable String audioGroupId

The audio rendition group referenced by this variant, or null.

captionGroupId

public final @Nullable String captionGroupId

The caption rendition group referenced by this variant, or null.

format

public final Format format

Format information associated with this variant.

subtitleGroupId

public final @Nullable String subtitleGroupId

The subtitle rendition group referenced by this variant, or null.

url

public final Uri url

The variant's url.

videoGroupId

public final @Nullable String videoGroupId

The video rendition group referenced by this variant, or null.

Public constructors

Variant

public Variant(
    Uri url,
    Format format,
    @Nullable String videoGroupId,
    @Nullable String audioGroupId,
    @Nullable String subtitleGroupId,
    @Nullable String captionGroupId
)
Parameters
Uri url

See url.

Format format

See format.

@Nullable String videoGroupId

See videoGroupId.

@Nullable String audioGroupId

See audioGroupId.

@Nullable String subtitleGroupId

See subtitleGroupId.

@Nullable String captionGroupId

See captionGroupId.

Public methods

copyWithFormat

public HlsMultivariantPlaylist.Variant copyWithFormat(Format format)

Returns a copy of this instance with the given Format.

createMediaPlaylistVariantUrl

public static HlsMultivariantPlaylist.Variant createMediaPlaylistVariantUrl(Uri url)

Creates a variant for a given media playlist url.

Parameters
Uri url

The media playlist url.

Returns
HlsMultivariantPlaylist.Variant

The variant instance.