Video in Processing JS?

Hi! I'm new to the forum and would love your help. I have a sketch that plays video. It uses this basic Processing video code: https://processing.org/reference/libraries/video/Movie.html

It works perfectly in "java" but will not work in "javascript" mode. I'd like to put this sketch online, either via OpenProcessing.org or on my own website. I can do this for my other sketches, but not for sketches that include video files.

My questions:

(1) Is there code that works for playing videos in javascript mode? Where can I find this?

(2) If not, is there a preferred method for putting java sketches (with video!) online? Is this possible?

Thank you!! ~LZ

Answers

  • edited March 2015 Answer ✓
    1. You should look for some JS library (not Java) which deals w/ video playback.
    2. You can instead try out p5*js framework in place of pjs'. Already got a video element:
      http://p5js.org/reference/#/p5/createVideo

    Of course, you'll have to code in JavaScript or in some other language which transpiles into it,
    like CoffeeScript or TypeScript though! :-<

  • I'll check out p5js -- thank you!

Sign In or Register to comment.