-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
91 lines (81 loc) · 3.01 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="Description" content="take photo with miband3">
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="manifest" href="manifest.json">
<!-- link rel="stylesheet" href="styles.css" -->
<title>Mi Band 3</title>
</head>
<body>
<a href="https://github.com/vshymanskyy/miband-js">
<img class="fork-me" src="https://s3.amazonaws.com/github/ribbons/forkme_left_gray_6d6d6d.png" alt="Fork me on GitHub">
</a>
<header>
<h1>
<a href="https://github.com/dj0001/miband3-selfie">
<span class="h1-left">MiBand</span>
<span class="h1-right">JS</span>
</a>
</h1>
<button id="scanBtn" class="btn-scan">Scan</button>
</header>
<main style="display: none;">
<pre id="output"></pre>
</main>
<aside> <!-- webcam here -->
<select >
<option>select source</option>
</select>
<select id='res'>
<option>VGA</option>
<option>HD</option>
</select>
<div id="container">
<video autoplay="true" id="videoElement"></video>
<a target="show" id="log"><canvas id="canvas"></canvas></a>
</div>
<div style='background:#cfd8dc'>
capture: <input type="number" name="update" min="1" value="600" size="3" title="interval">s File: <input type="text" name="fname" value="out" title="(path+)name">.
<select name="ft"><option>png</option><option selected>jpeg</option></select>
<button id="shot">start</button>
<select name="effect">
<option> none</option>
<option>◐gray</option>
<option>⇱zoom</option>
<option>↷rotate</option>
<option>⇤crop</option>
<option>⇢motion</option>
</select>
<!-- grayscale:<input type="checkbox" id="bw"> -->
Overlay: <input type="text" name="overlay" value="%D" title="%d = date">
motion<input type="checkbox" id="md" onclick='if(this.checked) document.getElementsByName("update")[0].value=1' title="detection">
½<input type="checkbox" id="sz" title="size">
<a id='link' download='mypic.jpg'>download</a>
</div>
</aside>
<script src="webapp.bundle.js"></script>
<script src="webcam.js"></script>
<script>
// Install service worker - for offline support (not working properly, so disabled)
/*if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('serviceworker.js');
}*/
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('sw.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
</script>
</body>
</html>