Package com.amazonaws.ivs.player
Class Player.Listener
java.lang.Object
com.amazonaws.ivs.player.Player.Listener
- Enclosing interface:
- Player
Player listener interface. Provide an implementation of this interface to
 
Player.addListener(Listener) to receive events from a Player instance.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidIndicates that a timed cue event occurred.abstract voidonDurationChanged(long duration) Indicates that source duration changed.abstract voidonError(PlayerException exception) Indicates that an error occurred.voidIndicates that the player has lost its network connection.abstract voidonQualityChanged(Quality quality) Indicates that the playing quality changed either from a user action or from an internal adaptive quality switch.abstract voidIndicates that the player is buffering from a previousPlayer.State.PLAYINGstate.abstract voidonSeekCompleted(long time) Indicates that the player has finished seeking to a given position as requested fromPlayer.seekTo(long).voidonSeiMessage(SeiMessage seiMessage) Indicates that a Supplemental Enhancement Information (SEI) message event occurred.abstract voidonStateChanged(Player.State state) Indicates that the player state changed.voidonSyncTimeChanged(long syncTime) Indicates that synchronization time has changed.voidonVideoFirstFrame(long time) Indicates that the first video frame has been displayed after the player started playback.abstract voidonVideoSizeChanged(int width, int height) Indicates that the video dimensions changed.
- 
Constructor Details- 
Listenerpublic Listener()
 
- 
- 
Method Details- 
onCueIndicates that a timed cue event occurred.- Parameters:
- cue- timed cue event object- Cue
 
- 
onSeiMessageIndicates that a Supplemental Enhancement Information (SEI) message event occurred.- Parameters:
- seiMessage- message object, currently always subtype- UserDataUnregisteredSeiMessage
 
- 
onDurationChangedpublic abstract void onDurationChanged(long duration) Indicates that source duration changed. This can occur after thePlayer.State.READYstate 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.
 
- 
onStateChangedIndicates that the player state changed.- Parameters:
- state- current player state
 
- 
onErrorIndicates that an error occurred. Errors are fatal and stop playback of the stream. The player moves intoPlayer.State.IDLEon an error.- Parameters:
- exception- exception object with information for the error that occurred.
 
- 
onRebufferingpublic abstract void onRebuffering()Indicates that the player is buffering from a previousPlayer.State.PLAYINGstate. Excludes user actions such as seeking, starting or resuming the stream.
- 
onSeekCompletedpublic abstract void onSeekCompleted(long time) Indicates that the player has finished seeking to a given position as requested fromPlayer.seekTo(long).- Parameters:
- time- the seek time in milliseconds.
 
- 
onVideoSizeChangedpublic 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
 
- 
onQualityChangedIndicates that the playing quality changed either from a user action or from an internal adaptive quality switch.- Parameters:
- quality- current quality
 
- 
onVideoFirstFramepublic 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 inPlayer.State.PLAYINGstate and when there is a video track.- Parameters:
- time- the time when the first frame was displayed, in millilseconds
 
- 
onSyncTimeChangedpublic void onSyncTimeChanged(long syncTime) Indicates that synchronization time has changed. SeePlayer.getSyncTime()- Parameters:
- syncTime- the current player syncTime, in milliseconds.
 
 
-