Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Video playback - detect the end of the video after playback

$
0
0
Hi,

What is the best method to detect when a video has completed playback?

I am using the below to play the video, which is standard:-


  1. // Movie handlers
  2. Movie videoAttractLoop;

  3. // Set up the sketch
  4. void setup(){
  5. // Load videos into memory
  6. videoAttractLoop = new Movie(this, "attract_loop.mp4");
  7.   
  8. // Play attract loop as video
  9. videoAttractLoop.loop();
  10. }

  11. // Play the movie stream
  12. void movieEvent(Movie m) {
  13.   m.read();
  14. }

Can someone point me in the right direction?

I would like to know how I can tell when the video file has finished playback.

Thank you.

Viewing all articles
Browse latest Browse all 1768

Trending Articles