# BaseUrlExclusionList

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

*** ** * ** ***


```
@UnstableApi
class BaseUrlExclusionList
```

<br />

*** ** * ** ***

Holds the state of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#exclude(androidx.media3.exoplayer.dash.manifest.BaseUrl,long)` base URLs to be used to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#selectBaseUrl(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)` a base URL based on these exclusions.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#BaseUrlExclusionList()()` Creates an instance. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#exclude(androidx.media3.exoplayer.dash.manifest.BaseUrl,long)(baseUrlToExclude: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!, exclusionDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Excludes the given base URL. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#getPriorityCount(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)(baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!)` Returns the number of priority levels of the given list of base URLs. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#getPriorityCountAfterExclusion(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)(baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!)` Returns the number of priority levels for the given list of base URLs after exclusion. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#getServiceLocationCount(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)(baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!)` Returns the number of service locations for the given list of base URLs before exclusion. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#getServiceLocationCountAfterExclusion(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)(baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!)` Returns the number of service locations for the given list of base URLs after exclusion. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#reset()()` Resets the state. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#selectBaseUrl(java.util.List<androidx.media3.exoplayer.dash.manifest.BaseUrl>)(baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!)` Selects the base URL to use from the given list. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#updateServiceLocationSteeringPriority(com.google.common.collect.ImmutableList<java.lang.String>)( serviceLocationPriority: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>? )` Updates the service location steering priority. |

## Public constructors

### BaseUrlExclusionList

```
BaseUrlExclusionList()
```

Creates an instance.

## Public functions

### exclude

```
fun exclude(baseUrlToExclude: BaseUrl!, exclusionDurationMs: Long): Unit
```

Excludes the given base URL.

| Parameters |
|---|---|
| `baseUrlToExclude: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!` | The base URL to exclude. |
| `exclusionDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration of exclusion, in milliseconds. |

### getPriorityCount

```
java-static fun getPriorityCount(baseUrls: (Mutable)List<BaseUrl!>!): Int
```

Returns the number of priority levels of the given list of base URLs.

| Parameters |
|---|---|
| `baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!` | The list of base URLs. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of priority levels before exclusion. |

### getPriorityCountAfterExclusion

```
fun getPriorityCountAfterExclusion(baseUrls: (Mutable)List<BaseUrl!>!): Int
```

Returns the number of priority levels for the given list of base URLs after exclusion.

| Parameters |
|---|---|
| `baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!` | The list of base URLs. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of priority levels after exclusion. |

### getServiceLocationCount

```
java-static fun getServiceLocationCount(baseUrls: (Mutable)List<BaseUrl!>!): Int
```

Returns the number of service locations for the given list of base URLs before exclusion.

| Parameters |
|---|---|
| `baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!` | The list of base URLs. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of service locations before exclusion. |

### getServiceLocationCountAfterExclusion

```
fun getServiceLocationCountAfterExclusion(baseUrls: (Mutable)List<BaseUrl!>!): Int
```

Returns the number of service locations for the given list of base URLs after exclusion.

| Parameters |
|---|---|
| `baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!` | The list of base URLs. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of service locations after exclusion. |

### reset

```
fun reset(): Unit
```

Resets the state.

### selectBaseUrl

```
fun selectBaseUrl(baseUrls: (Mutable)List<BaseUrl!>!): BaseUrl?
```

Selects the base URL to use from the given list.

The list is reduced by service location and priority of base URLs that have been passed to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/BaseUrlExclusionList#exclude(androidx.media3.exoplayer.dash.manifest.BaseUrl,long)`. The base URL to use is then selected from the remaining base URLs by priority and weight.

| Parameters |
|---|---|
| `baseUrls: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl!>!` | The list of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl` to select from. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/BaseUrl?` | The selected base URL after exclusion or null if all elements have been excluded. |

### updateServiceLocationSteeringPriority

```
fun updateServiceLocationSteeringPriority(
    serviceLocationPriority: ImmutableList<String!>?
): Unit
```

Updates the service location steering priority.