Class Player.Listener

java.lang.Object
com.amazonaws.ivs.player.Player.Listener
Enclosing interface:
Player

public abstract static class Player.Listener extends Object
Player listener interface. Provide an implementation of this interface to Player.addListener(Listener) to receive events from a Player instance.
  • Constructor Details Link icon

    • Listener Link icon

      public Listener()
  • Method Details Link icon

    • onCue Link icon

      public abstract void onCue(@NonNull Cue cue)
      Indicates that a timed cue event occurred.
      Parameters:
      cue - timed cue event object Cue
    • onSeiMessage Link icon

      public void onSeiMessage(@NonNull SeiMessage seiMessage)
      Indicates that a Supplemental Enhancement Information (SEI) message event occurred.
      Parameters:
      seiMessage - message object, currently always subtype UserDataUnregisteredSeiMessage
    • onDurationChanged Link icon

      public abstract void onDurationChanged(long duration)
      Indicates that source duration changed. This can occur after the Player.State.READY state to indicate a change in the duration of the media. This value can be set to -1 for unknown or indefinite length streams.
      Parameters:
      duration - the current duration of the source in milliseconds.
    • onStateChanged Link icon

      public abstract void onStateChanged(@NonNull Player.State state)
      Indicates that the player state changed.
      Parameters:
      state - current player state
    • onError Link icon

      public abstract void onError(@NonNull PlayerException exception)
      Indicates that an error occurred. Errors are fatal and stop playback of the stream. The player moves into Player.State.IDLE on an error.
      Parameters:
      exception - exception object with information for the error that occurred.
    • onRebuffering Link icon

      public abstract void onRebuffering()
      Indicates that the player is buffering from a previous Player.State.PLAYING state. Excludes user actions such as seeking, starting or resuming the stream.
    • onSeekCompleted Link icon

      public abstract void onSeekCompleted(long time)
      Indicates that the player has finished seeking to a given position as requested from Player.seekTo(long).
      Parameters:
      time - the seek time in milliseconds.
    • onVideoSizeChanged Link icon

      public abstract void onVideoSizeChanged(int width, int height)
      Indicates that the video dimensions changed.
      Parameters:
      width - updated video width in pixels
      height - updated video height in pixels
    • onQualityChanged Link icon

      public abstract void onQualityChanged(@NonNull Quality quality)
      Indicates that the playing quality changed either from a user action or from an internal adaptive quality switch.
      Parameters:
      quality - current quality
    • onNetworkUnavailable Link icon

      public void onNetworkUnavailable()
      Indicates that the player has lost its network connection. Users can customize network recovery behavior using Player.setNetworkRecoveryMode(com.amazonaws.ivs.player.Player.NetworkRecoveryMode)
      See Also:
    • onVideoFirstFrame Link icon

      public void onVideoFirstFrame(long time)
      Indicates that the first video frame has been displayed after the player started playback. Note that this callback only fires when the player is in Player.State.PLAYING state and when there is a video track.
      Parameters:
      time - the time when the first frame was displayed, in millilseconds
    • onSyncTimeChanged Link icon

      public void onSyncTimeChanged(long syncTime)
      Indicates that synchronization time has changed. See Player.getSyncTime()
      Parameters:
      syncTime - the current player syncTime, in milliseconds.