-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
var video, button;
var snapshots = [];
function setup() {
createCanvas(800, 240);
background(51);
video = createCapture(VIDEO);
video.size(320, 240);
button = createButton('Snap!');
button.mousePressed(takeSnap);
}
function takeSnap() {
loadPixels();
snapshots.push(video.get());
}
When I run the sketch, I receive this error:
p5.js:12462 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D':
The provided value is not of type '(HTMLImageElement or HTMLVideoElement or
HTMLCanvasElement or ImageBitmap)'(…)
Currently running on
p5.js v0.5.4 October 01, 2016
Metadata
Metadata
Assignees
Labels
No labels