Package com.tagtraum.audiokern
Interface PlayListPlayer
-
- All Superinterfaces:
AudioPlayer
- All Known Implementing Classes:
InternalPlayer,ITunesPlayerComponent,Player
public interface PlayListPlayer extends AudioPlayer
Audio player with the added capability of playing whole playlists, defined by aPlayListIterator.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPlayListPlayer.RepeatModeRepeat mode.static classPlayListPlayer.ScanModeScan mode.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)Adds aPlayListPlayerInterceptor.intcurrentIndex()Filtered index of the current song in the played list/component.JComponentgetComponent()Main display component for the currently active playlist.PlayListIterator<AudioSong>getIterator()Returns the currently used iterator.LonggetPlayListId()Persistent identifier of the current playlist, if available.PlayListPlayer.RepeatModegetRepeatMode()The current repeat mode.PlayListPlayer.ScanModegetScanMode()The current scan mode.voidnext()Move to next song.voidopen(PlayListIterator<AudioSong> iterator)Open the song returned by the firstListIterator.next()call.voidprevious()Move to previous song.voidremovePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)Removed aPlayListPlayerInterceptor.voidsetRepeatMode(PlayListPlayer.RepeatMode mode)Sets the current repeat mode.voidsetScanMode(PlayListPlayer.ScanMode mode)Sets a new scan mode.-
Methods inherited from interface com.tagtraum.audiokern.AudioPlayer
addAudioPlayerListener, addPropertyChangeListener, addPropertyChangeListener, close, fastForward, getAudioDevice, getDuration, getReplayGainType, getSong, getTime, getVolume, isDone, isMuted, isPaused, open, pause, play, playPause, removeAudioPlayerListener, removePropertyChangeListener, removePropertyChangeListener, reset, setAudioDevice, setMuted, setReplayGainType, setTime, setVolume
-
-
-
-
Method Detail
-
next
void next()
Move to next song. If playback was active, keep on playing.
-
previous
void previous()
Move to previous song. If playback was active, keep on playing.
-
getIterator
PlayListIterator<AudioSong> getIterator()
Returns the currently used iterator.- Returns:
- iterator
-
open
void open(PlayListIterator<AudioSong> iterator) throws IOException
Open the song returned by the firstListIterator.next()call. If playback was active, keep on playing.- Throws:
IOException- if the first song (obtained throughListIterator.next()) cannot be opened- See Also:
AudioPlayer.open(AudioSong)
-
getPlayListId
Long getPlayListId()
Persistent identifier of the current playlist, if available.- Returns:
- id or null, if not available.
-
getComponent
JComponent getComponent()
Main display component for the currently active playlist.- Returns:
- main display component for the currently active playlist
-
currentIndex
int currentIndex()
Filtered index of the current song in the played list/component. This index may change dynamically, as the view of the list is filtered or sorted.- Returns:
- index
-
setRepeatMode
void setRepeatMode(PlayListPlayer.RepeatMode mode)
Sets the current repeat mode.- Parameters:
mode- mode
-
getRepeatMode
PlayListPlayer.RepeatMode getRepeatMode()
The current repeat mode.- Returns:
- current repeat mode
-
setScanMode
void setScanMode(PlayListPlayer.ScanMode mode)
Sets a new scan mode.- Parameters:
mode- scan mode
-
getScanMode
PlayListPlayer.ScanMode getScanMode()
The current scan mode.- Returns:
- current scan mode
-
addPlayListPlayerInterceptor
void addPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Adds aPlayListPlayerInterceptor.- Parameters:
interceptor- interceptor
-
removePlayListPlayerInterceptor
void removePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Removed aPlayListPlayerInterceptor.- Parameters:
interceptor- interceptor
-
-