Okay so i have this method that should run a video, wait till it ends, then play a second video.
My problem is that the program doesn't seem to wait for the first video to end, and therefore directly jumped to the second video.
I the added the wait() method, and it causes the first video to play, but then it stops and the second video never starts.
Any help would be much appreciated!
private void test(ActionEvent event) throws InterruptedException {
File fi= new File("test\\firstVideo.mp4");
String filePath= fi.toURI().toString();
openFile(filePath);
wait(5000); //even wait(0) has the same effect
fi= new File("test\\secondVideo.mp4");
filePath= fi.toURI().toString();
openFile(filePath);
}