public void Stream(String FOLDER_PATH, int port){
File myDir = new File(FOLDER_PATH);
File[] files = myDir.listFiles();
if( myDir.exists() && myDir.isDirectory()){
do {
System.out.println(files[i]+" ...");
//File myFile = new File(files[i].getPath());
mediaPlayer.playMedia(files[i].getPath(),
":sout=#rtp{dst=127.0.0.1,port="+String.valueOf(port) +",mux=ts}",
":no-sout-rtp-sap",
":no-sout-standard-sap",
":sout-all",
":sout-keep"
);
i++;
}while(i< files.length && mediaPlayer.isMediaParsed());
}
}
How can I modify this code to make vlcj play(stream) the next file in folder after the current one ends?
I tried different methods but it stops after the first file.
If you refer to VLC sample
uk.co.caprica.vlcj.test.list.TestMediaListEmbeddedPlayerfromvlcj-1.2.0-test.jardistribution, this is how it is done: