webcam-grabber
v0.1.1
Published
Simple utility for grabbing video input from `getUserMedia` and channeling through a video element
Downloads
2
Maintainers
Readme
Webcam Grabber
This is a simple npm module for grabbing input from the user's webcam. It is intended to be used in a setup similar to stackgl and processed using browserify.
I used this post as a starting point when figuring out how to use getUserMedia
, and utilize the getusermedia
npm package for cross-browser compatibilit.
Usage
Usage is pretty straightforward, you pass a width and height for the video capture and an optional argument with setting for the getUserMedia
constraints
object.
var webcamGrabber = require('webcam-grabber');
var video = webcamGrabber(600, 400, { audio: false });
document.body.appendChild(video);
video.play();
Example
To run the included example:
npm install
npm run example
The example uses the budo development server to run.