0.0.10 • Published 7 years ago

fh-wfm-camera v0.0.10

Weekly downloads
16
License
MIT
Repository
github
Last release
7 years ago

FeedHenry WFM Camera Build Status

This module provides client services :

  • A promise based wrapper around the window.navigator.camera.getPicture
  • A desktop and a mobile Angular Service to use the camera module
  • An Angular Directive

Client-side usage

Client-side usage (via broswerify)

Setup

This module is packaged in a CommonJS format, exporting the name of the Angular namespace. The module can be included in an angular.js as follows:

angular.module('app', [
, require('fh-wfm-camera')
...
])

Integration

Angular service
controller('FileListCtrl', function($window, mobileCamera, desktopCamera) {

  var captureThenUpload = function() {
    if ($window.cordova) {
      return mobileCamera.capture()
      .then(function(capture) {
        console.log(capture.fileURI);
        console.log(capture.filename);
      })
    } else {
      return desktopCamera.capture()
      .then(function(dataUrl) {
        //do stuff
      })
    }
  }
}

For a more complete example, please check the demo mobile app.

Directives

NameAttributes
cameramodel, autostart
0.0.10

7 years ago

0.0.8

7 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago