-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
33 lines (32 loc) · 837 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Skeleton Collada</title>
<link rel="stylesheet" href="main.css">
<script type="text/javascript">
var trackedPose;
</script>
</head>
<body>
<div id="webgl"></div>
<div class="container">
<video id="video"></video>
<canvas id="drawingutils" width="1280px" height="720px"></canvas>
</div>
<script type="text/javascript">
const video = document.querySelector('#video');
window.navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
video.srcObject = stream;
video.onloadedmetadata = (e) => {
video.play();
};
})
.catch( () => {
alert('You have give browser the permission to run Webcam and mic ;( ');
});
</script>
<script type="module" src="animator.js"></script>
</body>
</html>