videojs-resolution-switcher icon indicating copy to clipboard operation
videojs-resolution-switcher copied to clipboard

Doesnt seem to change source

Open sobytes opened this issue 9 years ago • 4 comments

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

sobytes avatar Aug 19 '16 18:08 sobytes

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 avatar Aug 21 '16 14:08 sobytes

@sobytes did you ever make any progress on this?

AdamTyler avatar Sep 02 '16 15:09 AdamTyler

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.

hls

kmoskwiak avatar Sep 13 '16 21:09 kmoskwiak

changes are in dev branch

kmoskwiak avatar Sep 13 '16 21:09 kmoskwiak