view-stream.html 539 B

12345678910111213141516171819202122
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>JSMpeg Stream Client</title>
  5. <style type="text/css">
  6. html, body {
  7. background-color: #111;
  8. text-align: center;
  9. }
  10. </style>
  11. </head>
  12. <body>
  13. <canvas id="video-canvas"></canvas>
  14. <script type="text/javascript" src="jsmpeg.min.js"></script>
  15. <script type="text/javascript">
  16. var canvas = document.getElementById('video-canvas');
  17. var url = 'ws://'+document.location.hostname+':8082/';
  18. var player = new JSMpeg.Player(url, {canvas: canvas});
  19. </script>
  20. </body>
  21. </html>