Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +3 -3
templates/index.html
CHANGED
|
@@ -125,7 +125,7 @@
|
|
| 125 |
|
| 126 |
<div id="container">
|
| 127 |
<canvas id="canvasOutput"></canvas>
|
| 128 |
-
<video autoplay="true" id="
|
| 129 |
</div>
|
| 130 |
|
| 131 |
<div class = 'video'>
|
|
@@ -160,7 +160,7 @@
|
|
| 160 |
socket.on('connect', function(){
|
| 161 |
console.log("Connection has been succesfully established with socket.", socket.connected)
|
| 162 |
});
|
| 163 |
-
const video = document.querySelector("#
|
| 164 |
video.width = 500;
|
| 165 |
video.height = 375; ;
|
| 166 |
if (navigator.mediaDevices.getUserMedia) {
|
|
@@ -177,7 +177,7 @@
|
|
| 177 |
const FPS = 22;
|
| 178 |
setInterval(() => {
|
| 179 |
var type = "image/jpg"
|
| 180 |
-
var video_element = document.getElementById("
|
| 181 |
var frame = capture(video_element, 1)
|
| 182 |
var data = frame.toDataURL(type);
|
| 183 |
//data = data.replace('data:' + type + ';base64,', '');
|
|
|
|
| 125 |
|
| 126 |
<div id="container">
|
| 127 |
<canvas id="canvasOutput"></canvas>
|
| 128 |
+
<video autoplay="true" id="videoElement1"></video>
|
| 129 |
</div>
|
| 130 |
|
| 131 |
<div class = 'video'>
|
|
|
|
| 160 |
socket.on('connect', function(){
|
| 161 |
console.log("Connection has been succesfully established with socket.", socket.connected)
|
| 162 |
});
|
| 163 |
+
const video = document.querySelector("#videoElement1");
|
| 164 |
video.width = 500;
|
| 165 |
video.height = 375; ;
|
| 166 |
if (navigator.mediaDevices.getUserMedia) {
|
|
|
|
| 177 |
const FPS = 22;
|
| 178 |
setInterval(() => {
|
| 179 |
var type = "image/jpg"
|
| 180 |
+
var video_element = document.getElementById("videoElement1")
|
| 181 |
var frame = capture(video_element, 1)
|
| 182 |
var data = frame.toDataURL(type);
|
| 183 |
//data = data.replace('data:' + type + ';base64,', '');
|