This commit is contained in:
Kasper Moskwiak 2016-07-08 18:42:08 +02:00
parent 9ac272f905
commit e3556aeaa3
3 changed files with 5 additions and 4 deletions

View file

@ -33,7 +33,7 @@
<video id="video" class="video-js"></video> <video id="video" class="video-js"></video>
<script src="../node_modules/video.js/dist/video.js"></script> <script src="../node_modules/video.js/dist/video.js"></script>
<script src="../node_modules/videojs-contrib-hls/dist/videojs.hls.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 src="../lib/videojs-resolution-switcher.js"></script>
<script> <script>
// fire up the plugin // fire up the plugin

View file

@ -345,6 +345,7 @@
function initResolutionForHLS(player){ function initResolutionForHLS(player){
var hls = player.tech_.hls; var hls = player.tech_.hls;
if(!hls) { return; }
// Capture events // Capture events
player.on('mediachange', function(){ player.on('mediachange', function(){
player.trigger('resolutionchange'); player.trigger('resolutionchange');

View file

@ -35,7 +35,7 @@
"test": "grunt test" "test": "grunt test"
}, },
"devDependencies": { "devDependencies": {
"grunt": "^0.4.5", "grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0", "grunt-contrib-clean": "^1.0",
"grunt-contrib-concat": "^1.0", "grunt-contrib-concat": "^1.0",
"grunt-contrib-jshint": "^1.0", "grunt-contrib-jshint": "^1.0",
@ -43,9 +43,9 @@
"grunt-contrib-uglify": "^1.0", "grunt-contrib-uglify": "^1.0",
"grunt-contrib-watch": "^1.0", "grunt-contrib-watch": "^1.0",
"video.js": "^5.8", "video.js": "^5.8",
"qunitjs": "^1.22", "qunitjs": "^2.0.0-rc1",
"videojs-youtube": "^2.0.8", "videojs-youtube": "^2.0.8",
"videojs-contrib-hls": "^1.3.8" "videojs-contrib-hls": "^2.1.1"
}, },
"peerDependencies": { "peerDependencies": {
"video.js": "^5.8" "video.js": "^5.8"