|
|
@@ -32,14 +32,10 @@
|
|
32
|
32
|
</canvas>
|
|
33
|
33
|
<script type="text/javascript" src="jsmpg.js"></script>
|
|
34
|
34
|
<script type="text/javascript">
|
|
35
|
|
- // Show loading notice
|
|
36
|
|
- var canvas = document.getElementById('videoCanvas');
|
|
37
|
|
- var ctx = canvas.getContext('2d');
|
|
38
|
|
- ctx.fillStyle = '#444';
|
|
39
|
|
- ctx.fillText('Loading...', canvas.width/2-30, canvas.height/3);
|
|
40
|
|
-
|
|
41
|
35
|
// Setup the WebSocket connection and start the player
|
|
42
|
36
|
var client = new WebSocket( 'ws://example.com:8084/' );
|
|
|
37
|
+
|
|
|
38
|
+ var canvas = document.getElementById('videoCanvas');
|
|
43
|
39
|
var player = new jsmpeg(client, {canvas:canvas});
|
|
44
|
40
|
</script>
|
|
45
|
41
|
</body>
|