ContentSteeringTracker


@UnstableApi
public interface ContentSteeringTracker

Known direct subclasses
HlsContentSteeringTracker

Tracks the content steering states for an HLS stream.


Tracks the content steering states for an adaptive stream.

Summary

Public methods

abstract boolean
excludeCurrentPathway(long excludeDurationMs)

Excludes the current pathway for the given duration, in milliseconds.

abstract boolean

Returns whether the ContentSteeringTracker is active.

abstract void
start(
    Uri initialSteeringManifestUri,
    @Nullable String initialPathwayId,
    MediaSourceEventListener.EventDispatcher eventDispatcher
)

Starts the ContentSteeringTracker.

abstract void

Stops the ContentSteeringTracker.

Public methods

excludeCurrentPathway

abstract boolean excludeCurrentPathway(long excludeDurationMs)

Excludes the current pathway for the given duration, in milliseconds.

Parameters
long excludeDurationMs

The duration for which to exclude the current pathway.

Returns
boolean

Whether the exclusion was successful.

isActive

abstract boolean isActive()

Returns whether the ContentSteeringTracker is active.

If this method returns false, the caller of the ContentSteeringTracker should behave as if content steering is absent.

start

abstract void start(
    Uri initialSteeringManifestUri,
    @Nullable String initialPathwayId,
    MediaSourceEventListener.EventDispatcher eventDispatcher
)

Starts the ContentSteeringTracker.

Parameters
Uri initialSteeringManifestUri

The initial Uri of the steering manifest.

@Nullable String initialPathwayId

The ID of the initial pathway to use before the first steering manifest is loaded, or null to allow the tracker to pick any available pathway before the first steering manifest is loaded.

MediaSourceEventListener.EventDispatcher eventDispatcher

A MediaSourceEventListener.EventDispatcher for reporting load events.

stop

abstract void stop()

Stops the ContentSteeringTracker.