RESOLVED: Problem playing sequence of video clips
in
Core Library Questions
•
11 months ago
I have lots of short video clips that I want to be played back one after another in a random order.
The only method I can see is to use the duration() function to get the length of the clip when I start playing it, then store that value in a variable and decrement it every second until it reaches 0, then start the next clip and continue the process. The problem is that duration() always returns 0.0. The clips all play fine via the play() function and they are obviously not 0 seconds long, so what could be the issue?
Here's some code that I have in my setup function:
- Movie[] shortContent = new Movie[13];
- for (int i = 0; i < shortContent.length; i++ )
- shortContent[i] = new Movie(this, "Content_JS_S_"+i+".avi");
- for (int i = 0; i < shortContent.length; i++ )
- print("Duration: " + shortContent[i].duration());
What could the problem be? Or is there a better way to randomly sequence video clips? Im using processing 2.0b6
1