# HlsRedundantGroup.Factory

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.Factory)

*** ** * ** ***

<br />

```
class HlsRedundantGroup.Factory
```

<br />

*** ** * ** ***

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`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Factory#Factory(androidx.media3.exoplayer.hls.playlist.HlsMultivariantPlaylist)(multivariantPlaylist: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist!)` Creates a new factory. |

| ### Public functions |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Factory#createRenditionRedundantGroupList(int)(@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` with given `type`. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Factory#createVariantRedundantGroupList()()` Creates a list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant`. |

## Public constructors

### Factory

```
Factory(multivariantPlaylist: HlsMultivariantPlaylist!)
```

Creates a new factory.

| Parameters |
|---|---|
| `multivariantPlaylist: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist` for which to create `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

## Public functions

### createRenditionRedundantGroupList

```
fun createRenditionRedundantGroupList(@HlsRedundantGroup.Type type: Int): ImmutableList<HlsRedundantGroup!>!
```

Creates a list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` with given `type`.

If content steering is enabled, then a pathway Id will be determined by the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition#groupId()` and the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#pathwayId()` of the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.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 `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup.Type type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The type of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition` for which to create `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup!>!` | A list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If two renditions grouped into one `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` have the same pathway ID but different `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition#url()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If content steering enabled and a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Rendition#groupId()` is associated with more than one pathway. |
| `https://developer.android.com/reference/kotlin/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. |
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If the `type` is not one of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#VIDEO_RENDITION()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#AUDIO_RENDITION()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup#SUBTITLE_RENDITION()`. |

### createVariantRedundantGroupList

```
fun createVariantRedundantGroupList(): ImmutableList<HlsRedundantGroup!>!
```

Creates a list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant`.

If a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant` has a non-null `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#pathwayId()`, then its `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#url()` will be associated with that pathway ID when added to the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/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 `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist`.

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup!>!` | A list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup`. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If two variants grouped into one `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsRedundantGroup` have the same `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#pathwayId()` but different `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#url()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If content steering enabled and a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#videoGroupId()`, `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#audioGroupId()` or `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsMultivariantPlaylist.Variant#subtitleGroupId()` is associated with more than one pathway. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | If content steering is enabled and the set of available pathway IDs is inconsistent among variant redundant groups. |