DashContentSteeringTracker


@UnstableApi
class DashContentSteeringTracker : BaseContentSteeringTracker


Tracks the content steering states for a DASH stream.

Summary

Nested types

A callback to be notified of DashContentSteeringTracker events.

Provides the information for the query parameters to request the steering manifests.

Public constructors

DashContentSteeringTracker(
    dataSourceFactory: DataSource.Factory!,
    downloadExecutorSupplier: Supplier<ReleasableExecutor!>?,
    callback: DashContentSteeringTracker.Callback?,
    mediaTransferListener: TransferListener?,
    manifest: DashManifest!
)

Creates a DashContentSteeringTracker.

Public functions

Unit

Adds a SteeringQueryParamsProvider to the tracker.

ImmutableList<String!>?

Returns the current service location priority, or null if the tracker is inactive or no priority has been established.

TransferListener!

Returns the TransferListener that should be used by the DataSource for media loading.

Unit

Removes a SteeringQueryParamsProvider from the tracker.

Unit

Updates the DashManifest for the stream.

Protected functions

ImmutableMap<String!, String!>!

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

Boolean

Returns whether the given pathway is currently available.

Unit
onStart(initialPathwayIds: ImmutableList<String!>!)

Called when the tracker is started.

Unit

Called when tracking is stopped.

Unit

Performs a pathway clone defined in the steering manifest.

Unit

Performs a pathway evaluation based on the passed pathway priority.

Inherited functions

From androidx.media3.exoplayer.upstream.contentsteering.BaseContentSteeringTracker
java-static Uri!
applyUriReplacement(
    baseUri: Uri!,
    uriReplacement: SteeringManifest.UriReplacement!
)

Applies a SteeringManifest.UriReplacement to a base URI.

Unit

Releases the Content Steering tracker.

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

Starts the Content Steering tracker.

Public constructors

DashContentSteeringTracker

DashContentSteeringTracker(
    dataSourceFactory: DataSource.Factory!,
    downloadExecutorSupplier: Supplier<ReleasableExecutor!>?,
    callback: DashContentSteeringTracker.Callback?,
    mediaTransferListener: TransferListener?,
    manifest: DashManifest!
)

Creates a DashContentSteeringTracker.

Parameters
dataSourceFactory: DataSource.Factory!

The DataSource.Factory.

downloadExecutorSupplier: Supplier<ReleasableExecutor!>?

A supplier for a ReleasableExecutor, or null.

callback: DashContentSteeringTracker.Callback?

A Callback.

mediaTransferListener: TransferListener?

The TransferListener to be used by the DataSource for media loading, which should be the TransferListener passed to the DashMediaSource when the source is prepared.

manifest: DashManifest!

The DashManifest.

Public functions

addSteeringQueryParamsProvider

fun addSteeringQueryParamsProvider(
    provider: DashContentSteeringTracker.SteeringQueryParamsProvider!
): Unit

Adds a SteeringQueryParamsProvider to the tracker.

getCurrentServiceLocationPriority

fun getCurrentServiceLocationPriority(): ImmutableList<String!>?

Returns the current service location priority, or null if the tracker is inactive or no priority has been established.

getMediaTransferListener

fun getMediaTransferListener(): TransferListener!

Returns the TransferListener that should be used by the DataSource for media loading.

removeSteeringQueryParamsProvider

fun removeSteeringQueryParamsProvider(
    provider: DashContentSteeringTracker.SteeringQueryParamsProvider!
): Unit

Removes a SteeringQueryParamsProvider from the tracker.

updateManifest

fun updateManifest(manifest: DashManifest!): Unit

Updates the DashManifest for the stream.

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: String!

The ID of the pathway to check.

Returns
Boolean

Whether the given pathway is available.

onStart

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

Called when the tracker is started.

Parameters
initialPathwayIds: ImmutableList<String!>!

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 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: SteeringManifest.PathwayClone!

The SteeringManifest.PathwayClone to perform.

performPathwayEvaluation

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

Performs a pathway evaluation based on the passed pathway priority.

Parameters
pathwayPriority: ImmutableList<String!>!

The pathway priority to use for evaluation.