Package com.castlabs.android.player

# Class VideoTrackListener

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

All Implemented Interfaces:
  `MediaTrackEventListener`, `com.google.android.exoplayer2.video.VideoRendererEventListener`

public class VideoTrackListener extends Object implements com.google.android.exoplayer2.video.VideoRendererEventListener, MediaTrackEventListener
This is an implementation of the `VideoRendererEventListener` that is used to delegate events from the track renderer to the `PlayerListener` instances that are registered with the current `PlayerController`.

Since:
  3.0.0

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface com.google.android.exoplayer2.video.VideoRendererEventListener

  `com.google.android.exoplayer2.video.VideoRendererEventListener.EventDispatcher`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VideoTrackListener(PlayerListeners playerListeners)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `onCryptoError(MediaCodec.CryptoException e)`
  Invoked when a decoder operation raises a `DecryptionException`.
  `void`
  `onDecoderInitializationError(com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException e)`
  Invoked when a decoder fails to initialize.
  `void`
  `onDroppedFrames(int count, long elapsed)`
  `void`
  `onRenderedFirstFrame(Surface surface)`
  `void`
  `onVideoDecoderInitialized(String decoderName, long initializedTimestampMs, long initializationDurationMs)`
  `void`
  `onVideoDisabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)`
  `void`
  `onVideoEnabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)`
  `void`
  `onVideoInputFormatChanged(com.google.android.exoplayer2.Format format)`
  `void`
  `onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio)`

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

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

- ## Constructor Details

  - ### VideoTrackListener

    public VideoTrackListener(@NonNull PlayerListeners playerListeners)

- ## Method Details

  - ### onVideoEnabled

    public void onVideoEnabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)
    Specified by:
      `onVideoEnabled` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onVideoDecoderInitialized

    public void onVideoDecoderInitialized(String decoderName, long initializedTimestampMs, long initializationDurationMs)
    Specified by:
      `onVideoDecoderInitialized` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onDroppedFrames

    public void onDroppedFrames(int count, long elapsed)
    Specified by:
      `onDroppedFrames` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onVideoSizeChanged

    public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio)
    Specified by:
      `onVideoSizeChanged` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onRenderedFirstFrame

    public void onRenderedFirstFrame(Surface surface)
    Specified by:
      `onRenderedFirstFrame` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onVideoInputFormatChanged

    public void onVideoInputFormatChanged(com.google.android.exoplayer2.Format format)
    Specified by:
      `onVideoInputFormatChanged` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onVideoDisabled

    public void onVideoDisabled(com.google.android.exoplayer2.decoder.DecoderCounters counters)
    Specified by:
      `onVideoDisabled` in interface `com.google.android.exoplayer2.video.VideoRendererEventListener`

  - ### onDecoderInitializationError

    public void onDecoderInitializationError(@NonNull com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.DecoderInitializationException e)
    Description copied from interface: `MediaTrackEventListener`
    Invoked when a decoder fails to initialize.
    Specified by:
      `onDecoderInitializationError` in interface `MediaTrackEventListener`
    Parameters:
      `e` - The corresponding exception.

  - ### onCryptoError

    public void onCryptoError(@NonNull MediaCodec.CryptoException e)
    Description copied from interface: `MediaTrackEventListener`
    Invoked when a decoder operation raises a `DecryptionException`.
    Specified by:
      `onCryptoError` in interface `MediaTrackEventListener`
    Parameters:
      `e` - The corresponding exception.