I don't know if someone already solved it but I just made this to solve the bug.
Apparently the code after launching the video keep asking the Graphics class if the video is playing and if not it means it ended, but it doesnt take count of the fact that webm and mp4 are compressed and it takes more than a cycle for the video to start.
This caused to code to think the video ended but he didn't even started yet.