|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
MediaPlayerListener is an interface for implementing a listener to wait for media player events. A listener implementing MediaPlayerListener is registered in the media player by means of the MediaPlayer class setMediaPlayerListener() method.
When a media player state change occurs, mediaStateChanged() is called. Events are notified in the following cases.
| Event | Value notified in mediaStateChanged() |
| Playback started. Playback resumed after being paused. |
MediaPlayerListener.PLAYED |
| Playback paused. | MediaPlayerListener.PAUSED |
| Playback stopped (including stoppage due to error). | MediaPlayerListener.STOPPED |
The mediaStateChanged() method is not called in the following cases.
| Field Summary | |
static int |
PAUSED
Play paused. |
static int |
PLAYED
Play started. |
static int |
STOPPED
Play stopped. |
| Method Summary | |
void |
mediaStateChanged(int state)
Called when the media state has changed. |
| Field Detail |
public static final int PLAYED
public static final int STOPPED
public static final int PAUSED
| Method Detail |
public void mediaStateChanged(int state)
state - State (PLAYED, STOPPED, or PAUSED)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||