You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-7Lines changed: 14 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,18 +14,25 @@ An Angular directive for easily taking pictures from your webcam.
14
14
```html
15
15
<ng-camera
16
16
type="photo"
17
-
enabled="cameraActive"
17
+
enabled="true"
18
18
width="640"
19
19
height="480"
20
20
countdown="3"
21
21
ng-model="media"
22
-
overlay-src="photoFrame"
23
-
capture="publish()"
24
-
capture-message="SMILE!"></ng-camera>
22
+
overlay-src="http://example.com/photo-frame.png"
23
+
capture="callback(media)"
24
+
capture-message="Go!"></ng-camera>
25
25
```
26
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.
27
+
### Options
28
+
*`type`_string_ Type of media the capture (photo, video, gif). Photo is currently the only one supported
29
+
*`enabled`_boolean_ Enables or disables the stream by turning on/off webcam access
30
+
*`width`_integer_ Width in pixels for the video feed
31
+
*`height`_integer_ Height in pixels for the video feed
32
+
*`countdown`_integer_ Countdown time in seconds. Zero is replaced with `capture-message` text.
33
+
*`ng-model`_object_ Scope variable to data-bind resulting Base64-encoded image
34
+
*`overlay-src`_string_ Optional. Reference to image frame to overlay onto media. Automatically resizes to fit canvas.
35
+
*`capture`_function_ Callback for "Take Picture" button for use in parent scope. Passes Base64-encoded output as parameter
36
+
*`capture-message`_string_ Optional. Text to show during countdown instead of "0"
30
37
31
38
_Built by [Zach Dunn](https://github.com/zachdunn) from work on the [Robin Platform](http://getrobin.com)_
0 commit comments