An AngularJS directive to manipulate the webcam.
You can easily add it as a module to your own app.
A complete example can be found at http://jonashartmann.github.io/webcam-directive (gh-pages)
Using NPM
npm install webcamUsing Bower
bower install webcam-directiveEx.: dist/webcam.min.js
<script type="text/javascript" src="webcam.min.js"></script>angular.module('myapp', ['webcam']);<webcam></webcam><webcam placeholder="'img/ajax-loader.gif'">function MyController($scope) {
$scope.onError = function (err) {...};
$scope.onStream = function (stream) {...};
$scope.onSuccess = function () {...};
}<webcam
on-stream="onStream(stream)"
on-streaming="onSuccess()"
on-error="onError(err)">
</webcam>function MyController($scope) {
$scope.myChannel = {
// the fields below are all optional
videoHeight: 800,
videoWidth: 600,
video: null // Will reference the video element on success
};
}<webcam
channel="myChannel">
</webcam>see more examples wiki
- Fork and clone this repository
- Install dependencies
npm install- Build/test with karma
Ensure you have Chromium installed with CHROMIUM_BIN set to its path
npm run test- Make a Pull Request
Recommended: Test locally, as it will only be merged if it builds successfully.
Or just help by creating issues.
The code is licensed under the MIT License. @see LICENSE file
