mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-04 02:09:41 +02:00
yt feature
This commit is contained in:
parent
b485930ce6
commit
b8fe6018dc
3 changed files with 709 additions and 0 deletions
|
@ -265,6 +265,26 @@
|
|||
player.ready(function(){
|
||||
player.updateSrc(player.options_.sources);
|
||||
});
|
||||
}else{
|
||||
player.ready(function(){
|
||||
console.log(player.techName_);
|
||||
if(player.techName_ === 'Youtube'){
|
||||
console.log('yt');
|
||||
var q = player.tech_.ytPlayer.getAvailableQualityLevels();
|
||||
console.log(q);
|
||||
player.one('play', function(){
|
||||
console.log('asd');
|
||||
q = player.tech_.ytPlayer.getAvailableQualityLevels();
|
||||
|
||||
|
||||
|
||||
var menuButton = new ResolutionMenuButton(player, { sources: groupedSrc, initialySelectedLabel: choosen.label , initialySelectedRes: choosen.res }, settings, label);
|
||||
menuButton.el().classList.add('vjs-resolution-button');
|
||||
player.controlBar.resolutionSwitcher = player.controlBar.addChild(menuButton);
|
||||
console.log(q);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue