HlsContentSteeringTracker
@UnstableApi
public final class HlsContentSteeringTracker implements ContentSteeringTracker
Tracks the content steering states for an HLS stream.
Summary
Nested types |
|---|
public interface HlsContentSteeringTracker.CallbackA callback to be notified of |
Public fields |
|
|---|---|
boolean |
Public constructors |
|---|
HlsContentSteeringTracker(Creates an |
Public methods |
|
|---|---|
boolean |
excludeCurrentPathway(long excludeDurationMs)Excludes the current pathway for the given duration, in milliseconds. |
boolean |
isActive()Returns whether the |
void |
start(Starts the . |
void |
stop()Stops the |
Public fields
Public constructors
HlsContentSteeringTracker
public HlsContentSteeringTracker(
HlsDataSourceFactory dataSourceFactory,
@Nullable Supplier<ReleasableExecutor> downloadExecutorSupplier,
HlsPlaylistTracker playlistTracker,
@Nullable HlsContentSteeringTracker.Callback callback,
BandwidthMeter bandwidthMeter,
Clock clock
)
Creates an HlsContentSteeringTracker.
| Parameters | |
|---|---|
HlsDataSourceFactory dataSourceFactory |
The |
@Nullable Supplier<ReleasableExecutor> downloadExecutorSupplier |
A supplier to obtain a |
HlsPlaylistTracker playlistTracker |
The |
@Nullable HlsContentSteeringTracker.Callback callback |
A |
BandwidthMeter bandwidthMeter |
The |
Clock clock |
The |
Public methods
excludeCurrentPathway
public 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
public 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
public void start(
Uri initialSteeringManifestUri,
@Nullable String initialPathwayId,
MediaSourceEventListener.EventDispatcher eventDispatcher
)
Starts the .
| Throws | |
|---|---|
java.lang.IllegalStateException |
If the |