O'Reilly logo

Mastering openFrameworks: Creative Coding Demystified by Denis Perevalov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling the video playback

There are a number of additional functions in ofVideoPlayer for controlling video playing and positioning:

  • The stop() function is used to stop playing the video.
  • The setPaused( bPause ) function sets/resets pause of video playing, where bPause has type bool. If you pause the video, you can still switch its frames using the setFrame() or setPosition() function. It is extremely useful for the exact frame number control.
  • The setPosition( pos ) function sets playing position in file, where pos is a float number in range [0, 1].
  • The setFrame( frame ) function sets current frame to frame, where frame is an integer value from 0 to video. getTotalNumFrames() - 1.
  • The getCurrentFrame() function returns current frame number.
  • The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required