Assign an "onended" event to a video element.
Press play and wait for the video to end.
Video courtesy of Big Buck Bunny.