|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PlayableMedia
The PlayableMedia interface provides methods which are common to all media objects, including transport control, looping, positional control, and notification callbacks.
| Field Summary | |
|---|---|
static int |
DEFAULT_PRIORITY
Priority default, which is PRIORITY_5. |
static int |
PRIORITY_1
Priority level 1. |
static int |
PRIORITY_2
Priority level 2. |
static int |
PRIORITY_3
Priority level 3. |
static int |
PRIORITY_4
Priority level 3. |
static int |
PRIORITY_5
Priority level 4. |
| Method Summary | |
|---|---|
void |
destroy()
Free memory associated with this object. |
int |
getCurrentLoopNumber()
Gets the number of times the looped media has looped back to the loop start. |
int |
getLoopCount()
Gets the loop count; which is the total number of times an object is played. |
int |
getMarkerCount()
Deprecated. - use MarkableMedia.getMarkerCount() instead. |
int |
getMarkerID(int index)
Deprecated. - use MarkableMedia.getMarkerIDByIndex(int) instead. |
String |
getMarkerName(int index)
Deprecated. - use MarkableMedia.getMarkerNameByIndex(int) instead. |
int |
getMarkerPosition(int index)
Deprecated. - use MarkableMedia.getMarkerPositionByIndex(int) instead. |
int |
getMediaType()
Returns file type of media. |
int |
getMillisecondLength()
Get length in milliseconds of object's media. |
int |
getMillisecondPosition()
Get the current playback position of a object in milliseconds. |
int |
getPlaybackRate()
Get the playback rate of the media. 100 is default rate. |
int |
getPriority()
Get media priority level. |
int |
getUniqueID()
Return runtime ID. |
boolean |
isDone()
Returns true if object has finished playing. |
boolean |
isLoaded()
Returns true if object is loaded and ready to be played. |
boolean |
isLoopingEnabled()
Return whether looping is enabled (set by a call to setLoopingEnabled(boolean)). |
boolean |
isPaused()
Returns true if paused. |
boolean |
isPlaying()
Returns true if object is playing. |
void |
pause()
Pause object. |
void |
resume()
Will resume object if paused. |
void |
setDoneCallbackEvent(Event done)
Set the event that is called when this media is finished. |
void |
setDoneCallbackEvent(Event done,
boolean doEventOnce)
Set the event that is called when this media is finished. |
void |
setLoopCount(int loopCount)
Sets the loop count; which is the total number of times an object is played. |
void |
setLoopingEnabled(boolean on)
Enable looping. |
void |
setMillisecondPosition(int mSec)
Set the current playback position of object in milliseconds. |
void |
setPlaybackRate(int newRate)
Set the playback rate of the media. |
void |
setPositionCallbackEvent(Event event,
int position)
Set an event that is called when this media reaches the given position during playback. |
void |
setPositionToMarker(int markerID)
Deprecated. - use MarkableMedia.setPositionToMarkerByID(int) instead. |
void |
setPriority(int priority)
Set media priority level. |
void |
setStoppedCallbackEvent(Event stopped)
Set the event that is called when this media is stopped by stop(). |
void |
setStoppedCallbackEvent(Event stopped,
boolean doEventOnce)
Set the event that is called when this media is stopped by stop(). |
void |
startPlaying()
Start media playback with default attributes. |
void |
startPlaying(int attributes)
Start media playback with specified attributes. |
void |
stopPlaying()
Stop media playback. |
| Field Detail |
|---|
static final int PRIORITY_1
static final int PRIORITY_2
static final int PRIORITY_3
static final int PRIORITY_4
static final int PRIORITY_5
static final int DEFAULT_PRIORITY
PRIORITY_5. Used
with setPriority(int). Higher values are higher priority.
| Method Detail |
|---|
void destroy()
int getMillisecondLength()
void setMillisecondPosition(int mSec)
mSec - position in media to seek toint getMillisecondPosition()
boolean isPlaying()
boolean isLoaded()
int getMediaType()
void startPlaying()
void startPlaying(int attributes)
attributes - - class-specific attributes applied to this playbackvoid stopPlaying()
boolean isDone()
boolean isPaused()
void pause()
void resume()
int getUniqueID()
void setLoopingEnabled(boolean on)
setLoopCount(int) or is 0 (loop forever) by default.
on - enable or disable looping.boolean isLoopingEnabled()
setLoopingEnabled(boolean)).
void setLoopCount(int loopCount)
loopCount - - total number of times to play; 0 means loop forever.int getLoopCount()
int getCurrentLoopNumber()
int getMarkerCount()
MarkableMedia.getMarkerCount() instead.
int getMarkerID(int index)
MarkableMedia.getMarkerIDByIndex(int) instead.
String getMarkerName(int index)
MarkableMedia.getMarkerNameByIndex(int) instead.
int getMarkerPosition(int index)
MarkableMedia.getMarkerPositionByIndex(int) instead.
void setPositionToMarker(int markerID)
MarkableMedia.setPositionToMarkerByID(int) instead.
void setPositionCallbackEvent(Event event,
int position)
event - - event to be postedposition - - time in milliseconds at which the event should be postedvoid setDoneCallbackEvent(Event done)
done - - event to be posted
void setDoneCallbackEvent(Event done,
boolean doEventOnce)
done - - event to be posteddoEventOnce - - if true, callback only called once for a given playbackvoid setStoppedCallbackEvent(Event stopped)
stopped - - event to be posted
void setStoppedCallbackEvent(Event stopped,
boolean doEventOnce)
stopped - - event to be posteddoEventOnce - - if true, callback only called once for a given playbackvoid setPriority(int priority)
priority - - priority level for mediaint getPriority()
void setPlaybackRate(int newRate)
newRate - - new playback rate; 100 is default rate.int getPlaybackRate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||