}
@Override
public void setMode(MediaListPlayerMode mode) {
Logger.debug("setMode(mode={})", mode);
libvlc_playback_mode_e playbackMode;
switch(mode) {
case DEFAULT:
playbackMode = libvlc_playback_mode_e.libvlc_playback_mode_default;
break;
case LOOP:
playbackMode = libvlc_playback_mode_e.libvlc_playback_mode_loop;
break;
case REPEAT:
playbackMode = libvlc_playback_mode_e.libvlc_playback_mode_repeat;
break;
default:
throw new IllegalArgumentException("Invalid mode " + mode);
}
libvlc.libvlc_media_list_player_set_playback_mode(mediaListPlayerInstance, playbackMode.intValue());
}