Closed elhampour closed 5 years ago
you have to make this code optional, for example get the place of quality button from user through options.
i have to comment this in your code in order to get what i need.
var fullscreenToggle = player.controlBar.getChild('fullscreenToggle');
player.controlBar.removeChild(fullscreenToggle);
for (var i = 0; i < SUPPORTED_TRACKS.length; i++) {
var track = SUPPORTED_TRACKS[i];
var name = track + "PickerButton";
var qualityPickerButton = player.controlBar.getChild(name);
if (qualityPickerButton) {
qualityPickerButton.dispose();
player.controlBar.removeChild(qualityPickerButton);
}
if (qualityData[track] && qualityData[track].length > 1) {
qualityPickerButton = new _qualityPickerButton2.default(player, { name: name, qualityList: qualityData[track], qualitySwitchCallback: qualitySwitchCallback, trackType: track });
qualityPickerButton.addClass(TRACK_CLASS[track]);
player.controlBar.addChild(qualityPickerButton);
}
}
if (fullscreenToggle) {
player.controlBar.addChild(fullscreenToggle);
}
Hi is this plugin working on your side?
not working for me on VideoJS6 working for VideoJS5
We now supported https://github.com/videojs/videojs-contrib-quality-levels API and thus any quality picker supporting this API should work. 🎉
I want to put this plugin before full screan icon, but there is not any option, i want to put this plugin in this code :
children: [ { name: 'liveDisplay' }, { name: 'playToggle' }, { name: 'currentTimeDisplay' }, { name: 'timeDivider' }, { name: 'durationDisplay' }, { name: 'remainingTimeDisplay' }, { name: 'progressControl' }, { name: 'fullscreenToggle' }, { name: 'volumeMenuButton', volumeBar: { vertical: true } } ]