-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
The need to use a different camera with createVideo(CAPTURE)
has come up several times this semester. @lmccart posted an example for how to do so here:
I'm wondering if we should wrap this functionality and possibly make it more generic to sync with p5.sound and p5.AudioIn
?
Something like:
var capture;
var sourceId = '_________';
function setup() {
// can be removed once sourceId is discovered
// or creating the capture could be moved to callback?
captureList(gotSources);
capture = createVideo(CAPTURE, sourceId);
}
// This method can be removed after the source ID has been determined.
// Make this only give the "video" kind for captureList?
function gotList(sources) {
console.log('video: '+sources[i].label+' ID: '+sources[i].id);
}
This would add one function to the API (captureList()
. I'm happy to work on this if we think it's a good idea.
Another idea would be to add a callback to createVideo where the user could somehow assign the sourceId dynamically?
capture = createVideo(CAPTURE, gotSources);
Metadata
Metadata
Assignees
Labels
No labels