Interface ExoMediaPlayback.Listener

Enclosing class:
ExoMediaPlayback

public static interface ExoMediaPlayback.Listener
Interface definition to listen for player states.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoked when the player is preparing a MediaSource and the surface should be set.
    void
    Invoked when the [RenderView] associated with the playback should be hidden.
    default void
    Invoked when a new MediaItem is played.
    void
    Callback invoked when the player has been initialized.
    void
    Invoked when the player is destroyed.
    void
    Invoked when the player will be created.
    void
    Invoked when the @{link RenderView} associated with the playback should be visible.
    void
    onVideoSizeChanged(int width, int height)
    Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.
  • Method Details

    • onSetProjectionFormat

      void onSetProjectionFormat()
      Invoked when the player will be created.
    • onPlayerInitialized

      void onPlayerInitialized()
      Callback invoked when the player has been initialized.
    • onPlayerReleased

      void onPlayerReleased()
      Invoked when the player is destroyed.
    • onHideRenderView

      void onHideRenderView()
      Invoked when the [RenderView] associated with the playback should be hidden.
    • onShowRenderView

      void onShowRenderView()
      Invoked when the @{link RenderView} associated with the playback should be visible.
    • onVideoSizeChanged

      void onVideoSizeChanged(int width, int height)
      Called before a frame is rendered for the first time since setting the surface, and each time there's a change in the size or pixel aspect ratio of the video being rendered.
      Parameters:
      width - The video width in pixels, 0 when unknown.
      height - The video height in pixels, 0 when unknown.
    • onConfigureSurface

      void onConfigureSurface()
      Invoked when the player is preparing a MediaSource and the surface should be set.
    • onMediaItemChanged

      default void onMediaItemChanged()
      Invoked when a new MediaItem is played.