Created
May 22, 2014 14:10
-
-
Save edmorais/c35358373db239f8e9b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Player de dois vídeos em loop lado-a-lado | |
*/ | |
import processing.video.*; | |
Movie video1, video2; | |
void setup() { | |
size(1024, 768); | |
background(0); | |
video1 = new Movie(this, "1.mov"); | |
video2 = new Movie(this, "2.mov"); | |
// os vídeos devem estar dentro de uma pasta chamada 'data' dentro da pasta do sketch | |
video1.loop(); | |
video2.loop(); | |
} | |
void draw() { | |
image(video1, 24, 154, 480, 360); | |
image(video2, 520, 154, 480, 360); | |
// var. vídeo, x, y, largura, altura | |
} | |
// Called every time a new frame is available to read | |
void movieEvent(Movie m) { | |
m.read(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment