# BaseContentSteeringTracker

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

*** ** * ** ***


```
@UnstableApi
abstract class BaseContentSteeringTracker
```

<br />

Known direct subclasses [DashContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashContentSteeringTracker), [HlsContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/DashContentSteeringTracker` | Tracks the content steering states for a DASH stream. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker` | Tracks the content steering states for an HLS stream. |

*** ** * ** ***

Abstract base class for Content Steering tracker implementations.

It provides common state management for steering manifest tracking, pathway evaluation, and pathway cloning.

## Summary

| ### Protected constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#BaseContentSteeringTracker(androidx.media3.datasource.DataSource.Factory,com.google.common.base.Supplier<androidx.media3.exoplayer.util.ReleasableExecutor>)( dataSourceFactory: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSource.Factory!, downloadExecutorSupplier: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/base/Supplier.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/ReleasableExecutor!>? )` Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#release()()` Releases the Content Steering tracker. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#start(android.net.Uri,com.google.common.collect.ImmutableList<java.lang.String>,androidx.media3.exoplayer.source.MediaSourceEventListener.EventDispatcher)( initialSteeringManifestUri: https://developer.android.com/reference/android/net/Uri.html!, initialPathwayIds: 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!>!, eventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSourceEventListener.EventDispatcher! )` Starts the Content Steering tracker. |

| ### Protected functions |
|---|---|
| `java-static https://developer.android.com/reference/android/net/Uri.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#applyUriReplacement(android.net.Uri,androidx.media3.exoplayer.upstream.contentsteering.SteeringManifest.UriReplacement)( baseUri: https://developer.android.com/reference/android/net/Uri.html!, uriReplacement: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.UriReplacement! )` Applies a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.UriReplacement` to a base URI. |
| `abstract https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableMap.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#getSteeringQueryParameters()()` Returns the query parameters to include in the steering manifest request. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#isPathwayAvailable(java.lang.String)(pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns whether the given pathway is currently available. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#onStart(com.google.common.collect.ImmutableList<java.lang.String>)(initialPathwayIds: 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!>!)` Called when the tracker is started. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#onStop()()` Called when tracking is stopped. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#performPathwayClone(androidx.media3.exoplayer.upstream.contentsteering.SteeringManifest.PathwayClone)(pathwayClone: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.PathwayClone!)` Performs a pathway clone defined in the steering manifest. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#performPathwayEvaluation(com.google.common.collect.ImmutableList<java.lang.String>)(pathwayPriority: 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!>!)` Performs a pathway evaluation based on the passed pathway priority. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#isActive()` |

| ### Protected properties |
|---|---|
| `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!>?` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#currentPathwayPriority()` |

## Protected constructors

### BaseContentSteeringTracker

```
protected BaseContentSteeringTracker(
    dataSourceFactory: DataSource.Factory!,
    downloadExecutorSupplier: Supplier<ReleasableExecutor!>?
)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker`.

| Parameters |
|---|---|
| `dataSourceFactory: https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSource.Factory!` | The `https://developer.android.com/reference/kotlin/androidx/media3/datasource/DataSource.Factory` to load steering manifests. |
| `downloadExecutorSupplier: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/base/Supplier.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/ReleasableExecutor!>?` | A supplier for a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/ReleasableExecutor` to download steering manifests. |

## Public functions

### release

```
fun release(): Unit
```

Releases the Content Steering tracker.

Once released, the tracker cannot be used again.

### start

```
fun start(
    initialSteeringManifestUri: Uri!,
    initialPathwayIds: ImmutableList<String!>!,
    eventDispatcher: MediaSourceEventListener.EventDispatcher!
): Unit
```

Starts the Content Steering tracker.

| Parameters |
|---|---|
| `initialSteeringManifestUri: https://developer.android.com/reference/android/net/Uri.html!` | The initial `https://developer.android.com/reference/android/net/Uri.html` of the steering manifest. |
| `initialPathwayIds: 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!>!` | The IDs of the initial pathways to use before the first steering manifest is loaded. |
| `eventDispatcher: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSourceEventListener.EventDispatcher!` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSourceEventListener.EventDispatcher` for reporting load events. |

## Protected functions

### applyUriReplacement

```
protected java-static fun applyUriReplacement(
    baseUri: Uri!,
    uriReplacement: SteeringManifest.UriReplacement!
): Uri!
```

Applies a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.UriReplacement` to a base URI.

| Parameters |
|---|---|
| `baseUri: https://developer.android.com/reference/android/net/Uri.html!` | The base `https://developer.android.com/reference/android/net/Uri.html`. |
| `uriReplacement: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.UriReplacement!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.UriReplacement`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html!` | The updated `https://developer.android.com/reference/android/net/Uri.html`. |

### getSteeringQueryParameters

```
protected abstract fun getSteeringQueryParameters(): ImmutableMap<String!, String!>!
```

Returns the query parameters to include in the steering manifest request.

### isPathwayAvailable

```
protected abstract fun isPathwayAvailable(pathwayId: String!): Boolean
```

Returns whether the given pathway is currently available.

| Parameters |
|---|---|
| `pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The ID of the pathway to check. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the given pathway is available. |

### onStart

```
protected abstract fun onStart(initialPathwayIds: ImmutableList<String!>!): Unit
```

Called when the tracker is started.

| Parameters |
|---|---|
| `initialPathwayIds: 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!>!` | The IDs of the initial pathways to be used before the first steering manifest is loaded. |

### onStop

```
protected abstract fun onStop(): Unit
```

Called when tracking is stopped.

This can be either externally called by `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#release()` or internally due to an unrecoverable error.

### performPathwayClone

```
protected abstract fun performPathwayClone(pathwayClone: SteeringManifest.PathwayClone!): Unit
```

Performs a pathway clone defined in the steering manifest.

| Parameters |
|---|---|
| `pathwayClone: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.PathwayClone!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest.PathwayClone` to perform. |

### performPathwayEvaluation

```
protected abstract fun performPathwayEvaluation(pathwayPriority: ImmutableList<String!>!): Unit
```

Performs a pathway evaluation based on the passed pathway priority.

| Parameters |
|---|---|
| `pathwayPriority: 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!>!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/SteeringManifest#pathwayPriority()` to use for evaluation. |

## Public properties

### isActive

```
val isActive: Boolean
```

## Protected properties

### currentPathwayPriority

```
protected val currentPathwayPriority: ImmutableList<String!>?
```