public interface

PlayerListener

com.neomades.media.PlayerListener

Class Overview

Listener of a player to get all the events of a player.

Summary

Constants
int STATE_END_OF_MEDIA The end of the media has been reached
int STATE_PAUSED The player has been paused
int STATE_PLAYING The player is playing
int STATE_PREPARED The player is prepared to play
int STATE_RELEASED The player is destroyed
Public Methods
abstract void onPlayerError(Player player, int state, Exception error)
Called when an error has been thrown into a player.
abstract void onPlayerEvent(Player player, int state)
Called when a player has stopped.

Constants

public static final int STATE_END_OF_MEDIA

The end of the media has been reached

Constant Value: 5 (0x00000005)

public static final int STATE_PAUSED

The player has been paused

Constant Value: 4 (0x00000004)

public static final int STATE_PLAYING

The player is playing

Constant Value: 3 (0x00000003)

public static final int STATE_PREPARED

The player is prepared to play

Constant Value: 2 (0x00000002)

public static final int STATE_RELEASED

The player is destroyed

Constant Value: 1 (0x00000001)

Public Methods

public abstract void onPlayerError (Player player, int state, Exception error)

Called when an error has been thrown into a player.

Parameters
player the player
state state of the player
error the error exception

public abstract void onPlayerEvent (Player player, int state)

Called when a player has stopped.

Parameters
player the player
state state of the player