There was an error while loading. Please reload this page.
1 parent e6dcb47 commit d76249eCopy full SHA for d76249e
2 files changed
examples/index.html
@@ -0,0 +1,32 @@
1
+<!doctype html>
2
+
3
+<html>
4
+<head>
5
+ <title></title>
6
+ <script type="text/javascript" src="../src/tracking.js"></script>
7
+</head>
8
+<body>
9
10
+<div id="videoContainer"></div>
11
12
+<button onclick="snapshot()">Take a Snapshot!</button>
13
+<br/>
14
+<img id="picture" src="">
15
16
+<script>
17
+ var c1 = new tracking.Camera({
18
+ audio: true
19
+ });
20
21
+ c1.render('#videoContainer');
22
23
+ var snapshot = function(w, h) {
24
+ var picture = tracking.one('#picture');
25
+ picture.width = c1.get('width');
26
+ picture.height = c1.get('height');
27
+ picture.src = c1.get('video').toDataURL('image/png');
28
+ };
29
+</script>
30
31
+</body>
32
+</html>
0 commit comments