public final class

PlayerEmsgHandler.PlayerTrackEmsgHandler

extends java.lang.Object

implements TrackOutput

 java.lang.Object

↳androidx.media3.exoplayer.dash.PlayerEmsgHandler.PlayerTrackEmsgHandler

Overview

Handles emsg messages for a specific track for the player.

Summary

Methods
public voidformat(Format format)

public booleanmaybeRefreshManifestBeforeLoadingNextChunk(long presentationPositionUs)

For live streaming, check if the DASH manifest is expired before the next segment start time.

public voidonChunkLoadCompleted(Chunk chunk)

Called when a chunk load has been completed.

public booleanonChunkLoadError(Chunk chunk)

Called when a chunk load has encountered an error.

public voidrelease()

Release this track emsg handler.

public intsampleData(DataReader input, int length, boolean allowEndOfInput, int sampleDataPart)

public voidsampleData(ParsableByteArray data, int length, int sampleDataPart)

public voidsampleMetadata(long timeUs, int flags, int size, int offset, TrackOutput.CryptoData cryptoData)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public void format(Format format)

public int sampleData(DataReader input, int length, boolean allowEndOfInput, int sampleDataPart)

public void sampleData(ParsableByteArray data, int length, int sampleDataPart)

public void sampleMetadata(long timeUs, int flags, int size, int offset, TrackOutput.CryptoData cryptoData)

public boolean maybeRefreshManifestBeforeLoadingNextChunk(long presentationPositionUs)

For live streaming, check if the DASH manifest is expired before the next segment start time. If it is, the DASH media source will be notified to refresh the manifest.

Parameters:

presentationPositionUs: The next load position in presentation time.

Returns:

True if manifest refresh has been requested, false otherwise.

public void onChunkLoadCompleted(Chunk chunk)

Called when a chunk load has been completed.

Parameters:

chunk: The chunk whose load has been completed.

public boolean onChunkLoadError(Chunk chunk)

Called when a chunk load has encountered an error.

Parameters:

chunk: The chunk whose load encountered an error.

Returns:

Whether a manifest refresh has been requested.

public void release()

Release this track emsg handler. It should not be reused after this call.