com.vodafone.v10.system.media
Interface MediaPlayerListener


public interface MediaPlayerListener

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.

Table 1. Event Values Notified by MediaPlayerListener
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

PLAYED

public static final int PLAYED
Play started.

STOPPED

public static final int STOPPED
Play stopped.

PAUSED

public static final int PAUSED
Play paused.
Method Detail

mediaStateChanged

public void mediaStateChanged(int state)
Called when the media state has changed.
Parameters:
state - State (PLAYED, STOPPED, or PAUSED)


Copyright 2002,2003 Aplix Corporation. All rights reserved. Aplix Confidential and Restricted.