set sources inside video tag

This commit is contained in:
Kasper Moskwiak 2015-07-28 14:24:07 +02:00
parent e45af2a522
commit 23405ab6c4
2 changed files with 25 additions and 5 deletions

View file

@ -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)
}
};