- The video library takes some time to “ignite” after we issue a “play” command.
- Until then, its width & height dimensions are still
0
! - As a workaround, we can delay() inside setup() until the video is fully ready.
- This way, when draw() is called back for the 1st time, we’re safe to access the video.
void setup() {
// ...
( myMovie = new Movie(this, "kat.mov") ).loop();
while (myMovie.height == 0) delay(2);
}