mirror of
https://github.com/kmoskwiak/videojs-resolution-switcher.git
synced 2025-10-03 17:59:42 +02:00
hls init
This commit is contained in:
parent
56760f6314
commit
2e5bb5ade7
3 changed files with 85 additions and 2 deletions
|
@ -337,6 +337,17 @@
|
|||
});
|
||||
}
|
||||
|
||||
function initResolutionForHLS(player){
|
||||
var hls = player.tech_.hls;
|
||||
|
||||
player.one('loadedmetadata', function(){
|
||||
var playlists = hls.playlists.master.playlists;
|
||||
console.log(playlists)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
player.ready(function(){
|
||||
if(player.options_.sources.length > 1){
|
||||
// tech: Html5 and Flash
|
||||
|
@ -344,6 +355,11 @@
|
|||
player.updateSrc(player.options_.sources);
|
||||
}
|
||||
|
||||
if(player.tech_.hls){
|
||||
// HLS support
|
||||
initResolutionForHLS(player);
|
||||
}
|
||||
|
||||
if(player.techName_ === 'Youtube'){
|
||||
// tech: YouTube
|
||||
initResolutionForYt(player);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue