HlsRedundantGroup.Factory


public class HlsRedundantGroup.Factory


A factory for creating lists of redundant groups from a HlsMultivariantPlaylist.

Summary

Public constructors

Factory(HlsMultivariantPlaylist multivariantPlaylist)

Creates a new factory.

Public constructors

Factory

public Factory(HlsMultivariantPlaylist multivariantPlaylist)

Creates a new factory.

Parameters
HlsMultivariantPlaylist multivariantPlaylist

The HlsMultivariantPlaylist for which to create redundant groups.

Public methods

createRenditionRedundantGroupList

public ImmutableList<HlsRedundantGroupcreateRenditionRedundantGroupList(@HlsRedundantGroup.Type int type)

Creates a list of redundant groups for renditions with given type.

If content steering is enabled, then a pathway Id will be determined by the group ID and the pathway ID of the Variant that links to the rendition. Otherwise, a generated pathway ID will be used. The first is '.', and the subsequent ones for the same group are '..', '...', according to the order they are listed in the HlsMultivariantPlaylist.

Parameters
@HlsRedundantGroup.Type int type

The type of renditions for which to create redundant groups.

Throws
androidx.media3.common.ParserException

If two renditions grouped into one HlsRedundantGroup have the same pathway ID but different urls.

androidx.media3.common.ParserException

If content steering enabled and a group ID is associated with more than one pathway.

androidx.media3.common.ParserException

If content steering is enabled and the set of available pathway IDs of a rendition redundant group is inconsistent with the variant redundant groups.

java.lang.IllegalArgumentException

If the type is not one of VIDEO_RENDITION, AUDIO_RENDITION or SUBTITLE_RENDITION.

createVariantRedundantGroupList

public ImmutableList<HlsRedundantGroupcreateVariantRedundantGroupList()

Creates a list of redundant groups for variants.

If a Variant has a non-null pathway ID, then its url will be associated with that pathway ID when added to the HlsRedundantGroup. Otherwise, a generated pathway ID will be used. The first is '.', and the subsequent ones for the same group are '..', '...', according to the order they are listed in the HlsMultivariantPlaylist.

Throws
androidx.media3.common.ParserException

If two variants grouped into one HlsRedundantGroup have the same pathwayId but different urls.

androidx.media3.common.ParserException

If content steering enabled and a video group ID, audio group ID or subtitle group ID is associated with more than one pathway.

androidx.media3.common.ParserException

If content steering is enabled and the set of available pathway IDs is inconsistent among variant redundant groups.