public static abstract class

Player.Listener

extends Object
java.lang.Object
   ↳ com.amazonaws.ivs.player.Player.Listener

Class Overview

Player listener interface. Provide an implementation of this interface to addListener(Listener) to receive events from a Player instance.

Summary

Public Constructors
Listener()
Public Methods
abstract void onCue(Cue cue)
Indicates that a timed cue event occurred.
abstract void onDurationChanged(long duration)
Indicates that source duration changed.
abstract void onError(PlayerException exception)
Indicates that an error occurred.
abstract void onQualityChanged(Quality quality)
Indicates that the playing quality changed either from a user action or from an internal adaptive quality switch.
abstract void onRebuffering()
Indicates that the player is buffering from a previous PLAYING state.
abstract void onSeekCompleted(long time)
Indicates that the player has seeked to a given position as requested from seekTo(long).
abstract void onStateChanged(Player.State state)
Indicates that the player state changed.
abstract void onVideoSizeChanged(int width, int height)
Indicates that the video dimensions changed.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Listener ()

Public Methods

public abstract void onCue (Cue cue)

Indicates that a timed cue event occurred.

public abstract void onDurationChanged (long duration)

Indicates that source duration changed. This can occur after the 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.

public abstract void onError (PlayerException exception)

Indicates that an error occurred. Errors are fatal and stop playback of the stream. The player moves into IDLE on an error.

Parameters
exception exception object with information for the error that occurred.

public abstract void onQualityChanged (Quality quality)

Indicates that the playing quality changed either from a user action or from an internal adaptive quality switch.

Parameters
quality current quality

public abstract void onRebuffering ()

Indicates that the player is buffering from a previous PLAYING state. Excludes user actions such as seeking, starting or resuming the stream.

public abstract void onSeekCompleted (long time)

Indicates that the player has seeked to a given position as requested from seekTo(long).

Parameters
time the seeked time in milliseconds.

public abstract void onStateChanged (Player.State state)

Indicates that the player state changed.

Parameters
state current player state

public abstract void onVideoSizeChanged (int width, int height)

Indicates that the video dimensions changed.

Parameters
width updated video width
height updated video height