-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (32 loc) · 942 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
34
35
36
37
38
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>
canvas {
display: block;
float: left;
transform: scale(1);
transform-origin: 0% 0% 0px;
}
.camera {
display: block;
margin-left: 10px;
margin-top: 10px;
padding: 0px;
width: 800px;
}
</style>
</head>
<body>
<div class="row">
<div><canvas class="camera" id="canvas1" width="50%" height="100%"></canvas></div>
</div>
</body>
<script type="text/javascript" src="./jsmpeg.min.js"></script>
<script type="text/javascript">
player = new JSMpeg.Player('ws://localhost:9001', {
canvas: document.getElementById('canvas1') // Canvas should be a canvas DOM element
})
</script>