Преглед изворни кода

Remove Canvas2D loading notice in example; otherwise webgl cannot be used

Dominic Szablewski пре 10 година
родитељ
комит
a8f3d0b016
1 измењених фајлова са 2 додато и 6 уклоњено
  1. 2 6
      stream-example.html

+ 2 - 6
stream-example.html Прегледај датотеку

@@ -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>