-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
40 lines (40 loc) · 1.3 KB
/
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
39
40
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=1024, initial-scale=1"/>
<meta http-equiv="Content-Security-Policy" content="default-src * data: blob: 'unsafe-inline' 'unsafe-eval' ws: wss: ;">
<title>jsmpeg streaming</title>
<style type="text/css">
body {
background: #333;
text-align: center;
margin-top: 0;
}
#videoCanvas {
width: 1024px;
height: 576px;
}
</style>
</head>
<body>
<!-- The Canvas size specified here is the "initial" internal resolution. jsmpeg will
change this internal resolution to whatever the source provides. The size the
canvas is displayed on the website is dictated by the CSS style.
-->
<span>iSight Demo</span><br/>
<canvas id="videoCanvas" width="1024" height="576">
<p>
Please use a browser that supports the Canvas Element, like
<a href="http://www.google.com/chrome">Chrome</a>,
<a href="http://www.mozilla.com/firefox/">Firefox</a>,
<a href="http://www.apple.com/safari/">Safari</a> or Internet Explorer 10
</p>
</canvas>
<script type="text/javascript" src="/static/jsmpeg.min.js"></script>
<script type="text/javascript">
var url = 'ws://'+document.location.hostname+':8084/';
var canvas = document.getElementById('videoCanvas');
var player = new JSMpeg.Player(url, {canvas:canvas});
</script>
</body>
</html>