Package org.luwrain.player
Interface Player
public interface Player
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
static enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Set<Player.Flags>
static final int
static final int
static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(Listener listener) getFlags()
getState()
int
int
boolean
boolean
jump
(long offsetMsec) boolean
boolean
play
(Playlist playlist, int startingTrackNum, long startingPosMsec, Set<Player.Flags> flags) Starts playing of the specified playlist.boolean
playTrack
(int trackIndex) boolean
void
removeListener
(Listener listener) void
setVolume
(int volume) boolean
stop()
-
Field Details
-
MIN_VOLUME
static final int MIN_VOLUME- See Also:
-
MAX_VOLUME
static final int MAX_VOLUME- See Also:
-
SHARED_OBJECT_NAME
- See Also:
-
DEFAULT_FLAGS
-
-
Method Details
-
play
Player.Result play(Playlist playlist, int startingTrackNum, long startingPosMsec, Set<Player.Flags> flags) Starts playing of the specified playlist. This method acts in separate thread and returns execution control immediately. If there is a previous playing, initiated before to this call, it will be silently cancelled. You may specify the desired track number and a position in audio file to begin playing from.- Parameters:
playlist
- A playlist to playstartingTrackNum
- A desired 0-based track number to play fromstartingPosMsec
- A position in audio file in milliseconds to start playing from
-
stop
boolean stop() -
pauseResume
boolean pauseResume() -
jump
boolean jump(long offsetMsec) -
nextTrack
boolean nextTrack() -
prevTrack
boolean prevTrack() -
playTrack
boolean playTrack(int trackIndex) -
getState
Player.State getState() -
hasPlaylist
boolean hasPlaylist() -
getPlaylist
Playlist getPlaylist() -
getTrackNum
int getTrackNum() -
getVolume
int getVolume() -
setVolume
void setVolume(int volume) -
addListener
-
removeListener
-
getFlags
Set<Player.Flags> getFlags()
-