# HlsRedundantGroup

Artifact: [androidx.media3:media3-exoplayer-hls](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.java+class:androidx.media3.exoplayer.hls.playlist.HlsRedundantGroup)

*** ** * ** ***

<br />

```
@UnstableApi
class HlsRedundantGroup
```

<br />

*** ** * ** ***

Represents a group of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` that are identical streams but from different locations (different playlist urls), and indicated by a shared `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Factory` A factory for creating lists of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` from a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist`. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey` Defines a key that groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` into one `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type` Represents the type of a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#AUDIO_RENDITION() = 2` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#SUBTITLE_RENDITION() = 3` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#VARIANT() = 0` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant`. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#VIDEO_RENDITION() = 1` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#HlsRedundantGroup(androidx.media3.exoplayer.hls.playlist.HlsRedundantGroup.GroupKey,java.lang.String,android.net.Uri)( groupKey: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey!, pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, playlistUrl: https://developer.android.com/reference/android/net/Uri.html! )` Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#HlsRedundantGroup(androidx.media3.exoplayer.hls.playlist.HlsRedundantGroup.GroupKey,java.lang.String,android.net.Uri,int)( groupKey: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey!, pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, playlistUrl: https://developer.android.com/reference/android/net/Uri.html!, indexInMultivariantPlaylist: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| ### Public functions |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableSet.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#getAllPathwayIds()()` Returns all pathway IDs that belong to this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableSet.html<https://developer.android.com/reference/android/net/Uri.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#getAllPlaylistUrls()()` Returns all playlist urls that belong to this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#getCurrentPlaylistUrl()()` Returns the playlist url that is associated with the currently chosen pathway ID. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#getIndicesInMultivariantPlaylist()()` Returns the indices of the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` belonging to this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` in either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#variants()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#videos()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#audios()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#subtitles()`. |
| `https://developer.android.com/reference/android/net/Uri.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#getPlaylistUrl(java.lang.String)(pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns the playlist url associated with the given `pathwayId`, or `null` if the given `pathwayId` doesn't exist in this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#put(java.lang.String,android.net.Uri)(pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, playlistUrl: https://developer.android.com/reference/android/net/Uri.html!)` Puts a `playlistUrl` and its associated `pathwayId` to the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#put(java.lang.String,android.net.Uri,int)(pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, playlistUrl: https://developer.android.com/reference/android/net/Uri.html!, indexInMultivariantPlaylist: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Puts a `playlistUrl` and its associated `pathwayId` to the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#size()()` Returns the size of the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#currentPathwayId()` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#groupKey()` The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey` that the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` share. |

## Constants

### AUDIO_RENDITION

```
@HlsRedundantGroup.Type
const val AUDIO_RENDITION = 2: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`.

### SUBTITLE_RENDITION

```
@HlsRedundantGroup.Type
const val SUBTITLE_RENDITION = 3: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`.

### VARIANT

```
@HlsRedundantGroup.Type
const val VARIANT = 0: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant`.

### VIDEO_RENDITION

```
@HlsRedundantGroup.Type
const val VIDEO_RENDITION = 1: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` groups `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition`.

## Public constructors

### HlsRedundantGroup

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

Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

| Parameters |
|---|---|
| `groupKey: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#groupKey()`. |
| `pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The ID of the default current pathway. |
| `playlistUrl: https://developer.android.com/reference/android/net/Uri.html!` | The playlist url that is associated with the default current pathway. |

### HlsRedundantGroup

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

Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

| Parameters |
|---|---|
| `groupKey: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey!` | See `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#groupKey()`. |
| `pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The ID of the default current pathway. |
| `playlistUrl: https://developer.android.com/reference/android/net/Uri.html!` | The playlist url that is associated with the default current pathway. |
| `indexInMultivariantPlaylist: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the `playlistUrl` in either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#variants()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#videos()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#audios()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#subtitles()`. May be `https://developer.android.com/reference/kotlin/androidx/media3/common/C#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 `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

### getAllPlaylistUrls

```
fun getAllPlaylistUrls(): ImmutableSet<Uri!>!
```

Returns all playlist urls that belong to this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/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 `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` belonging to this `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` in either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#variants()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#videos()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#audios()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#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 `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

### put

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

Puts a `playlistUrl` and its associated `pathwayId` to the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

### put

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

Puts a `playlistUrl` and its associated `pathwayId` to the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

| Parameters |
|---|---|
| `pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The ID of the pathway to add. |
| `playlistUrl: https://developer.android.com/reference/android/net/Uri.html!` | The playlist url to add. |
| `indexInMultivariantPlaylist: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the `playlistUrl` in either `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#variants()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#videos()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#audios()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist#subtitles()`. May be `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if the `playlistUrl` is not declared in the multivariant playlist. |

### size

```
fun size(): Int
```

Returns the size of the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`.

## Public properties

### currentPathwayId

```
var currentPathwayId: String!
```

### groupKey

```
val groupKey: HlsRedundantGroup.GroupKey!
```

The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.GroupKey` that the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` share.