An [AngularJS][] directive to manipulate the webcam.
npm install webcamshell
npm install webcam
`
#### Using Bower
`shell
bower install webcam-directive
`
#### There is a tag for each version, with the built javascript file inside the _dist_ directory
Ex.: dist/webcam.min.js
Installation
#### Using script tag
`html
`
Usage
#### Add module "webcam" as dependency
`js
angular.module('myapp', ['webcam']);
`
#### Then add the new element in HTML
`html
`
Advanced Usage
#### Set a custom placeholder image to be shown while loading the stream
`html
`
#### Callbacks
`js
function MyController($scope) {
$scope.onError = function (err) {...};
$scope.onStream = function (stream) {...};
$scope.onSuccess = function () {...};
}
`
`html
on-stream="onStream(stream)"
on-streaming="onSuccess()"
on-error="onError(err)">
`
#### Set a channel to bind data
`js
function MyController($scope) {
$scope.myChannel = {
// the fields below are all optional
videoHeight: 800,
videoWidth: 600,
video: null // Will reference the video element on success
};
}
`
`html
channel="myChannel">
``