@UnstableApi
class HlsRedundantGroup


Represents a group of variants or renditions that are identical streams but from different locations (different playlist urls), and indicated by a shared GroupKey.

Summary

Nested types

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

Defines a key that groups variants or renditions into one HlsRedundantGroup.

Represents the type of a HlsRedundantGroup.

Public constructors

HlsRedundantGroup(
    groupKey: HlsRedundantGroup.GroupKey!,
    pathwayId: String!,
    playlistUrl: Uri!
)

Creates a HlsRedundantGroup.

HlsRedundantGroup(
    groupKey: HlsRedundantGroup.GroupKey!,
    pathwayId: String!,
    playlistUrl: Uri!,
    indexInMultivariantPlaylist: Int
)

Creates a HlsRedundantGroup.

Public functions

ImmutableSet<String!>!

Returns all pathway IDs that belong to this HlsRedundantGroup.

ImmutableSet<Uri!>!

Returns all playlist urls that belong to this HlsRedundantGroup.

Uri!

Returns the playlist url that is associated with the currently chosen pathway ID.

ImmutableList<Int!>!

Returns the indices of the variants or renditions belonging to this HlsRedundantGroup in either variants, videos, audios or subtitles.

Uri?
getPlaylistUrl(pathwayId: String!)

Returns the playlist url associated with the given pathwayId, or null if the given pathwayId doesn't exist in this HlsRedundantGroup.

Unit
put(pathwayId: String!, playlistUrl: Uri!)

Puts a playlistUrl and its associated pathwayId to the HlsRedundantGroup.

Unit
put(pathwayId: String!, playlistUrl: Uri!, indexInMultivariantPlaylist: Int)

Puts a playlistUrl and its associated pathwayId to the HlsRedundantGroup.

Int

Returns the size of the HlsRedundantGroup.

Constants

AUDIO_RENDITION

@HlsRedundantGroup.Type
const val AUDIO_RENDITION = 2: Int

The HlsRedundantGroup groups audio renditions.

SUBTITLE_RENDITION

@HlsRedundantGroup.Type
const val SUBTITLE_RENDITION = 3: Int

The HlsRedundantGroup groups subtitle renditions.

VARIANT

@HlsRedundantGroup.Type
const val VARIANT = 0: Int

The HlsRedundantGroup groups variants.

VIDEO_RENDITION

@HlsRedundantGroup.Type
const val VIDEO_RENDITION = 1: Int

The HlsRedundantGroup groups video renditions.

Public constructors

HlsRedundantGroup

HlsRedundantGroup(
    groupKey: HlsRedundantGroup.GroupKey!,
    pathwayId: String!,
    playlistUrl: Uri!
)

Creates a HlsRedundantGroup.

Parameters
groupKey: HlsRedundantGroup.GroupKey!

See groupKey.

pathwayId: String!

The ID of the default current pathway.

playlistUrl: Uri!

The playlist url that is associated with the default current pathway.

HlsRedundantGroup

HlsRedundantGroup(
    groupKey: HlsRedundantGroup.GroupKey!,
    pathwayId: String!,
    playlistUrl: Uri!,
    indexInMultivariantPlaylist: Int
)

Creates a HlsRedundantGroup.

Parameters
groupKey: HlsRedundantGroup.GroupKey!

See groupKey.

pathwayId: String!

The ID of the default current pathway.

playlistUrl: Uri!

The playlist url that is associated with the default current pathway.

indexInMultivariantPlaylist: Int

The index of the playlistUrl in either variants, videos, audios or subtitles. May be INDEX_UNSET if the playlistUrl is not declared in the multivariant playlist.

Public functions

getAllPathwayIds

fun getAllPathwayIds(): ImmutableSet<String!>!

Returns all pathway IDs that belong to this HlsRedundantGroup.

getAllPlaylistUrls

fun getAllPlaylistUrls(): ImmutableSet<Uri!>!

Returns all playlist urls that belong to this HlsRedundantGroup.

getCurrentPlaylistUrl

fun getCurrentPlaylistUrl(): Uri!

Returns the playlist url that is associated with the currently chosen pathway ID.

getIndicesInMultivariantPlaylist

fun getIndicesInMultivariantPlaylist(): ImmutableList<Int!>!

Returns the indices of the variants or renditions belonging to this HlsRedundantGroup in either variants, videos, audios or subtitles.

getPlaylistUrl

fun getPlaylistUrl(pathwayId: String!): Uri?

Returns the playlist url associated with the given pathwayId, or null if the given pathwayId doesn't exist in this HlsRedundantGroup.

put

fun put(pathwayId: String!, playlistUrl: Uri!): Unit

Puts a playlistUrl and its associated pathwayId to the HlsRedundantGroup.

put

fun put(pathwayId: String!, playlistUrl: Uri!, indexInMultivariantPlaylist: Int): Unit

Puts a playlistUrl and its associated pathwayId to the HlsRedundantGroup.

Parameters
pathwayId: String!

The ID of the pathway to add.

playlistUrl: Uri!

The playlist url to add.

indexInMultivariantPlaylist: Int

The index of the playlistUrl in either variants, videos, audios or subtitles. May be INDEX_UNSET if the playlistUrl is not declared in the multivariant playlist.

size

fun size(): Int

Returns the size of the HlsRedundantGroup.

Public properties

currentPathwayId

var currentPathwayIdString!