Skip to content

Commit 00af266

Browse files
committed
Improved read me and removed auto-disabling of camera
1 parent 558d64a commit 00af266

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
angular-camera
2-
==============
1+
# Angular Camera Directive
32

4-
Angular camera directive
3+
An Angular directive for easily taking pictures from your webcam.
4+
5+
![ngCamera in action](http://onemightyroar.s3.amazonaws.com/github/dalek-camera-example.jpeg)
6+
7+
## Getting started
8+
9+
1. Install via Bower using `bower install angular-camera`
10+
2. Load the `omr.directives` module in your application: `angular.module('app', ['omr.directives']);`
11+
12+
## Using ngCamera
13+
14+
```html
15+
<ng-camera
16+
type="photo"
17+
enabled="cameraActive"
18+
width="640"
19+
height="480"
20+
countdown="3"
21+
ng-model="media"
22+
overlay-src="photoFrame"
23+
capture="publish()"
24+
capture-message="SMILE!"></ng-camera>
25+
```
26+
27+
The captured photo will save a Base64 version of itself to the ng-model's definition. Overlay an optional picture frame via `overlay-src` to have it stitched onto the final image.
28+
29+
More extensive documentation to follow.
30+
31+
_Built by [Zach Dunn](https://github.com/zachdunn) from work on the [Robin Platform](http://getrobin)_

src/directives/angular-camera.coffee

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,9 @@ angular.module('omr.directives', [])
101101
# Wait for overlay image to load before making dataURL
102102
scope.$apply ->
103103
scope.media = canvas.toDataURL('image/jpeg')
104-
scope.enabled = false
105104
scope.captureCallback(scope.media) if scope.captureCallback?
106105
else
107106
scope.media = canvas.toDataURL('image/jpeg') # Assign to ngModel
108-
#scope.enabled = false # Turn off camera feed
109107
scope.captureCallback(scope.media) if scope.captureCallback?
110108

111109
scope.hideUI = false

0 commit comments

Comments
 (0)