mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 17:59:42 +02:00
set sources inside video tag
This commit is contained in:
parent
e45af2a522
commit
23405ab6c4
2 changed files with 25 additions and 5 deletions
|
@ -82,7 +82,7 @@
|
|||
})
|
||||
|
||||
|
||||
player.newVideoSources = function(src){
|
||||
player.updateSrc = function(src){
|
||||
|
||||
// Dispose old resolution menu button before adding new sources
|
||||
if(player.controlBar.resolutionSwitcher){
|
||||
|
@ -96,6 +96,10 @@
|
|||
player.src(src);
|
||||
}
|
||||
|
||||
// Create resolution switcher for videos form <source> tag inside <video>
|
||||
if(player.options_.sources.length > 1){
|
||||
player.updateSrc(player.options_.sources)
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue