/webcam-directive

Angularjs directive to access the webcam

Primary LanguageJavaScriptMIT LicenseMIT

Webcam manipulation with HTML5

Build Status

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

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

Contribute

  1. Fork and clone this repository

  2. Install dependencies

     npm install
    
  3. Build/test with grunt

     grunt test
    
  4. Make a Pull Request

Or just help by creating issues.

Download

The current version can be found inside the dist/ folder of this repo.

Ex.: dist/<version_number>/webcam.min.js

Installation

Using script tag

<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>

Callbacks

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

Custom placeholder to be shown while loading the webcam

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

Technologies used in this project

The code is licensed under the MIT License. @see LICENSE file