-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
108 lines (88 loc) · 4.28 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
<title>Camera</title>
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<link href="./styles.css" rel="stylesheet">
</head>
<body class="d-flex flex-column">
<div class="container">
<div class="mt-10">
<h1>Web API Camera</h1>
</div>
<div class="col text-center">
<div class="p-1">
<button id="camera" type="button" class="btn btn-primary btn-sm control">Start</button>
</div>
</div>
<div class="home row row-cols-2 row-cols-lg-4 g-2 g-lg-3">
<div class="col text-center">
<div class="p-2 border bg-light">
<button id="snapshot" type="button" class="btn btn-primary control">Snapshot</button>
</div>
</div>
<div class="col text-center">
<div class="p-2 border bg-light"> <button id="download" type="button"
class="btn btn-primary control">Download</button></div>
</div>
<div class="col text-center">
<div class="p-2 border bg-light">
<button id="share" type="button" class="btn btn-primary control">Share</button>
</div>
</div>
<div class="col text-center">
<div class="p-2 border bg-light">
<button id="stop" type="button" class="btn btn-primary control">Stop</button>
</div>
</div>
</div>
<div class="row row-cols-2 g-2 g-lg-3" class="justify-content-center">
<div>
<form id="device-form" class="hidden">
<label for="device-option">Video Device:</label>
<select name="device-option" id="device-option" onchange="deviceOptionChange()"
form="device-option-form">
</select>
</form>
</div>
<div>
<div id="flip-button" class="p-1 text-center hidden">
<button id="flip" type="button" class="btn btn-primary btn-sm">Flip Camera Location</button>
</div>
</div>
</div>
<div id="video-canvas" class="d-flex justify-content-between flex-row flex-wrap mb5">
<!-- <div class="row row-cols-1 row-cols-lg-2 justify-content-center mb-5"> -->
<div id="video-container" class="hidden mb-5">
<h3 class="text-center">Video Camera</h3>
<video id="video" playsinline autoplay></video>
</div>
<div id="canvas-container" class="hidden mb-5">
<h3 class="text-center">Snapshot</h3>
<canvas id="canvas"></canvas>
</div>
<!-- </div> -->
</div>
<div class="row">
<footer class="mt-auto d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<p class="col-md-6 mb-0 text-body-secondary text-center">© 2023 Rebecca Peltz</p>
<p class="col-md-6 mb-0 text-body-secondary text-center"> Code: <a target="_blank"
href="https://github.com/rebeccapeltz/webapi-camera"
class="link-body-emphasis text-decoration-none">
webapi-camera
</a></p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script src="./script.js"></script>
</body>
</html>