# HlsContentSteeringTracker

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/HlsContentSteeringTracker.java+class:androidx.media3.exoplayer.hls.HlsContentSteeringTracker)

*** ** * ** ***


```
@UnstableApi
class HlsContentSteeringTracker : BaseContentSteeringTracker
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.media3.exoplayer.upstream.contentsteering.BaseContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker) ||
|   | ↳ | [androidx.media3.exoplayer.hls.HlsContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker) |

*** ** * ** ***

Tracks the content steering states for an HLS stream.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker.Callback` A callback to be notified of `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker` events. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#HlsContentSteeringTracker(androidx.media3.exoplayer.hls.HlsDataSourceFactory,com.google.common.base.Supplier<androidx.media3.exoplayer.util.ReleasableExecutor>,androidx.media3.exoplayer.hls.playlist.HlsPlaylistTracker,androidx.media3.exoplayer.hls.HlsContentSteeringTracker.Callback,androidx.media3.exoplayer.upstream.BandwidthMeter,androidx.media3.common.util.Clock)( dataSourceFactory: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsDataSourceFactory!, 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!>?, playlistTracker: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylistTracker!, callback: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker.Callback?, bandwidthMeter: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/BandwidthMeter!, clock: https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock! )` Creates an `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#excludeCurrentPathway(long)(excludeDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Excludes the current pathway for the given duration. |

| ### Protected functions |
|---|---|
| `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/hls/HlsContentSteeringTracker#getSteeringQueryParameters()()` Returns the query parameters to include in the steering manifest request. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#isPathwayAvailable(java.lang.String)(pathwayId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns whether the given pathway is currently available. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#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. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#onStop()()` Called when tracking is stopped. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#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. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker#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. |

### Inherited functions

From [androidx.media3.exoplayer.upstream.contentsteering.BaseContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker) `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.
`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.

### Inherited properties

From [androidx.media3.exoplayer.upstream.contentsteering.BaseContentSteeringTracker](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker) `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()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/contentsteering/BaseContentSteeringTracker#isActive()`

## Public constructors

### HlsContentSteeringTracker

```
HlsContentSteeringTracker(
    dataSourceFactory: HlsDataSourceFactory!,
    downloadExecutorSupplier: Supplier<ReleasableExecutor!>?,
    playlistTracker: HlsPlaylistTracker!,
    callback: HlsContentSteeringTracker.Callback?,
    bandwidthMeter: BandwidthMeter!,
    clock: Clock!
)
```

Creates an `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker`.

| Parameters |
|---|---|
| `dataSourceFactory: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsDataSourceFactory!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsDataSourceFactory`. |
| `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 to obtain a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/util/ReleasableExecutor`, or ` null`. |
| `playlistTracker: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylistTracker!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/playlist/HlsPlaylistTracker`. |
| `callback: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker.Callback?` | A `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/hls/HlsContentSteeringTracker.Callback` to receive events, or ` null`. |
| `bandwidthMeter: https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/BandwidthMeter!` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/upstream/BandwidthMeter`. |
| `clock: https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Clock`. |

## Public functions

### excludeCurrentPathway

```
fun excludeCurrentPathway(excludeDurationMs: Long): Boolean
```

Excludes the current pathway for the given duration.

| Parameters |
|---|---|
| `excludeDurationMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration in milliseconds to exclude the current pathway. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the current pathway was excluded. |

## Protected functions

### getSteeringQueryParameters

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

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

### isPathwayAvailable

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