Event doesnt' wait for video to end Fix

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.


View attachment WaitForVideoEndFix.js
respect for making this, but i had always just put a wait event for the same length as a video and never had any problems with other events happening in that time. i suppose this is a easier work around for that.
Awesome, thanks for the fix!
Thank you so much for this!

Original thread: https://forums.rpgmakerweb.com/threads/event-doesnt-wait-for-video-to-end-fix.65527/