You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.5 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>video.js HLS Plugin Example</title>
  6. <link href="node_modules/video.js/dist/video-js/video-js.css" rel="stylesheet">
  7. <!-- video.js -->
  8. <script src="node_modules/video.js/dist/video-js/video.js"></script>
  9. <!-- Media Sources plugin -->
  10. <script src="node_modules/videojs-contrib-media-sources/src/videojs-media-sources.js"></script>
  11. <!-- HLS plugin -->
  12. <script src="src/videojs-hls.js"></script>
  13. <!-- segment handling -->
  14. <script src="src/xhr.js"></script>
  15. <script src="src/flv-tag.js"></script>
  16. <script src="src/stream.js"></script>
  17. <script src="src/exp-golomb.js"></script>
  18. <script src="src/h264-stream.js"></script>
  19. <script src="src/aac-stream.js"></script>
  20. <script src="src/metadata-stream.js"></script>
  21. <script src="src/segment-parser.js"></script>
  22. <!-- m3u8 handling -->
  23. <script src="src/m3u8/m3u8-parser.js"></script>
  24. <script src="src/playlist-loader.js"></script>
  25. <script src="node_modules/pkcs7/dist/pkcs7.unpad.js"></script>
  26. <script src="src/decrypter.js"></script>
  27. <script src="src/bin-utils.js"></script>
  28. <!-- example MPEG2-TS segments -->
  29. <!-- bipbop -->
  30. <!-- <script src="test/tsSegment.js"></script> -->
  31. <!-- bunnies -->
  32. <!--<script src="test/tsSegment-bc.js"></script>-->
  33. <style>
  34. body {
  35. font-family: Arial, sans-serif;
  36. margin: 20px;
  37. }
  38. .info {
  39. background-color: #eee;
  40. border: thin solid #333;
  41. border-radius: 3px;
  42. padding: 0 5px;
  43. margin: 20px 0;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <div class="info">
  49. <p>The video below is an <a href="https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-SW1">HTTP Live Stream</a>. On desktop browsers other than Safari, the HLS plugin will polyfill support for the format on top of the video.js Flash tech.</p>
  50. <p>Due to security restrictions in Flash, you will have to load this page over HTTP(S) to see the example in action.</p>
  51. </div>
  52. <video id="video"
  53. class="video-js vjs-default-skin"
  54. height="300"
  55. width="600"
  56. controls>
  57. <source
  58. src="http://solutions.brightcove.com/jwhisenant/hls/apple/bipbop/bipbopall.m3u8"
  59. type="application/x-mpegURL">
  60. </video>
  61. <script>
  62. videojs.options.flash.swf = 'node_modules/video.js/dist/video-js/video-js.swf';
  63. // initialize the player
  64. var player = videojs('video');
  65. </script>
  66. </body>
  67. </html>