< back to all how-tos

Load and play a video

In your header file (*.h), add this line:

ofVideoPlayer videoPlayer;

In your .cpp file, there are only a few more lines of code we need, this is what you'll need to add to the setup() function:


In your update() function:


In your draw() function:

videoPlayer.draw(0, 0, 400, 300);