java.lang.Object
uk.co.caprica.vlcj.player.list.ControlsApi
Behaviour pertaining to media list player controls, like play, pause, stop of the list as a whole, play a specific
item, play next item, play previous item.
-
Method Summary
Modifier and TypeMethodDescriptionvoidpause()Toggle-pause the media list.voidplay()Play the media list.booleanplay(int itemIndex) Play a particular item on the media list.booleanplayNext()Play the next item in the media list.booleanPlay the previous item in the media list.booleansetMode(PlaybackMode mode) Set the media list play mode.voidsetPause(boolean pause) Pause/un-pause the media list.voidstop()Stop the media list.
-
Method Details
-
play
public void play()Play the media list.If the play mode is
PlaybackMode.REPEATno item will be played and a "media list end reached" event will be raised. -
pause
public void pause()Toggle-pause the media list. -
setPause
public void setPause(boolean pause) Pause/un-pause the media list.- Parameters:
pause-trueto pause;falseto un-pause
-
stop
public void stop()Stop the media list. -
play
public boolean play(int itemIndex) Play a particular item on the media list.When the mode is
PlaybackMode.REPEATthis method is the only way to successfully play media in the list.- Parameters:
itemIndex- index of the item to play- Returns:
trueif the item could be played, otherwisefalse
-
playNext
public boolean playNext()Play the next item in the media list.When the mode is
PlaybackMode.REPEATthis method will replay the current media, not the next one.- Returns:
trueif the next item could be played, otherwisefalse
-
playPrevious
public boolean playPrevious()Play the previous item in the media list.When the mode is
PlaybackMode.REPEATthis method will replay the current media, not the previous one.- Returns:
trueif the previous item could be played, otherwisefalse
-
setMode
Set the media list play mode.Note that if setting the play mode to
PlaybackMode.REPEATyou can not simply play the media list, you must instead play a particular item (by its index).- Parameters:
mode- mode- Returns:
trueon success;falseon error
-