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.

74 lines
2.3 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/flv-tag.js"></script>
  15. <script src="src/exp-golomb.js"></script>
  16. <script src="src/h264-stream.js"></script>
  17. <script src="src/aac-stream.js"></script>
  18. <script src="src/segment-parser.js"></script>
  19. <!-- m3u8 handling -->
  20. <script src="src/stream.js"></script>
  21. <script src="src/m3u8/m3u8-parser.js"></script>
  22. <script src="src/playlist-loader.js"></script>
  23. <!-- example MPEG2-TS segments -->
  24. <!-- bipbop -->
  25. <!-- <script src="test/tsSegment.js"></script> -->
  26. <!-- bunnies -->
  27. <!--<script src="test/tsSegment-bc.js"></script>-->
  28. <style>
  29. body {
  30. font-family: Arial, sans-serif;
  31. }
  32. .info {
  33. background-color: #eee;
  34. border: thin solid #333;
  35. border-radius: 3px;
  36. padding: 0 5px;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <div class="info">
  42. <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>
  43. <p>Due to security restrictions in Flash, you will have to load this page over HTTP(S) to see the example in action.</p>
  44. </div>
  45. <video id="video"
  46. class="video-js vjs-default-skin"
  47. height="300"
  48. width="600"
  49. controls>
  50. <source
  51. src="http://solutions.brightcove.com/jwhisenant/hls/apple/bipbop/bipbopall.m3u8"
  52. type="application/x-mpegURL">
  53. </video>
  54. <script>
  55. videojs.options.flash.swf = 'node_modules/video.js/dist/video-js/video-js.swf';
  56. // initialize the player
  57. var player = videojs('video', {
  58. techOrder: ['hls']
  59. });
  60. // initialize the plugin
  61. //player.hls()
  62. </script>
  63. </body>
  64. </html>