webcam-directive

Angularjs directive to access the webcam via getUserMedia
1 person uses it

Webcam manipulation with HTML5

This is a directive that can be added as a module to your own app.

Demos can be found at http://jonashartmann.github.io/webcam-directive

Download

The current minified version can be found inside the dist/ folder of the github repository. Ex.: dist//webcam.min.js

NOTE: Please ignore the Download button on this page. I didn't find a way to change its link to the current tag.

Installation:

<script type="text/javascript" src="webcam.min.js"></script>

Usage

Add module "webcam" as dependency:

angular.module('myapp', ['webcam']);

Then just use the new element:

<webcam></webcam>

With Callbacks:

<webcam on-stream="onStream(stream,video)" on-access-denied="onError(err)" on-streaming="onSuccess(video)"> </webcam>

With a custom placeholder to be shown while loading the webcam:

<webcam placeholder="'img/ajax-loader.gif'">

comments powered by Disqus
This page was last updated over 3 years ago.