MediaPeriod.Callback


public interface MediaPeriod.Callback extends SequenceableLoader.Callback

Known direct subclasses
ClippingMediaPeriod

Wraps a MediaPeriod and clips its SampleStreams to provide a subsequence of their samples.

MaskingMediaPeriod

Media period that defers calling createPeriod on a given source until createPeriod has been called.


A callback to be notified of MediaPeriod events.

Summary

Public methods

abstract void
onPrepared(MediaPeriod mediaPeriod)

Called when preparation completes.

Inherited methods

From androidx.media3.exoplayer.source.SequenceableLoader.Callback
abstract void

Called by the loader to indicate that it wishes for its continueLoading method to be called when it can continue to load data.

Public methods

onPrepared

abstract void onPrepared(MediaPeriod mediaPeriod)

Called when preparation completes.

Called on the playback thread. After invoking this method, the MediaPeriod can expect for selectTracks to be called with the initial track selection.

Parameters
MediaPeriod mediaPeriod

The prepared MediaPeriod.