I’m trying to load a video and set a random frame to start it within the update() function:
video[activeVideoPlayer].load(videoDir.getPath(activeVideo)); int frames = video[activeVideoPlayer].getTotalNumFrames(); video[activeVideoPlayer].setFrame( ofRandom(frames) ); video[activeVideoPlayer].play();
The loading and playing works fine, but I get quite a lot of
unable to seek type of errors, which sets the video to play from the first frame. Is there a way (besides inserting
ofSleepMillis()) to make the
.getTotalNumFrames() wait until the loading of the file is complete without disrupting another video playing at the same time?
As always, grateful for any help!