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


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.


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


Add module "webcam" as dependency:

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

Then just use the new element:


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 almost 5 years ago.