I'm actually using the GSVideo library, but I assumed they functioned the same.
The problem is the audio, not the video. The video changes fine the keyPress but the audio carries on playing.
Here's my code: Any Ideas?
- import codeanticode.gsvideo.*;
- GSMovie player;
- //global variables
- int direction;
- public void setup() {
- size(640, 480);
- background(0);
- // GSvideo setup
- player = new GSMovie(this, "tdogg.mov");
- player.loop();
- }
- void draw() {
- image(player, 0, 0, width, height);
- }
- void keyPressed() {
- if (key == '1') { player = new GSMovie (this, "tdogg.mov");}
- if (key == '2') { player = new GSMovie (this, "transit.mov");}
- if (key == '3') { player = new GSMovie (this, "bunny.mov");}
- }
- void movieEvent(GSMovie player) {
- player.read();
- }