@viewlift/player-backup 1.0.151-backup → 1.0.153-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-ede4c39f.js → autoNextVideo-5cba144d.js} +1 -1
- package/cjs/bundle.css +4 -4
- package/cjs/{features-b56dec82.js → features-1b7b8fad.js} +1 -1
- package/cjs/generic-cffdd8af.js +1 -0
- package/cjs/index-1d82e4aa.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-5a423543.js → keyboardShortcuts-6130f6da.js} +1 -1
- package/cjs/{multicamv2-44e8fde7.js → multicamv2-418c6d1e.js} +1 -1
- package/cjs/{multicamv2-e611c3b8.js → multicamv2-865a1e95.js} +1 -1
- package/cjs/{nextEpisodeButton-eab2aeca.js → nextEpisodeButton-f48a1478.js} +1 -1
- package/cjs/{playlist-029b6e86.js → playlist-44a9cec1.js} +1 -1
- package/cjs/{series-de2bf178.js → series-eebfb942.js} +1 -1
- package/cjs/{series-v2-33851251.js → series-v2-1fc93482.js} +1 -1
- package/cjs/{series-v2-1259d44a.js → series-v2-c7ec0557.js} +1 -1
- package/cjs/{skin-d7e126b8.js → skin-189f672a.js} +1 -1
- package/cjs/{skin-ef6c44c4.js → skin-99c6bb9d.js} +1 -1
- package/cjs/{skin-6e47bfbb.js → skin-a2185e84.js} +1 -1
- package/cjs/{skin-22d3f712.js → skin-bdd20d25.js} +1 -1
- package/cjs/{skin-ec42fbd8.js → skin-c81e5e01.js} +1 -1
- package/cjs/{skin-ad8c0abc.js → skin-febf0901.js} +1 -1
- package/cjs/{videoSelector-90583f21.js → videoSelector-46f32a98.js} +1 -1
- package/cjs/{videoSelector-7b378f0a.js → videoSelector-dd693189.js} +1 -1
- package/esm/{autoNextVideo-89382452.js → autoNextVideo-dc4a9620.js} +1 -1
- package/esm/bundle.css +4 -4
- package/esm/{features-ac944dd0.js → features-eec2a5a0.js} +1 -1
- package/esm/generic-25166c8d.js +1 -0
- package/esm/index-8317a3c0.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-92c13792.js → keyboardShortcuts-c7ac48c1.js} +1 -1
- package/esm/{multicamv2-958804b3.js → multicamv2-4f36c6a7.js} +1 -1
- package/esm/{multicamv2-f76900e2.js → multicamv2-97e6c267.js} +1 -1
- package/esm/{nextEpisodeButton-e8b79764.js → nextEpisodeButton-be0b7b59.js} +1 -1
- package/esm/{playlist-46370728.js → playlist-4c2c299e.js} +1 -1
- package/esm/{series-f574b0d7.js → series-78d8d8b6.js} +1 -1
- package/esm/{series-v2-0a20f71a.js → series-v2-59643fc8.js} +1 -1
- package/esm/{series-v2-01fcf72e.js → series-v2-8313dd46.js} +1 -1
- package/esm/{skin-775663ee.js → skin-0548ad42.js} +1 -1
- package/esm/{skin-4631f9d6.js → skin-2e10a78f.js} +1 -1
- package/esm/{skin-fc396a2d.js → skin-3614d96c.js} +1 -1
- package/esm/{skin-fc1c3f3a.js → skin-587d35fb.js} +1 -1
- package/esm/{skin-e93811e3.js → skin-b55ce448.js} +1 -1
- package/esm/{skin-b8392ba2.js → skin-f76547cf.js} +1 -1
- package/esm/{videoSelector-26f5fe83.js → videoSelector-33746b14.js} +1 -1
- package/esm/{videoSelector-0899655a.js → videoSelector-d6f69327.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-38e65a3d.js +0 -1
- package/cjs/index-94307660.js +0 -1
- package/esm/generic-939cd476.js +0 -1
- package/esm/index-30f52aa5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=require("./generic-
|
|
1
|
+
"use strict";var e,i=require("./generic-cffdd8af.js"),t=require("./util-197a4f7c.js"),n=require("./skin-aef573bd.js"),o=0,u=0,d=function e(t,o,d,c){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then((function(e){n.highlightVideo(u,o),u++,r(e)})).catch((function(i){r(i),setTimeout((function(){n.highlightVideo(u,o),u++,e(u,o,d)}),5e3)})))},r=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(o);var h=null==c?void 0:c.content;e=null==c?void 0:c.cb;var l=c.playerId;t.onVideoEnded(l,(function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>h.length-1||(i.setVideoIdx(u+1),i.load(l,h[u].id).then((function(e){n.highlightVideo(u,l),i.setCurrentVideo(e.response),u++,r(e)})).catch((function(e){r(e),n.highlightVideo(u,l),u++,o=setTimeout((function(){i.isPaused(l)&&d(u,l,h)}),5e3)}))))}))},exports.switchToNext=d;
|
package/cjs/bundle.css
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
8
|
height: 0.7em;
|
|
8
9
|
position: absolute;
|
|
@@ -142,7 +143,6 @@
|
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
|
|
145
|
-
|
|
146
146
|
.video-js .tvProviderImage {
|
|
147
147
|
position: absolute;
|
|
148
148
|
right: 1rem;
|
|
@@ -170,9 +170,6 @@
|
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
173
|
.video-js .multicamera-parent.default{
|
|
177
174
|
height: 345px;
|
|
178
175
|
position: absolute;
|
|
@@ -253,6 +250,9 @@
|
|
|
253
250
|
|
|
254
251
|
|
|
255
252
|
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
256
|
/* nextep */
|
|
257
257
|
.next-ep-preview{
|
|
258
258
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-cffdd8af.js"),s=require("./renditions-fd408798.js"),d=require("./skin-aef573bd.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-a355bdc9.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-418c6d1e.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-865a1e95.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-f48a1478.js")})).then((function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-44a9cec1.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-c59e995e.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-eebfb942.js")})).then((function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<a.length;c++)s(c)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-c7ec0557.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-1fc93482.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-4adda0f4.js")})).then((function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-46f32a98.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-dd693189.js")})).then((function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-aef573bd.js"),a=require("./browser-77c57718.js"),l=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-37b81672.js"),s={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 c(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function v(e,t){c("event",e,t)}var m=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},p=null;function f(){return{set:function(e){e&&(p=e)},get:function(){return p}}}var w,g,I,E,h,T,y=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=f().get(),i=getBaseUrl(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),b=null,_=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!m(t)){e.next=6;break}return b||(b=y().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&f().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){b=null}))),e.abrupt("return",b);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},O=function(e){g=e},F=function(){return g},P=function(){return w},S=function(e){I=e},L=function(e){if(E){var t=E.get(e);S(t+1)}},V=(T=0,{set:function(e){e>=0&&(T=e)},get:function(){return T}});function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function W(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?R(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):R(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var A=function(){var e,t,n,i,o,r,a,l=F();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function C(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function x(){var e=window.sessionStorage.getItem("uid");return e||(e=C(),window.sessionStorage.setItem("uid",e),e)}function N(){return B.apply(this,arguments)}function B(){return(B=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=C(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());v(r?"FAILED_TO_START":"DROPPED_STREAM",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e,t){e.one("play",tryCatch((function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),v("PLAY",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("Video Start",{"Video ID":A(),watchTime:Math.floor(e.currentTime())})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))v("BUFFERING",W({pfm:window.platform,uid:x(),vid:A(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,v("FIRST_FRAME",W({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),vid:A()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;v("AD_REQUEST",W({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),vid:A(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),v("AD_IMPRESSION",W({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:x(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:A()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(j(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var j=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,p,f,w,g;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:return m=e.sent,p=D(m),f=null==p?void 0:p.site,w=null==p?void 0:p.siteId,e.t0=W,e.t1=W,e.t2=W({aid:f,cid:w,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=x(),e.t5=A(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,N();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),g=[e.t31],o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:m},contentType:"application/x-www-form-urlencoded",dataType:"text",data:g}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function U(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?M(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):M(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var k={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=k.version;var H,G=function(e,t){var n,i,r,a,l,d,u,c;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.overrideEntitlementBaseUrl)+"/video/status":J.get()+"".concat(null==s?void 0:s.getVideoDetails),params:U({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:t,"Sdk-Version":k.version},withCredentials:!0})},z=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:J.get()+s.getLinearChannelDetails,params:U(U(U(U(U({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===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},q=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:return i=e.sent,e.abrupt("return",o({url:J.get()+"".concat(null==s?void 0:s.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:U({},t),params:U({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Y=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:J.get()+"".concat(null==s?void 0:s.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},X=function(e){var t=e.videoId;return o({method:"GET",url:J.get()+"".concat(null==s?void 0:s.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},J=(H=null==s?void 0:s.apiBaseUrl,{set:function(e){e&&(H=e)},get:function(){return H}}),K=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},Q=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Z=function(){var e=V.get();return e>=0?e+1:1},$=function(){var e,t,n,i=P(),o=F(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=V.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=d(navigator.userAgent);var ne=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ie=function(e){var t=oe(e,"video.tags",[]),n=oe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},oe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},re=function(){var e,t,n,i,o,a,d,u,s,c,v,m,p,f,w,g,I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,h=arguments.length>2?arguments[2]:void 0,T=(null==h?void 0:h.contentType)||"video",y=null==h||null===(e=h[T])||void 0===e?void 0:e.metadata,b=r.getPlayer(E);if(!I.includes("VIEWLIFT_"))return I;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===T?null==h||null===(t=h.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==h?void 0:h.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:oe(h,"video.gist.id",""),P=te(te({},ae(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:ne(O,D),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===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:oe(h,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:oe(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:oe(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(u=b.options_)||void 0===u?void 0:u.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:ie(h),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(oe(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+oe(h,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:oe(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:oe(null===(m=window)||void 0===m||null===(p=m.app_data)||void 0===p||null===(f=p.site)||void 0===f?void 0:f.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*oe(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:oe(h,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:oe(h,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:oe(h,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:oe(h,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:$(),VIEWLIFT_SEASON_NUMBER:Z(),VIEWLIFT_CONTENT_TAGS:ie(h)},null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g?void 0:g.macros);for(var S in P){var L=new RegExp(S,"g");I=I.replace(L,P[S])}return I},ae=function(e){var t,n,i,o,r,l,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return s||c?(a.isMobile()?s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=a.isMobile()?te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=a.isMobile()?te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},le=function(e,t){var n,i,o,r,l,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,h=(null==e||null===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var T=(null==e||null===(m=e[w])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ue(E);if(g){var y=se(I,t);return y.src=re(y.src,t,e),y}if("Safari"!==a.detectBrowser()&&T)return de(I);if(h){var b=ue(I);return b.src=re(b.src,t,e),b}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=re(_.src,t,e),_}return null},de=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ue=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},se=function(e,t){var n=e.fairPlay,o=e.widevine,l=e.playReady,d=a.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",o),i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return ce(t),u}var s={src:o.url,type:"application/dash+xml"};return ce(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var ce=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==a.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ve=!1,me=function(e,t,n){var i=re(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r.getPlayer(e);if(null!==a.el_){ve=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),ve&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var fe=function(e){return!!i.getPlayer("".concat(e))},we=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,_();case 3:return a=e.sent,l=r.getPlayer(t),e.abrupt("return",new Promise((function(e,n){z(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=C(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=le(r,t);O(r),a&&o?(Ee(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ge=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,s,c,v;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_();case 2:return s=e.sent,(P()||null)&&L(i),c=0,v=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&Y(i,s).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){G(i,s).then((function(i){var o,a,l,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;O(i.data);var h=(null==I||null===(l=I.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);h&&me(t,h,I);var T=le(I,t);if(T){var y,b,_,D,F,P,S,L,V,R,W,A,C,x,N=(null==I||null===(y=I.video)||void 0===y||null===(b=y.gist)||void 0===b?void 0:b.videoImageUrl)||(null==I||null===(_=I.video)||void 0===_||null===(D=_.gist)||void 0===D||null===(F=D.imageGist)||void 0===F?void 0:F.r16x9),B=r.getPlayer(t);if(B.poster(N),Ee(t,T),B.on("loadstart",(function(){E&&e({status:!0,msg:"Video Loaded",response:I})})),B.on("loadeddata",(function(){Q(),e({status:!0,msg:"Video Loaded",response:I})})),B.one("play",(function(){c&&v<95&&setTimeout((function(){B.currentTime(c)}),0)})),B.one("error",(function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(P=I.video)||void 0===P||null===(S=P.contentDetails)||void 0===S||null===(L=S.closedCaptions)||void 0===L?void 0:L.length)>0||(null==I||null===(V=I.video)||void 0===V||null===(R=V.closedCaptions)||void 0===R?void 0:R.length)>0)W=((null==I||null===(A=I.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(x=I.video)||void 0===x?void 0:x.closedCaptions)).filter((function(e){return"VTT"===e.format})),u.addCaptions(t,W);else u.removeCaptions(t)}else K(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){he(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Ie=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()},Ee=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},he=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);fe(n)&&K(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=we,exports.baseUrlManager=J,exports.clearError=Q,exports.createIdxMapping=function(e){E=new Map,e.map((function(e,t){E.set(e.id,t)}))},exports.createSeriesWatchMap=function(e,t){var n=new Map;X({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),h=n})).catch((function(e){return console.log(e)}))},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Ie(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=P,exports.getCurrentVideo=F,exports.getEntitlementData=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},exports.getEpisodeNumber=$,exports.getLinearChannelDetails=z,exports.getSeasonNumber=Z,exports.getSeriesDetails=function(e,t){var n,i,r=D(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:J.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=X,exports.getSeriesWatchMap=function(){return h},exports.getSource=le,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=x,exports.getVideoDetails=G,exports.getVideoIdx=function(){return I},exports.getVideoInfo=Y,exports.handleError=K,exports.initialiseAdvertisement=me,exports.initiateErrorHandling=he,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",(function(){window.endFirstFrame(n)}))}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=fe,exports.isTokenExpired=m,exports.load=ge,exports.loadVideo=Ee,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=f,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],c("js",new Date),c("config",e)},exports.saveWatchHistory=q,exports.seasonIdxManager=V,exports.setCurrentSeries=function(e){w=e},exports.setCurrentVideo=O,exports.setVideoIdx=S,exports.setVideoIdxById=L,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,n,r,i=require("@babel/runtime/helpers/toConsumableArray"),o=require("./skin-aef573bd.js"),a=require("./generic-cffdd8af.js"),l=require("./autoNextVideo-5cba144d.js"),u=require("@babel/runtime/helpers/typeof"),s=require("video.js"),c=require("@babel/runtime/helpers/asyncToGenerator"),d=require("@babel/runtime/regenerator"),p=require("@babel/runtime/helpers/defineProperty"),v=require("@babel/runtime/helpers/slicedToArray"),m=[],f=function(e,t){var n=o.getPlayer(e),r=Math.floor(n.currentTime());if(Math.floor(n.duration())!=r){n.pause(e);var i=a.getVideoIdx();l.switchToNext(i,e,m)}};function h(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function g(e){return x.apply(this,arguments)}function x(){return(x=c(d.mark((function e(t){return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=v(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)},n.onerror=function(n){var r,i,o,a;e([{duration:t.duration,uri:"".concat(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(a=o.images)||void 0===a?void 0:a.placeholderCover)}])}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",h(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=c(d.mark((function e(t){var n,r;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return g(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},p(n,"left","-60px"),p(n,"border","1px solid transparent"),p(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}e={0:{src:"example-thumbnail.png"}},t=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===u(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},r=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},s.registerPlugin("thumbnails",(function(i){var o,a,l,u,s,c,d,p;function v(){document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",v),p()}a=t({},e,i),u=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=u.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(o=document.createElement("div")).className="vjs-thumbnail-holder",l=document.createElement("img"),o.appendChild(l),l.src=a[0].src,l.className="vjs-thumbnail",t(l.style,a[0].style),l.style.left||l.style.right||(l.onload=function(){l.style.left=-l.naturalWidth/2+"px"}),c=u.duration(),u.on("durationchange",(function(e){c=u.duration()})),u.on("loadedmetadata",(function(e){c=u.duration()})),(s=u.controlBar.progressControl).el().appendChild(o),d=function(e){var i,u,d,p,v,m,f,h,g,x;for(u in d=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((x=r(s.el()).getBoundingClientRect()).width||x.right)+g,m=e.pageX,e.changedTouches&&(m=e.changedTouches[0].pageX),p=m||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,p-=r(s.el()).getBoundingClientRect().left+g,i=Math.floor((p-s.el().offsetLeft)/s.width()*c),a)i>u&&(d=Math.max(d,u));(v=a[d]).src&&l.src!=v.src&&(l.src=v.src),v.style&&l.style!=v.style&&t(l.style,v.style),p+(h=function(e,t){var r;return t?parseFloat(t):"auto"!==(r=n(e)("clip"))&&"inherit"!==r&&4===(r=r.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(r[1])-parseFloat(r[3]):0}(l,v.width||a[0].width)/2)>f?p-=p+h-f:p<h&&(p=h),o.style.left=p+"px"},s.on("mousemove",d),s.on("touchmove",d),s.on("pointerdown",(function(e){console.log(e),document.addEventListener("pointermove",d),document.addEventListener("pointerup",v)})),p=function(e){o.style.left="-1000px"},s.on("mouseout",p),s.on("touchcancel",p),s.on("touchend",p),u.on("userinactive",p)}));var C=function(){var e=c(d.mark((function e(t,n){var r,i,o,a;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=v(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function N(e){return k.apply(this,arguments)}function k(){return(k=c(d.mark((function e(t){var n,r,i,o,l,u,s,c,p,m,f,h,g,x,y,b,w,E,C,N,k,T,I,P,L;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return o=e.sent,e.next=7,o.text();case 7:l=e.sent,u=new DOMParser,s=u.parseFromString(l,"application/xml"),c=null===(r=a.getCurrentVideo())||void 0===r||null===(i=r.video)||void 0===i?void 0:i.runtime,p=s.getElementsByTagName("AdaptationSet"),m=0;case 13:if(!(m<p.length)){e.next=35;break}if(("image"!==(f=p[m]).getAttribute("contentType")||"image/png"!==f.getAttribute("mimeType"))&&"image/jpeg"!==f.getAttribute("mimeType")){e.next=32;break}if(h=f.getElementsByTagName("SegmentTemplate")[0],g=f.getElementsByTagName("Representation")[0],x=g.getElementsByTagName("EssentialProperty")[0],y=x.getAttribute("value"),b=null==y?void 0:y.split("x"),w=v(b,2),E=w[0],C=w[1],!h){e.next=32;break}for(h.getAttribute("media"),N=h.getAttribute("duration"),k=N/(N/(E*C)),T=Math.round(c/k),I=Math.ceil(T/9),P=h.getAttribute("media"),L=[],m=0;m<I;m++)L.push({duration:k,layout:y,uri:n+"/"+P.replace("$Number$",m)});return e.abrupt("return",L);case 32:m++,e.next=13;break;case 35:return console.log("No trickplay segment found."),e.abrupt("return",null);case 39:e.prev=39,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 42:case"end":return e.stop()}}),e,null,[[1,39]])})))).apply(this,arguments)}function T(){return(T=c(d.mark((function e(t){var n,r,i,a,l,u,s,c,p,v,m;return d.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.getPlayer(t),r=n.currentSource(),null==(i=r.src)||!i.includes("m3u8")){e.next=18;break}return e.next=5,y(i);case 5:if(!((null==(a=e.sent)?void 0:a.length)>0)){e.next=16;break}return l=(null==a?void 0:a[0])||null,u=l.uri,s=i.substring(0,i.lastIndexOf("/"))+"/",e.next=11,C(s,u);case 11:return c=e.sent,e.next=14,w(c);case 14:p=e.sent,n.thumbnails(p);case 16:e.next=27;break;case 18:if(null==i||!i.includes("mpd")){e.next=27;break}return e.next=21,N(i);case 21:if(!((null==(v=e.sent)?void 0:v.length)>0)){e.next=27;break}return e.next=25,w(v);case 25:m=e.sent,n.thumbnails(m);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}exports.addNextEpPreview=function(e,t){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r;m=[];var l=a.getCurrentSeries();null==l||l.map((function(e){var t;return(t=m).push.apply(t,i(e.episodes))})),null==t||null===(r=t.series)||void 0===r||r.cb}else{var u,s;m=(null==t||null===(u=t.relatedVideos)||void 0===u?void 0:u.content)||[],null==t||null===(s=t.relatedVideos)||void 0===s||s.cb}var c=o.getPlayer(e);c.on("timeupdate",(function(){var e,t,n=Math.floor(c.currentTime()),r=c.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&a.getVideoIdx()<=(null===(t=m)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var d,p=m.filter((function(e,t){return t==a.getVideoIdx()}));if((null==p?void 0:p.length)>0)if(null!==(d=document.getElementsByClassName("next-ep-preview"))&&void 0!==d&&d[0]){var v,h,g,x,y,b,w,E,C,N,k,T;(null===(v=document.getElementsByClassName("next-ep-preview"))||void 0===v?void 0:v[0]).style.visibility="hidden";var I=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],P=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],L=null===(x=document.getElementsByClassName("next-ep-content"))||void 0===x?void 0:x[0],A=null===(y=p[0])||void 0===y?void 0:y.title;(null===(b=A)||void 0===b?void 0:b.length)>60&&(A=A.substr(0,60)+"..."),I.textContent="".concat(A),P.src=(null===(w=p[0])||void 0===w||null===(E=w.gist)||void 0===E||null===(C=E.imageGist)||void 0===C?void 0:C.r16x9)||(null==p||null===(N=p[0])||void 0===N?void 0:N.img)||(null===(k=window)||void 0===k||null===(T=k.customData)||void 0===T?void 0:T.fallbackImage),L.onclick=function(){return f(e)}}else{var B,M,j,O,S,q,X,R,V=document.createElement("div");V.className="next-ep-preview",V.style.visibility="hidden",document.getElementById(e).append(V);var F=document.createElement("div");F.className="next-ep-header",F.textContent="Next up";var D=null===(B=p[0])||void 0===B?void 0:B.title,U=document.createElement("img");U.className="next-ep-img",U.src=(null===(M=p[0])||void 0===M||null===(j=M.gist)||void 0===j||null===(O=j.imageGist)||void 0===O?void 0:O.r16x9)||(null==p||null===(S=p[0])||void 0===S?void 0:S.img)||(null===(q=window)||void 0===q||null===(X=q.customData)||void 0===X?void 0:X.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(R=D)||void 0===R?void 0:R.length)>60&&(D=D.substr(0,60)+"..."),G.textContent="".concat(D);var W=document.createElement("div");W.className="next-ep-content",W.append(U),W.append(G),W.onclick=function(){return f(e)},V.append(F),V.append(W)}},exports.addTVProviderImage=function(e,t){var n=o.getPlayer(e),r=null==t?void 0:t.tvProviderLogoUrl;if(r){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(r),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",(function(){i.classList.remove("vjs-fade")})),n.on("userinactive",(function(){n.paused()||i.classList.add("vjs-fade")})),n.on("fullscreenchange",(function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}},exports.initiateTrickplay=function(e){return T.apply(this,arguments)};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-38e65a3d.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("./skin-aef573bd.js"),l=require("./browser-77c57718.js"),a=require("@babel/runtime/helpers/typeof"),s=require("./util-197a4f7c.js"),u=require("./captions-37b81672.js"),d=require("./renditions-fd408798.js"),c=require("./resolution-c59e995e.js"),v=require("./localisation-56e0a999.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/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var p,f=function(e){return new Promise((function(n,t){if(m(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},m=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(){var e=n(o.mark((function e(n){var t,a,s,u;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.getPlayer(null==n?void 0:n.playerId),console.log(n),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=5,import("@silvermine/videojs-chromecast");case 5:return u=e.sent,e.prev=6,e.next=9,f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:return e.prev=14,u.default(i),e.finish(14);case 17:null!==(s=window)&&void 0!==s&&s.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==l.detectBrowser()?null==a||a.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[6,11,14,17]])})));return function(n){return e.apply(this,arguments)}}(),y=function(e,n){var t=r.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,r,l,a,s=this.el(),u=i.dom.getPointerPosition(s,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function h(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 w(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?h(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var b=[],k=0,O=null;function S(n,o,i){var r,l,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(r=o.watchHistory)||void 0===r||r.apiVersion;var c=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(n.currentTime()),f=Math.floor(n.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var m=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,g=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(n.currentTime()),h=d?100:Math.floor(v/f*100),b={};g?function(n,o,i){var r=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return w(w({},e),{},t({},n,u[n]))}),{}),c=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===p}));c<0?l.push(w(w({content:d},n),{},{addedDate:a,updateDate:a})):l[c]=w(w(w({},l[c]),n),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(b={completed:d,watchedTime:y,watchedPercentage:h},c,o.siteOwner):(b=w(w({videoId:p,watchedTime:y,watchedPercentage:h,doneWatching:d,profileId:c},O&&{seriesId:O}),m&&{originalObjectId:m}),e.saveWatchHistory(b).then((function(e){})).catch((function(e){}))),k=v+i}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function j(e,n,t){var o=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}var T=function(e,n,t){var o=r.getPlayer(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},I=function(e){var n=r.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},C=!1,E=function(n,t){var o,i,r=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[r])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!C){var l=D(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),C=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function D(e,n,t){if(Array.isArray(e))return e.map((function(e){return D(e,n,t)}));if(null!==e&&"object"===a(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=D(e[i],n,t)})),o}return e}function x(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(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?x(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var V=function(n,t,o,i){var l,a,s=i.res,u=i.sres,d=r.getPlayer(n),c=(null==s?void 0:s.contentType)||"video",v=(null==s||null===(l=s[c])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;e.setCurrentVideo(s),d&&(d.on("loadstart",(function(){v?o.resolve({status:!0,msg:"Video Loaded",response:s}):o.resolve(R({status:!0,msg:"Player Initialised"},u?{seriesResponse:u,response:s}:{response:s}))})),d.on("loadeddata",(function(){var o,i,l;(null==d||!d.muted())&&T(n,sessionStorage.getItem("volume")||"100");var a=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var u,c,v=R(R({},t),s);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(O=null==n||null===(i=n.series)||void 0===i?void 0:i.id),b=[],k=0,p=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=r.getPlayer(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());b.includes(k)||(e==k?(b.push(e),S(s,n,a)):e>k&&(k=e+a))})),s.one("ended",(function(){S(s,n,a,!0)})))}(n,v,null==a||null===(u=a.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=d&&d.mux){var f,m,g,y,h,w,P=(null===(f=e.getCurrentVideo())||void 0===f?void 0:f.video)||(null==s?void 0:s.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(m=t.analytics)||void 0===m?void 0:m.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(y=P.series)||void 0===y?void 0:y.title,video_stream_type:null!=P&&null!==(h=P.streamingInfo)&&void 0!==h&&h.isLiveStream?"live":"video",viewer_user_id:null==t||null===(w=t.analytics)||void 0===w?void 0:w.userId};d.mux({debug:!1,data:I})}})),d.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];d.trigger("subtitlechanged",n)})),d.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),y=g.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}})),d.tech_.on("retryplaylist",(function(){v&&E(s,n)})),d.on("error",(function(){var t,i;(console.log("ERROR",d.error(),d.error().code),4===d.error().code&&v)?E(s,n):(e.handleError(n,(null==d||null===(t=d.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==d||null===(i=d.error())||void 0===i?void 0:i.message)||"Some error occured",response:s}))})),d.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o,i,r,l=null===(o=e.getCurrentVideo())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout((function(){d.currentTime(u)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){d.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),d.on("volumechange",(function(){var e=100*d.volume().toFixed(2);d.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),d.on("chromecastDisconnected",(function(){if(v){d.currentSource();for(var e=d.textTracks(),n=e.length-1;n>=0;n--)d.removeRemoteTextTrack(e[n])}})))},A=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-ef6c44c4.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-d7e126b8.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-ec42fbd8.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-22d3f712.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-6e47bfbb.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-ad8c0abc.js")})).then((function(t){t.initialiseSkin(e,n)}))};var N=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),f("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=n(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(i),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),q=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:N,loadEMELibrary:_,loadMuxPlugin:L});function H(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 M(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?H(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):H(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var B=new Set,U=null,F=function(n,t,o){var i,r,l,a,s,u,d,c,v,p={};p[null==o||null===(i=o.Constants)||void 0===i?void 0:i.ASSET_NAME]=z(n),p["c3.cm.id"]=(null==n||null===(r=n.linearchannel)||void 0===r?void 0:r.id)||(null==n||null===(l=n.video)||void 0===l?void 0:l.id)||"",p["c3.cm.contentType"]=J(n),p[null==o||null===(a=o.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==n||!n.linearchannel),p[null==o||null===(s=o.Constants)||void 0===s?void 0:s.STREAM_URL]=t.currentSrc(),p[null==o||null===(u=o.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NA":e.getUserId(),p["c3.cm.categoryType"]=W(n),p[null==o||null===(d=o.Constants)||void 0===d?void 0:d.PLAYER_NAME]="VL_WEB_PLAYER",p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.encoding="",p.screenResolution="",p.DRMEnabled=(null==n||null===(c=n.video)||void 0===c?void 0:c.drmEnabled)||(null==n||null===(v=n.linearchannel)||void 0===v?void 0:v.drmEnabled)||"None",p.subscriberType="",p.DAIStream=G(),p[o.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NA";var f=Y(e.getCurrentSeries(),n);return p=M(M({},p),f)},W=function(e){return null!=e&&e.linearchannel?"Linear":null!=e&&e.video&&(null==e||null===(n=e.video)||void 0===n||null===(t=n.categories)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.title)||"Null";var n,t,o},G=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},z=function(e){var n,t,o,i,r=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.title)||"Null",a=(null==e||null===(o=e[r])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)||"Null";return"[".concat(a,"] ").concat(l)},J=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var K,Y=function(n,t){var o,i,r,l,a,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t)return s;var u=e.getSeasonNumber(),d=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(o=t.video)||void 0===o||null===(i=o.series)||void 0===i?void 0:i.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(r=n[u-1])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},X=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Q=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Z=function(){var t=n(o.mark((function n(t,i){var l,a,s,u,d;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null!=i&&null!==(l=i.convivaConfig)&&void 0!==l&&l.enable){n.next=2;break}return n.abrupt("return");case 2:if(s=r.getPlayer(t),"function"==typeof(u=null==i||null===(a=i.convivaConfig)||void 0===a?void 0:a.trackConvivaPlayerEvent)){n.next=6;break}return n.abrupt("return");case 6:if(!(u instanceof Promise)){n.next=12;break}return n.next=9,u("getConvivaObject");case 9:d=n.sent,n.next=13;break;case 12:d=u("getConvivaObject");case 13:if(d){n.next=15;break}return n.abrupt("return");case 15:u("setPlayer",s),s.ready((function(){var e=s.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=X(t.keySystem);u("contentInfo",{DRMEnabled:o})}else u("contentInfo",{DRMEnabled:"None"})})),n||u("contentInfo",{DRMEnabled:"None"})})),s.on("loadstart",(function(){U&&U!==s.currentSrc()&&u("playbackEnded"),U=s.currentSrc();var n=Q(s.currentType()),t=e.getCurrentVideo(),o=F(t,s,d);o.authToken=(null==i?void 0:i.token)||"NA",o.streamType=n,u("contentInfo",o)})),s.on("play",(function(){B.has(s.currentSrc())||(B.add(s.currentSrc()),u("playbackStarted",null))})),s.on("ended",(function(){B.has(s.currentSrc())&&B.delete(s.currentSrc()),u("playbackEnded")})),s.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&u("initAdSensor",{player:s,adsLoader:null==e?void 0:e.adsLoader})}));case 21:case"end":return n.stop()}}),n)})));return function(e,n){return t.apply(this,arguments)}}();function $(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 ee(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?$(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):$(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var ne=function(l,a,s,d){var c,v,p,f,m,h,w,b,k,O,S,P,j,T,I,C,E,D,x,R,N,q,H,M,B,U,F,W,G,z,J,K,Y,X=a.res,Q=void 0===X?null:X,$=a.sres,ne=void 0===$?null:$;null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(p=v.framework)||void 0===p||null===(f=p.CastContext)||void 0===f||null===(m=f.getInstance())||void 0===m||m.S;var te=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],oe=(null===(h=Q)||void 0===h?void 0:h.contentType)||"video",ie=r.impolicy16x9(null===(w=Q)||void 0===w||null===(b=w[oe])||void 0===b||null===(k=b.gist)||void 0===k?void 0:k.videoImageUrl)||r.impolicy16x9(null===(O=Q)||void 0===O||null===(S=O[oe])||void 0===S||null===(P=S.gist)||void 0===P||null===(j=P.imageGist)||void 0===j?void 0:j.r16x9),re=(null===(T=Q)||void 0===T||null===(I=T[oe])||void 0===I||null===(C=I.liveDetails)||void 0===C?void 0:C.isDvrEnabled)||!1,le=(null===(E=Q)||void 0===E||null===(D=E[oe])||void 0===D||null===(x=D.streamingInfo)||void 0===x?void 0:x.isLiveStream)||!1,ae=(null===(R=Q)||void 0===R||null===(N=R.ads)||void 0===N||null===(q=N.preRoll)||void 0===q||null===(H=q.adTags)||void 0===H||null===(M=H.web)||void 0===M?void 0:M.active)&&(null===(B=Q)||void 0===B||null===(U=B.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(W=F.adTags)||void 0===W||null===(G=W.web)||void 0===G?void 0:G.url);Q=ee(ee({},Q),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var se=(Y={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==s.skin,liveui:re},t(Y,"autoplay",null==s?void 0:s.autoplay),t(Y,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ae),t(Y,"loop",(null==s?void 0:s.loop)||!1),t(Y,"audioPosterMode",null==s?void 0:s.audioPosterMode),t(Y,"html5",ee(ee({vhs:ee(ee({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==s||null===(z=s.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(K=s.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),t(Y,"poster",ie),t(Y,"techOrder",te),t(Y,"chromecast",{requestCustomDataFn:function(e){var n=r.getPlayer(l),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,r,l,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){f.isDrmEnabled=!0;var m=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;f.licenseUrl=m;var g=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=g}var y=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=y;var h=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=h;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=b,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Q,e,t)}}),Y);if(!i.getPlayers()[l])var ue=i(l,se,function(){var t=n(o.mark((function n(){var t,r,a,c,v,p,f,m,h,w,b,k,O,S,P,j,T,I,C,E,D,x,R,N;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ue),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,g(s);case 5:if(null!=s&&null!==(t=s.analytics)&&void 0!==t&&t.muxKey&&L(),le&&d.resolve(ee({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Q}:{response:Q})),e.inititateBeacon(l),Z(l,s),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),P=null===(r=Q)||void 0===r||null===(a=r[oe])||void 0===a?void 0:a.drmEnabled,j=null===(c=Q)||void 0===c||null===(v=c[oe])||void 0===v||null===(p=v.liveDetails)||void 0===p?void 0:p.startOverTime,!P){n.next=15;break}return n.next=15,_();case 15:re&&y(l,j),!ae||null!=s&&null!==(f=s.customData)&&void 0!==f&&f.disableAds||e.initialiseAdvertisement(l,ae,Q),T=e.getSource(Q,l),console.log(T),null!=s&&s.nearestClusterUrl&&(T=e.getUpdatedClusterSource(T,s.nearestClusterUrl)),T?e.loadVideo(l,T):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Q}),e.handleError(l,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Q)||void 0===m||null===(h=m[oe])||void 0===h||null===(w=h.contentDetails)||void 0===w||null===(b=w.closedCaptions)||void 0===b?void 0:b.length)>0||(null===(k=Q)||void 0===k||null===(O=k[oe])||void 0===O||null===(S=O.closedCaptions)||void 0===S?void 0:S.length)>0)&&(N=(null===(C=Q)||void 0===C||null===(E=C[oe])||void 0===E||null===(D=E.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(x=Q)||void 0===x||null===(R=x[oe])||void 0===R?void 0:R.closedCaptions),I=N.filter((function(e){return"VTT"===e.format})),u.addCaptions(l,I)),null!=s&&s.disableControls?e.disableControls(l):A(l,ee(ee(ee({},s),se),{},{liveVideo:le,isDvrEnabled:re,res:Q,sres:ne})),V(l,ee(ee(ee({},s),se),{},{liveVideo:le}),d,{res:Q,sres:ne});case 24:case"end":return n.stop()}}),n)})));return function(){return t.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:s.onTimeUpdate,getVideoDuration:s.getVideoDuration,onVideoEnded:s.onVideoEnded,init:function(t){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000",t),new Promise(function(){var i=n(o.mark((function n(i,a){var s,u,d,c,p,m,g,y,h,w,b,k,O,S,P,T,I,C,E,D,x,R,V,A,_,L,H;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(b=(null==t?void 0:t.videoSourceUrl)||!1,k=null==t?void 0:t.asat,O=(null==t||null===(s=t.epg)||void 0===s?void 0:s.enable)||!1,S=null==t?void 0:t.videoId,P=(null==t||null===(u=t.series)||void 0===u?void 0:u.enable)||!1,window.videoId=S,T=null==t?void 0:t.token,!e.token_authentication_enabled(t)){n.next=15;break}if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),T&&!e.isTokenExpired(T)){n.next=14;break}return a({status:!1,msg:"".concat(T?"Token is expired !":"Missing Authorization Token"),response:{token:T}}),n.abrupt("return");case 14:K=JSON.parse(atob(T.split(".")[1]));case 15:return t.isAnonymousUser=!(null===(d=K)||void 0===d||!d.anonymousId),t.siteOwner=(null===(c=K)||void 0===c?void 0:c.site)||null,t.userId=(null===(p=K)||void 0===p?void 0:p.userId)||null,window.sessionStorage.setItem("uid",null===(m=K)||void 0===m?void 0:m.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",T),I=null==t?void 0:t.playerId,t.chromecastReceiverId=null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable?null:null==t?void 0:t.chromecastReceiverId,C=null==t?void 0:t.airplay,E=(null==t||null===(y=t.analytics)||void 0===y?void 0:y.gaId)||null,(D=null==t?void 0:t.errors)&&(window.customErrors=D),window.customData=null==t?void 0:t.customData,v.setLocalisation(null==t||null===(h=t.customData)||void 0===h?void 0:h.localisation),e.baseUrlManager.set(t.apiBaseUrl),null!=t&&t.skin&&!r.isNotAValidSkin(t.skin)||(t.skin="VL_ONE"),n.next=33,N();case 33:C&&"Safari"==l.detectBrowser()&&Promise.resolve().then((function(){return q})).then((function(e){e.importAirplay()})),E&&f("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return e.runGtag(E)})).catch((function(e){})),(x=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(I)))&&x.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b?(V={directPlaybackUrl:b,id:R="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},k?e.getVideoDetails(R,T).then((function(e){ne(I,{res:ee(ee({},e),V)},t,{resolve:i,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,R)})):ne(I,{res:V},t,{resolve:i,reject:a})):P?(_=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(_)),L=null==t||null===(A=t.series)||void 0===A?void 0:A.id,console.log("seriesId",L),e.getSeriesDetails(L,T).then((function(n){var o,r,l,s=n.data,u=n.data.seasons;e.setCurrentSeries(u);var d=S||(null==u||null===(o=u[0])||void 0===o||null===(r=o.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(L,T),e.getVideoDetails(d,T).then((function(n){var o,r,l;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),ne(I,{res:null==n?void 0:n.data,sres:s},t,{resolve:i,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}))})).catch((function(n){e.initiateErrorHandling(n,I,a)}))):O?(H=null==t?void 0:t.epg,e.getLinearChannelDetails(H,T).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==H?void 0:H.channelId,ne(I,{res:n},t,{resolve:i,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}))):e.getVideoDetails(S,T).then((function(n){var o,r,l,s;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(r=o.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var u,d=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,f=j((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",S,null==t?void 0:t.siteOwner);if(f&&f.length)t.watchHistoryResumeTime=(null===(v=f[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=f[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",ne(I,{res:d},t,{resolve:i,reject:a})}else e.getVideoInfo(S,T).then((function(e){var n,o,r,l,s,u;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(l=r.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",ne(I,{res:d},t,{resolve:i,reject:a})})).catch((function(e){var n,o,r,l;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(l=r.watchHistory)||void 0===l||l.cb(e)),ne(I,{res:d},t,{resolve:i,reject:a})}));else ne(I,{res:d},t,{resolve:i,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}));case 38:case"end":return n.stop()}}),n)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:d.getRenditions,skip:e.skip,getPlayer:r.getPlayer,play:e.play,pause:e.pause,detectBrowser:l.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:s.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:u.enableCaptions,disableCaptions:u.disableCaptions,getCaptions:u.getCaptions,playSelectedResolution:c.playSelectedResolution,getSource:e.getSource,setVolume:T,getVolume:I,disableControls:e.disableControls,setPlaybackSpeed:s.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-cffdd8af.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("./skin-aef573bd.js"),l=require("./browser-77c57718.js"),a=require("@babel/runtime/helpers/typeof"),s=require("./util-197a4f7c.js"),u=require("./captions-37b81672.js"),d=require("./renditions-fd408798.js"),c=require("./resolution-c59e995e.js"),v=require("./localisation-56e0a999.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/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var p,f=function(e){return new Promise((function(n,t){if(m(e))t("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!0,i.src=e,i.onload=function(){n()},i.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(i)}}))},m=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(){var e=n(i.mark((function e(n){var t,a,s,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r.getPlayer(null==n?void 0:n.playerId),console.log(n),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=5,import("@silvermine/videojs-chromecast");case 5:return u=e.sent,e.prev=6,e.next=9,f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:return e.prev=14,u.default(o),e.finish(14);case 17:null!==(s=window)&&void 0!==s&&s.cast?null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==a||a.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==l.detectBrowser()?null==a||a.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[6,11,14,17]])})));return function(n){return e.apply(this,arguments)}}(),y=function(e,n){var t=r.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,i,r,l,a,s=this.el(),u=o.dom.getPointerPosition(s,n).x;o.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(r=i.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function w(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?h(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var b=[],k=0,O=null;function S(n,i,o){var r,l,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==i||null===(r=i.watchHistory)||void 0===r||r.apiVersion;var c=null==i||null===(l=i.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(n.currentTime()),f=Math.floor(n.duration());null==i||null===(a=i.watchHistory)||void 0===a||a.xapiKey;var m=(null==i||null===(s=i.video)||void 0===s?void 0:s.originalObjectId)||null,g=(null==i||null===(u=i.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(n.currentTime()),h=d?100:Math.floor(v/f*100),b={};g?function(n,i,o){var r=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(o),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},d=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return w(w({},e),{},t({},n,u[n]))}),{}),c=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===p}));c<0?l.push(w(w({content:d},n),{},{addedDate:a,updateDate:a})):l[c]=w(w(w({},l[c]),n),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(b={completed:d,watchedTime:y,watchedPercentage:h},c,i.siteOwner):(b=w(w({videoId:p,watchedTime:y,watchedPercentage:h,doneWatching:d,profileId:c},O&&{seriesId:O}),m&&{originalObjectId:m}),e.saveWatchHistory(b).then((function(e){})).catch((function(e){}))),k=v+o}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function j(e,n,t){var i=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),o=[];return i&&Array.isArray(i)&&(o=i.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),o}var T=function(e,n,t){var i=r.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var o=parseFloat(n)/100;i.volume(o),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},I=function(e){var n=r.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},C=!1,E=function(n,t){var i,o,r=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[r])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!C){var l=D(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),C=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function D(e,n,t){if(Array.isArray(e))return e.map((function(e){return D(e,n,t)}));if(null!==e&&"object"===a(e)){var i={};return Object.keys(e).forEach((function(o){o===n&&void 0!==e[t]?i[o]=e[t]:o===t&&void 0!==e[n]?i[o]=e[n]:i[o]=D(e[o],n,t)})),i}return e}function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function R(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var V=function(n,t,i,o){var l,a,s=o.res,u=o.sres,d=r.getPlayer(n),c=(null==s?void 0:s.contentType)||"video",v=(null==s||null===(l=s[c])||void 0===l||null===(a=l.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;e.setCurrentVideo(s),d&&(d.on("loadstart",(function(){v?i.resolve({status:!0,msg:"Video Loaded",response:s}):i.resolve(R({status:!0,msg:"Player Initialised"},u?{seriesResponse:u,response:s}:{response:s}))})),d.on("loadeddata",(function(){var i,o,l;(null==d||!d.muted())&&T(n,sessionStorage.getItem("volume")||"100");var a=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.saveOffline)){var u,c,v=R(R({},t),s);!function(e,n,t){var i,o,l;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(O=null==n||null===(o=n.series)||void 0===o?void 0:o.id),b=[],k=0,p=t;var a=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,s=r.getPlayer(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());b.includes(k)||(e==k?(b.push(e),S(s,n,a)):e>k&&(k=e+a))})),s.one("ended",(function(){S(s,n,a,!0)})))}(n,v,null==a||null===(u=a.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=d&&d.mux){var f,m,g,y,h,w,P=(null===(f=e.getCurrentVideo())||void 0===f?void 0:f.video)||(null==s?void 0:s.video),j=null==P?void 0:P.gist,I={env_key:null==t||null===(m=t.analytics)||void 0===m?void 0:m.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==P||null===(y=P.series)||void 0===y?void 0:y.title,video_stream_type:null!=P&&null!==(h=P.streamingInfo)&&void 0!==h&&h.isLiveStream?"live":"video",viewer_user_id:null==t||null===(w=t.analytics)||void 0===w?void 0:w.userId};d.mux({debug:!1,data:I})}})),d.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];d.trigger("subtitlechanged",n)})),d.on("subtitlechanged",(function(e,n){var t,i,o,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(r=o.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),y=g.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([y[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}})),d.tech_.on("retryplaylist",(function(){v&&E(s,n)})),d.on("error",(function(){var t,o;(console.log("ERROR",d.error(),d.error().code),4===d.error().code&&v)?E(s,n):(e.handleError(n,(null==d||null===(t=d.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==d||null===(o=d.error())||void 0===o?void 0:o.message)||"Some error occured",response:s}))})),d.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var i,o,r,l=null===(i=e.getCurrentVideo())||void 0===i||null===(o=i.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout((function(){d.currentTime(u)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){d.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),d.on("volumechange",(function(){var e=100*d.volume().toFixed(2);d.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),d.on("chromecastDisconnected",(function(){if(v){d.currentSource();for(var e=d.textTracks(),n=e.length-1;n>=0;n--)d.removeRemoteTextTrack(e[n])}})))},A=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-99c6bb9d.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-189f672a.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-c81e5e01.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-bdd20d25.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-a2185e84.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-febf0901.js")})).then((function(t){t.initialiseSkin(e,n)}))};var N=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),f("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=n(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){o.getPlugin("eme")||o.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=n(i.mark((function e(){var n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(o),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),q=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(o)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(o)}))},loadAdsLibrary:N,loadEMELibrary:_,loadMuxPlugin:L});function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?H(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var B=new Set,U=null,F=function(n,t,i){var o,r,l,a,s,u,d,c,v,p={};p[null==i||null===(o=i.Constants)||void 0===o?void 0:o.ASSET_NAME]=z(n),p["c3.cm.id"]=(null==n||null===(r=n.linearchannel)||void 0===r?void 0:r.id)||(null==n||null===(l=n.video)||void 0===l?void 0:l.id)||"",p["c3.cm.contentType"]=K(n),p[null==i||null===(a=i.Constants)||void 0===a?void 0:a.IS_LIVE]=!(null==n||!n.linearchannel),p[null==i||null===(s=i.Constants)||void 0===s?void 0:s.STREAM_URL]=t.currentSrc(),p[null==i||null===(u=i.Constants)||void 0===u?void 0:u.VIEWER_ID]="undefined"===e.getUserId()?"NA":e.getUserId(),p["c3.cm.categoryType"]=W(n),p[null==i||null===(d=i.Constants)||void 0===d?void 0:d.PLAYER_NAME]="VL_WEB_PLAYER",p["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),p.encoding="",p.screenResolution="",p.DRMEnabled=(null==n||null===(c=n.video)||void 0===c?void 0:c.drmEnabled)||(null==n||null===(v=n.linearchannel)||void 0===v?void 0:v.drmEnabled)||"None",p.subscriberType="",p.DAIStream=G(),p[i.Constants.DEFAULT_RESOURCE]="AKAMAI",p["c3.cm.brand"]="NA";var f=Y(e.getCurrentSeries(),n);return p=M(M({},p),f)},W=function(e){return null!=e&&e.linearchannel?"Linear":null!=e&&e.video&&(null==e||null===(n=e.video)||void 0===n||null===(t=n.categories)||void 0===t||null===(i=t[0])||void 0===i?void 0:i.title)||"Null";var n,t,i},G=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",o=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return o?"YES":"NO"},z=function(e){var n,t,i,o,r=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.title)||"Null",a=(null==e||null===(i=e[r])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id)||"Null";return"[".concat(a,"] ").concat(l)},K=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var J,Y=function(n,t){var i,o,r,l,a,s={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return s;var u=e.getSeasonNumber(),d=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(o=i.series)||void 0===o?void 0:o.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(r=n[u-1])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[d-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",s},X=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},Q=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Z=function(){var t=n(i.mark((function n(t,o){var l,a,s,u,d;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null!=o&&null!==(l=o.convivaConfig)&&void 0!==l&&l.enable){n.next=2;break}return n.abrupt("return");case 2:if(s=r.getPlayer(t),"function"==typeof(u=null==o||null===(a=o.convivaConfig)||void 0===a?void 0:a.trackConvivaPlayerEvent)){n.next=6;break}return n.abrupt("return");case 6:if(!(u instanceof Promise)){n.next=12;break}return n.next=9,u("getConvivaObject");case 9:d=n.sent,n.next=13;break;case 12:d=u("getConvivaObject");case 13:if(d){n.next=15;break}return n.abrupt("return");case 15:s.ready((function(){var e=s.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var i=X(t.keySystem);u("contentInfo",{DRMEnabled:i})}else u("contentInfo",{DRMEnabled:"None"})})),n||u("contentInfo",{DRMEnabled:"None"})})),s.on("loadstart",(function(){U&&U!==s.currentSrc()&&u("playbackEnded"),u("setPlayer",s),B.clear(),U=s.currentSrc();var n=Q(s.currentType()),t=e.getCurrentVideo(),i=F(t,s,d);i.authToken=(null==o?void 0:o.token)||"NA",i.streamType=n,u("contentInfo",i)})),s.on("play",(function(){B.has(s.currentSrc())||(B.add(s.currentSrc()),u("playbackStarted",null))})),s.on("ended",(function(){B.has(s.currentSrc())&&B.delete(s.currentSrc()),u("playbackEnded")})),s.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&u("initAdSensor",{player:s,adsLoader:null==e?void 0:e.adsLoader})})),s.on("dispose",(function(){null==B||B.clear(),u("playbackEnded")}));case 21:case"end":return n.stop()}}),n)})));return function(e,n){return t.apply(this,arguments)}}();function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function ee(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var ne=function(l,a,s,d){var c,v,p,f,m,h,w,b,k,O,S,P,j,T,I,C,E,D,x,R,N,q,H,M,B,U,F,W,G,z,K,J,Y,X=a.res,Q=void 0===X?null:X,$=a.sres,ne=void 0===$?null:$;null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(p=v.framework)||void 0===p||null===(f=p.CastContext)||void 0===f||null===(m=f.getInstance())||void 0===m||m.S;var te=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],ie=(null===(h=Q)||void 0===h?void 0:h.contentType)||"video",oe=r.impolicy16x9(null===(w=Q)||void 0===w||null===(b=w[ie])||void 0===b||null===(k=b.gist)||void 0===k?void 0:k.videoImageUrl)||r.impolicy16x9(null===(O=Q)||void 0===O||null===(S=O[ie])||void 0===S||null===(P=S.gist)||void 0===P||null===(j=P.imageGist)||void 0===j?void 0:j.r16x9),re=(null===(T=Q)||void 0===T||null===(I=T[ie])||void 0===I||null===(C=I.liveDetails)||void 0===C?void 0:C.isDvrEnabled)||!1,le=(null===(E=Q)||void 0===E||null===(D=E[ie])||void 0===D||null===(x=D.streamingInfo)||void 0===x?void 0:x.isLiveStream)||!1,ae=(null===(R=Q)||void 0===R||null===(N=R.ads)||void 0===N||null===(q=N.preRoll)||void 0===q||null===(H=q.adTags)||void 0===H||null===(M=H.web)||void 0===M?void 0:M.active)&&(null===(B=Q)||void 0===B||null===(U=B.ads)||void 0===U||null===(F=U.preRoll)||void 0===F||null===(W=F.adTags)||void 0===W||null===(G=W.web)||void 0===G?void 0:G.url);Q=ee(ee({},Q),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var se=(Y={enableSmoothSeeking:!0,controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==s.skin,liveui:re},t(Y,"autoplay",null==s?void 0:s.autoplay),t(Y,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ae),t(Y,"loop",(null==s?void 0:s.loop)||!1),t(Y,"audioPosterMode",null==s?void 0:s.audioPosterMode),t(Y,"html5",ee(ee({vhs:ee(ee({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==s||null===(z=s.customData)||void 0===z?void 0:z.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==s||null===(K=s.customData)||void 0===K?void 0:K.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),t(Y,"poster",oe),t(Y,"techOrder",te),t(Y,"chromecast",{requestCustomDataFn:function(e){var n=r.getPlayer(l),t=((null==n?void 0:n.textTracksJson_)||n.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var i,o,r,l,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){f.isDrmEnabled=!0;var m=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;f.licenseUrl=m;var g=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];f.licenseToken=g}var y=(null==e||null===(i=e[p])||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType)||"VIDEO";f.contentType=y;var h=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;f.duration=h;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=b,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Q,e,t)}}),Y);if(!o.getPlayers()[l])var ue=o(l,se,function(){var t=n(i.mark((function n(){var t,r,a,c,v,p,f,m,h,w,b,k,O,S,P,j,T,I,C,E,D,x,R,N;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ue),console.log(o.VERSION),console.log(o.getPlugins()),n.next=5,g(s);case 5:if(null!=s&&null!==(t=s.analytics)&&void 0!==t&&t.muxKey&&L(),le&&d.resolve(ee({status:!0,msg:"Player Initialised"},ne?{seriesResponse:ne,response:Q}:{response:Q})),e.inititateBeacon(l,null==s?void 0:s.analyticsCb),Z(l,s),/Android/i.test(navigator.userAgent)&&(o.options.vhs.overrideNative=!0),P=null===(r=Q)||void 0===r||null===(a=r[ie])||void 0===a?void 0:a.drmEnabled,j=null===(c=Q)||void 0===c||null===(v=c[ie])||void 0===v||null===(p=v.liveDetails)||void 0===p?void 0:p.startOverTime,!P){n.next=15;break}return n.next=15,_();case 15:re&&y(l,j),!ae||null!=s&&null!==(f=s.customData)&&void 0!==f&&f.disableAds||e.initialiseAdvertisement(l,ae,Q),T=e.getSource(Q,l),console.log(T),null!=s&&s.nearestClusterUrl&&(T=e.getUpdatedClusterSource(T,s.nearestClusterUrl)),T?e.loadVideo(l,T):(d.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Q}),e.handleError(l,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Q)||void 0===m||null===(h=m[ie])||void 0===h||null===(w=h.contentDetails)||void 0===w||null===(b=w.closedCaptions)||void 0===b?void 0:b.length)>0||(null===(k=Q)||void 0===k||null===(O=k[ie])||void 0===O||null===(S=O.closedCaptions)||void 0===S?void 0:S.length)>0)&&(N=(null===(C=Q)||void 0===C||null===(E=C[ie])||void 0===E||null===(D=E.contentDetails)||void 0===D?void 0:D.closedCaptions)||(null===(x=Q)||void 0===x||null===(R=x[ie])||void 0===R?void 0:R.closedCaptions),I=N.filter((function(e){return"VTT"===e.format})),u.addCaptions(l,I)),null!=s&&s.disableControls?e.disableControls(l):A(l,ee(ee(ee({},s),se),{},{liveVideo:le,isDvrEnabled:re,res:Q,sres:ne})),V(l,ee(ee(ee({},s),se),{},{liveVideo:le}),d,{res:Q,sres:ne});case 24:case"end":return n.stop()}}),n)})));return function(){return t.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:s.onTimeUpdate,getVideoDuration:s.getVideoDuration,onVideoEnded:s.onVideoEnded,init:function(t){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var o=n(i.mark((function n(o,a){var s,u,d,c,p,m,g,y,h,w,b,k,O,S,P,T,I,C,E,D,x,R,V,A,_,L,H;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(b=(null==t?void 0:t.videoSourceUrl)||!1,k=null==t?void 0:t.asat,O=(null==t||null===(s=t.epg)||void 0===s?void 0:s.enable)||!1,S=null==t?void 0:t.videoId,P=(null==t||null===(u=t.series)||void 0===u?void 0:u.enable)||!1,window.videoId=S,T=null==t?void 0:t.token,!e.token_authentication_enabled(t)){n.next=15;break}if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),T&&!e.isTokenExpired(T)){n.next=14;break}return a({status:!1,msg:"".concat(T?"Token is expired !":"Missing Authorization Token"),response:{token:T}}),n.abrupt("return");case 14:J=JSON.parse(atob(T.split(".")[1]));case 15:return t.isAnonymousUser=!(null===(d=J)||void 0===d||!d.anonymousId),t.siteOwner=(null===(c=J)||void 0===c?void 0:c.site)||null,t.userId=(null===(p=J)||void 0===p?void 0:p.userId)||null,window.sessionStorage.setItem("uid",null===(m=J)||void 0===m?void 0:m.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",T),I=null==t?void 0:t.playerId,t.chromecastReceiverId=null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable?null:null==t?void 0:t.chromecastReceiverId,C=null==t?void 0:t.airplay,E=(null==t||null===(y=t.analytics)||void 0===y?void 0:y.gaId)||null,(D=null==t?void 0:t.errors)&&(window.customErrors=D),window.customData=null==t?void 0:t.customData,v.setLocalisation(null==t||null===(h=t.customData)||void 0===h?void 0:h.localisation),e.baseUrlManager.set(t.apiBaseUrl),null!=t&&t.skin&&!r.isNotAValidSkin(t.skin)||(t.skin="VL_ONE"),n.next=33,N();case 33:C&&"Safari"==l.detectBrowser()&&Promise.resolve().then((function(){return q})).then((function(e){e.importAirplay()})),E&&f("https://www.googletagmanager.com/gtag/js?id=".concat(E)).then((function(){return e.runGtag(E)})).catch((function(e){})),(x=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(I)))&&x.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b?(V={directPlaybackUrl:b,id:R="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},k?e.getVideoDetails(R,T).then((function(e){ne(I,{res:ee(ee({},e),V)},t,{resolve:o,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,R)})):ne(I,{res:V},t,{resolve:o,reject:a})):P?(_=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(_)),L=null==t||null===(A=t.series)||void 0===A?void 0:A.id,e.getSeriesDetails(L,T).then((function(n){var i,r,l,s=n.data,u=n.data.seasons;e.setCurrentSeries(u);var d=S||(null==u||null===(i=u[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);e.createSeriesWatchMap(L,T),e.getVideoDetails(d,T).then((function(n){var i,r,l;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(n.data),ne(I,{res:null==n?void 0:n.data,sres:s},t,{resolve:o,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}))})).catch((function(n){e.initiateErrorHandling(n,I,a)}))):O?(H=null==t?void 0:t.epg,e.getLinearChannelDetails(H,T).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==H?void 0:H.channelId,ne(I,{res:n},t,{resolve:o,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}))):e.getVideoDetails(S,T).then((function(n){var i,r,l,s;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,e.setCurrentVideo(null==n?void 0:n.data);var u,d=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,f=j((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",S,null==t?void 0:t.siteOwner);if(f&&f.length)t.watchHistoryResumeTime=(null===(v=f[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=f[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",ne(I,{res:d},t,{resolve:o,reject:a})}else e.getVideoInfo(S,T).then((function(e){var n,i,r,l,s,u;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(r=window)||void 0===r||null===(l=r.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",ne(I,{res:d},t,{resolve:o,reject:a})})).catch((function(e){var n,i,r,l;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(r=window)||void 0===r||null===(l=r.watchHistory)||void 0===l||l.cb(e)),ne(I,{res:d},t,{resolve:o,reject:a})}));else ne(I,{res:d},t,{resolve:o,reject:a})})).catch((function(n){e.initiateErrorHandling(n,I,a,S)}));case 38:case"end":return n.stop()}}),n)})));return function(e,n){return o.apply(this,arguments)}}())},getRenditions:d.getRenditions,skip:e.skip,getPlayer:r.getPlayer,play:e.play,pause:e.pause,detectBrowser:l.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:s.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:u.enableCaptions,disableCaptions:u.disableCaptions,getCaptions:u.getCaptions,playSelectedResolution:c.playSelectedResolution,getSource:e.getSource,setVolume:T,getVolume:I,disableControls:e.disableControls,setPlaybackSpeed:s.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-cffdd8af.js"),l=require("./skin-aef573bd.js");exports.initialiseKeyboardEvents=function(r,i){var n,o,t,a=l.getPlayer(r),c=null==a||null===(n=a.controlBar)||void 0===n||null===(o=n.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(t=document)||void 0===t||t.addEventListener("keydown",(function(l){var n;if(console.log(l),"input"!=l.target.localName){var o=l.key,t=!0===i.liveVideo||!0===i.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(o)&&(l.preventDefault(),null==u||u.focus()),o){case" ":null==c||c.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(n=document.querySelector(".vjs-fullscreen-control"))||void 0===n||n.click();break;case"ArrowLeft":t&&!1===i.liveui||e.rewind(r,10);break;case"ArrowRight":t||e.skip(r,10)}}}),!0)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),i=require("./generic-cffdd8af.js"),l=require("./skin-aef573bd.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-37b81672.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(v,d);var u,m,p=(u=v,m=c(),function(){var e,t=n(u);if(m){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(r=p.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(v,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-e7a024e5.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(l.closeOpenDrawers(),r.classList.remove("hidden"),t.classList.add("open"),l.setUpdatedElHeight(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var n=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(n,"px"),a.style.overflow="hidden",s.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,a,n,l=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(l.classList.add("selected"),l.style.border="2px solid #D2393B"),l.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");l.classList.add("selected"),l.style.border="2px solid #D2393B",i.load(t.playerId,t.streams[e].id).then((function(e){i.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},l.style.backgroundImage="url(".concat(t.streams[e].img,")");var c=document.createElement("img");c.className="stream-thumbnail-image",c.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.fallbackImage)),l.append(c),s.dom.appendContent(u,l),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(a,n),s.dom.appendContent(a,c),s.dom.appendContent(e,a),s.dom.appendContent(e,d),l.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./generic-cffdd8af.js"),i=require("./skin-aef573bd.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-37b81672.js"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),u=function(){r(h,d);var u,m,p=(u=h,m=c(),function(){var e,t=a(u);if(m){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return n(this,e)});function h(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=p.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-7a86b517.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(i.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 r=document.getElementById(this.playerId);if(r){var n=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.style.overflow="hidden",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),a=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var c=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),m=function(e){var r,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var r=s.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then((function(e){l.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var a=document.createElement("img");a.className="stream-thumbnail-image",a.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),a.alt="No Thumbnail Available",n.append(a),s.dom.appendContent(u,n),s.dom.appendContent(d,u)},p=0;p<this.streams.length;p++)m(p);s.dom.appendContent(n,a),s.dom.appendContent(n,c),s.dom.appendContent(e,n),s.dom.appendContent(e,d),i.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),h}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-cffdd8af.js"),a=require("./skin-aef573bd.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-37b81672.js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./nextEpisodeButton-b6e6586f.js")})).then((function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),n.addEventListener("mouseover",(function(){o.dom.removeClass(n,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")})),n.addEventListener("mouseout",(function(){o.dom.addClass(n,"nextepisode-hidden")}))}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach((function(e,r){e.gist.id===n&&(t=r)})),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then((function(e){s.setCurrentVideo(e.response)}))};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-cffdd8af.js"),c=require("./autoNextVideo-5cba144d.js"),d=require("./skin-aef573bd.js");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("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-37b81672.js"),require("./util-197a4f7c.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-df87ca90.js")})).then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.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=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,d),o.dom.appendContent(a,s),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),h}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=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"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=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-cffdd8af.js"),u=require("./icons-0ea2e662.js"),p=require("./skin-aef573bd.js");require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-37b81672.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f,m=c.getComponent("Component"),g=function(){n(d,m);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,f=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{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)}))}}]),d}();function b(){return(b=e(l.mark((function e(i,t,s,n){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),v(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 y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.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 s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,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=p.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){}))}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach((function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),v[i].addEventListener("click",(function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,m[i].id,t,u)})),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
|