public final class

HlsMultivariantPlaylist.Variant

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.hls.playlist.HlsMultivariantPlaylist.Variant

Overview

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

Summary

Fields
public final java.lang.StringaudioGroupId

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

public final java.lang.StringcaptionGroupId

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

public final Formatformat

Format information associated with this variant.

public final java.lang.StringsubtitleGroupId

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

public final Uriurl

The variant's url.

public final java.lang.StringvideoGroupId

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

Constructors
publicVariant(Uri url, Format format, java.lang.String videoGroupId, java.lang.String audioGroupId, java.lang.String subtitleGroupId, java.lang.String captionGroupId)

Methods
public HlsMultivariantPlaylist.VariantcopyWithFormat(Format format)

Returns a copy of this instance with the given Format.

public static HlsMultivariantPlaylist.VariantcreateMediaPlaylistVariantUrl(Uri url)

Creates a variant for a given media playlist url.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final Uri url

The variant's url.

public final Format format

Format information associated with this variant.

public final java.lang.String videoGroupId

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

public final java.lang.String audioGroupId

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

public final java.lang.String subtitleGroupId

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

public final java.lang.String captionGroupId

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

Constructors

public Variant(Uri url, Format format, java.lang.String videoGroupId, java.lang.String audioGroupId, java.lang.String subtitleGroupId, java.lang.String captionGroupId)

Parameters:

url: See HlsMultivariantPlaylist.Variant.url.
format: See HlsMultivariantPlaylist.Variant.format.
videoGroupId: See HlsMultivariantPlaylist.Variant.videoGroupId.
audioGroupId: See HlsMultivariantPlaylist.Variant.audioGroupId.
subtitleGroupId: See HlsMultivariantPlaylist.Variant.subtitleGroupId.
captionGroupId: See HlsMultivariantPlaylist.Variant.captionGroupId.

Methods

public static HlsMultivariantPlaylist.Variant createMediaPlaylistVariantUrl(Uri url)

Creates a variant for a given media playlist url.

Parameters:

url: The media playlist url.

Returns:

The variant instance.

public HlsMultivariantPlaylist.Variant copyWithFormat(Format format)

Returns a copy of this instance with the given Format.