public interface

IPlayerEventsListener

com.akamai.media.IPlayerEventsListener

Class Overview

Player EventsListener

Summary

Constants
int PLAYER_EVENT_TYPE_END_REBUFFERING Indicate the last rebuffering event has ended
int PLAYER_EVENT_TYPE_ERROR Indicate an error has occurred
int PLAYER_EVENT_TYPE_FINISHED Indicate the end of the playback
int PLAYER_EVENT_TYPE_FULLSCREEN_MODE_CHANGE Indicate a fullscreen mode being selected
int PLAYER_EVENT_TYPE_LOADING Indicate the control is loading a media resource
int PLAYER_EVENT_TYPE_LOAD_REQUESTED There is a request for loading a new video.
int PLAYER_EVENT_TYPE_PAUSE_REQUESTED Pause method called
int PLAYER_EVENT_TYPE_POSITION_UPDATE Indicate a time position change.
int PLAYER_EVENT_TYPE_RESUME_REQUESTED Resume method called
int PLAYER_EVENT_TYPE_SIZE_CHANGE Video size or position has changed.
int PLAYER_EVENT_TYPE_START_PLAYING Indicate the start of the playback
int PLAYER_EVENT_TYPE_START_REBUFFERING Indicate the control is starting buffering
int PLAYER_EVENT_TYPE_SWITCH Indicate a bitrate switch has just occurred
int PLAYER_EVENT_TYPE_SWITCH_REQUESTED Indicate a bitrate switch has been requested
int PLAYER_EXTENDED_EVENT_BANDWIDTH_MEASURE Indicate the control has executed a bandwidth measure arg1: Current client bandwidth arg2: Index of the recommended playback bitrate
int PLAYER_EXTENDED_EVENT_SEEKING_SUCCEDEED Indicate a successful seeking operation arg1: Seeking position
Public Methods
abstract boolean onPlayerEvent(int iInEventType)
Called to indicate a player event
abstract boolean onPlayerExtendedEvent(int iInEventType, int arg1, int arg2)
Called to indicate a player extended event

Constants

public static final int PLAYER_EVENT_TYPE_END_REBUFFERING

Indicate the last rebuffering event has ended

Constant Value: 5 (0x00000005)

public static final int PLAYER_EVENT_TYPE_ERROR

Indicate an error has occurred

Constant Value: 3 (0x00000003)

public static final int PLAYER_EVENT_TYPE_FINISHED

Indicate the end of the playback

Constant Value: 1 (0x00000001)

public static final int PLAYER_EVENT_TYPE_FULLSCREEN_MODE_CHANGE

Indicate a fullscreen mode being selected

Constant Value: 11 (0x0000000b)

public static final int PLAYER_EVENT_TYPE_LOADING

Indicate the control is loading a media resource

Constant Value: 8 (0x00000008)

public static final int PLAYER_EVENT_TYPE_LOAD_REQUESTED

There is a request for loading a new video. A plugin can pause the load (returning false in onPlayerEvent) for doing things (use case: implementing ads plugins

Constant Value: 13 (0x0000000d)

public static final int PLAYER_EVENT_TYPE_PAUSE_REQUESTED

Pause method called

Constant Value: 15 (0x0000000f)

public static final int PLAYER_EVENT_TYPE_POSITION_UPDATE

Indicate a time position change. Used to track the progress of the video

Constant Value: 0 (0x00000000)

public static final int PLAYER_EVENT_TYPE_RESUME_REQUESTED

Resume method called

Constant Value: 14 (0x0000000e)

public static final int PLAYER_EVENT_TYPE_SIZE_CHANGE

Video size or position has changed. This event is fired whenever the position or the size of the video control changes. For example, when there is a change in the screen orientation

Constant Value: 12 (0x0000000c)

public static final int PLAYER_EVENT_TYPE_START_PLAYING

Indicate the start of the playback

Constant Value: 2 (0x00000002)

public static final int PLAYER_EVENT_TYPE_START_REBUFFERING

Indicate the control is starting buffering

Constant Value: 4 (0x00000004)

public static final int PLAYER_EVENT_TYPE_SWITCH

Indicate a bitrate switch has just occurred

Constant Value: 7 (0x00000007)

public static final int PLAYER_EVENT_TYPE_SWITCH_REQUESTED

Indicate a bitrate switch has been requested

Constant Value: 6 (0x00000006)

public static final int PLAYER_EXTENDED_EVENT_BANDWIDTH_MEASURE

Indicate the control has executed a bandwidth measure arg1: Current client bandwidth arg2: Index of the recommended playback bitrate

Constant Value: 9 (0x00000009)

public static final int PLAYER_EXTENDED_EVENT_SEEKING_SUCCEDEED

Indicate a successful seeking operation arg1: Seeking position

Constant Value: 10 (0x0000000a)

Public Methods

public abstract boolean onPlayerEvent (int iInEventType)

Called to indicate a player event

Parameters
iInEventType Even type
Returns
  • If true, process continue as expected. If event type is PLAYER_EVENT_TYPE_LOAD_REQUESTED and methods returns false, stream loading process is interrupted. Once interrupted, to resume the playback a explicit call to resume() method is required.

public abstract boolean onPlayerExtendedEvent (int iInEventType, int arg1, int arg2)

Called to indicate a player extended event

Parameters
iInEventType Event Type
arg1 Argument
arg2 Argument
Returns
  • If true, process continue as expected.