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
3.1 KiB
78 lines
3.1 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>video.js HLS Plugin Example</title>
|
|
|
|
<link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
|
|
|
|
<!-- video.js -->
|
|
<script src="node_modules/video.js/dist/video.js"></script>
|
|
|
|
<!-- transmuxing -->
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/lib/stream.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/flv-tag.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/exp-golomb.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/h264-extradata.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/h264-stream.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/aac-stream.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/metadata-stream.js"></script>
|
|
<script src="node_modules/videojs-contrib-media-sources/node_modules/mux.js/legacy/segment-parser.js"></script>
|
|
|
|
<!-- Media Sources plugin -->
|
|
<script src="node_modules/videojs-contrib-media-sources/src/videojs-media-sources.js"></script>
|
|
<script>
|
|
videojs.MediaSource.webWorkerURI = 'node_modules/videojs-contrib-media-sources/src/transmuxer_worker.js';
|
|
</script>
|
|
|
|
<!-- HLS plugin -->
|
|
<script src="src/videojs-hls.js"></script>
|
|
|
|
<!-- m3u8 handling -->
|
|
<script src="src/xhr.js"></script>
|
|
<script src="src/stream.js"></script>
|
|
<script src="src/m3u8/m3u8-parser.js"></script>
|
|
<script src="src/playlist.js"></script>
|
|
<script src="src/playlist-loader.js"></script>
|
|
|
|
<script src="node_modules/pkcs7/dist/pkcs7.unpad.js"></script>
|
|
<script src="src/decrypter.js"></script>
|
|
|
|
<script src="src/bin-utils.js"></script>
|
|
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 20px;
|
|
}
|
|
.info {
|
|
background-color: #eee;
|
|
border: thin solid #333;
|
|
border-radius: 3px;
|
|
padding: 0 5px;
|
|
margin: 20px 0;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="info">
|
|
<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>
|
|
<p>Due to security restrictions in Flash, you will have to load this page over HTTP(S) to see the example in action.</p>
|
|
</div>
|
|
<video id="video"
|
|
class="video-js vjs-default-skin"
|
|
height="300"
|
|
width="600"
|
|
controls>
|
|
<source
|
|
src="http://solutions.brightcove.com/jwhisenant/hls/apple/bipbop/bipbopall.m3u8"
|
|
type="application/x-mpegURL">
|
|
</video>
|
|
<script>
|
|
videojs.options.flash.swf = 'node_modules/videojs-swf/dist/video-js.swf';
|
|
// initialize the player
|
|
var player = videojs('video');
|
|
</script>
|
|
</body>
|
|
</html>
|