i have a code to make a player with 3 diferent videos. The problem is that i dont know how to change from one video to another. I have a "next" button, and in that button i do this:
player = new MediaPlayer(medias.get(objplaying));
view = new MediaView(player);
What i do there is:
- Stop the player (which is a mediaplayer)
- erase all from the Pane central
- put in the player the new media with the new video
- Add the MediaView view to the pane and then play it.
It does works, but only sometimes, other times the video wont pass UKNOWN status. It does not happen in every video or always to the same video, happen sometimes.
I dont know if thats the way to change between videos, but i cant find an example how to do it