0.1.1 • Published 8 years ago

webcam-grabber v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

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.