@viewlift/player-backup 0.0.85 → 0.0.86
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-8103fc72.js → autoNextVideo-b517b7a0.js} +1 -1
- package/cjs/bundle.css +1 -1
- package/cjs/{caption-settings-04f0abe8.js → caption-settings-a811cab2.js} +1 -1
- package/cjs/{icons-c6ad8a7a.js → icons-1ca59b5a.js} +1 -1
- package/cjs/index-7c1e5980.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-af0be974.js → keyboardShortcuts-6ed60013.js} +1 -1
- package/cjs/{multicam-b520c29c.js → multicam-cb0feea0.js} +1 -1
- package/cjs/{multicamv2-d2393f21.js → multicamv2-5d1da6ed.js} +1 -1
- package/cjs/{mwebPotraitTray-272a31d9.js → mwebPotraitTray-be81a224.js} +1 -1
- package/cjs/{nextEpisodeButton-ac760451.js → nextEpisodeButton-b2c17530.js} +1 -1
- package/cjs/{playlist-80cbed70.js → playlist-bc457b0d.js} +1 -1
- package/cjs/{series-95f277c9.js → series-df1f7175.js} +1 -1
- package/cjs/{series-v2-84c495b7.js → series-v2-d4881c30.js} +1 -1
- package/cjs/{settings-icon-0fa3de25.js → settings-icon-30220ffd.js} +1 -1
- package/cjs/{skin-1515d258.js → skin-1cb330e5.js} +1 -1
- package/cjs/{skin-9d210dd2.js → skin-21b992e6.js} +1 -1
- package/cjs/{skin-61a03ec3.js → skin-6da6f9f3.js} +1 -1
- package/cjs/{skin-c40311d5.js → skin-de0c17ae.js} +1 -1
- package/cjs/{videoSelector-fe70d4ac.js → videoSelector-aa80691d.js} +1 -1
- package/esm/{autoNextVideo-6df12daa.js → autoNextVideo-61bcfdd6.js} +1 -1
- package/esm/bundle.css +1 -1
- package/esm/{caption-settings-e1cbfe1c.js → caption-settings-5c2a0794.js} +1 -1
- package/esm/{icons-6b14ea52.js → icons-3b7b871b.js} +1 -1
- package/esm/index-8ea26832.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-5f622eb7.js → keyboardShortcuts-7f3cfa8e.js} +1 -1
- package/esm/{multicam-d4ce812b.js → multicam-c868cc12.js} +1 -1
- package/esm/{multicamv2-19e304e3.js → multicamv2-aef2fcaf.js} +1 -1
- package/esm/{mwebPotraitTray-cfb58640.js → mwebPotraitTray-ebb9e70d.js} +1 -1
- package/esm/{nextEpisodeButton-584decd2.js → nextEpisodeButton-c32e5192.js} +1 -1
- package/esm/{playlist-ecc18463.js → playlist-510e3f8f.js} +1 -1
- package/esm/{series-c2c39020.js → series-030c89bc.js} +1 -1
- package/esm/{series-v2-d23d0d7a.js → series-v2-16874896.js} +1 -1
- package/esm/{settings-icon-1bfc3415.js → settings-icon-0d3ec059.js} +1 -1
- package/esm/{skin-8cec50de.js → skin-038c52ea.js} +1 -1
- package/esm/{skin-e4f3c35f.js → skin-3e94eb26.js} +1 -1
- package/esm/{skin-16bae23f.js → skin-f6d3c265.js} +1 -1
- package/esm/{skin-a3310e15.js → skin-f7a9ab4c.js} +1 -1
- package/esm/{videoSelector-701d556c.js → videoSelector-bc548a99.js} +1 -1
- package/iife/bundle.css +655 -0
- package/iife/index.js +1 -0
- package/package.json +1 -1
- package/umd/bundle.css +655 -0
- package/umd/index.js +1 -0
- package/cjs/index-1f4e015b.js +0 -1
- package/esm/index-b5c120a2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,s as r,r as t}from"./index-
|
|
1
|
+
import{g as e,s as r,r as t}from"./index-8ea26832.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{l as c,p as u}from"./index-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{l as c,p as u}from"./index-8ea26832.js";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}var m=s.getComponent("Component"),p=function(o){l(p,m);var n=d(p);function p(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),p=m.getPropertyValue("height"),f=m.getPropertyValue("width"),v=p.slice(0,-2);f.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(v-135,"px"),e.style.height="".concat(v-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(v-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(p,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),p}();export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{u as s,s as i,v as l}from"./icons-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{u as s,s as i,v as l}from"./icons-3b7b871b.js";import{t as c,g as d,l as m,p as u}from"./index-8ea26832.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=o(e);if(t){var s=o(this).constructor;r=Reflect.construct(a,arguments,s)}else r=a.apply(this,arguments);return n(this,r)}}var h=a.getComponent("Component"),v=function(n){r(v,h);var o=p(v);function v(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=o.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"stream-container hidden"});a.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(c(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),document.getElementById(this.playerId).style.overflow="hidden",a.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=a.dom.createEl("div",{className:"stream-selector-head"}),o=a.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=a.dom.createEl("div",{className:"stream-selector-content"}),p=a.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,n=a.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=a.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",m(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){u(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),o.alt="No Thumbnail Available",n.append(o),a.dom.appendContent(p,n),a.dom.appendContent(c,p)},v=0;v<this.streams.length;v++)h(v);a.dom.appendContent(n,o),a.dom.appendContent(n,s),a.dom.appendContent(e,n),a.dom.appendContent(e,c),d(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),v}();export{v as default};
|
|
@@ -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 l from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{s}from"./loader-580278fe.js";import{l as i,p as a}from"./index-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import r from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{s}from"./loader-580278fe.js";import{l as i,p as a}from"./index-8ea26832.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,n=r(e);if(t){var s=r(this).constructor;o=Reflect.construct(n,arguments,s)}else o=n.apply(this,arguments);return l(this,o)}}var d=n.getComponent("Component"),u=function(l){o(u,d);var r=c(u);function u(t){var o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(o=r.call(this,t,l)).playerId=l.playerId,o.config=l.config,o.createUI(null==l?void 0:l.config.streams),o}return t(u,[{key:"createEl",value:function(){return n.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,o,l,r,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(o=this.config)||void 0===o?void 0:o.liveVideo)||!(null!=this&&null!==(l=this.config)&&void 0!==l&&l.liveui)&&!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var m=n.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=n.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=n.dom.createEl("div",{className:"tilecontainer-potrait"});n.dom.appendContent(d,m),n.dom.appendContent(d,v),n.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var o=this,l=this.el(),r=n.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(r.style.border="2px solid red"),r.style.backgroundImage="url(".concat(e.img,")");var c=n.dom.$(".tilecontainer-potrait",this.contentEl());n.dom.appendContent(c,r);var d=sessionStorage.getItem("token");return r.addEventListener("click",(function(t){s(o.playerId),o.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),i(o.playerId,e.id,d).then((function(e){a(o.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){import("./mwebPotrait-3c1805d8.js").then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),o=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),l=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),r=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==o||o.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==r||r.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")))}}]),u}();export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as s}from"./icons-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as s}from"./icons-3b7b871b.js";import{l as a,k as l}from"./index-8ea26832.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var s=i(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return o(this,n)}}var p=r.getComponent("Component"),c=function(o){n(a,p);var i=d(a);function a(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(a,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(s(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),s=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),a}(),u=function(e,t){var n=m(e,t.video.gist.id),o=f(e[n],t.video.gist.id),i=v(e[n],o);h(i.nextEp)},m=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,s=n>1?e.episodes[i]:null;return o===i&&(0===o?s=null:r=null),{prevEp:r,nextEp:s,prevEpIdx:o,nextEpIdx:i}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},h=function(e){r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t=sessionStorage.getItem("token");a("my-player",e.gist.id,t).then((function(e){l(e.response)}))},r.dom.$(".next-eps-image").innerHTML="<img src=".concat(e.gist.videoImageUrl,"/>"),r.dom.$(".next-eps-description").innerHTML="<div class='next-eps-title'>".concat(e.title,"</div>\n <div class='next-eps-description-details'>").concat(e.gist.description,"</div>")};export{c as default,u as initaliseFunctionality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,s as r}from"./icons-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,s as r}from"./icons-3b7b871b.js";import{t as d,g as c,l as p,n as m}from"./index-8ea26832.js";import{a as u}from"./autoNextVideo-61bcfdd6.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return l(this,n)}}var y=a.getComponent("Component"),h=function(l){o(h,y);var i=v(h);function h(e){var n,o,l,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&u({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),c=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,c),a.dom.appendContent(i,s),a.dom.appendContent(d,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(d,i),u.onclick=function(e){e.stopPropagation(),m(t+1),p(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,d),c(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),h}();export{h as default};
|
|
@@ -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 n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import l from"video.js";import{q as d,e as p,l as u,k as v,p as m}from"./index-
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import l from"video.js";import{q as d,e as p,l as u,k as v,p as m}from"./index-8ea26832.js";import{s as f}from"./loader-580278fe.js";import{E as h}from"./icons-3b7b871b.js";import"video.js/dist/video-js.min.css";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}var y,b=l.getComponent("Component"),L=function(e){s(o,b);var r=g(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,y=s.playerId;var c=i.el();return C(c,i.seriesData),i.loadCSS(),i}return i(o,[{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)}))}}]),o}();function w(){return(w=e(c.mark((function e(t,i,n,s){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=sessionStorage.getItem("token"),p(y),f(y),u(y,i,r).then((function(e){v(e.response),m(y)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;var a=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(""),c=a;o.innerHTML=c,function(e){d(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){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var l=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var h=function(t){l[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return w.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},g=0;g<l.length;g++)h(g)}function C(e,t){e.innerHTML='<div class="hover-div"></div>\n '.concat(h(),'\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>')}export{C as customSeasonList,k as handleSeasonChange,L as seriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as l,s as c,B as d}from"./icons-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as l,s as c,B as d}from"./icons-3b7b871b.js";import{q as u,x as m,y as p,t as v,g as h,f,l as y}from"./index-8ea26832.js";import{a as g}from"./autoNextVideo-61bcfdd6.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=a(e);if(t){var s=a(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return i(this,n)}}var C=r.getComponent("Component"),N=function(i){s(N,C);var a=b(N);function N(n){var s,i,r,l,c,d,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,N),(d=a.call(this,n,v)).playerId=v.playerId,d.seriesData=v.sres,d.videos=null==v||null===(s=v.sres)||void 0===s?void 0:s.seasons,d.currentVideoData=v.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1;var h=sessionStorage.getItem("token");if(d.watchMap=new Map,u({videoId:d.options_.series.id,token:h}).then((function(e){e.data.map((function(e){d.watchMap.set(e.videoId,e.watchedPercentage)}))})).catch((function(e){return console.log(e)})),null!==(l=o(d))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(c=v.series)&&void 0!==c&&c.enable){var f,y,b,C,E=null==v||null===(f=v.sres)||void 0===f?void 0:f.seasons,L=[];E.map((function(t){L.push.apply(L,e(t.episodes))})),m(L),p(null===(y=d.options_)||void 0===y||null===(b=y.res)||void 0===b||null===(C=b.video)||void 0===C?void 0:C.id),g({playerId:d.playerId,content:L,cb:d.cb,series:null==v?void 0:v.sres})}return d}return n(N,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(l())});return r.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,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(v(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"series-selection-container hidden"});r.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(o,"px"),r.dom.appendContent(t,n),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(n)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"series-selector-head"}),s=r.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(c())});s.onclick=function(){if("series-selector-cross-icon"===s.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===s.className){var o=r.dom.$(".series-selector-content",t.el());r.dom.$(".series-selector-cross-icon",t.el()),s.className="series-selector-cross-icon",o.innerHTML="";var i=t.createSeasonLister();r.dom.appendContent(o,i),r.dom.$(".series-selector-title",t.el()).innerHTML="Seasons",s.innerHTML="".concat(c())}};var i=r.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),a=r.dom.createEl("div",{className:"series-selector-content"}),l=this.createSeasonLister();r.dom.appendContent(a,l),r.dom.appendContent(o,s),r.dom.appendContent(o,i),r.dom.appendContent(e,o),r.dom.appendContent(e,a),h(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createSeasonLister",value:function(){var e=this;h(this.playerId);for(var t=f(),n=r.dom.createEl("div",{className:"season-container"}),o=function(o){var s=document.createElement("label");s.className="season-holder",s.setAttribute("for","season-".concat(o));var i=document.createElement("div");i.className="season - ".concat(o),i.innerHTML=t[o].title;var a=r.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==o&&(a.checked=!0),a.onclick=function(t){e.showSeasonDetails(o)},r.dom.appendContent(s,a),r.dom.appendContent(s,i),r.dom.appendContent(n,s)},s=0;s<t.length;s++)o(s);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var o=this;t=t.map((function(e){var t,n,s;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===(n=e.gist)||void 0===n||null===(s=n.imageGist)||void 0===s?void 0:s.r16x9,watchedPercentage:(null==o?void 0:o.watchMap.get(null==e?void 0:e.id))||0}}));for(var s=function(s){var i,a,l,c,d,u=r.dom.createEl("div",{className:"series-container"}),m=r.dom.createEl("div",{className:"series-section",index:s}),v=r.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[s])||void 0===i?void 0:i.title)||"")}),h=r.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[s].watchedPercentage,"%' class='series-progress-bar-value'></div>")});r.dom.appendContent(m,v),r.dom.appendContent(m,h),r.dom.appendContent(u,m),r.dom.appendContent(n,u);var f=r.dom.createEl("div",{className:"series-section-expanded hidden"}),g=(null===(a=t[s])||void 0===a?void 0:a.description)||"";(null===(l=g)||void 0===l?void 0:l.length)>170&&(g=g.substr(0,170)+"...");var b=r.dom.createEl("div",{className:"series-description",innerHTML:"".concat(g||"")}),C=r.dom.createEl("img",{className:"series-image"});C.src="".concat((null===(c=t[s])||void 0===c?void 0:c.img)||"https://appcms.monumentalsportsnetwork.com/00000151-11b4-d29b-a17d-55fdb2b80000/_temp/images/placeholder-cover-rev1.png"),C.alt="".concat(null===(d=t[s])||void 0===d?void 0:d.title),r.dom.appendContent(f,C),r.dom.appendContent(f,b),r.dom.appendContent(u,f),r.dom.appendContent(n,u),f.onclick=function(e){var n;e.stopPropagation(),p(null===(n=t[s])||void 0===n?void 0:n.id),y(o.playerId,t[s].id,sessionStorage.getItem("token")).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))},m.onclick=function(t){var n,o,s,i=document.getElementsByClassName("series-selector-content")[0].childNodes,a=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=a&&null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(u.style.backgroundColor="#0000007d",null==a||null===(o=a.classList)||void 0===o||o.remove("hidden")):(null==a||null===(s=a.classList)||void 0===s||s.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)s(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;var t=r.dom.$(".series-selector-content",this.el());t.innerHTML="";var n=f()[e].episodes;this.getSeasonDetailsContainer(n,t);var o=r.dom.$(".series-selector-cross-icon",this.el());o.className="series-selector-back-icon",o.innerHTML="".concat(d()),r.dom.$(".series-selector-title",this.el()).innerHTML="Season ".concat(e+1)}}]),N}();export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{t as l,s as c}from"./icons-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{t as l,s as c}from"./icons-3b7b871b.js";import{t as s,g as d,w as u,a as m}from"./index-8ea26832.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}var h=r.getComponent("Component"),v=function(o){a(v,h);var i=p(v);function v(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,v),(n=i.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(v,[{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-0125bffd.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.el(),t=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(s(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),o=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(c())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:"Settings"}),l=r.dom.createEl("div",{className:"settings-selector-content"}),s=r.dom.createEl("div",{className:"settings-container"}),u=this.createVideoQualityContainer();r.dom.appendContent(s,u);var m=this.createAudioQualityContainer();r.dom.appendContent(s,m),r.dom.appendContent(a,o),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,l),r.dom.appendContent(l,s),d(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createAudioQualityContainer",value:function(){var e=d(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=r.dom.createEl("div",{className:"audio-language-container"}),a=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:"Audio Language"});r.dom.appendContent(n,a);for(var o=function(e){var a=document.createElement("label");a.className="audio-language-holder",a.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.innerHTML=t[e].label;var i=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});i.setAttribute("type","radio"),1==t[e].enabled&&(i.checked=!0),i.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(a,i),r.dom.appendContent(a,o),r.dom.appendContent(n,a)},i=0;i<t.length;i++)o(i);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this;u(this.playerId,"raw",!0);var n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:"Video Quality"});r.dom.appendContent(n,a);for(var o=[].concat(e(m(this.playerId)),[{height:"Auto"}]),i=function(e){var a=document.createElement("label");a.className="video-quality-holder",a.setAttribute("for","quality".concat(e));var i=document.createElement("div");i.className="video-quality - ".concat(e),i.innerHTML=o[e].height+"".concat("Auto"==o[e].height?"":"p")+"".concat(o[e].height>=720?"<span class='hd-rendition'> HD</span>":"");var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(o[e]),checked:"".concat(e==o.length-1)});l.setAttribute("type","radio"),l.onchange=function(n){var a=o[e];"true"=="".concat("Auto"==o[e].height)?u(t.playerId,a,!0):u(t.playerId,a)},r.dom.appendContent(a,l),r.dom.appendContent(a,i),r.dom.appendContent(n,a)},l=0;l<o.length;l++)i(l);return n}}]),v}();export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,M as t,b as n,c as s,d as o,S as r,e as l,N as a}from"./icons-
|
|
1
|
+
import{a as e,M as t,b as n,c as s,d as o,S as r,e as l,N as a}from"./icons-3b7b871b.js";import{g as i,d as c,c as u}from"./index-8ea26832.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-7f3cfa8e.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"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function v(l,a){var m=i(l);m.one("play",(function(){null!=a&&a.streams&&e(l,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"),m.getChild("FullscreenToggle").el().appendChild(u(t(window.controlsColor))),m.getChild("FullscreenToggle").el().appendChild(u(n(window.controlsColor))),f(l)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&s(l,"live",r())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&o(l,a)}))}function b(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,t){l(e)}(e),function(e,t){var n=i(e),s=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var o=document.createElement("div");o.classList.add("caption-header"),s.querySelector(".vjs-menu-content").insertBefore(o,s.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 h;function f(e){var t=i(e);j(),t.on("pause",(function(){clearTimeout(h),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(h),h=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{f as hideControls,b as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,f as t,g as s,S as o,h as i,i as n,M as r,b as l,N as a,j as d,R as m}from"./icons-
|
|
1
|
+
import{c as e,f as t,g as s,S as o,h as i,i as n,M as r,b as l,N as a,j as d,R as m}from"./icons-3b7b871b.js";import{i as u}from"./keyboardShortcuts-7f3cfa8e.js";import{g as p,b as c,c as b}from"./index-8ea26832.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"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function v(v,h){u(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&&i(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",m())}(v,h),function(i,n){var r=p(i),l=(null==n?void 0:n.sres)||null;r.on("loadeddata",(function(){e(i,"default",o()),l&&import("./nextEpisodeButton-c32e5192.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,c())}))})),r.one("loadedmetadata",(function(){var e;l&&(t(i,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),s(n.sres,n.res,i))}))}(v,h),function(e,t){var s=p(e),o=document.getElementsByClassName("vjs-current-time")[0],i=document.getElementsByClassName("vjs-duration")[0],n=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(o&&(o.style.display="none"),i&&(i.style.display="none"),n&&(n.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(b(r(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(b(l(window.controlsColor)));var d=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(a()));var m=document.createElement("div");m.classList.add("caption-header"),d.querySelector(".vjs-menu-content").insertBefore(m,d.querySelector(".vjs-menu-item"))}(v,h)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,p as t,e as r}from"./index-
|
|
1
|
+
import{g as e,p as t,e as r}from"./index-8ea26832.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";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/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function i(i){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)})),o(),function(i){var o=document.getElementById("".concat(i)),s=e(i);o&&o.addEventListener("touchstart",(function(){s.paused()?t(i):r(i)}))}(i)}var o=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};export{i as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as e,l as t,h as l,i as n,e as i,m as o,n as r,o as a,p as s,M as d,b as u,q as m,r as v}from"./icons-
|
|
1
|
+
import{k as e,l as t,h as l,i as n,e as i,m as o,n as r,o as a,p as s,M as d,b as u,q as m,r as v}from"./icons-3b7b871b.js";import{f as c,g as p,h as g,a as h,i as f,c as b}from"./index-8ea26832.js";import y from"@babel/runtime/helpers/toConsumableArray";import{s as C}from"./autoNextVideo-61bcfdd6.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"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";var x=c(),E=[];null==x||x.map((function(e){return E.push.apply(E,y(e.episodes))}));var N=function(e,t){var l=p(e),n=Math.floor(l.currentTime());if(Math.floor(l.duration())!=n){l.pause(e);var i=g();C(i,e,E,sessionStorage.getItem("token"))}};function j(l,n){var i=p(l);i.on("loadeddata",(function(){var o,r,a,s,d,u,m;(null===(o=h(l))||void 0===o?void 0:o.length)>0&&e(l,n),(null===(r=f(l))||void 0===r?void 0:r.length)>0&&t(l,n),null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable&&function(e,t){var l;null==t||null===(l=t.series)||void 0===l||l.cb;var n=p(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),l=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-t<=10&&g()<=(null==E?void 0:E.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=E.filter((function(e,t){return t==g()}));if((null==o?void 0:o.length)>0)if(null!==(i=document.getElementsByClassName("next-ep-preview"))&&void 0!==i&&i[0]){var r,a,s,d,u,m,v,c,h;(null===(r=document.getElementsByClassName("next-ep-preview"))||void 0===r?void 0:r[0]).style.visibility="hidden";var f=null===(a=document.getElementsByClassName("next-ep-title"))||void 0===a?void 0:a[0],b=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],y=null===(d=document.getElementsByClassName("next-ep-content"))||void 0===d?void 0:d[0],C=null===(u=o[0])||void 0===u?void 0:u.title;(null===(m=C)||void 0===m?void 0:m.length)>60&&(C=C.substr(0,60)+"..."),f.innerHTML="".concat(C),b.src=(null===(v=o[0])||void 0===v||null===(c=v.gist)||void 0===c||null===(h=c.imageGist)||void 0===h?void 0:h.r16x9)||"https://appcms.monumentalsportsnetwork.com/00000151-11b4-d29b-a17d-55fdb2b80000/_temp/images/placeholder-cover-rev1.png",y.onclick=function(){return N(e)}}else{var x,j,B,w,k,T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden",document.getElementById(e).append(T);var V=document.createElement("div");V.className="next-ep-header",V.innerHTML="Next up";var M=null===(x=o[0])||void 0===x?void 0:x.title,L=document.createElement("img");L.className="next-ep-img",L.src=(null===(j=o[0])||void 0===j||null===(B=j.gist)||void 0===B||null===(w=B.imageGist)||void 0===w?void 0:w.r16x9)||"https://appcms.monumentalsportsnetwork.com/00000151-11b4-d29b-a17d-55fdb2b80000/_temp/images/placeholder-cover-rev1.png";var I=document.createElement("div");I.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),I.innerHTML="".concat(M);var P=document.createElement("div");P.className="next-ep-content",P.append(L),P.append(I),P.onclick=function(){return N(e)},T.append(V),T.append(P)}}(l,n),s=i.duration(),u=Math.floor(s/60),(m=null===(d=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===d?void 0:d[0])&&(m.style.marginRight=u>60?"56px":"41px")}))}function B(e,t){import("./skin-5a02ebe6.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)})),j(e,t),function(e,t){var l=p(e);l.controlBar.getChild("FullscreenToggle").el().appendChild(b(d(window.controlsColor))),l.controlBar.getChild("FullscreenToggle").el().appendChild(b(u(window.controlsColor)));var n=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(n[0].style.display="none")}(e,t),function(e,t){var d,u,c,p,g;0==t.liveVideo&&0==t.liveui&&l(e,"defaultV2",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"defaultV2",v());t.liveVideo||i(e);(null==t||null===(d=t.relatedVideos)||void 0===d?void 0:d.content.length)>0&&o(e,null==t?void 0:t.relatedVideos);(null==t||null===(u=t.streams)||void 0===u?void 0:u.length)>1&&r(e,null==t?void 0:t.streams);(null==t||null===(c=t.playlist)||void 0===c||null===(p=c.content)||void 0===p?void 0:p.length)>0&&a(e,null==t?void 0:t.playlist);null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable&&s(e,t)}(e,t),function(e,t){var l=p(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",i.append(o),l.el().appendChild(i),l.on("useractive",(function(){i.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||i.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,t)}export{B as initialiseSkin};
|
|
@@ -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 r from"video.js";import{E as a,s as l}from"./icons-
|
|
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 r from"video.js";import{E as a,s as l}from"./icons-3b7b871b.js";import{t as s,g as c,j as d,l as m,n as u}from"./index-8ea26832.js";import{a as p}from"./autoNextVideo-61bcfdd6.js";import"@babel/runtime/helpers/defineProperty";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,r=i(e);if(t){var a=i(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return n(this,o)}}var h=r.getComponent("Component"),f=function(n){o(f,h);var i=v(f);function f(t){var o,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,r.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&p({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(f,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a())});return r.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.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(s(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.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 a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),s=r.dom.createEl("div",{className:"video-selector-content"}),p=r.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){u(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";d(e),m(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var l=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(o=t.videos[e])||void 0===o?void 0:o.title)||"")});r.dom.appendContent(n,i),r.dom.appendContent(n,l),r.dom.appendContent(p,n),r.dom.appendContent(s,p)},h=0;h<this.videos.length;h++)v(h);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,s),c(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),f}();export{f as default};
|