/
index.html
35 lines (32 loc) · 1.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!doctype html>
<html>
<head>
<title>Photo-Box Web component demo</title>
<script src="http://avgp.github.io/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="photo-box.html">
</head>
<body>
<h1><photo-box></h1>
<p>Let your users take a snapshot from the webcam and download it.</p>
<article>
<h2>Simple</h2>
<p><button onclick="document.getElementById('simple').startCapture()">Start camera</button></p>
<photo-box id="simple"></photo-box>
</article>
<article>
<h2>Customized the displayed texts</h2>
<p><button onclick="document.getElementById('custom').startCapture()">Start camera</button></p>
<photo-box id="custom">
<label for="snapshotButton">Cheese</label>
<label for="saveButton">Get yours</label>
<label for="retakeButton">Nah, again</label>
<div class="error">Yikes >-<</div>
<div class="nosupport">Your browser just can't...</div>
</photo-box>
</article>
<article>
<h2>Automatically start capturing</h2>
<photo-box autostart="true"></photo-box>
</article>
</body>
</html>