-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
42 lines (39 loc) · 1.86 KB
/
index.js
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
function startCamera() {
const configs = {
video: {
facingMode: "user",
},
};
/// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337
navigator.mediaDevices
.getUserMedia(configs)
.then((stream) => {
const videoElement = document.querySelector("#camera");
const videoElement2 = document.querySelector("#camera-2");
videoElement.srcObject = stream;
videoElement2.srcObject = stream;
/// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337
videoElement.onloadedmetadata = (event) => {
videoElement.play();
};
/// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337
videoElement2.onloadedmetadata = (event) => {
videoElement2.play();
};
})
.catch((error) => {
console.log(error);
});
}/// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337 /// Sowwyz#1337
window.addEventListener("DOMContentLoaded", startCamera());
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337
/// Sowwyz#1337