Spaces:
Sleeping
Sleeping
Create templates/index.html
Browse files- templates/index.html +33 -0
templates/index.html
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Flask Camera App</title>
|
| 7 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
| 8 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div class="container">
|
| 12 |
+
<h1>Camera Capture App</h1>
|
| 13 |
+
<button id="openCamera" class="btn">
|
| 14 |
+
<img src="https://img.icons8.com/ios-filled/50/ffffff/camera.png" alt="Camera Icon">
|
| 15 |
+
Open Camera
|
| 16 |
+
</button>
|
| 17 |
+
<div id="cameraContainer" style="display: none;">
|
| 18 |
+
<select id="cameraSelect">
|
| 19 |
+
<option value="user">Front Camera</option>
|
| 20 |
+
<option value="environment">Back Camera</option>
|
| 21 |
+
</select>
|
| 22 |
+
<video id="videoElement" autoplay playsinline></video>
|
| 23 |
+
<button id="captureButton" class="btn">Capture Image</button>
|
| 24 |
+
</div>
|
| 25 |
+
<canvas id="canvas" style="display: none;"></canvas>
|
| 26 |
+
<div id="result">
|
| 27 |
+
<img id="capturedImage" style="display: none; max-width: 100%;">
|
| 28 |
+
<pre id="hfResult"></pre>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
| 32 |
+
</body>
|
| 33 |
+
</html>
|