Package com.google.android.exoplayer2.source

## Interface MediaPeriod.Callback

- All Superinterfaces:
    `SequenceableLoader.Callback<MediaPeriod>`
  All Known Implementing Classes:
    `ClippingMediaPeriod`, `MaskingMediaPeriod`
  Enclosing interface:
    MediaPeriod

      public static interface MediaPeriod.Callback
      extends SequenceableLoader.Callback<MediaPeriod>

  A callback to be notified of `MediaPeriod` events.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onPrepared​(MediaPeriod mediaPeriod)` | Called when preparation completes.

    - ### Methods inherited from interface com.google.android.exoplayer2.source.SequenceableLoader.Callback

      `onContinueLoadingRequested`

- - ### Method Detail

    - #### onPrepared

          void onPrepared​(MediaPeriod mediaPeriod)

      Called when preparation completes.

      Called on the playback thread. After invoking this method, the `MediaPeriod` can expect for `MediaPeriod.selectTracks(ExoTrackSelection[], boolean[], SampleStream[], boolean[], long)` to be called with the initial track selection.

      Parameters:
        `mediaPeriod` - The prepared `MediaPeriod`.