merge hls-tech into master

+ update videojs and videojs-hls-contrib
This commit is contained in:
Kasper Moskwiak 2016-09-13 22:44:42 +02:00
commit dba17d2e5b
3 changed files with 152 additions and 5 deletions

65
examples/hls.html Normal file
View file

@ -0,0 +1,65 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Video.js Resolution Switcher</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../lib/videojs-resolution-switcher.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
background: #777;
}
.info {
background-color: #eee;
border: thin solid #333;
border-radius: 3px;
padding: 0 5px;
text-align: center;
}
.video-js {
margin: 40px auto;
}
</style>
</head>
<body>
<div class="info">
<p>
HLS tech
</p>
</div>
<video id="video" class="video-js"></video>
<script src="../node_modules/video.js/dist/video.js"></script>
<script src="../node_modules/videojs-contrib-hls/dist/videojs-contrib-hls.min.js"></script>
<script src="../lib/videojs-resolution-switcher.js"></script>
<script>
// fire up the plugin
videojs('video', {
controls: true,
muted: true,
width: 1000,
plugins: {
videoJsResolutionSwitcher: {
dynamicLabel: true // Display dynamic labels or gear symbol
}
}
}, function(){
var player = this;
window.player = player;
player.updateSrc({
src: '//labs.tvpw.pl/video/hls/tears.m3u8',
type: 'application/x-mpegURL'
}, {hls: true});
player.on('resolutionchange', function(){
console.info('Source changed to %s', player.src());
});
})
</script>
</body>
</html>