|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to facilities for playing audio and video files.
Method Summary | |
void |
addStatusListener(PlayerStatusListener ps)
Adds a listener to be informed when the media player changes status. |
void |
close()
Close the player and release its resources. |
void |
cueFile(MediaData f)
Loads a file, sets the current position to the beginning, and pauses. |
java.awt.Component |
getCanvas()
|
java.lang.String |
getDevice()
|
boolean |
getLoop()
Returns the value of the loop property. |
java.lang.String |
getName()
|
int |
getSize()
Returns the maximum size of the current file. |
Volume |
getVolume()
Gets the audio output volume. |
VolumeRange |
getVolumeRange()
|
void |
jumpTo(int pos)
Moves the current position. |
void |
pause()
Temporarily stops playing at the current position. |
void |
play()
Starts playing after calling stop or cuefile. |
boolean |
playFile(java.lang.String f)
Play the file, blocking until it's done. |
void |
playNextTrack()
|
void |
playPrevTrack()
|
void |
playStream(java.io.InputStream str)
|
void |
removeStatusListener(PlayerStatusListener ps)
Removes a listener. |
void |
setArtist(java.lang.String artist)
|
void |
setDevice(java.lang.String dev)
|
void |
setLoop(boolean l)
Sets the loop property. |
void |
setTitle(java.lang.String artist)
|
void |
setTotal(int secs)
|
void |
setTrack(int track)
|
void |
setVolume(Volume vol)
Sets the audio output volume. |
void |
stop()
Stops playing and resets the current position to the beginning. |
void |
unpause()
Starts playing after calling pause. |
Method Detail |
public boolean playFile(java.lang.String f) throws java.lang.Exception
f
- a string containing an URL to playjava.lang.Exception
- public void playStream(java.io.InputStream str) throws java.lang.Exception
str
- java.lang.Exception
- public void cueFile(MediaData f) throws java.lang.Exception
f
- java.lang.Exception
- public int getSize() throws java.lang.Exception
java.lang.Exception
- public java.lang.String getDevice()
public java.awt.Component getCanvas()
public void setDevice(java.lang.String dev) throws java.lang.Exception
public void setArtist(java.lang.String artist)
public void setTitle(java.lang.String artist)
public void setTrack(int track)
public void jumpTo(int pos) throws java.lang.Exception
pos
- java.lang.Exception
- public void play() throws java.lang.Exception
java.lang.Exception
- public void playNextTrack() throws java.lang.Exception
java.lang.Exception
- public void playPrevTrack() throws java.lang.Exception
java.lang.Exception
- public void pause() throws java.lang.Exception
java.lang.Exception
- public void unpause() throws java.lang.Exception
java.lang.Exception
- public void stop() throws java.lang.Exception
java.lang.Exception
- public VolumeRange getVolumeRange() throws java.lang.Exception
public Volume getVolume() throws java.lang.Exception
java.lang.Exception
- public void setVolume(Volume vol) throws java.io.IOException
vol
- java.io.IOException
- public void setLoop(boolean l)
public void setTotal(int secs)
public boolean getLoop()
public void addStatusListener(PlayerStatusListener ps)
ps
- the listener to addpublic void removeStatusListener(PlayerStatusListener ps)
ps
- the listener to removepublic void close() throws java.lang.Exception
java.lang.Exception
- public java.lang.String getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |