@viewlift/player-backup 1.0.39-backup → 1.0.41-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-2a3bc551.js +1 -0
- package/cjs/{caption-settings-f3e37105.js → caption-settings-cbf26f5d.js} +1 -1
- package/cjs/{features-3dc87d13.js → features-3256353b.js} +1 -1
- package/cjs/{generic-cc95c197.js → generic-f1337705.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-a0e88a36.js → keyboardShortcuts-82c1d0c3.js} +1 -1
- package/cjs/{multicam-a4e98a67.js → multicam-11b80a8f.js} +1 -1
- package/cjs/{multicamv2-1eca99e2.js → multicamv2-b8796ea2.js} +1 -1
- package/cjs/{mwebPotraitTray-7640b238.js → mwebPotraitTray-6b5329c9.js} +1 -1
- package/cjs/{nextEpisodeButton-dd4da316.js → nextEpisodeButton-741716c8.js} +1 -1
- package/cjs/{playlist-cbd207bf.js → playlist-16815b66.js} +1 -1
- package/cjs/{renditions-91573633.js → renditions-ff44900d.js} +1 -1
- package/cjs/{resolution-9789c5cf.js → resolution-09012b1a.js} +1 -1
- package/cjs/{series-3673825d.js → series-59f6bb67.js} +1 -1
- package/cjs/{series-v2-3650e1a9.js → series-v2-2f7a5723.js} +1 -1
- package/cjs/{settings-icon-08839782.js → settings-icon-dc362ab7.js} +1 -1
- package/cjs/{skin-8925d749.js → skin-4ca82552.js} +1 -1
- package/cjs/{skin-1b21eeee.js → skin-89c72439.js} +1 -1
- package/cjs/{skin-7cfa3064.js → skin-b5678ea8.js} +1 -1
- package/cjs/skin-d78bc704.js +1 -0
- package/cjs/{skin-18481b5d.js → skin-f665266b.js} +1 -1
- package/cjs/{util-28ea633b.js → util-10f4d8f3.js} +1 -1
- package/cjs/{videoSelector-11d52e36.js → videoSelector-6fa96527.js} +1 -1
- package/esm/autoNextVideo-e040852b.js +1 -0
- package/esm/{caption-settings-87e16267.js → caption-settings-7a16ac4c.js} +1 -1
- package/esm/{features-eb132e33.js → features-1f39a7eb.js} +1 -1
- package/esm/{generic-75d4a7a6.js → generic-2fc1ceae.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-1aa8374f.js → keyboardShortcuts-7dc4bc8d.js} +1 -1
- package/esm/{multicam-0d779007.js → multicam-e30f06bd.js} +1 -1
- package/esm/{multicamv2-f09951cf.js → multicamv2-3d479592.js} +1 -1
- package/esm/{mwebPotraitTray-1f9d4161.js → mwebPotraitTray-94a2c4cc.js} +1 -1
- package/esm/{nextEpisodeButton-869cab14.js → nextEpisodeButton-92c5af60.js} +1 -1
- package/esm/{playlist-af5cb201.js → playlist-8cd85f78.js} +1 -1
- package/esm/{renditions-45e91759.js → renditions-20bdb901.js} +1 -1
- package/esm/{resolution-6cffff90.js → resolution-21976ccd.js} +1 -1
- package/esm/{series-bef32d50.js → series-92030d9a.js} +1 -1
- package/esm/{series-v2-da8873f2.js → series-v2-bd90bcec.js} +1 -1
- package/esm/{settings-icon-12089d1e.js → settings-icon-702ddbc3.js} +1 -1
- package/esm/{skin-0bb667e0.js → skin-014f29eb.js} +1 -1
- package/esm/{skin-a1ededa3.js → skin-40823f20.js} +1 -1
- package/esm/{skin-fda8cfc3.js → skin-848fb4ea.js} +1 -1
- package/esm/{skin-9e230c9d.js → skin-a19d74c0.js} +1 -1
- package/esm/skin-ba596dff.js +1 -0
- package/esm/{util-f7991320.js → util-1638cc8d.js} +1 -1
- package/esm/{videoSelector-08d50bec.js → videoSelector-a1cec41e.js} +1 -1
- package/package.json +1 -1
- package/cjs/autoNextVideo-dbd14685.js +0 -1
- package/cjs/skin-26e0479a.js +0 -1
- package/esm/autoNextVideo-305c1027.js +0 -1
- package/esm/skin-5800a900.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),l=require("@babel/runtime/helpers/defineProperty"),r=require("video.js"),s=require("./generic-f1337705.js");function c(e){var t=u();return function(){var n,i=d(e);if(t){var a=d(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js");var h=r.getComponent("Component"),v=function(){a(d,h);var o=c(d);function d(n){var a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),a=o.call(this,n,s),l(i(a),"masterRenditions",[]),l(i(a),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",a.fontSizeOptions.map((function(e,t){var n=r.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;a.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(a),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),a.playerId=null==s?void 0:s.playerId,a.skin=null==s?void 0:s.skin,a.icon=null==s?void 0:s.icon,a.masterRenditions=[],a.fontSizeOptions=[10,12,14],a.createRenditions(s.renditions),window.height=null,a}return n(d,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el(),i=r.dom.$(".setting-icon",this.el()),a=s.parseSvgString(this.icon);if(i.append(a),"live"===this.skin){var o=document.createTextNode(" Settings");i.appendChild(o)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),c=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(c,l),this.toggleContentOnHover(n,d);var u=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,a,o=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(a=e.playlist)||void 0===a?void 0:a.attributes.BANDWIDTH))/1048576).toFixed(1),l="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");l="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(o,s),r.dom.appendContent(u,o),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",u),"Safari"!=s.detectBrowser()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),a=(e.bitrate/1e6).toFixed(1),o="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(o="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=r.dom.createEl("p",{innerHTML:o,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(u,i),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,p(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",u)),r.dom.appendContent(c,u),r.dom.appendContent(d,c),r.dom.appendContent(n,d)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t,n,a=e.activeCues[0];if(console.log((null==a||null===(t=a.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),a&&document.querySelector(".auto.selected")){var o,d,l,r,s,c,u,h;if(null!=a&&null!==(o=a.value)&&void 0!==o&&null!==(d=o.resolution)&&void 0!==d&&d.height&&i!==(null==a||null===(l=a.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==a||null===(u=a.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==a||null===(s=a.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,a,o,d,l=null===(i=this.player_)||void 0===i||null===(a=i.tech_)||void 0===a?void 0:a.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(o=this.player_)||void 0===o||null===(d=o.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,p(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),v=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});v.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(v,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,p(n.playerId,null,!0)})),r.dom.appendContent(h,v),r.dom.appendContent(t,h)}}}]),d}(),p=function(e,t,n){var i,a=s.getPlayer(e),o=null==t?void 0:t.bandwidth;if((null==a||null===(i=a.tech_)||void 0===i?void 0:i.vhs)||!1){a.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===o?e.enabled(!0):e.enabled(!1)})),a.handleTechPlaying_();var d=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==a||null===(u=a.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var v,p,m,g;null==a||null===(v=a.dash)||void 0===v||null===(p=v.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==a||null===(m=a.dash)||void 0===m||null===(g=m.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(f)}),100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"hidden")}}};exports.default=v,exports.playSelectedResolution=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-f1337705.js"),u=require("./loader-393b838a.js"),p=require("./icons-0f7b3404.js");function v(e){var i=h();return function(){var t,n=a(e);if(i){var s=a(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return r(this,t)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var f,m=c.getComponent("Component"),g=function(){s(r,m);var e=v(r);function r(t){var s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,r),s=e.call(this,t,a),o(n(s),"seriesData",[]),s.seriesData=a.seriesData,f=a.playerId,b(s.el(),s.seriesData),s.loadCSS(),s}return t(r,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-9c237975.js")})).then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),r}();function y(){return(y=e(l.mark((function e(i,t,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),u.showLoader(f),d.load(f,t).then((function(e){d.setCurrentVideo(e.response),d.play(f)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e,i){for(var t='<div class="hover-div"></div>\n '.concat(p.EpisodesSvg(),'\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,i){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("")}(i),'\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 n=d.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=b,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){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(i+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.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),h=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)}));for(var m=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,n){return y.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},g=0;g<c.length;g++)m(g)},exports.seriesModule=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0f7b3404.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0f7b3404.js"),d=require("./generic-f1337705.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/regenerator"),require("axios");var c=require("./autoNextVideo-2a3bc551.js");function u(e){var t=v();return function(){var n,s=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("js-cookie"),require("ua-parser-js"),require("./util-10f4d8f3.js");var p=l.getComponent("Component"),m=function(){i(r,p);var o=u(r);function r(n){var i,l,a,u,v,p,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,r),(p=o.call(this,n,m)).playerId=m.playerId,p.seriesData=m.sres,p.videos=null==m||null===(i=m.sres)||void 0===i?void 0:i.seasons,p.currentVideoData=m.res,p.initialiseStructure(),p.loadCSS(),p.selectedSeason=0,p.cb=null==m||null===(l=m.series)||void 0===l?void 0:l.cb,p.autoPlayNext=(null==m||null===(a=m.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),p.watchMap=d.getSeriesWatchMap(),null!==(u=s(p))&&void 0!==u&&u.autoPlayNext&&null!=m&&null!==(v=m.series)&&void 0!==v&&v.enable){var h,g,f,C,y=null==m||null===(h=m.sres)||void 0===h?void 0:h.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(g=p.options_)||void 0===g||null===(f=g.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),c.autoPlayNext({playerId:p.playerId,content:b,cb:p.cb,series:null==m?void 0:m.sres})}return p}return n(r,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-70137d8c.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")?(d.closeOpenDrawers(),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=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(s,"px"),l.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(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=d.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();l.dom.appendContent(r,c),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),d.getPlayer(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;d.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;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===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=d.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),r}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-0f7b3404.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-0f7b3404.js"),s=require("./generic-f1337705.js"),c=require("./renditions-ff44900d.js"),d=require("./resolution-09012b1a.js"),u=require("./localisation-56e0a999.js");function p(e){var t=m();return function(){var n,a=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return i(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/assertThisInitialized");var h=r.getComponent("Component"),v=function(){a(o,h);var i=p(o);function o(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,o),(n=i.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(o,[{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.SettingsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-e6a8feee.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.closeOpenDrawers(),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");t.style.height="".concat(n),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),s.detectOrientationChange(this.playerId,t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),i=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var o=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),c=r.dom.createEl("div",{className:"settings-selector-content"}),d=r.dom.createEl("div",{className:"settings-container"}),p=this.createVideoQualityContainer();r.dom.appendContent(d,p);var m=this.createAudioQualityContainer();r.dom.appendContent(d,m),r.dom.appendContent(a,i),r.dom.appendContent(a,o),r.dom.appendContent(e,a),r.dom.appendContent(e,c),r.dom.appendContent(c,d),s.getPlayer(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=s.getPlayer(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:u.getLocalisation("audioLanguageText")||"Audio Language"});r.dom.appendContent(n,a);for(var i=function(e){var a,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===(a=t[e])||void 0===a?void 0:a.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(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});r.dom.appendContent(n,a);var i=[].concat(e(c.getRenditions(this.playerId)),[{height:"Auto"}]);d.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,l,c=document.createElement("label");c.className="video-quality-holder",c.setAttribute("for","quality".concat(e));var u=document.createElement("div");u.className="video-quality - ".concat(e);var p=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),m=document.createTextNode(p);if(u.appendChild(m),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var h=s.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=h&&h.firstChild;)u.appendChild(h.firstChild);var v=r.dom.createEl("input",{className:"radio - ".concat(e),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});v.setAttribute("type","radio"),v.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?d.playSelectedResolution(t.playerId,a,!0):d.playSelectedResolution(t.playerId,a)},r.dom.appendContent(c,v),r.dom.appendContent(c,u),r.dom.appendContent(n,c)},l=0;l<i.length;l++)o(l);return n}}]),o}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./features-
|
|
1
|
+
"use strict";var e,t=require("./features-3256353b.js"),n=require("./icons-0f7b3404.js"),r=require("./generic-f1337705.js"),s=require("@babel/runtime/helpers/defineProperty"),o=require("./keyboardShortcuts-82c1d0c3.js");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,o){var l=r.getPlayer(e);l.one("play",(function(){null!=o&&o.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)),null!=o&&o.airplay&&"Safari"==r.detectBrowser()&&l.addChild("airPlayButton"),null!=o&&o.chromecastReceiverId&&l.addChild("chromecastButton"),l.addChild("FullscreenToggle"),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MinimizeSvg(window.controlsColor))),l.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(n.MaximizeSvg(window.controlsColor))),a(e)})),l.on("loadedmetadata",(function(){window.endFirstFrame(l),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",n.SettingsSvg())})),l.one("loadedmetadata",(function(){var n;null!=o&&o.streams&&(null==o||null===(n=o.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,o)}))}function a(t){var n=r.getPlayer(t);c(),n.on("pause",(function(){clearTimeout(e),u()})),n.on("play",(function(){c()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){u(),n.paused()||c()})),s.addEventListener("touchstart",(function(){u(),c()})),s.addEventListener("mousemove",(function(){u(),n.paused()||c()}))}function u(){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 c(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-ff44900d.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.hideControls=a,exports.initialiseSkin=function(e,s){var i;o.initialiseKeyboardEvents(e,s),(null==(i=s)||!i.liveui)&&(null==i||!i.liveVideo)||null!=i&&i.liveui&&null!=i&&i.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.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.addSlowMotion(e)}(e),function(e,t){var s=r.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.createIconMarkup(n.NewCaptionsSvg()));var i=document.createElement("div");i.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(i,o.querySelector(".vjs-menu-item"));var l=document.createElement("div");if(l.innerText="Captions",l.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(l),"Safari"==r.detectBrowser()){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,s),l(e,s)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-3256353b.js"),r=require("./keyboardShortcuts-82c1d0c3.js"),t=require("./icons-0f7b3404.js"),i=require("./generic-f1337705.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-ff44900d.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(n,s){r.initialiseKeyboardEvents(n,s),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,i){0==i.liveVideo&&0==i.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==i.liveVideo&&0==i.liveui||1==i.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(n,s),function(r,n){var s=i.getPlayer(r),o=(null==n?void 0:n.sres)||null;s.on("loadeddata",(function(){e.addResolutionModule(r,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-741716c8.js")})).then((function(e){e.initaliseFunctionality(n.sres.seasons,i.getCurrentVideo())}))})),s.one("loadedmetadata",(function(){var t;o&&(e.addSeriesModule(r,null==n||null===(t=n.sres)||void 0===t?void 0:t.seasons,n),e.addNextEpisodeButton(n.sres,n.res,r))}))}(n,s),function(e,r){var n=i.getPlayer(e),s=document.getElementsByClassName("vjs-current-time")[0],o=document.getElementsByClassName("vjs-duration")[0],l=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(s&&(s.style.display="none"),o&&(o.style.display="none"),l&&(l.style.display="none"));n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var a=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(i.createIconMarkup(t.NewCaptionsSvg()));var u=document.createElement("div");u.classList.add("caption-header"),a.querySelector(".vjs-menu-content").insertBefore(u,a.querySelector(".vjs-menu-item"))}(n,s)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-f1337705.js"),r=require("./features-3256353b.js"),i=require("./renditions-ff44900d.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,n)}))}(t,n),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-3256353b.js"),t=require("./icons-0f7b3404.js"),l=require("./generic-f1337705.js"),i=require("./renditions-ff44900d.js"),n=require("@babel/runtime/helpers/toConsumableArray"),o=require("./autoNextVideo-2a3bc551.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-10f4d8f3.js");var r=l.getCurrentSeries(),a=[];null==r||r.map((function(e){return a.push.apply(a,n(e.episodes))}));var d=function(e,t){var i;null==t||null===(i=t.series)||void 0===i||i.cb;var n=l.getPlayer(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),i=n.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-t<=10&&l.getVideoIdx()<=(null==a?void 0:a.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=a.filter((function(e,t){return t==l.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var d,s,v,c,m,p,g,h,f,y,b;(null===(d=document.getElementsByClassName("next-ep-preview"))||void 0===d?void 0:d[0]).style.visibility="hidden";var C=null===(s=document.getElementsByClassName("next-ep-title"))||void 0===s?void 0:s[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],q=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],j=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=j)||void 0===p?void 0:p.length)>60&&(j=j.substr(0,60)+"..."),C.textContent="".concat(j),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(b=y.customData)||void 0===b?void 0:b.fallbackImage),q.onclick=function(){return u(e)}}else{var w,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(w=r[0])||void 0===w?void 0:w.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var T=document.createElement("div");T.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),T.textContent="".concat(M);var O=document.createElement("div");O.className="next-ep-content",O.append(R),O.append(T),O.onclick=function(){return u(e)},P.append(I),P.append(O)}},u=function(e,t){var i=l.getPlayer(e),n=Math.floor(i.currentTime());if(Math.floor(i.duration())!=n){i.pause(e);var r=l.getVideoIdx();o.switchToNext(r,e,a)}};function s(t,n){var o=l.getPlayer(t);o.on("loadeddata",(function(){var r,a,u;(null===(r=i.getRenditions(t))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(t,n),(null===(a=l.getCaptions(t))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(t,n),null!=n&&null!==(u=n.series)&&void 0!==u&&u.enable&&d(t,n),function(e,t){var l,i=Math.floor(e/60),n=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];n&&(n.style.marginRight=i>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");t&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==n?void 0:n.liveVideo)||!1)})),o.one("play",(function(){var l,i,n,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(t,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}exports.initialiseSkin=function(i,n){!function(){"Chrome"==l.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),s(i,n),function(e,i){var n=l.getPlayer(e);n.controlBar.getChild("FullscreenToggle").el().appendChild(l.createIconMarkup(t.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(l.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var o=document.getElementsByClassName("vjs-time-control");i.liveVideo&&(o[0].style.display="none")}(i,n),function(l,i){var n,o,r,a,d,u;0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)&&e.addSkipButton(l,"defaultV2",t.SkipSvgV2());(0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)||1==(null==i?void 0:i.liveui))&&e.addRewindButton(l,"defaultV2",t.RewindSvgV2());i.liveVideo||e.addSlowMotion(l);(null==i||null===(n=i.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(l,null==i?void 0:i.relatedVideos);(null==i||null===(r=i.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(l,null==i?void 0:i.streams);(null==i||null===(a=i.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(l,null==i?void 0:i.playlist);null!=i&&null!==(u=i.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(l,i)}(i,n),function(e,t){var i=l.getPlayer(e),n=null==t?void 0:t.tvProviderLogoUrl;if(!n)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(n),r.alt="Provider Image",o.append(r),i.el().appendChild(o),i.on("useractive",(function(){o.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||o.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(i,n)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-f1337705.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./generic-
|
|
1
|
+
"use strict";var t=require("./generic-f1337705.js");exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onTimeUpdate=function(e,n){var a=t.getPlayer(e);a?a.on("timeupdate",(function(){return n(a.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var a=t.getPlayer(e);a?a.on("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},exports.seekToTimeStamp=function(e,n,a){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(a({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):a({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):a("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var a=t.getPlayer(e);if(!a)return"Cannot find player with id: '".concat(e,"'");try{return a.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(t){return"Error: ".concat(t)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0f7b3404.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0f7b3404.js"),l=require("./generic-f1337705.js"),d=require("./autoNextVideo-2a3bc551.js"),c=require("./localisation-56e0a999.js");function s(e){var t=u();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-10f4d8f3.js");var v=r.getComponent("Component"),m=function(){n(i,v);var o=s(i);function i(t){var n,r,a,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,i),(a=o.call(this,t,c)).playerId=c.playerId,a.seriesData=c.sres,a.videos=c.related.content,a.cb=(null==c||null===(n=c.related)||void 0===n?void 0:n.cb)||null,a.autoNext=(null==c||null===(r=c.related)||void 0===r?void 0:r.autoNext)||!1,a.currentVideoData=c.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(l.setVideoIdx(0),d.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(i,[{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.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.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 n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(l.closeOpenDrawers(),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");t.style.height="".concat(n),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),l.detectOrientationChange(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var d=r.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o,i,a,d,c=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";l.highlightVideo(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var m=document.createElement("img");m.className="related-thumbnail-image",m.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),m.alt="No Thumbnail Available",v.append(m);var p=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});r.dom.appendContent(c,v),r.dom.appendContent(c,p),r.dom.appendContent(u,c),r.dom.appendContent(s,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,d),r.dom.appendContent(e,o),r.dom.appendContent(e,s),l.getPlayer(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")}))}}]),i}();exports.default=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n,q as t,P as i,e as o,Q as e,O as a,R as c}from"./generic-2fc1ceae.js";import{a as u}from"./util-1638cc8d.js";var s,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;s=null==l?void 0:l.cb;var h=l.playerId;u(h,(function(){var u=n(h);0!==(null==u?void 0:u.currentTime())&&((f=a())>d.length-1||t(h,d[f].id).then((function(n){i(f),o(n.response),f++,c(f),v(n)})).catch((function(n){v(n),i(f),f++,c(f),r=setTimeout((function(){e(h)&&m(f,h,d)}),5e3)})))}))},m=function n(o,e,a,u){f=o,o>a.length-1||t(e,a[o].id).then((function(n){i(f),f++,c(f),v(n)})).catch((function(t){v(t),setTimeout((function(){i(f),f++,c(f),n(f,e,a)}),5e3)}))},v=function(n){s&&s(n)};export{l as a,m as s};
|
|
@@ -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 a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-c2efba97.js";import{w as l,v as s,T as d,U as p,a as m,u}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{C as r,e as c}from"./icons-c2efba97.js";import{w as l,v as s,T as d,U as p,a as m,u}from"./generic-2fc1ceae.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";function v(e){var t=h();return function(){var n,i=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return a(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f=i.getComponent("Component"),g=function(){n(o,f);var a=v(o);function o(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(n=a.call(this,t,i)).playerId=i.playerId,n.seriesData=i.sres,n.currentVideoData=i.res,n.initialiseStructure(),n.loadCSS(),n}return t(o,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./caption-settings-2e47813b.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=l(this.playerId);null==t||t.map((function(t){return s(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var e;null!==(e=a.classList)&&void 0!==e&&e.contains("hidden")?(d(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px"):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");a.style.height="".concat(o),i.dom.appendContent(n,a),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=i.dom.createEl("div",{className:"caption-selector-head"}),o=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(c())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var r=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),l=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d);var p=this.createFontSizeContainer();i.dom.appendContent(s,p),i.dom.appendContent(a,o),i.dom.appendContent(a,r),i.dom.appendContent(e,a),i.dom.appendContent(e,l),i.dom.appendContent(l,s),m(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:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){l(e.playerId).map((function(t){return s(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var c=l(this.playerId),d=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==c||null===(a=c[n])||void 0===a?void 0:a.label;var l=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});l.onchange=function(t){u(e.playerId,c[n].id)},l.setAttribute("type","radio"),i.dom.appendContent(o,l),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},p=0;p<c.length;p++)d(p);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),o}();export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{a,L as s,r as c,k as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{a,L as s,r as c,k as d}from"./generic-2fc1ceae.js";import{g as u}from"./renditions-20bdb901.js";import{g as m}from"./localisation-0bf399a1.js";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){var t=h();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=m("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},g=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},C=function(e,t){import("./multicam-e30f06bd.js").then((function(n){var r=n.default,o=t.streams,l=a(e);i.registerComponent("multicamModule",r),l.getChild("controlBar").addChild("multicamModule",{playerId:e,streams:o,config:t},l.controlBar.children().length)}));var n=document.querySelector(".vjs-control-bar");n&&"live"==(null==t?void 0:t.skin)&&(n.style.background="transparent")},B=function(e,t,n){import("./resolution-21976ccd.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-92c5af60.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t){import("./mwebPotraitTray-94a2c4cc.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("mwebPotraitTray",r),o.getChild("controlBar").addChild("mwebPotraitTray",{playerId:e,config:t},0)}))},k=function(e,t,n){import("./series-92030d9a.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},E=function(e,t){import("./videoSelector-a1cec41e.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},O=function(e,t){import("./caption-settings-7a16ac4c.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},w=function(e,t){import("./settings-icon-702ddbc3.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},S=function(e,t){import("./playlist-8cd85f78.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},I=function(t,n){import("./series-v2-bd90bcec.js").then((function(r){var o=r.default,l=a(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?p(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({playerId:t},n),l.controlBar.children().length-3)}))},M=function(e,t){import("./multicamv2-3d479592.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},P=function(e,t){var n=a(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},L=function(e){var t=a(e).el(),n=0,r=a(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o};export{C as a,B as b,j as c,v as d,k as e,b as f,y as g,g as h,w as i,O as j,P as k,E as l,M as m,S as n,I as o,L as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";var l={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var u={name:"@viewlift/player-backup",version:"1.0.39-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":u.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:s(s(s(s(s({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,a,l;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return a={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=o){e.next=11;break}return l=s({doneWatching:null==n?void 0:n.doneWatching,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},(null==n?void 0:n.seriesId)&&{seriesId:n.seriesId}),e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r},data:l,params:s({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:w(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:T(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},I=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:g(o),headers:{Authorization:e.token}})},g=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},w=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},T=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},y=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==l?void 0:l.getVideoDetails)},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==l?void 0:l.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=5;break}return e.abrupt("return",S().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.log("Error fetching refresh token",e),n})));case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=V().get(),n=b();return i({method:"GET",url:n+"/identity/refresh/".concat(e)})},C=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},W=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var A=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?F(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):F(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var k,P,N,x,j,B=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},U=function(e){var n=H(e,"video.tags",[]),t=H(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},H=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},M=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},z=function(){var e,n,t,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,f=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,I=Se(m);if(!v.includes("VIEWLIFT_"))return v;var g=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(g.getPropertyValue("height").slice(0,-2)),w=Math.trunc(g.getPropertyValue("width").slice(0,-2)),T=H(p,"video.gist.id",""),y=R(R({},G(f)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:B(w,E),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:H(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==I||null===(t=I.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==I||null===(o=I.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:U(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+H(p,"video.gist.permalink","")),VIEWLIFT_COPPA:H(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:H(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:H(p,"video.series[0].gist.title",H(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:H(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:H(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:H(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},G=function(e){var n,t,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||u?(M()?s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=M()?R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=M()?R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},q=function(e,n){var t,o,i,r,a,l,d,s,u,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,w=(null==e||null===(l=e[f])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[f])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return J(E);if(I){var y=X(g,n);return y.src=z(y.src,n,e),y}if("Safari"!==A()&&T)return Y(g);if(w){var h=J(g);return h.src=z(h.src,n,e),h}if(null!=g&&g.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return _.src=z(_.src,n,e),_}return null},Y=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},J=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},X=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,a=A(),l=Se(n);if("Safari"===a){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(l.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var K=function(e){P=e},Q=function(){return P},Z=function(e){k=e},$=function(){return k},ee=function(){return N},ne=function(e){N=e},te=function(e){j=e},oe=function(){return j},ie=function(e){x=new Map,e.map((function(e,n){x.set(e.id,n)}))},re=function(e){if(x){var n=x.get(e);ne(n+1)}},ae=function(e,n){for(var t=Se(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},le=function(e,n){for(var t=Se(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},de=function(e){var n,t=Se(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},se=function(e){var n=Se(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},ue=function(e,n){var t=Se(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ce=!1,ve=function(e,n,t){var o=z(n,e,t),i=Se(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=Se(e);if(null!==r.el_){ce=!0;var a={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ce&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},me=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},pe=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},fe=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ie=function(e){return fe(e)},ge=function(e){a(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},Ee=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},we=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Te="",ye=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(Te!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),Te=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var _e=function(e){o(e).play()},be=function(e){o(e).pause()},Oe=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},De=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ve=function(e){return!!o.getPlayer("".concat(e))},Le=function(e){return o(e).paused()},Se=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Ce=function(){var e=n(t.mark((function e(n,o,i){var r,a,l,d,s,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return d=e.sent,re(o),s=0,u=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&f(o,d).then((function(e){var n,t,o,i,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,u=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,d).then((function(o){var i,r,a,l,d,c,v,m,p,f,I=null==o?void 0:o.data,g=(null==I||null===(i=I.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;K(o.data);var E=(null==I||null===(a=I.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==I||null===(v=I.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&ve(n,E,I);var w=q(I,n);if(w){var T,y,h,_,b,O,D,V,L,S,A,F,R,k,P=(null==I||null===(T=I.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==I||null===(h=I.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),N=Se(n);if(N.poster(P),Re(n,w),N.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:I})})),N.on("loadeddata",(function(){W(),e({status:!0,msg:"Video Loaded",response:I})})),N.one("play",(function(){s&&u<95&&setTimeout((function(){N.currentTime(s)}),0)})),N.one("error",(function(){var e;t({status:!1,msg:(null==N||null===(e=N.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(O=I.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==I||null===(L=I.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)A=((null==I||null===(F=I.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==I||null===(k=I.video)||void 0===k?void 0:k.closedCaptions)).filter((function(e){return"VTT"===e.format})),ue(n,A);else se(n)}else C(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ke(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),We=function(e,n,t){var o=Se(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ae=function(e){var n=Se(e);if(Fe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Fe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Re=function(e,n){Se(e).src(n)},ke=function(n,t,o,i){var r,a,l,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ve(t)&&C(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?he(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Pe=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{O as A,me as B,m as C,c as D,ke as E,v as F,f as G,we as H,ve as I,ue as J,Z as K,fe as L,Ie as M,$ as N,ee as O,ge as P,Le as Q,ne as R,pe as S,Ee as T,ye as U,ie as V,re as W,Se as a,Q as b,W as c,A as d,K as e,oe as f,L as g,C as h,I as i,te as j,Oe as k,We as l,be as m,Re as n,Ve as o,_e as p,Ce as q,De as r,p as s,Ae as t,ae as u,le as v,de as w,q as x,Pe as y,V as z};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";var l={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var u={name:"@viewlift/player-backup",version:"1.0.41-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:s({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":u.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:s(s(s(s(s({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,a,l;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return a={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=o){e.next=11;break}return l=s({doneWatching:null==n?void 0:n.doneWatching,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},(null==n?void 0:n.seriesId)&&{seriesId:n.seriesId}),e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r},data:l,params:s({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 11:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:w(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:T(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},I=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:g(o),headers:{Authorization:e.token}})},g=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},w=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},T=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},y=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==l?void 0:l.getVideoDetails)},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==l?void 0:l.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var L=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=5;break}return e.abrupt("return",S().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.log("Error fetching refresh token",e),n})));case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=V().get(),n=b();return i({method:"GET",url:n+"/identity/refresh/".concat(e)})},C=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},W=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var A=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?F(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):F(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var k,P,N,x,j,B=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},U=function(e){var n=H(e,"video.tags",[]),t=H(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},H=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},M=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},z=function(){var e,n,t,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,f=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,I=Se(m);if(!v.includes("VIEWLIFT_"))return v;var g=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(g.getPropertyValue("height").slice(0,-2)),w=Math.trunc(g.getPropertyValue("width").slice(0,-2)),T=H(p,"video.gist.id",""),y=R(R({},G(f)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:B(w,E),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:H(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==I||null===(t=I.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==I||null===(o=I.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:U(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+H(p,"video.gist.permalink","")),VIEWLIFT_COPPA:H(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:H(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:H(p,"video.series[0].gist.title",H(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:H(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:H(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:H(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},G=function(e){var n,t,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||u?(M()?s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=M()?R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=M()?R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},q=function(e,n){var t,o,i,r,a,l,d,s,u,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,w=(null==e||null===(l=e[f])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[f])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return J(E);if(I){var y=X(g,n);return y.src=z(y.src,n,e),y}if("Safari"!==A()&&T)return Y(g);if(w){var h=J(g);return h.src=z(h.src,n,e),h}if(null!=g&&g.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return _.src=z(_.src,n,e),_}return null},Y=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},J=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},X=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,a=A(),l=Se(n);if("Safari"===a){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(l.eme(),u.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var K=function(e){P=e},Q=function(){return P},Z=function(e){k=e},$=function(){return k},ee=function(){return N},ne=function(e){N=e},te=function(e){j=e},oe=function(){return j},ie=function(e){x=new Map,e.map((function(e,n){x.set(e.id,n)}))},re=function(e){if(x){var n=x.get(e);ne(n+1)}},ae=function(e,n){for(var t=Se(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},le=function(e,n){for(var t=Se(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},de=function(e){var n,t=Se(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},se=function(e){var n=Se(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},ue=function(e,n){var t=Se(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ce=!1,ve=function(e,n,t){var o=z(n,e,t),i=Se(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=Se(e);if(null!==r.el_){ce=!0;var a={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ce&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},me=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},pe=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},fe=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ie=function(e){return fe(e)},ge=function(e){a(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},Ee=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},we=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},Te="",ye=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(Te!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),Te=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var _e=function(e){o(e).play()},be=function(e){o(e).pause()},Oe=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},De=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ve=function(e){return!!o.getPlayer("".concat(e))},Le=function(e){return o(e).paused()},Se=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Ce=function(){var e=n(t.mark((function e(n,o,i){var r,a,l,d,s,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return d=e.sent,re(o),s=0,u=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&f(o,d).then((function(e){var n,t,o,i,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,u=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,d).then((function(o){var i,r,a,l,d,c,v,m,p,f,I=null==o?void 0:o.data,g=(null==I||null===(i=I.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;K(o.data);var E=(null==I||null===(a=I.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(d=l.adTags)||void 0===d||null===(c=d.web)||void 0===c?void 0:c.active)&&(null==I||null===(v=I.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&ve(n,E,I);var w=q(I,n);if(w){var T,y,h,_,b,O,D,V,L,S,A,F,R,k,P=(null==I||null===(T=I.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==I||null===(h=I.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),N=Se(n);if(N.poster(P),Re(n,w),N.on("loadstart",(function(){g&&e({status:!0,msg:"Video Loaded",response:I})})),N.on("loadeddata",(function(){W(),e({status:!0,msg:"Video Loaded",response:I})})),N.one("play",(function(){s&&u<95&&setTimeout((function(){N.currentTime(s)}),0)})),N.one("error",(function(){var e;t({status:!1,msg:(null==N||null===(e=N.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(O=I.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==I||null===(L=I.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)A=((null==I||null===(F=I.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==I||null===(k=I.video)||void 0===k?void 0:k.closedCaptions)).filter((function(e){return"VTT"===e.format})),ue(n,A);else se(n)}else C(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ke(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),We=function(e,n,t){var o=Se(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ae=function(e){var n=Se(e);if(Fe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},Fe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Re=function(e,n){Se(e).src(n)},ke=function(n,t,o,i){var r,a,l,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ve(t)&&C(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?he(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Pe=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{O as A,me as B,m as C,c as D,ke as E,v as F,f as G,we as H,ve as I,ue as J,Z as K,fe as L,Ie as M,$ as N,ee as O,ge as P,Le as Q,ne as R,pe as S,Ee as T,ye as U,ie as V,re as W,Se as a,Q as b,W as c,A as d,K as e,oe as f,L as g,C as h,I as i,te as j,Oe as k,We as l,be as m,Re as n,Ve as o,_e as p,Ce as q,De as r,p as s,Ae as t,ae as u,le as v,de as w,q as x,Pe as y,V as z};
|