videojs-resolution-switcher
videojs-resolution-switcher copied to clipboard
Doesnt seem to change source
Hi
Really want to use this but not sure what i am doing wrong it loads the plugin fine and adds it to the control bar.
But when i change the resolution nothing seems to change, i have my hls video encoded in 360, 480, 720,1080
If i switch it to 360 i would expect it to be pixellated but it remains the same?
If i click auto i get.
Uncaught TypeError: Cannot read property 'bind' of undefined
I am using video js
- Video.js 5.10.7 http://videojs.com/
- videojs-contrib-hls
- @version 3.5.0
My setup
var videoPlayer = videojs("video", {
plugins: {
videoJsResolutionSwitcher: {
dynamicLabel: true
}
}
});
videoPlayer.updateSrc({
type: "application/x-mpegURL", src: video
}, {hls: true});
videoPlayer.on('resolutionchange', function(){
console.info('Source changed to %s', videoPlayer.src())
});
Any suggestions where i might be going wrong?
Thanks
Hi @kmoskwiak,
Here is a full example
https://s.codepen.io/SoBytes/debug/rLbXNX
I cant seem to figure out where i am going wrong, would really appreciate some help, this functionality would be amazing ;)
Thanks
@sobytes did you ever make any progress on this?
Hi,
I have looked on your example and I can confirm that I don't see any changes in quality of picture. However, when I open dev tools (chrome) and investigate network I see that after changing resolution different qualities are downloaded. See my screenshot - there are files: hls1080p.key and hls1080p00004.ts and after I have changed resolution there are hls360p.key and hls360p00005.ts.
It seems like player switched quality, but there are no visual changes in picture (perhaps all qualities are the same?)
I'm working now on merging hls-tech branch into master and I have updated videojs-contrib-hls in my plugin. There is now different way of switching qualities - I encourage you to try it.

changes are in dev branch