kmoskwiak / videojs-resolution-switcher

Resolution switcher adds the ability to select the video quality in video.js player.
https://kmoskwiak.github.io/videojs-resolution-switcher/
Other
403 stars 243 forks source link

Is it possible to order videojs-resolution-switcher in the control bar? #113

Open mimipaskova opened 6 years ago

mimipaskova commented 6 years ago

Hello, I would like to ask is it possible to preorder control-bar and to put resolution switcher before progress control, because now it is after it like in your demo - image I want to move it like this image I've searched for the same question, but I didn't find.

Thanks,

npstcole commented 6 years ago

This is a function of videojs and not the plugin. It's possible:

player.getChild('controlBar').addChild('AudioDescriptionButton', {}, 9);

Simply use the name of the button as it's defined. In this case, I'm using a custom button to toggle on/off an audio described version of the video in question so my AD button is defined as "AudioDescriptionButton". If you use the function without passing any parameters for, it's appended to the end of the controlBar, like so:

player.getChild('controlBar').addChild('AudioDescriptionButton', {});