I'm able to get Video.JS working but I'm not able to get the Resolution Switcher plugin working.
I just don't know where to put the code to get it work I think
I put this in my <head>
<link href="http://vjs.zencdn.net/5.4.4/video-js.css" rel="stylesheet">
<!-- If you'd like to support IE8 -->
<script src="http://vjs.zencdn.net/ie8/1.1.1/videojs-ie8.min.js"></script>
I'm using this code for where the video will be displayed
<video id='video' class="video-js vjs-default-skin"></video>
I put this right before my <body>
ends
<script src="http://vjs.zencdn.net/5.4.4/video.js"></script>
<script src="assets/js/video.js"></script>
<script src="assets/js/videojs-resolution-switcher.js"></script>
And this is placed afterwards
videojs('video', {
controls: true,
plugins: {
videoJsResolutionSwitcher: {
default: 'high',
dynamicLabel: true
}
}
}, function() {
// Add dynamically sources via updateSrc method
player.updateSrc([{
src: 'videos/intros/Intro480_30_Condensed.mp4',
type: 'video/mp4',
label: '480'
}, {
src: 'videos/intros/Intro720_30_Condensed.mp4',
type: 'video/mp4',
label: '720'
}])
player.on('resolutionchange', function() {
console.info('Source changed to %s', player.src())
})
})
And this is the error I get in the console
and nothing is playing.