|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Player
A Player plays tracks to one or more speakers which may be local speaker
(probably a SourceDataLine
), an Airtunes speaker or some other type (eg RTSP, uPnP etc.)
Each player maintains it's own playlist and tracks may be cued, reordered, skipped
and so on as you'd expect.
Method Summary | |
---|---|
void |
addSpeaker(Speaker speaker)
Add a Speaker to the Player. |
java.util.Collection<Speaker> |
getAvailableSpeakers()
Get the collection of speakers that could be used by this Player and that aren't currently in use elsewhere. |
Track |
getCurrentTrack()
Get the Track currently being played by this Player, or null if it's
not playing anything |
int |
getCurrentTrackIndex()
Return the index in the list of tracks returned from getPlaylist()
that is currently playing. |
java.lang.String |
getDisplayName()
Return a nice name for this Player for display to the user |
ManualPlaylist |
getPlaylist()
Return the Playlist in use by this Player |
long |
getRemaining()
Return the number of milliseconds remaining in the playlist. |
int |
getRepeat()
Get the repeat mode, as set by setRepeat(int) |
int |
getRevision()
Return the revision number. |
boolean |
getShuffle()
Get the shuffle mode, as set by setShuffle(boolean) |
java.util.Collection<Speaker> |
getSpeakers()
Return the list of Speaker objects current in use by this Player |
int |
getTrackPosition()
Return the number of milliseconds into the currently playing track. |
int |
getVolume()
Return the current volume |
boolean |
isPaused()
Return true if the player is paused, false if it's playing or stopped. |
void |
playNext()
Skip to the next track in the playlist. |
void |
playPrevious()
Skip to the previous track in the playlist. |
void |
removeSpeaker(Speaker speaker)
Remove a Speaker to the Player. |
void |
seek(int ms)
Seek to the specified millisecond value in the current track If the value is outsize the valid range this method does nothing |
void |
setCurrentTrackIndex(int ix)
Set the currently playing track |
void |
setPaused(boolean paused)
Set the player to be paused (true) or playing (false). |
void |
setRepeat(int repeat)
Set the style of repeat - none (0), track only (1) or playlist (2) |
void |
setShuffle(boolean shuffle)
Set whether to shuffle the playlist |
void |
setVolume(int volume)
Set the current volume |
Methods inherited from interface org.qtunes.core.Service |
---|
getContext, reportState, startService, stopService |
Method Detail |
---|
ManualPlaylist getPlaylist()
void playNext()
void playPrevious()
void setCurrentTrackIndex(int ix)
void seek(int ms)
void setPaused(boolean paused)
boolean isPaused()
int getTrackPosition()
long getRemaining()
void setShuffle(boolean shuffle)
void setRepeat(int repeat)
int getRepeat()
setRepeat(int)
boolean getShuffle()
setShuffle(boolean)
int getCurrentTrackIndex()
getPlaylist()
that is currently playing. If no track is playing return -1
void setVolume(int volume)
volume
- the volume, between 0 and 100int getVolume()
java.util.Collection<Speaker> getAvailableSpeakers()
void addSpeaker(Speaker speaker)
Speaker.setPlayer(org.qtunes.player.Player)
.
void removeSpeaker(Speaker speaker)
Speaker.setPlayer(org.qtunes.player.Player)
.
java.util.Collection<Speaker> getSpeakers()
Speaker
objects current in use by this Player
Track getCurrentTrack()
Track
currently being played by this Player, or null if it's
not playing anything
int getRevision()
java.lang.String getDisplayName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |