Waiting for video to ends

I was playing a video i an automatic execution event and it doens't wait for the movie to end. I managed to solve it using event pages and this line as a conditional branch argument


!Graphics.isVideoPlaying()


The thing is i wish it was more clean also i think that this should have been a basic feature of the program (maybe i missed something?).


Anyway, i there a way to obtain this more cleanly? It there a plugin or something like that that fixes this thing?


I working on a plugin for this by myself for now but if someone already has a solution he's welcome
I solved it,


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 ened but he didnt' even started yet.


Here is the fix


EDIT: I made a new topic in plugin releases about this if you want to erase this topic


View attachment WaitForVideoEndFix.js
I don't know why there is no one reply this post.
It really saved my life.

@atfield, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/waiting-for-video-to-ends.65525/