cache-cues-D8o-F2Bu.js
11 months ago
cache-cues-D8o-F2Bu.js.map
11 months ago
fittext-kmLX7jv_.js
11 months ago
fittext-kmLX7jv_.js.map
11 months ago
hls-CsbhelHE.js
3 weeks ago
hls-CsbhelHE.js.map
3 weeks ago
index-BxRAfMA5.js
11 months ago
index-BxRAfMA5.js.map
11 months ago
index.js
3 years ago
index.js.map
11 months ago
learndash-4JWclJp6.js
3 weeks ago
learndash-4JWclJp6.js.map
3 weeks ago
lifter-DcYtxwW6.js
11 months ago
lifter-DcYtxwW6.js.map
11 months ago
loader.js
2 months ago
loader.js.map
11 months ago
presto-action-bar-ui.presto-youtube-subscribe-button.entry.js.map
11 months ago
presto-action-bar-ui_2.entry.js
11 months ago
presto-action-bar-ui_2.entry.js.map
11 months ago
presto-action-bar_17.entry.js
3 weeks ago
presto-action-bar_17.entry.js.map
3 weeks ago
presto-cta-overlay-ui.entry.js
11 months ago
presto-cta-overlay-ui.entry.js.map
11 months ago
presto-email-overlay-ui.presto-player-spinner.entry.js.map
1 month ago
presto-email-overlay-ui_2.entry.js
1 month ago
presto-email-overlay-ui_2.entry.js.map
1 month ago
presto-player-button.entry.js
11 months ago
presto-player-button.entry.js.map
11 months ago
presto-player-skeleton.entry.js
11 months ago
presto-player-skeleton.entry.js.map
11 months ago
presto-player.presto-playlist-item.presto-playlist-overlay.presto-playlist-ui-BG80ci1u.js
3 weeks ago
presto-player.presto-playlist-item.presto-playlist-overlay.presto-playlist-ui-BG80ci1u.js.map
3 weeks ago
presto-player.presto-playlist-item.presto-playlist-overlay.presto-playlist-ui.entry.js.map
11 months ago
presto-player_4.entry.js
3 weeks ago
presto-player_4.entry.js.map
1 year ago
presto-playlist.entry.js
11 months ago
presto-playlist.entry.js.map
11 months ago
presto-search-bar-ui.entry.js
11 months ago
presto-search-bar-ui.entry.js.map
11 months ago
presto-timestamp.entry.js
11 months ago
presto-timestamp.entry.js.map
11 months ago
presto-video-curtain-ui.entry.js
11 months ago
presto-video-curtain-ui.entry.js.map
11 months ago
presto-video.entry.js
4 months ago
presto-video.entry.js.map
4 months ago
resize-observer-DwzUTbbs.js
11 months ago
resize-observer-DwzUTbbs.js.map
11 months ago
tutor-fH7ZDDmI.js
11 months ago
tutor-fH7ZDDmI.js.map
11 months ago
util-EuTDjLsB.js
11 months ago
util-EuTDjLsB.js.map
11 months ago
web-components.js
2 months ago
web-components.js.map
11 months ago
hls-CsbhelHE.js
1 lines
| 1 | import{P as PrestoPlayer}from"./presto-player.presto-playlist-item.presto-playlist-overlay.presto-playlist-ui-BG80ci1u.js";import"./index-BxRAfMA5.js";import"./util-EuTDjLsB.js";import"./cache-cues-D8o-F2Bu.js";const loadHLS=({config:e,selector:t,src:o,preload:r})=>new Promise(async(n,a)=>{if(!window.Hls)for(;!window.hasOwnProperty("Hls");)await new Promise(e=>setTimeout(e,50));if(window.Hls.isSupported()){let a=!["metadata","none"].includes(r);wp?.blocks&&(a=!0);var l=new window.Hls(window?.wp?.hooks?.applyFilters?.("presto.hlsSettings",{autoStartLoad:a,capLevelToPlayerSize:!0}));return l.loadSource(o),l.on(window.Hls.Events.LEVEL_SWITCHED,(e,o)=>{var r=t.closest(".presto-player__wrapper").querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");l.autoLevelEnabled?r.innerHTML=`AUTO (${l.levels[o.level].height}p)`:r.innerHTML="AUTO"}),void l.on(window.Hls.Events.MANIFEST_PARSED,function(o,r){var a=l.levels.map(function(e){return e.height});a.unshift(0);const s=(a||[]).findIndex(e=>e===parseInt(window?.prestoPlayer?.hls_start_level));l.startLevel=s?s-1:2,e.quality={default:0,options:a,forced:!0,onChange:function(e){0===e?prestoHLS.currentLevel=-1:prestoHLS.levels.forEach(function(t,o){t.height===e&&(console.log("Found quality match with "+e),prestoHLS.currentLevel=o)})}},l.attachMedia(t),window.prestoHLS=l;const i=new PrestoPlayer(t,{...e});i.hls=l;const p=()=>{l.startLoad(-1),i.off("waiting",p)};return i.on("waiting",p),i.on("languagechange",()=>{setTimeout(()=>l.subtitleTrack=i.currentTrack,50)}),n(i)})}return t.canPlayType("application/vnd.apple.mpegurl"),n(new PrestoPlayer(t,{...e}))});export{loadHLS as default}; |