-
Notifications
You must be signed in to change notification settings - Fork 0
/
MagicMonitor.html
52 lines (52 loc) · 1.36 KB
/
MagicMonitor.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Joseph's Magic Monitor</title>
<!-- Page Styling -->
<style>
#container
{
margin: 0px auto;
width: 100%;
height: 100%;
border: 10px #333 solid;
}
#videoElement
{
width: 100%;
height: 100%;
background-color: #000000;
}
body{
background-color: #000000;
}
</style>
<!-- Video / Audio Streaming -->
<script>
var hdConstraints =
{
mandatory: {
minWidth: 1920,
minHeight: 1080
}
}
if (navigator.mediaDevices.getUserMedia)
{
navigator.mediaDevices.getUserMedia({video: hdConstraints, audio: true})
.then(function (stream)
{
document.querySelector("#videoElement").srcObject = stream;
});
}
</script>
<!-- End of On- Load -->
</head>
<!-- Page Building -->
<body>
<div id="container">
<video autoplay="true" id="videoElement">
</video>
</div>
</body>
</html>