Package com.castlabs.android.player

# Class ChunkSampleSourceListener

java.lang.Object
com.castlabs.android.player.ChunkSampleSourceListener

All Implemented Interfaces:
  `com.google.android.exoplayer2.source.MediaSourceEventListener`

public class ChunkSampleSourceListener extends Object implements com.google.android.exoplayer2.source.MediaSourceEventListener
Listener for `MediaSourceEventListener` events that are propagated to the `PlayerController`.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.google.android.exoplayer2.source.MediaSourceEventListener

  `com.google.android.exoplayer2.source.MediaSourceEventListener.EventDispatcher`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ChunkSampleSourceListener(PlayerController playerController)`
  Creates a new instance of `ChunkSampleSourceListener`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onDownstreamFormatChanged(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)`
  `void`
  `onLoadCanceled(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)`
  `void`
  `onLoadCompleted(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)`
  `void`
  `onLoadError(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)`
  `void`
  `onLoadStarted(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)`
  `void`
  `onUpstreamDiscarded(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ChunkSampleSourceListener

    public ChunkSampleSourceListener(@NonNull PlayerController playerController)
    Creates a new instance of `ChunkSampleSourceListener`.
    Parameters:
      `playerController` - The `PlayerController` to propagate events to.

- ## Method Details

  - ### onLoadStarted

    public void onLoadStarted(int windowIndex, @Nullable com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)
    Specified by:
      `onLoadStarted` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`

  - ### onLoadCompleted

    public void onLoadCompleted(int windowIndex, @Nullable com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)
    Specified by:
      `onLoadCompleted` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`

  - ### onLoadCanceled

    public void onLoadCanceled(int windowIndex, @Nullable com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)
    Specified by:
      `onLoadCanceled` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`

  - ### onLoadError

    public void onLoadError(int windowIndex, @Nullable com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.LoadEventInfo loadEventInfo, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData, IOException error, boolean wasCanceled)
    Specified by:
      `onLoadError` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`

  - ### onUpstreamDiscarded

    public void onUpstreamDiscarded(int windowIndex, com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)
    Specified by:
      `onUpstreamDiscarded` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`

  - ### onDownstreamFormatChanged

    public void onDownstreamFormatChanged(int windowIndex, @Nullable com.google.android.exoplayer2.source.MediaSource.MediaPeriodId mediaPeriodId, com.google.android.exoplayer2.source.MediaLoadData mediaLoadData)
    Specified by:
      `onDownstreamFormatChanged` in interface `com.google.android.exoplayer2.source.MediaSourceEventListener`