|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMusicPlayerController
A music player controller can be used to control a music player.
EvolutionPlayerUI.getMusicPlayerController()
Nested Class Summary | |
---|---|
static class |
IMusicPlayerController.MusicPlayerControllerListener
A music player controller listener is informed about state changes in the music player. |
Method Summary | |
---|---|
void |
addPlayListener(IMusicPlayerController.MusicPlayerControllerListener listener)
Add the given listener to the list of controller listeners. |
boolean |
canChangeVolume()
Can the volume of the current song be changed? |
boolean |
canPause()
Can the current song be paused? |
boolean |
canSeek()
Can the current song be seeked? |
LocalMediaInfo |
getCurrent()
Returns the song currently played. |
long |
getTimePlayed()
The amount of milliseconds the current song as been played so far. |
int |
getVolume()
The volume of the current song in the range [0, 100] |
boolean |
isPaused()
Is the player in the pause state? |
void |
next()
Play the next song, this is either a randomly chosen song or a song previously added with pushSong(LocalMediaInfo) . |
void |
pause()
Pause the playback, only has an effect if canPause() returns
true for the same song. |
void |
play(LocalMediaInfo media)
Start playing the given song. |
void |
previous()
Play the previously played song, if the current song has been played for less then a couple of seconds, replay the current song otherwise. |
void |
pushSong(LocalMediaInfo media)
Push the given media to the next play list. |
void |
removePlayListener(IMusicPlayerController.MusicPlayerControllerListener listener)
Remove the given listener from the list of controller listeners. |
void |
resume()
Resume the playback, only has an effect if isPaused() returns
true. |
void |
seek(int percentage)
Seek to the given percentage in the file, that is 0 is the beginning, 100 the end and 50 is the middle of the song. |
void |
setVolume(int volume)
Set the volume of the music player. |
void |
start()
Start playing some random chosen song. |
void |
stop()
Stop playing the current song. |
Method Detail |
---|
void start()
void stop()
boolean isPaused()
boolean canPause()
pause()
has any effect for the current songvoid pause()
canPause()
returns
true for the same song.
void resume()
isPaused()
returns
true.
void next()
pushSong(LocalMediaInfo)
.
void previous()
LocalMediaInfo getCurrent()
void play(LocalMediaInfo media)
media
- the media to playvoid pushSong(LocalMediaInfo media)
next()
. If the list is empty a random song
will be chosen, otherwise the first song in the list will be used and
removed from the list. pushSong(LocalMediaInfo)
adds the given
media to the end of the list.
media
- the media to add to the next listlong getTimePlayed()
void addPlayListener(IMusicPlayerController.MusicPlayerControllerListener listener)
listener
- the listener to addvoid removePlayListener(IMusicPlayerController.MusicPlayerControllerListener listener)
listener
- the listener to removeboolean canSeek()
void seek(int percentage)
percentage
- the percentage of played time after seek returnsboolean canChangeVolume()
void setVolume(int volume)
canChangeVolume()
returns true.
volume
- the volume to set in the range [0, 100]int getVolume()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |