forked from VictorTzeng/surging.cloud
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJSMpeg.html
More file actions
29 lines (28 loc) · 742 Bytes
/
JSMpeg.html
File metadata and controls
29 lines (28 loc) · 742 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>JSMpeg Stream Client</title>
<style type="text/css">
html, body {
background-color: #111;
text-align: center;
}
</style>
</head>
<body>
<canvas id="video-canvas"></canvas>
<script type="text/javascript" src="js/jsmpeg.min.js"></script>
<script type="text/javascript">
var canvas = document.getElementById('video-canvas');
var url = 'ws://'+'127.0.0.1:96/api/media';
var config = {
canvas: canvas,
autoplay: true,
audio: false,
video: true,
protocols: 'media',
};
var player = new JSMpeg.Player(url, config);
</script>
</body>
</html>