net.rim.plazmic.mediaengine
Interface MediaListener


public interface MediaListener

The listener interface for all media events.

Since:
JDE 3.7.0

Field Summary
static int MEDIA_COMPLETE
          Sent when all scheduled media actions have been completed.
static int MEDIA_IO
          Sent by the MediaManager to notify about download progress/status.
static int MEDIA_LOADING_FAILED
          Sent by a MediaManager on failure of asynchronous download of media.
static int MEDIA_REALIZED
          Sent by a MediaManager on completion of asynchronous download of media.
static int MEDIA_REQUESTED
          Sent when new content is requested.
static int UNUSED
          Value to use for "eventParam" parameter values in the mediaEvent(java.lang.Object, int, int, java.lang.Object) method, when the parameter is not required.
 
Method Summary
 void mediaEvent(Object sender, int event, int eventParam, Object data)
          Invoked to handle media events.
 

Field Detail

MEDIA_COMPLETE

public static final int MEDIA_COMPLETE
Sent when all scheduled media actions have been completed.

Unless the media contains no user focusable items, this event is not guaranteed to be the last event generated by the media, because the user could start an animation with one of the focusable items.

If the media has focusable items then the user can trigger another action. If the media does not have any focusable items then it turns into a static media.

Since:
JDE 3.7.0

MEDIA_IO

public static final int MEDIA_IO
Sent by the MediaManager to notify about download progress/status.
Since:
JDE 3.7.0

MEDIA_LOADING_FAILED

public static final int MEDIA_LOADING_FAILED
Sent by a MediaManager on failure of asynchronous download of media.
Since:
JDE 4.0.0

MEDIA_REALIZED

public static final int MEDIA_REALIZED
Sent by a MediaManager on completion of asynchronous download of media.
Since:
JDE 3.7.0

MEDIA_REQUESTED

public static final int MEDIA_REQUESTED
Sent when new content is requested.
Since:
JDE 3.7.0

UNUSED

public static final int UNUSED
Value to use for "eventParam" parameter values in the mediaEvent(java.lang.Object, int, int, java.lang.Object) method, when the parameter is not required.
Since:
JDE 3.7.0
Method Detail

mediaEvent

public void mediaEvent(Object sender,
                       int event,
                       int eventParam,
                       Object data)
Invoked to handle media events.

The particular use of the data parameter varies with the media event being handled:
Media event data usage

MEDIA_COMPLETE Points to media data
MEDIA_REQUESTED Points to a string containing a URL for the requested content
MEDIA_IO Points to a LoadingStatus object
MEDIA_REALIZED Contains the media object returned by the downloader
MEDIA_LOADING_FAILED Holds a URI for the media

Parameters:
sender - Object that initiated the event, usually a MediaPlayer.
event - Event code for the event.
eventParam - Additional parameter associated with some events; at present, third-party implementors should treat this parameter as for internal use only, and ignore any value passed in.
data - Additional data associated with the event.
Since:
JDE 3.7.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.