|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapwidgets.APMediaPlayer
public class APMediaPlayer
Wraps PMediaPlayer. For now only sound files are supported. For video see PVideoView.
Constructor Summary | |
---|---|
APMediaPlayer(processing.core.PApplet pApplet)
Creates new PMediaPlayer |
Method Summary | |
---|---|
int |
getCurrentPosition()
Get the current position. |
int |
getDuration()
Get the duration of the sound |
boolean |
onError(android.media.MediaPlayer mediaPlayer,
int a,
int b)
|
void |
onPrepared(android.media.MediaPlayer mp)
When this is called, the player is ready to start playing etc. |
void |
pause()
Pause the playing of the file |
void |
release()
Release the MediaPlayer |
void |
seekTo(int msec)
move to a point in the file, counted from the beginning in millisecond. |
void |
setLooping(boolean looping)
Set this to true to loop the play back. |
void |
setMediaFile(java.lang.String file)
Set the media file by filename |
void |
setVolume(float left,
float right)
Sets the volume. |
void |
start()
Start playing the file |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public APMediaPlayer(processing.core.PApplet pApplet)
pApplet
- Method Detail |
---|
public void setMediaFile(java.lang.String file)
file
- public void start()
public void pause()
public void seekTo(int msec)
msec
- public void release()
public void setLooping(boolean looping)
looping
- public void setVolume(float left, float right)
left
- right
- public int getCurrentPosition()
public int getDuration()
public void onPrepared(android.media.MediaPlayer mp)
onPrepared
in interface android.media.MediaPlayer.OnPreparedListener
public boolean onError(android.media.MediaPlayer mediaPlayer, int a, int b)
onError
in interface android.media.MediaPlayer.OnErrorListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |