|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlhmc.plugins.Plugin
lhmc.plugins.BasicPlayerPlugin
public class BasicPlayerPlugin
BasicPlayerPlugin executes a single sound file or a directory of files making a playlist. When a file is played a play panel is showed. It supports MP3, OGG Vorbis, FLAC, MONKEY's AUDIO, WAV, AIFF, AU and SPEEX audio formats.
Field Summary | |
---|---|
protected java.util.Map |
audioInfo
|
protected PlaylistItem |
currentItem
|
protected boolean |
isMuted
|
protected boolean |
isPaused
|
protected BasicPlayer |
player
|
protected float |
positonValue
|
protected double |
volume
|
Fields inherited from class lhmc.plugins.Plugin |
---|
backupFrame, mainFrame |
Constructor Summary | |
---|---|
BasicPlayerPlugin()
Constructs the basic player plugin. |
Method Summary | |
---|---|
void |
display(java.lang.String msg)
Displays a message. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
opened(java.lang.Object stream,
java.util.Map properties)
Open callback, stream is ready to play. |
void |
play(java.net.URL url)
Shows the play panel and plays a single song. |
void |
playAll(java.net.URL file)
Shows the play panel and creates a playlist for all the songs in the current directory, and plays one by one. |
void |
progress(int bytesread,
long microseconds,
byte[] pcmdata,
java.util.Map properties)
Progress callback while playing. |
void |
run(java.net.URL urlFile)
Starts to play a song. |
void |
setController(BasicController controller)
A handle to the BasicPlayer, plugins may control the player through the controller (play, stop, ...) |
void |
stateUpdated(BasicPlayerEvent event)
Notification callback for basicplayer events such as opened, eom ... |
Methods inherited from class lhmc.plugins.Plugin |
---|
setMainFrame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected BasicPlayer player
protected PlaylistItem currentItem
protected java.util.Map audioInfo
protected float positonValue
protected double volume
protected boolean isPaused
protected boolean isMuted
Constructor Detail |
---|
public BasicPlayerPlugin()
Method Detail |
---|
public void play(java.net.URL url)
play
in class Plugin
url
- the song to play.public void playAll(java.net.URL file)
playAll
in class Plugin
file
- the songs directory to play.public void run(java.net.URL urlFile)
urlFile
- the song file.public void opened(java.lang.Object stream, java.util.Map properties)
stream
- could be File, URL or InputStreamproperties
- audio stream properties.public void progress(int bytesread, long microseconds, byte[] pcmdata, java.util.Map properties)
bytesread
- from encoded stream.microseconds
- elapsed (reseted after a seek !).pcmdata
- PCM samples.properties
- audio stream parameters.public void stateUpdated(BasicPlayerEvent event)
event
- public void setController(BasicController controller)
controller
- : a handle to the playerpublic void display(java.lang.String msg)
msg
- A string of the message.public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |