We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I'm trying to figure out how to capture webcam video but I can't seem to get it working. The problem is that not even the example is working for me here:
http://p5js.org/examples/examples/Dom_Video_Capture.php
This example only ever shows a black window. Firefox asks to share my webcam but doesn't display anything. Chrome and Safari do not prompt to share the webcam.
I am running Mac OS X El Capitan version 10.11.2 and have tried the following browsers all with the same result:
Chrome 48.0.2564.109 (64-bit) Safari Version 9.0.2 (11601.3.9) Firefox 44.0.2
Does anyone know why I cannot seem to access my Mac's webcam? Is this a Mac issue?
Answers
I've tried to run the example here, I'm using Windows 10.
P5.JS Editor: Works fine.
Firefox: Asks to connect with my webcam, successfully connects with the webcam, but the sketch only shows a black canvas.
Chrome: Sketch only shows a black canvas, the browser doesn't ask to connect with the webcam even though it is set to ask.
Microsoft Edge: Asks to connect with the webcam and then works fine.
Internet Explorer: Doesn't even show the black canvas.
Make sure you are running the latest version of p5.js, as well as the p5.js dom library, which is required to play video. Make the call to the p5.js library before the p5js dom library in your index.html. Also make sure that the sketch.js is loading the video correctly and that the video is accessible.