Help needed to code videos play with processing by receiving data from Arduino

No.

remember that draw() runs 60 times per second during the movie plays.

So the execution doesn’t wait in the if-clause but runs on.

Therefore, this line of code must be outside the if-clause.

Does the movie has something like .isPlaying property?