@viewlift/player-backup 1.0.99-backup → 1.0.100-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-731fc1fc.js → autoNextVideo-b3777f2f.js} +1 -1
- package/cjs/bundle.css +1 -1
- package/cjs/{caption-settings-228fb391.js → caption-settings-ca07c7a5.js} +1 -1
- package/cjs/{features-b6adcbb7.js → features-86dad21d.js} +1 -1
- package/cjs/{generic-77cbda56.js → generic-9d9b0e54.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-68f50a7b.js → keyboardShortcuts-cb2a921f.js} +1 -1
- package/cjs/{multicam-8db80bb4.js → multicam-3f966668.js} +1 -1
- package/cjs/{multicamv2-97272ade.js → multicamv2-c89a71aa.js} +1 -1
- package/cjs/{mwebPotraitTray-0585b077.js → mwebPotraitTray-d55268ef.js} +1 -1
- package/cjs/{nextEpisodeButton-9a867b2d.js → nextEpisodeButton-6d989315.js} +1 -1
- package/cjs/{playlist-7a3723b0.js → playlist-0933530f.js} +1 -1
- package/cjs/{renditions-0c58cc3d.js → renditions-97ea2e48.js} +1 -1
- package/cjs/{resolution-816e03de.js → resolution-a28ec092.js} +1 -1
- package/cjs/{series-66cf6a00.js → series-d93aa8be.js} +1 -1
- package/cjs/{series-v2-acaae556.js → series-v2-76f7ce6f.js} +1 -1
- package/cjs/{settings-icon-5257d3dc.js → settings-icon-6e86ed2b.js} +1 -1
- package/cjs/{skin-0c8cce11.js → skin-4ae012ee.js} +1 -1
- package/cjs/{skin-e7ad0365.js → skin-518e4a9c.js} +1 -1
- package/cjs/{skin-db967a8f.js → skin-99b034cf.js} +1 -1
- package/cjs/{skin-386e995b.js → skin-b89cd1a3.js} +1 -1
- package/cjs/{skin-1fe41038.js → skin-cc063da4.js} +1 -1
- package/cjs/{skin-3740d1ef.js → skin-f8f4e492.js} +1 -1
- package/cjs/{util-1f90e4a3.js → util-cfdeb4de.js} +1 -1
- package/cjs/{videoSelector-23b9e00e.js → videoSelector-03dee6e9.js} +1 -1
- package/esm/{autoNextVideo-ba5ab337.js → autoNextVideo-a74ccb76.js} +1 -1
- package/esm/bundle.css +1 -1
- package/esm/{caption-settings-0d1646dc.js → caption-settings-7ed78d7f.js} +1 -1
- package/esm/{features-077306aa.js → features-25f8bfd9.js} +1 -1
- package/esm/{generic-fa98f0cf.js → generic-30a350ab.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-05852259.js → keyboardShortcuts-32aa1b23.js} +1 -1
- package/esm/{multicam-4aa3b524.js → multicam-93e248db.js} +1 -1
- package/esm/{multicamv2-0a0bd570.js → multicamv2-0fbdf24f.js} +1 -1
- package/esm/{mwebPotraitTray-996f3b57.js → mwebPotraitTray-66401f73.js} +1 -1
- package/esm/{nextEpisodeButton-a9fa2ed8.js → nextEpisodeButton-2c9cad0b.js} +1 -1
- package/esm/{playlist-6d69772d.js → playlist-74c8d757.js} +1 -1
- package/esm/{renditions-ebec6a8e.js → renditions-9e4f9b98.js} +1 -1
- package/esm/{resolution-d5382170.js → resolution-3396f48a.js} +1 -1
- package/esm/{series-34e9687a.js → series-0ba25f98.js} +1 -1
- package/esm/{series-v2-6ab0649f.js → series-v2-c926a577.js} +1 -1
- package/esm/{settings-icon-f1b36d3e.js → settings-icon-8e1ae58f.js} +1 -1
- package/esm/{skin-f46d9762.js → skin-2d53e012.js} +1 -1
- package/esm/{skin-26f13cdd.js → skin-85b3ae06.js} +1 -1
- package/esm/{skin-f4ab493c.js → skin-99f72a1b.js} +1 -1
- package/esm/{skin-1353ed4d.js → skin-a91b517c.js} +1 -1
- package/esm/{skin-ce6ea8d3.js → skin-e058fad8.js} +1 -1
- package/esm/{skin-382addb2.js → skin-e7d692fb.js} +1 -1
- package/esm/{util-c301d76a.js → util-814500d5.js} +1 -1
- package/esm/{videoSelector-ceaa49d3.js → videoSelector-ef11b432.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{X as d,j as p,o as u,t as v,e as m,p as f}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{X as d,j as p,o as u,t as v,e as m,p as f}from"./generic-30a350ab.js";import{s as h}from"./loader-580278fe.js";import{E as g}from"./icons-3e9a1686.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){n(d,C);var e,l,c=(e=d,l=b(),function(){var t,i=a(e);if(l){var s=a(this).constructor;t=Reflect.construct(i,arguments,s)}else t=i.apply(this,arguments);return r(this,t)});function d(e){var i,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),i=c.call(this,e,n),o(s(i),"seriesData",[]),i.seriesData=n.seriesData,y=n.playerId,E(i.el(),i.seriesData),i.loadCSS(),i}return i(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();function L(){return(L=e(l.mark((function e(t,i,s,n){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(y),h(y),v(y,i).then((function(e){m(e.response),f(y)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){p(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),m=document.querySelector("#episodes-back-btn"),f=e.id,h=e.episodes;m.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(n,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var s=t.querySelector(".meta-details");t.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),i.forEach((function(t,s){s!==e&&(i[s].classList.remove("episode-active"),i[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,u[t],u)})),v[t].addEventListener("click",(function(){return function(e,t,i,s){return L.apply(this,arguments)}(t,h[t].id,i,u)})),e.episodes[t].id==f&&u[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,t){for(var i='<div class="hover-div"></div>\n '.concat(g(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=d(i);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}export{E as customSeasonList,k as handleSeasonChange,w as seriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-3e9a1686.js";import{i as u,a0 as m,a1 as p,Y as v,P as h,b as f,R as C,N as g,t as y}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-3e9a1686.js";import{i as u,a0 as m,a1 as p,Y as v,P as h,b as f,R as C,N as g,t as y}from"./generic-30a350ab.js";import{a as b}from"./autoNextVideo-a74ccb76.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-814500d5.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){o(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function L(s){var o,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(o=c.sres)||void 0===o?void 0:o.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=n(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,g=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,y=[];g.map((function(t){y.push.apply(y,e(t.episodes))})),m(y),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:y,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-0727ee8c.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(v(),e.classList.remove("hidden"),s.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});o.onclick=function(){if("series-selector-cross-icon"===o.className)e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===o.className){var n=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),o.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(n,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var l=h(d());o.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),f(this.playerId).on("fullscreenchange",(function(){var s=document.getElementById(t.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;f(this.playerId);for(var t=C(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(n));var l=document.createElement("div");l.className="season - ".concat(n),l.textContent=null===(o=t[n])||void 0===o?void 0:o.title;var r=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==n&&(r.checked=!0),r.onclick=function(t){g.set(n),e.showSeasonDetails(n)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(s,i)},o=0;o<t.length;o++)n(o);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map((function(e){var t,s,o,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9,watchedPercentage:(null==n||null===(i=n.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var o=function(o){var i,l,r,d,c,u,m,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:o}),f=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")}),C=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,f),a.dom.appendContent(h,C),a.dom.appendContent(v,h),a.dom.appendContent(s,v);var g=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[o])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[o])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(m=t[o])||void 0===m?void 0:m.title),a.dom.appendContent(g,E),a.dom.appendContent(g,N),a.dom.appendContent(v,g),a.dom.appendContent(s,v),g.onclick=function(e){var s;e.stopPropagation(),p(null===(s=t[o])||void 0===s?void 0:s.id),y(n.playerId,t[o].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},h.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=C()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=h(c());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{f as l,e as d,T as s}from"./icons-3e9a1686.js";import{Y as c,Z as u,_ as p,$ as m,b as h,X as v,P as f}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{f as l,e as d,T as s}from"./icons-3e9a1686.js";import{Y as c,Z as u,_ as p,$ as m,b as h,X as v,P as f}from"./generic-30a350ab.js";import{g}from"./renditions-9e4f9b98.js";import{playSelectedResolution as y}from"./resolution-3396f48a.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(L,E);var N,k,I=(N=L,k=C(),function(){var e,t=o(N);if(k){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function L(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,L),(a=I.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(L,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),n=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:b("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),l=r.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();r.dom.appendContent(l,s);var c=this.createAudioQualityContainer();r.dom.appendContent(l,c),r.dom.appendContent(a,n),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,o),r.dom.appendContent(o,l),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=r.dom.createEl("div",{className:"audio-language-container"}),n=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:b("audioLanguageText")||"Audio Language"});r.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=r.dom.createEl("div",{className:"video-quality-container"}),n=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:b("videoQualityText")||"Video Quality"});r.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,l,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),h=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?b("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(g);if(u.appendChild(C),p.appendChild(h),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var E=v("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var I=f(s());k.appendChild(I),c.appendChild(N),c.appendChild(k),c.appendChild(p),r.dom.appendContent(d,c),d.appendChild(u),r.dom.appendContent(a,d)},l=0;l<i.length;l++)o(l);return a}}]),L}();export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,p as r,o as t}from"./generic-
|
|
1
|
+
import{b as e,p as r,o as t}from"./generic-30a350ab.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function o(e){i(e),n(e)}var n=function(o){var n=e(o),i=document.getElementById("".concat(o));i&&i.addEventListener("touchstart",(function(){n.paused()?r(o):t(o)}))},i=function(r){var t=e(r);t.requestFullscreen=function(){},t.controlBar.hide()};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as n,d as o}from"./features-
|
|
1
|
+
import{a as e,b as t,c as n,d as o}from"./features-25f8bfd9.js";import{M as s,a as r,S as l,N as a}from"./icons-3e9a1686.js";import{b as i,d as c,Q as u}from"./generic-30a350ab.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-32aa1b23.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-9e4f9b98.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function v(o,a){var m=i(o);m.one("play",(function(){var t,n,l,i;null!=a&&a.streams&&e(o,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a)),null!=a&&a.airplay&&"Safari"==c()&&m.addChild("airPlayButton"),null!=a&&a.chromecastReceiverId&&m.addChild("chromecastButton"),m.addChild("FullscreenToggle"),null===(t=m.getChild("FullscreenToggle"))||void 0===t||null===(n=t.el())||void 0===n||n.appendChild(u(s(window.controlsColor))),null===(l=m.getChild("FullscreenToggle"))||void 0===l||null===(i=l.el())||void 0===i||i.appendChild(u(r(window.controlsColor))),h(o)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&t(o,"live",l())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&n(o,a)}))}function f(e,t){var n;m(e,t),(null==(n=t)||!n.liveui)&&(null==n||!n.liveVideo)||null!=n&&n.liveui&&null!=n&&n.liveVideo?import("./dvr_skin-9cc1b144.js").then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):import("./nondvr_skin-64be70e5.js").then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e){o(e)}(e),function(e,t){var n=i(e),o=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var s=document.createElement("div");s.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(s,o.querySelector(".vjs-menu-item"));var r=document.createElement("div");if(r.innerText="Captions",r.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(r),"Safari"==c()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,t),v(e,t)}var b;function h(e){var t=i(e);j(),t.on("pause",(function(){clearTimeout(b),y()})),t.on("play",(function(){j()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||j()})),n.addEventListener("touchstart",(function(){y(),j()})),n.addEventListener("mousemove",(function(){y(),t.paused()||j()}))}function y(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function j(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-fullscreen-control")[0],n=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(b),b=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{h as hideControls,f as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,e as t,f as o,g as s,h as n}from"./features-
|
|
1
|
+
import{b as e,e as t,f as o,g as s,h as n}from"./features-25f8bfd9.js";import{i}from"./keyboardShortcuts-32aa1b23.js";import{S as r,M as l,a,N as d,b as m,R as u}from"./icons-3e9a1686.js";import{b as p,a as c,Q as b}from"./generic-30a350ab.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-9e4f9b98.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function v(v,h){i(v,h),import("./skin-cd537931.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",u())}(v,h),function(s,n){var i=p(s),l=(null==n?void 0:n.sres)||null;i.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-2c9cad0b.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,c())}))})),i.one("loadedmetadata",(function(){var e;l&&(t(s,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),o(n.sres,n.res,s))}))}(v,h),function(e,t){var o,s,n,i,r=p(e),m=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(m&&(m.style.display="none"),u&&(u.style.display="none"),c&&(c.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(b(l(window.controlsColor))),null===(n=r.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(b(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(d()));var h=document.createElement("div");h.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(h,v.querySelector(".vjs-menu-item"))}(v,h)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,p as t,o as r}from"./generic-
|
|
1
|
+
import{b as e,p as t,o as r}from"./generic-30a350ab.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),n(),function(o){var n=document.getElementById("".concat(o)),a=e(o);n&&n.addEventListener("touchstart",(function(){a.paused()?t(o):r(o)}))}(o)}var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,j as t,k as n,g as l,h as o,d as r,l as i,m as a,n as s,o as u}from"./features-077306aa.js";import{M as c,a as d,c as m,d as v}from"./icons-3e9a1686.js";import{R as p,b as f,S as h,y as g,Q as y,d as x}from"./generic-fa98f0cf.js";import{g as w}from"./renditions-ebec6a8e.js";import b from"@babel/runtime/helpers/toConsumableArray";import{s as C}from"./autoNextVideo-ba5ab337.js";import E from"@babel/runtime/helpers/typeof";import j from"video.js";import N from"@babel/runtime/helpers/asyncToGenerator";import k from"@babel/runtime/regenerator";import B from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-c301d76a.js";var T=p(),I=[];null==T||T.map((function(e){return I.push.apply(I,b(e.episodes))}));var L,O,M,V,R=function(e,t){var n=f(e),l=Math.floor(n.currentTime());if(Math.floor(n.duration())!=l){n.pause(e);var o=h();C(o,e,I)}};function P(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),l={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(l.resolution=e.split("=")[1]),e.includes("URI")&&(l.uri=e.split("=")[1].replace(/"/g,""))})),n.push(l)}})),n}function X(e){return S.apply(this,arguments)}function S(){return(S=N(k.mark((function e(t){return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var l=[],o=t.layout.split("x"),r=B(o,2),i=r[0],a=r[1];n.onload=function(){var o=document.createElement("canvas");o.width=n.width,o.height=n.height,o.getContext("2d").drawImage(n,0,0,o.width,o.height);for(var r=o.width/a,s=o.height/i,u=0;u<i;u++)for(var c=0;c<a;c++){var d=document.createElement("canvas");d.width=r,d.height=s,d.getContext("2d").drawImage(o,c*r,u*s,r,s,0,0,r,s);var m=d.toDataURL("image/png");l.push({uri:m,duration:t.duration})}e(l)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){return F.apply(this,arguments)}function F(){return(F=N(k.mark((function e(t){var n,l;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return l=e.sent,e.abrupt("return",P(l));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function U(e){return D.apply(this,arguments)}function D(){return(D=N(k.mark((function e(t){var n,l;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return X(e)})));case 2:return n=e.sent.flat(),l={},n.map((function(e,t){var n=e.duration;l[n*t]={src:e.uri,style:{left:"-60px",height:"68px",width:"120px"}}})),e.abrupt("return",l);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}L={0:{src:"example-thumbnail.png"}},O=function e(){var t,n,l,o,r;for(l in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(r in o=t[l])o.hasOwnProperty(r)&&("object"===E(o[r])?n[r]=e(n[r],o[r]):n[r]=o[r]);return n},M=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},V=function e(t){return"HTML"!==t.nodeName&&"static"===M(t)("position")?e(t.offsetParent):t},j.plugin("thumbnails",(function(e){var t,n,l,o,r,i,a,s;n=O({},L,e),o=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=o.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),t.appendChild(l),l.src=n[0].src,l.className="vjs-thumbnail",O(l.style,n[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),i=o.duration(),o.on("durationchange",(function(e){i=o.duration()})),o.on("loadedmetadata",(function(e){i=o.duration()})),(r=o.controlBar.progressControl).el().appendChild(t),a=function(e){var o,a,s,u,c,d,m,v,p,f;for(a in s=0,p=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,m=((f=V(r.el()).getBoundingClientRect()).width||f.right)+p,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),u=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,u-=V(r.el()).getBoundingClientRect().left+p,o=Math.floor((u-r.el().offsetLeft)/r.width()*i),n)o>a&&(s=Math.max(s,a));(c=n[s]).src&&l.src!=c.src&&(l.src=c.src),c.style&&l.style!=c.style&&O(l.style,c.style),u+(v=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=M(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(l,c.width||n[0].width)/2)>m?u-=u+v-m:u<v&&(u=v),t.style.left=u+"px"},r.on("mousemove",a),r.on("touchmove",a),s=function(e){t.style.left="-1000px"},r.on("mouseout",s),r.on("touchcancel",s),r.on("touchend",s),o.on("userinactive",s)}));var G=function(){var e=N(k.mark((function e(t,n){var l,o,r,i;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return l=e.sent,e.next=5,l.text();case 5:return o=e.sent,r=o.split("\n"),i=[],r.forEach((function(e,n){e=e.trim();var l={resolution:null,duration:null,uri:null,layout:null};n>0&&r[n-1].includes("#EXT-X-TILES")&&(r[n-1]=r[n-1].split(","),l.uri=t+e,r[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=B(t,2),o=n[0],r=n[1];o=o.toLowerCase(),l[o]=r}))})),i.push(l))})),e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function W(){return(W=N(k.mark((function e(t){var n,l,o,r,i,a,s,u,c;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f(t),l=n.currentSource(),o=l.src,e.next=4,A(o);case 4:if(!((null==(r=e.sent)?void 0:r.length)>0)){e.next=15;break}return i=(null==r?void 0:r[0])||null,a=i.uri,s=n.tech().vhs.playlists.master.uri.substring(0,n.tech().vhs.playlists.master.uri.lastIndexOf("/"))+"/",e.next=10,G(s,a);case 10:return u=e.sent,e.next=13,U(u);case 13:c=e.sent,n.thumbnails(c);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(l,o){var r=f(l);r&&(r.on("loadeddata",(function(){var n,i,a;(null===(n=w(l))||void 0===n?void 0:n.length)>0&&e(l,o),(null===(i=g(l))||void 0===i?void 0:i.length)>0&&t(l,o),null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable&&function(e,t){var n;null==t||null===(n=t.series)||void 0===n||n.cb;var l=f(e);l.on("timeupdate",(function(){var e,t=Math.floor(l.currentTime()),n=l.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];n-t<=10&&h()<=(null==I?void 0:I.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=I.filter((function(e,t){return t==h()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var i,a,s,u,c,d,m,v,p,g,y;(null===(i=document.getElementsByClassName("next-ep-preview"))||void 0===i?void 0:i[0]).style.visibility="hidden";var x=null===(a=document.getElementsByClassName("next-ep-title"))||void 0===a?void 0:a[0],w=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],b=null===(u=document.getElementsByClassName("next-ep-content"))||void 0===u?void 0:u[0],C=null===(c=r[0])||void 0===c?void 0:c.title;(null===(d=C)||void 0===d?void 0:d.length)>60&&(C=C.substr(0,60)+"..."),x.textContent="".concat(C),w.src=(null===(m=r[0])||void 0===m||null===(v=m.gist)||void 0===v||null===(p=v.imageGist)||void 0===p?void 0:p.r16x9)||(null===(g=window)||void 0===g||null===(y=g.customData)||void 0===y?void 0:y.fallbackImage),b.onclick=function(){return R(e)}}else{var E,j,N,k,B,T,L,O=document.createElement("div");O.className="next-ep-preview",O.style.visibility="hidden",document.getElementById(e).append(O);var M=document.createElement("div");M.className="next-ep-header",M.textContent="Next up";var V=null===(E=r[0])||void 0===E?void 0:E.title,P=document.createElement("img");P.className="next-ep-img",P.src=(null===(j=r[0])||void 0===j||null===(N=j.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null===(B=window)||void 0===B||null===(T=B.customData)||void 0===T?void 0:T.fallbackImage);var X=document.createElement("div");X.className="next-ep-title",(null===(L=V)||void 0===L?void 0:L.length)>60&&(V=V.substr(0,60)+"..."),X.textContent="".concat(V);var S=document.createElement("div");S.className="next-ep-content",S.append(P),S.append(X),S.onclick=function(){return R(e)},O.append(M),O.append(S)}}(l,o),function(e,t){var n,l=Math.floor(e/60),o=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];o&&(o.style.marginRight=l>60?"56px":"41px");var r=document.getElementsByClassName("vjs-live-control")[0],i=document.getElementsByClassName("vjs-time-control");t&&r.classList.value.includes("vjs-hidden")&&(i[0].style.display="block",o&&(o.style.marginRight="56px"))}(r.duration(),(null==o?void 0:o.liveVideo)||!1),null!=o&&o.liveVideo||function(e){W.apply(this,arguments)}(l)})),r.one("play",(function(){var e,t,o,r;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&n(l,null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.iframeOverlayUrl)})))}function z(e,t){!function(){"Chrome"==x()&&import("./chromett-a3cbb2e1.js").then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));import("./skin-808893ac.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),_(e,t),function(e,t){var n,l,o,r,i,a,s=f(e);null==s||null===(n=s.controlBar)||void 0===n||null===(l=n.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(y(c(window.controlsColor))),null==s||null===(r=s.controlBar)||void 0===r||null===(i=r.getChild("FullscreenToggle"))||void 0===i||null===(a=i.el())||void 0===a||a.appendChild(y(d(window.controlsColor)));var u=document.getElementsByClassName("vjs-time-control");t.liveVideo&&u[0]&&(u[0].style.display="none")}(e,t),function(e,t){var n,c,d,p,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&l(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&o(e,"defaultV2",v());t.liveVideo||r(e);(null==t||null===(n=t.relatedVideos)||void 0===n||null===(c=n.content)||void 0===c?void 0:c.length)>0&&i(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&a(e,null==t?void 0:t.streams);(null==t||null===(p=t.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&u(e,t)}(e,t),function(e,t){var n=f(e),l=null==t?void 0:t.tvProviderLogoUrl;if(!l)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(l),r.alt="Provider Image",o.append(r),n.el().appendChild(o),n.on("useractive",(function(){o.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||o.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(e,t)}export{z as initialiseSkin};
|
|
1
|
+
import{i as e,j as t,k as n,g as l,h as o,d as r,l as i,m as a,n as s,o as u}from"./features-25f8bfd9.js";import{M as c,a as d,c as m,d as v}from"./icons-3e9a1686.js";import{R as p,b as f,S as h,y as g,Q as y,d as x}from"./generic-30a350ab.js";import{g as w}from"./renditions-9e4f9b98.js";import b from"@babel/runtime/helpers/toConsumableArray";import{s as C}from"./autoNextVideo-a74ccb76.js";import E from"@babel/runtime/helpers/typeof";import j from"video.js";import N from"@babel/runtime/helpers/asyncToGenerator";import k from"@babel/runtime/regenerator";import B from"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./localisation-0bf399a1.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-814500d5.js";var T=p(),I=[];null==T||T.map((function(e){return I.push.apply(I,b(e.episodes))}));var L,O,M,V,R=function(e,t){var n=f(e),l=Math.floor(n.currentTime());if(Math.floor(n.duration())!=l){n.pause(e);var o=h();C(o,e,I)}};function P(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),l={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(l.resolution=e.split("=")[1]),e.includes("URI")&&(l.uri=e.split("=")[1].replace(/"/g,""))})),n.push(l)}})),n}function X(e){return S.apply(this,arguments)}function S(){return(S=N(k.mark((function e(t){return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var l=[],o=t.layout.split("x"),r=B(o,2),i=r[0],a=r[1];n.onload=function(){var o=document.createElement("canvas");o.width=n.width,o.height=n.height,o.getContext("2d").drawImage(n,0,0,o.width,o.height);for(var r=o.width/a,s=o.height/i,u=0;u<i;u++)for(var c=0;c<a;c++){var d=document.createElement("canvas");d.width=r,d.height=s,d.getContext("2d").drawImage(o,c*r,u*s,r,s,0,0,r,s);var m=d.toDataURL("image/png");l.push({uri:m,duration:t.duration})}e(l)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){return F.apply(this,arguments)}function F(){return(F=N(k.mark((function e(t){var n,l;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return l=e.sent,e.abrupt("return",P(l));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function U(e){return D.apply(this,arguments)}function D(){return(D=N(k.mark((function e(t){var n,l;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return X(e)})));case 2:return n=e.sent.flat(),l={},n.map((function(e,t){var n=e.duration;l[n*t]={src:e.uri,style:{left:"-60px",height:"68px",width:"120px"}}})),e.abrupt("return",l);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}L={0:{src:"example-thumbnail.png"}},O=function e(){var t,n,l,o,r;for(l in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(r in o=t[l])o.hasOwnProperty(r)&&("object"===E(o[r])?n[r]=e(n[r],o[r]):n[r]=o[r]);return n},M=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},V=function e(t){return"HTML"!==t.nodeName&&"static"===M(t)("position")?e(t.offsetParent):t},j.plugin("thumbnails",(function(e){var t,n,l,o,r,i,a,s;n=O({},L,e),o=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=o.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),t.appendChild(l),l.src=n[0].src,l.className="vjs-thumbnail",O(l.style,n[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),i=o.duration(),o.on("durationchange",(function(e){i=o.duration()})),o.on("loadedmetadata",(function(e){i=o.duration()})),(r=o.controlBar.progressControl).el().appendChild(t),a=function(e){var o,a,s,u,c,d,m,v,p,f;for(a in s=0,p=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,m=((f=V(r.el()).getBoundingClientRect()).width||f.right)+p,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),u=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,u-=V(r.el()).getBoundingClientRect().left+p,o=Math.floor((u-r.el().offsetLeft)/r.width()*i),n)o>a&&(s=Math.max(s,a));(c=n[s]).src&&l.src!=c.src&&(l.src=c.src),c.style&&l.style!=c.style&&O(l.style,c.style),u+(v=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=M(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(l,c.width||n[0].width)/2)>m?u-=u+v-m:u<v&&(u=v),t.style.left=u+"px"},r.on("mousemove",a),r.on("touchmove",a),s=function(e){t.style.left="-1000px"},r.on("mouseout",s),r.on("touchcancel",s),r.on("touchend",s),o.on("userinactive",s)}));var G=function(){var e=N(k.mark((function e(t,n){var l,o,r,i;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return l=e.sent,e.next=5,l.text();case 5:return o=e.sent,r=o.split("\n"),i=[],r.forEach((function(e,n){e=e.trim();var l={resolution:null,duration:null,uri:null,layout:null};n>0&&r[n-1].includes("#EXT-X-TILES")&&(r[n-1]=r[n-1].split(","),l.uri=t+e,r[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=B(t,2),o=n[0],r=n[1];o=o.toLowerCase(),l[o]=r}))})),i.push(l))})),e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function W(){return(W=N(k.mark((function e(t){var n,l,o,r,i,a,s,u,c;return k.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f(t),l=n.currentSource(),o=l.src,e.next=4,A(o);case 4:if(!((null==(r=e.sent)?void 0:r.length)>0)){e.next=15;break}return i=(null==r?void 0:r[0])||null,a=i.uri,s=n.tech().vhs.playlists.master.uri.substring(0,n.tech().vhs.playlists.master.uri.lastIndexOf("/"))+"/",e.next=10,G(s,a);case 10:return u=e.sent,e.next=13,U(u);case 13:c=e.sent,n.thumbnails(c);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(l,o){var r=f(l);r&&(r.on("loadeddata",(function(){var n,i,a;(null===(n=w(l))||void 0===n?void 0:n.length)>0&&e(l,o),(null===(i=g(l))||void 0===i?void 0:i.length)>0&&t(l,o),null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable&&function(e,t){var n;null==t||null===(n=t.series)||void 0===n||n.cb;var l=f(e);l.on("timeupdate",(function(){var e,t=Math.floor(l.currentTime()),n=l.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];n-t<=10&&h()<=(null==I?void 0:I.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=I.filter((function(e,t){return t==h()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var i,a,s,u,c,d,m,v,p,g,y;(null===(i=document.getElementsByClassName("next-ep-preview"))||void 0===i?void 0:i[0]).style.visibility="hidden";var x=null===(a=document.getElementsByClassName("next-ep-title"))||void 0===a?void 0:a[0],w=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],b=null===(u=document.getElementsByClassName("next-ep-content"))||void 0===u?void 0:u[0],C=null===(c=r[0])||void 0===c?void 0:c.title;(null===(d=C)||void 0===d?void 0:d.length)>60&&(C=C.substr(0,60)+"..."),x.textContent="".concat(C),w.src=(null===(m=r[0])||void 0===m||null===(v=m.gist)||void 0===v||null===(p=v.imageGist)||void 0===p?void 0:p.r16x9)||(null===(g=window)||void 0===g||null===(y=g.customData)||void 0===y?void 0:y.fallbackImage),b.onclick=function(){return R(e)}}else{var E,j,N,k,B,T,L,O=document.createElement("div");O.className="next-ep-preview",O.style.visibility="hidden",document.getElementById(e).append(O);var M=document.createElement("div");M.className="next-ep-header",M.textContent="Next up";var V=null===(E=r[0])||void 0===E?void 0:E.title,P=document.createElement("img");P.className="next-ep-img",P.src=(null===(j=r[0])||void 0===j||null===(N=j.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null===(B=window)||void 0===B||null===(T=B.customData)||void 0===T?void 0:T.fallbackImage);var X=document.createElement("div");X.className="next-ep-title",(null===(L=V)||void 0===L?void 0:L.length)>60&&(V=V.substr(0,60)+"..."),X.textContent="".concat(V);var S=document.createElement("div");S.className="next-ep-content",S.append(P),S.append(X),S.onclick=function(){return R(e)},O.append(M),O.append(S)}}(l,o),function(e,t){var n,l=Math.floor(e/60),o=null===(n=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===n?void 0:n[0];o&&(o.style.marginRight=l>60?"56px":"41px");var r=document.getElementsByClassName("vjs-live-control")[0],i=document.getElementsByClassName("vjs-time-control");t&&r.classList.value.includes("vjs-hidden")&&(i[0].style.display="block",o&&(o.style.marginRight="56px"))}(r.duration(),(null==o?void 0:o.liveVideo)||!1),null!=o&&o.liveVideo||function(e){W.apply(this,arguments)}(l)})),r.one("play",(function(){var e,t,o,r;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&n(l,null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r?void 0:r.iframeOverlayUrl)})))}function z(e,t){!function(){"Chrome"==x()&&import("./chromett-a3cbb2e1.js").then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));import("./skin-808893ac.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),_(e,t),function(e,t){var n,l,o,r,i,a,s=f(e);null==s||null===(n=s.controlBar)||void 0===n||null===(l=n.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(y(c(window.controlsColor))),null==s||null===(r=s.controlBar)||void 0===r||null===(i=r.getChild("FullscreenToggle"))||void 0===i||null===(a=i.el())||void 0===a||a.appendChild(y(d(window.controlsColor)));var u=document.getElementsByClassName("vjs-time-control");t.liveVideo&&u[0]&&(u[0].style.display="none")}(e,t),function(e,t){var n,c,d,p,f,h;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&l(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&o(e,"defaultV2",v());t.liveVideo||r(e);(null==t||null===(n=t.relatedVideos)||void 0===n||null===(c=n.content)||void 0===c?void 0:c.length)>0&&i(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&a(e,null==t?void 0:t.streams);(null==t||null===(p=t.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(h=t.series)&&void 0!==h&&h.enable&&u(e,t)}(e,t),function(e,t){var n=f(e),l=null==t?void 0:t.tvProviderLogoUrl;if(!l)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(l),r.alt="Provider Image",o.append(r),n.el().appendChild(o),n.on("useractive",(function(){o.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||o.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(e,t)}export{z as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,W as r}from"./generic-
|
|
1
|
+
import{b as e,W as r}from"./generic-30a350ab.js";import{i as t,p as o}from"./features-25f8bfd9.js";import{g as i}from"./renditions-9e4f9b98.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./localisation-0bf399a1.js";function n(n,a){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(o,n){e(o).on("loadeddata",(function(){var e;(null===(e=i(o))||void 0===e?void 0:e.length)>0&&t(o,n),null!=n&&n.disableCaptions&&r(o)}))}(n,a),function(r){var t=e(r);t.controls(!1),o(r)}(n)}export{n as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./generic-
|
|
1
|
+
import{b as t}from"./generic-30a350ab.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-3e9a1686.js";import{Y as s,Z as d,_ as c,$ as m,T as u,t as p,V as v}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-3e9a1686.js";import{Y as s,Z as d,_ as c,$ as m,T as u,t as p,V as v}from"./generic-30a350ab.js";import{a as h}from"./autoNextVideo-a74ccb76.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-814500d5.js";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y=a.getComponent("Component"),g=function(){o(E,y);var g,C,N=(g=E,C=b(),function(){var e,t=i(g);if(C){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function E(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(i=N.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(v(0),h({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(E,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(s(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",d(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),c(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),s=a.dom.createEl("div",{className:"video-selector-content"}),d=a.dom.createEl("div",{className:"video-container"}),c=function(e){var o,n,i,r,l,c=a.dom.createEl("div",{className:"video -".concat(e)}),m=a.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){v(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),p(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",m.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(c,m),a.dom.appendContent(c,f),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},h=0;h<this.videos.length;h++)c(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,s),m(this.playerId,e)}}]),E}();export{g as default};
|