HlsContentSteeringTracker


@UnstableApi
class HlsContentSteeringTracker : ContentSteeringTracker


Tracks the content steering states for an HLS stream.

Summary

Nested types

A callback to be notified of HlsContentSteeringTracker events.

Public constructors

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

Creates an HlsContentSteeringTracker.

Public functions

Boolean
excludeCurrentPathway(excludeDurationMs: Long)

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

Unit
start(
    initialSteeringManifestUri: Uri!,
    initialPathwayId: String?,
    eventDispatcher: MediaSourceEventListener.EventDispatcher!
)

Starts the .

Unit

Stops the ContentSteeringTracker.

Public properties

Boolean

Public constructors

HlsContentSteeringTracker

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

Creates an HlsContentSteeringTracker.

Parameters
dataSourceFactory: HlsDataSourceFactory!

The HlsDataSourceFactory to create data sources for loading steering manifests.

downloadExecutorSupplier: Supplier<ReleasableExecutor!>?

A supplier to obtain a ReleasableExecutor for downloading steering manifests, or null.

playlistTracker: HlsPlaylistTracker!

The HlsPlaylistTracker.

callback: HlsContentSteeringTracker.Callback?

A Callback to receive events, or null.

bandwidthMeter: BandwidthMeter!

The BandwidthMeter to obtain throughput estimates.

clock: Clock!

The Clock to schedule handler messages.

Public functions

excludeCurrentPathway

fun excludeCurrentPathway(excludeDurationMs: Long): Boolean

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

Parameters
excludeDurationMs: Long

The duration for which to exclude the current pathway.

Returns
Boolean

Whether the exclusion was successful.

start

fun start(
    initialSteeringManifestUri: Uri!,
    initialPathwayId: String?,
    eventDispatcher: MediaSourceEventListener.EventDispatcher!
): Unit

Starts the .

Throws
java.lang.IllegalStateException

If the initialPathwayId is not declared in the redundant group.

stop

fun stop(): Unit

Stops the ContentSteeringTracker.

Public properties

isActive

val isActiveBoolean