Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +3 -3
templates/index.html
CHANGED
@@ -19,12 +19,12 @@
|
|
19 |
|
20 |
startCameraBtn.addEventListener('click', async () => {
|
21 |
try {
|
22 |
-
// Request access to the user's camera
|
23 |
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
24 |
-
|
25 |
// Display the camera feed in the video element
|
26 |
videoElement.srcObject = stream;
|
27 |
-
|
|
|
28 |
// Enable the video element to show the camera feed
|
29 |
videoElement.hidden = false;
|
30 |
} catch (error) {
|
|
|
19 |
|
20 |
startCameraBtn.addEventListener('click', async () => {
|
21 |
try {
|
|
|
22 |
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
|
23 |
+
|
24 |
// Display the camera feed in the video element
|
25 |
videoElement.srcObject = stream;
|
26 |
+
videoElement.play();
|
27 |
+
|
28 |
// Enable the video element to show the camera feed
|
29 |
videoElement.hidden = false;
|
30 |
} catch (error) {
|