I am working on a similar project. I got my video to play with my RFID tag but it's extremely choppy and does not continue playing (only audio) when I remove the tag. I used a piece of your code in mine. Now the choppiness is the problem!
- import processing.serial.*;
- import processing.video.*;
- Serial rfidPort;
- String tagID = "";
- Movie[] myVids = new Movie[1];
- void setup(){
- size(800,600);
- println(Serial.list());
- String portnum = Serial.list()[0];
- rfidPort = new Serial(this, portnum, 2400);
- rfidPort.buffer(12);
- PFont myFont = createFont(PFont.list()[2], 24);
- textFont(myFont);
- myVids[0] = new Movie(this, "brave.mp4");
- }
- void draw(){
- text(tagID, width/4, height/2 - 24);
- }
- void serialEvent(Serial rfidPort) {
- tagID = trim(rfidPort.readString());
- if (tagID.equals("84003435BC") == true) {
- image(myVids[0],0,0);
- myVids[0].play();
- }} void movieEvent(Movie m) {
- m.read();
- m.available();
- }