-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Nature of issue?
- Found a bug
- Existing feature enhancement
- New feature request
Most appropriate sub-area of p5.js?
- Color
- Core/Environment/Rendering
- Data
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Other (DOM?)
Which platform were you using when you encountered this?
- Mobile/Tablet (touch devices)
- Desktop/Laptop
- Others (specify if possible)
Details about the bug:
- p5.js version: 0.6.1
- Web browser and version: Version 68.0.3440.106 (Official Build) (64-bit)
- Operating System: Mac
- Steps to reproduce this:
Run the following code and you will see that the video no longer is updated after video.get() is called.:
function takesnap() {
currentImg = video.get();
}
function setup() {
createCanvas(600, 240);
video = createCapture(VIDEO);
video.size(320, 240);
video.hide();
background(0);
captureBtn = createButton('snap');
captureBtn.mousePressed(takesnap);
}
function draw() {
image(video,0,0);
}
Workaround by @meiamsome 👍
function draw() {
var frame = video.get();
image(frame, 0, 0);
}
meiamsome and ahmedMshaban
Metadata
Metadata
Assignees
Labels
No labels