@viewlift/player-backup 2.0.12-backup → 2.0.14-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-58bc1a2f.js +1 -0
- package/cjs/bundle.css +106 -102
- package/cjs/{features-8225fea6.js → features-bbf12d8e.js} +1 -1
- package/cjs/generic-4b7bb87d.js +1 -0
- package/cjs/{index-1fcdbb6b.js → index-a4968be0.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-948ccf19.js → keyboardShortcuts-2b3e75e4.js} +1 -1
- package/cjs/{multicamv2-8903504f.js → multicamv2-c1d0ed30.js} +1 -1
- package/cjs/{multicamv2-fc76d829.js → multicamv2-cea9f2f8.js} +1 -1
- package/cjs/{nextEpisodeButton-6e40bdee.js → nextEpisodeButton-f7707d1d.js} +1 -1
- package/cjs/{playlist-87cb2091.js → playlist-6c107638.js} +1 -1
- package/cjs/renditions-b41243b6.js +1 -0
- package/cjs/{series-b9746444.js → series-f4526439.js} +1 -1
- package/cjs/{series-v2-a81c9df1.js → series-v2-4725a038.js} +1 -1
- package/cjs/{series-v2-44ad9686.js → series-v2-6dc24d73.js} +1 -1
- package/cjs/{settings-icon-3bb3f6e7.js → settings-icon-429f8165.js} +1 -1
- package/cjs/{skin-8210cd1e.js → skin-06dcc3fb.js} +1 -1
- package/cjs/{skin-3de9d1f0.js → skin-131ddc1d.js} +1 -1
- package/cjs/skin-74976452.js +1 -0
- package/cjs/{skin-dd5d6589.js → skin-81af0a5e.js} +1 -1
- package/cjs/{skin-d3686c74.js → skin-8644239a.js} +1 -1
- package/cjs/{skin-cc383c94.js → skin-a6410bc4.js} +1 -1
- package/cjs/{videoSelector-0fa5dd2a.js → videoSelector-5b8b82c6.js} +1 -1
- package/cjs/{videoSelector-71ca46d1.js → videoSelector-e4bb3b22.js} +1 -1
- package/cjs/videojs_contrib_dash-5ec0e9bd.js +1 -0
- package/esm/autoNextVideo-d845eed5.js +1 -0
- package/esm/bundle.css +106 -102
- package/esm/{features-8199dcc4.js → features-28f3fba0.js} +1 -1
- package/esm/generic-08550dfb.js +1 -0
- package/esm/{index-5e14e546.js → index-b2daa6b2.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-5c6e1501.js → keyboardShortcuts-d4b7595b.js} +1 -1
- package/esm/{multicamv2-dcea296f.js → multicamv2-4b9de262.js} +1 -1
- package/esm/{multicamv2-2d0ce060.js → multicamv2-8d67f44f.js} +1 -1
- package/esm/{nextEpisodeButton-19013125.js → nextEpisodeButton-70cfcfbb.js} +1 -1
- package/esm/{playlist-7eee12e8.js → playlist-b813b540.js} +1 -1
- package/esm/{renditions-cdeb4051.js → renditions-aa307468.js} +1 -1
- package/esm/{series-e3d86974.js → series-2a2949ad.js} +1 -1
- package/esm/{series-v2-9da1717c.js → series-v2-ab6a1052.js} +1 -1
- package/esm/{series-v2-87d7a59c.js → series-v2-eef07700.js} +1 -1
- package/esm/{settings-icon-3fd3f980.js → settings-icon-b8f0ec18.js} +1 -1
- package/esm/{skin-eed420a5.js → skin-19ed57f8.js} +1 -1
- package/esm/skin-5783c97e.js +1 -0
- package/esm/{skin-4cdfc075.js → skin-5d96192f.js} +1 -1
- package/esm/{skin-27a1e021.js → skin-7e650a44.js} +1 -1
- package/esm/{skin-95ad0650.js → skin-c6d62a04.js} +1 -1
- package/esm/{skin-82873eeb.js → skin-e0bd9b2e.js} +1 -1
- package/esm/{util-623a2db0.js → util-1c8c0f16.js} +1 -1
- package/esm/{videoSelector-a65e6b3f.js → videoSelector-bfcd1075.js} +1 -1
- package/esm/{videoSelector-66c19d10.js → videoSelector-ff7ea20f.js} +1 -1
- package/esm/videojs_contrib_dash-5ee2e52c.js +1 -0
- package/package.json +1 -1
- package/cjs/autoNextVideo-fd4e17f3.js +0 -1
- package/cjs/generic-7bf7b567.js +0 -1
- package/cjs/renditions-f9e729be.js +0 -1
- package/cjs/skin-d9bdf52f.js +0 -1
- package/esm/autoNextVideo-7358eba2.js +0 -1
- package/esm/generic-903859b0.js +0 -1
- package/esm/skin-0b6c7cd6.js +0 -1
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-7bf7b567.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/regenerator"),r=require("video.js"),o=require("./util-6edeeb8a.js"),l=require("./captions-fbd6fefb.js"),a=require("./renditions-f9e729be.js"),s=require("./resolution-719c85a4.js"),u=require("./skin-34fbc337.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof");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},y=function(e,n,t){var i=u.getPlayer(e);if(i)if(n>=0&&n<=100){i.muted()&&i.muted(!1);var r=parseFloat(n)/100;i.volume(r),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,"'")})},g=function(e){var n=u.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")};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 b(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){n(e,t,i[t])})):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 w=[],k=0,S=null;function O(n,t,i){var r,o,l,a,s,u=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(r=t.watchHistory)||void 0===r||r.apiVersion;var c=null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.profileId,d=Math.floor(n.currentTime()),v=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var f=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,m=(null==t||null===(s=t.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,y=Math.floor(n.currentTime()),g=u?100:Math.floor(d/v*100),h={};m?j(h={completed:u,watchedTime:y,watchedPercentage:g},c,t.siteOwner):(h=b(b({videoId:p,watchedTime:y,watchedPercentage:g,doneWatching:u,profileId:c},S&&{seriesId:S}),f&&{originalObjectId:f}),e.saveWatchHistory(h).then((function(e){})).catch((function(e){}))),k=d+i}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function j(t,i,r){var o=i?"watchhistory-data-".concat(i):"watchhistory-data-guest-".concat(r),l=P(o),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return b(b({},e),{},n({},t,u[t]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===p}));d<0?l.push(b(b({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=b(b(b({},l[d]),t),{},{updateDate:a}),localStorage.setItem("".concat(o),JSON.stringify(l))}function T(e,n,t){var i=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return i&&Array.isArray(i)&&(r=i.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),r}var I=function(){var e=t(i.mark((function e(n){var t,o,l,a;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=u.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(r),e.finish(13);case 16:null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),E=function(e,n){var t=u.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,i,o,l,a,s=this.el(),u=r.dom.getPointerPosition(s,n).x;r.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(i=t.cast)||void 0===i||null===(o=i.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){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()}}))};var C=function(){var e=t(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)}}(),D=function(){var e=t(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){r.getPlugin("eme")||r.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=t(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(r),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)}}(),R=function(){var e=t(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-3f0e537b.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),V=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(r)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(r)}))},loadAdsLibrary:C,loadEMELibrary:D,loadMuxPlugin:x,loadDvrSeekbar:R});function N(e){return A.apply(this,arguments)}function A(){return(A=t(i.mark((function e(n){var t;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,C();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then((function(){return V})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,n){return L.apply(this,arguments)}function L(){return(L=t(i.mark((function e(n,t){var r,o,l,a,s,u,d,v,p;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",d=null==t||null===(r=t[u])||void 0===r?void 0:r.drmEnabled,null==t||null===(o=t[u])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,v=(null==t||null===(a=t.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,p="Chrome"==c.detectBrowser()&&(v||(null===(s=["dirtvision"])||void 0===s?void 0:s.includes(null==t?void 0:t.siteName))),e.prev=6,e.next=9,Promise.allSettled([d?D():null,I(n),p?f("https://cdn.dashjs.org/v5.0.0/modern/umd/dash.all.min.js"):null]);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:case"end":return e.stop()}}),e,null,[[6,11]])})))).apply(this,arguments)}function q(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 t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?q(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var H=new Set,U=null,B=function(n,t,i){var r,o,l,a,s,u,c,d={},v=(null==n?void 0:n.contentType)||"video";d["c3.cm.id"]=(null===(r=n[v])||void 0===r?void 0:r.id)||"Null",d["c3.cm.contentType"]=J(n),d[null==i||null===(o=i.Constants)||void 0===o?void 0:o.IS_LIVE]=!(null==n||!n.linearchannel),d[null==i||null===(l=i.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),d[null==i||null===(a=i.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),d["c3.cm.categoryType"]=G(n),d["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"}}(),d.DRMEnabled=(null===(s=n[v])||void 0===s?void 0:s.drmEnabled)||"None",d.DAIStream=null!==(u=n[v])&&void 0!==u&&null!==(c=u.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[i.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=Y(n),d["c3.cm.genreList"]=F(n),d["c3.cm.genre"]=W(n),d["c3.cm.channel"]=z(n);var p=X(e.getCurrentSeries(),n);return d=M(M({},d),p)},W=function(e){var n,t,i,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(i=t.primaryCategory)||void 0===i?void 0:i.title)||"Null"},F=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},z=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null==e||null===(n=e[i])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},G=function(e){return(null==e?void 0:e.contentType)||"null"},Y=function(e){var n,t,i=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[i])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},K=function(e,n){var t,i,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(i=t.gist)||void 0===i?void 0:i.title)||"Null";return"".concat(l)},J=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var X=function(n,t){var i,r,o,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(),c=e.getEpisodeNumber();return s["c3.cm.seriesName"]=(null==t||null===(i=t.video)||void 0===i||null===(r=i.series)||void 0===r?void 0:r.title)||"Null",s["c3.cm.seasonNumber"]=(null==u?void 0:u.toString())||"Null",s["c3.cm.showTitle"]=(null==n||null===(o=n[u-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",s["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",s},Q=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"}},Z=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},$=function(){var n=t(i.mark((function n(t,r){var o,l,a,s,c,d,v,p,f,m;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==r?void 0:r.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,s=o.tveProvider,c=o.enable,d=o.appName,v=(r||{}).token,c){n.next=4;break}return n.abrupt("return");case 4:if(p=u.getPlayer(t),"function"==typeof(f=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,f("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var i=Q(t.keySystem);f("contentInfo",{DRMEnabled:i})}else f("contentInfo",{DRMEnabled:"None"})})),n||f("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var n,t;U&&U!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),H.clear(),U=p.currentSrc();var i=Z(p.currentType()),o=e.getCurrentVideo(),l=B(o,p,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=K(o,r),l.authToken=v||"NULL",l.streamType=i,l.D2CType=a||"NONE",l.subscriberType=s||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=s||"NULL",f("contentInfo",l)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})})),p.on("play",(function(){H.has(p.currentSrc())||(H.add(p.currentSrc()),f("playbackStarted",null))})),p.on("ended",(function(){H.has(p.currentSrc())&&H.delete(p.currentSrc()),f("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==H||H.clear(),f("playbackEnded")}));case 20:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),ee=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-dd5d6589.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-3de9d1f0.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-d3686c74.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-cc383c94.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-8210cd1e.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-d9bdf52f.js")})).then((function(t){t.initialiseSkin(e,n)}))},ne=!1,te=function(n,t){var i,r,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(i=n[o])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!ne){var l=ie(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),ne=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ie(e,n,t){if(Array.isArray(e))return e.map((function(e){return ie(e,n,t)}));if(null!==e&&"object"===v(e)){var i={};return Object.keys(e).forEach((function(r){r===n&&void 0!==e[t]?i[r]=e[t]:r===t&&void 0!==e[n]?i[r]=e[n]:i[r]=ie(e[r],n,t)})),i}return e}function re(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 oe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?re(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):re(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var le=function(n,t,i,r){var o,a,s,d,v=r.res,f=r.sres,m=u.getPlayer(n),g=(null==v?void 0:v.contentType)||"video",h=(null==v||null===(o=v[g])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==v||null===(s=v[g])||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;e.setCurrentVideo(v),m&&(m.on("loadstart",(function(){h?i.resolve({status:!0,msg:"Video Loaded",response:v}):i.resolve(oe({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))})),m.on("loadeddata",(function(){var i,r,o,a=l.getCaptions(n);if(null==a||a.map((function(e){return l.disableCaptions(n,e.id)})),b&&"Safari"===c.detectBrowser())try{var s;null==m||null===(s=m.liveTracker)||void 0===s||s.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&y(n,sessionStorage.getItem("volume")||"100");var d=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!==(r=t.watchHistory)&&void 0!==r&&r.saveOffline)){var f,g,h=oe(oe({},t),v);!function(e,n,t){var i,r,o;null!=n&&n.series&&null!=n&&null!==(i=n.series)&&void 0!==i&&i.enable&&(S=null==n||null===(r=n.series)||void 0===r?void 0:r.id),w=[],k=0,p=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=u.getPlayer(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());w.includes(k)||(e==k?(w.push(e),O(a,n,l)):e>k&&(k=e+l))})),a.one("ended",(function(){O(a,n,l,!0)})))}(n,h,null==d||null===(f=d.video)||void 0===f||null===(g=f.gist)||void 0===g?void 0:g.id)}if(null!=t&&null!==(o=t.analytics)&&void 0!==o&&o.muxKey&&null!=m&&m.mux){var P,j,T,I,E,C,D=(null===(P=e.getCurrentVideo())||void 0===P?void 0:P.video)||(null==v?void 0:v.video),x=null==D?void 0:D.gist,R={env_key:null==t||null===(j=t.analytics)||void 0===j?void 0:j.muxKey,player_name:"vl-web-player",player_version:null===(T=window)||void 0===T?void 0:T.vl_player_version,video_id:null==x?void 0:x.id,video_title:null==x?void 0:x.title,video_series:null==D||null===(I=D.series)||void 0===I?void 0:I.title,video_stream_type:null!=D&&null!==(E=D.streamingInfo)&&void 0!==E&&E.isLiveStream?"live":"video",viewer_user_id:null==t||null===(C=t.analytics)||void 0===C?void 0:C.userId};m.mux({debug:!1,data:R})}})),m.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];m.trigger("subtitlechanged",n)})),m.on("subtitlechanged",(function(e,n){var t,i,r,o,l,a,s,u,c,d,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===(r=i.framework)||void 0===r||null===(o=r.CastContext)||void 0===o||null===(l=o.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===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===p){var m,y=f.getMediaSession(),g=y.media.tracks.filter((function(e){return"TEXT"==e.type}));m=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}})),m.tech_.on("retryplaylist",(function(){h&&te(v,n)})),m.on("error",(function(){var t,r;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?te(v,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),i.reject({status:!1,msg:(null==m||null===(r=m.error())||void 0===r?void 0:r.message)||"Some error occured",response:v}))})),m.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var i,r,o,l=null===(i=e.getCurrentVideo())||void 0===i||null===(r=i.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.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(){m.currentTime(u)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}})),m.on("volumechange",(function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),m.on("chromecastDisconnected",(function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}})))};function ae(e){return se.apply(this,arguments)}function se(){return(se=t(i.mark((function e(n){var t,r,o,l,a,s,u,c,d,v,p,f,m;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.id_,o=this.el().querySelector("video")||this.el(),l=window.player=null===(t=window.dashjs)||void 0===t?void 0:t.MediaPlayer().create(),a=(null==n?void 0:n.keySystems)&&(null==n||null===(r=n.keySystems)||void 0===r?void 0:r["com.widevine.alpha"]),s=null==n?void 0:n.src,l&&o?(l.initialize(o,s,!0),a&&(v=null===(u=n.keySystems["com.widevine.alpha"])||void 0===u?void 0:u.url,p=null===(c=n.keySystems["com.microsoft.playready"])||void 0===c?void 0:c.url,f=null===(d=n.keySystems["com.widevine.alpha"])||void 0===d?void 0:d.licenseHeaders["X-AxDRM-Message"],m={"com.widevine.alpha":{serverURL:v,httpRequestHeaders:{"X-AxDRM-Message":f},audioRobustness:"SW_SECURE_CRYPTO",videoRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{serverURL:p,httpRequestHeaders:{"X-AxDRM-Message":f},audioRobustness:"SW_SECURE_CRYPTO",videoRobustness:"SW_SECURE_CRYPTO"}},l.setProtectionData(m))):console.error("Cannot initialise dash player");case 6:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function ue(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 ce(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ue(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var de,ve=function(o,a,s,d){var v,p,f,m,y,g,h,b,w,k,S,O,P,j,T,I,C,D,x,R,V,N,A,L,q,M,H,U,B,W,F,z,G=a.res,Y=void 0===G?null:G,K=a.sres,J=void 0===K?null:K,X=null!=s&&s.chromecastReceiverId?["chromecast","html5"]:["html5"],Q=(null===(v=Y)||void 0===v?void 0:v.contentType)||"video",Z=u.impolicy16x9(null===(p=Y)||void 0===p||null===(f=p[Q])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||u.impolicy16x9(null===(y=Y)||void 0===y||null===(g=y[Q])||void 0===g||null===(h=g.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),ne=(null===(w=Y)||void 0===w||null===(k=w[Q])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,te=(null===(O=Y)||void 0===O||null===(P=O[Q])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStreafm)||!1,ie=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(C=I.preRoll)||void 0===C||null===(D=C.adTags)||void 0===D||null===(x=D.web)||void 0===x?void 0:x.active)&&(null===(R=Y)||void 0===R||null===(V=R.ads)||void 0===V||null===(N=V.preRoll)||void 0===N||null===(A=N.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.url),re=(null===(q=Y=ce(ce({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource}))||void 0===q||null===(M=q.video)||void 0===M?void 0:M.isSSAIEnabled)||!1,oe="Chrome"==c.detectBrowser()&&(re||(null===(H=["dirtvision"])||void 0===H?void 0:H.includes(null===(U=Y)||void 0===U?void 0:U.siteName)));console.log("Utilising Dash Playback");var se=(z={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:ne},n(z,"autoplay",null==s?void 0:s.autoplay),n(z,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ie),n(z,"loop",(null==s?void 0:s.loop)||!1),n(z,"audioPosterMode",null==s?void 0:s.audioPosterMode),n(z,"html5",ce(ce({vhs:ce(ce({liveRangeSafeTimeDelta:10,useDevicePixelRatio:!0,experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==s||null===(B=s.customData)||void 0===B?void 0:B.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),nativeTextTracks:!("Safari"!=c.detectBrowser()&&!oe)},0==(null==s||null===(W=s.customData)||void 0===W?void 0:W.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(F=s.customData)||void 0===F?void 0:F.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",Z),n(z,"techOrder",X),n(z,"chromecast",{requestCustomDataFn:function(e){var n=getPlayer(o),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,r,o,l,a,s,u,c,d,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m;f.isDrmEnabled=!0;var y=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,g=null==y?void 0:y.url;f.licenseUrl=g;var h=null==y?void 0:y.licenseHeaders["X-AxDRM-Message"];f.licenseToken=h}var b=(null==e||null===(i=e[p])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.contentType)||"VIDEO";f.contentType=b;var w=null==e||null===(o=e[p])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;f.duration=w;var k=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=k;var S=null==e||null===(u=e[p])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return f.mediaImage=S,f.subTitles=t,f.DVR=(null==e||null===(d=e[p])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(Y,e,t)}}),z);if(!r.getPlayers()[o])var ue=r(o,se,function(){var n=t(i.mark((function n(){var t,a,u,c,v,p,f,m,y,g,h,b,w,k,S,O,P,j,T,I,C,D;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ue),console.log(r.VERSION),console.log(r.getPlugins()),n.next=5,_(s,Y);case 5:k=null===(t=Y)||void 0===t||null===(a=t[Q])||void 0===a||null===(u=a.liveDetails)||void 0===u?void 0:u.startOverTime,te&&d.resolve(ce({status:!0,msg:"Player Initialised"},J?{seriesResponse:J,response:Y}:{response:Y})),e.inititateBeacon(o,null==s?void 0:s.analyticsCb),$(o,s),/Android/i.test(navigator.userAgent)&&(r.options.vhs.overrideNative=!0),ne&&E(o,k),!ie||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(o,ie,Y),S=e.getSource(Y,o),console.log(S),null!=s&&s.nearestClusterUrl&&(S=e.getUpdatedClusterSource(S,s.nearestClusterUrl)),oe&&null!==(v=S)&&void 0!==v&&null!==(p=v.src)&&void 0!==p&&p.includes(".mpd")?ae.call(this,S):S?e.loadVideo(o,S):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),e.handleError(o,"Incompatible / Missing Source")),((null===(f=Y)||void 0===f||null===(m=f[Q])||void 0===m||null===(y=m.contentDetails)||void 0===y||null===(g=y.closedCaptions)||void 0===g?void 0:g.length)>0||(null===(h=Y)||void 0===h||null===(b=h[Q])||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0)&&(D=(null===(P=Y)||void 0===P||null===(j=P[Q])||void 0===j||null===(T=j.contentDetails)||void 0===T?void 0:T.closedCaptions)||(null===(I=Y)||void 0===I||null===(C=I[Q])||void 0===C?void 0:C.closedCaptions),O=D.filter((function(e){return"VTT"===e.format})),l.addCaptions(o,O)),null!=s&&s.disableControls?e.disableControls(o):ee(o,ce(ce(ce({},s),se),{},{liveVideo:te,isDvrEnabled:ne,res:Y,sres:J})),le(o,ce(ce(ce({},s),se),{},{liveVideo:te}),d,{res:Y,sres:J});case 19:case"end":return n.stop()}}),n,this)})));return function(){return n.apply(this,arguments)}}())};function pe(e,n){return fe.apply(this,arguments)}function fe(){return(fe=t(i.mark((function n(t,r){var o,l,a,s,u,c;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=r.resolve,l=r.reject,a=null==t?void 0:t.videoId,s=null==t?void 0:t.playerId,u=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:c=n.sent,e.getVideoDetails(a,c).then((function(n){var i,r,d,v;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(d=r.gist)||void 0===d?void 0:d.contentType,e.setCurrentVideo(null==n?void 0:n.data);var p,f=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!u)if((null===(p=t.watchHistory)||void 0===p?void 0:p.saveOffline)||!1){var m,y,g,h=T((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,t.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;f.contentType="video",ve(s,{res:f},t,{resolve:o,reject:l})}else e.getVideoInfo(a,c).then((function(e){var n,i,r,o,l,a;null!==(n=window)&&void 0!==n&&null!==(i=n.watchHistory)&&void 0!==i&&i.cb&&(null===(r=window)||void 0===r||null===(o=r.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,f.contentType="video"})).catch((function(e){var n,t,i,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(e))})).finally((function(){ve(s,{res:f},t,{resolve:o,reject:l})}));else ve(s,{res:f},t,{resolve:o,reject:l})})).catch((function(n){e.initiateErrorHandling(n,s,l,a)}));case 8:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function me(e,n){return ye.apply(this,arguments)}function ye(){return(ye=t(i.mark((function n(t,r){var o,l,a,s,u;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=r.resolve,l=r.reject,n.next=3,e.getToken();case 3:a=n.sent,s=null==t?void 0:t.playerId,u=null==t?void 0:t.epg,e.getLinearChannelDetails(u,a).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==u?void 0:u.channelId,ve(s,{res:n},t,{resolve:o,reject:l})})).catch((function(n){e.initiateErrorHandling(n,s,l,videoId)}));case 7:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function ge(e,n){return he.apply(this,arguments)}function he(){return(he=t(i.mark((function n(t,r){var o,l,a,s,u,c,d;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=r.resolve,a=r.reject,n.next=3,e.getToken();case 3:s=n.sent,u=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(d,s).then((function(n){var i,r,o,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(i=v[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(o=r[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(d,s),e.getVideoDetails(p,s).then((function(n){var i,r,o;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),ve(u,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,reject:a})})).catch((function(n){e.initiateErrorHandling(n,u,a,videoId)}))})).catch((function(n){e.initiateErrorHandling(n,u,a)}));case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function be(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 we(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?be(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:o.onTimeUpdate,getVideoDuration:o.getVideoDuration,onVideoEnded:o.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var r=t(i.mark((function t(r,o){var l,a,s,c,v,p,m,y,g,h,b,w,k,S,O,P,j,T,I,E,C,D,x,R,V,A;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,S=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,P=(null==n?void 0:n.streamingInfo)||!1,window.videoId=S,j=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",j),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),j&&!e.isTokenExpired(j)){t.next=16;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),t.abrupt("return");case 16:de=JSON.parse(atob(j.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(s=de)||void 0===s||!s.anonymousId),n.siteOwner=(null===(c=de)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=de)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(p=de)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,T=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(m=n.series)&&void 0!==m&&m.enable?null:null==n?void 0:n.chromecastReceiverId,I=(null==n||null===(y=n.analytics)||void 0===y?void 0:y.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(g=n.customData)||void 0===g?void 0:g.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!u.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,N(n);case 33:I&&f("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return e.runGtag(I)})).catch((function(e){})),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(T)))&&C.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b?(x={directPlaybackUrl:b,id:D="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(D,j).then((function(e){var t=(null==e?void 0:e.data)||{};ve(T,{res:we(we({},t),x)},n,{resolve:r,reject:o})})).catch((function(n){e.initiateErrorHandling(n,T,o,D)})):ve(T,{res:x},n,{resolve:r,reject:o})):P?(V=null==n||null===(R=n.streamingInfo)||void 0===R?void 0:R.videoAssets,A={directPlaybackUrl:null==V?void 0:V.url,id:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"},ve(T,{res:A},n,{resolve:r,reject:o})):O?ge(n,{resolve:r,reject:o}):k?me(n,{resolve:r,reject:o}):pe(n,{resolve:r,reject:o});case 37:case"end":return t.stop()}}),t)})));return function(e,n){return r.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:u.getPlayer,play:e.play,pause:e.pause,detectBrowser:c.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:o.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:y,getVolume:g,disableControls:e.disableControls,setPlaybackSpeed:o.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./generic-4b7bb87d.js"),n=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),r=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("./util-6edeeb8a.js"),l=require("./captions-fbd6fefb.js"),a=require("./renditions-b41243b6.js"),u=require("./resolution-719c85a4.js"),s=require("./skin-34fbc337.js"),c=require("./browser-77c57718.js"),d=require("./localisation-56e0a999.js"),v=require("@babel/runtime/helpers/typeof");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 r=document.createElement("script");r.async=!0,r.src=e,r.onload=function(){n()},r.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(r)}}))},m=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},g=function(e,n,t){var r=s.getPlayer(e);if(r)if(n>=0&&n<=100){r.muted()&&r.muted(!1);var i=parseFloat(n)/100;r.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,"'")})},y=function(e){var n=s.getPlayer(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function h(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var w=[],k=0,O=null;function S(n,t,r){var i,o,l,a,u,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==t||null===(i=t.watchHistory)||void 0===i||i.apiVersion;var c=null==t||null===(o=t.watchHistory)||void 0===o?void 0:o.profileId,d=Math.floor(n.currentTime()),v=Math.floor(n.duration());null==t||null===(l=t.watchHistory)||void 0===l||l.xapiKey;var f=(null==t||null===(a=t.video)||void 0===a?void 0:a.originalObjectId)||null,m=(null==t||null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,g=Math.floor(n.currentTime()),y=s?100:Math.floor(d/v*100),h={};m?j(h={completed:s,watchedTime:g,watchedPercentage:y},c,t.siteOwner):(h=b(b({videoId:p,watchedTime:g,watchedPercentage:y,doneWatching:s,profileId:c},O&&{seriesId:O}),f&&{originalObjectId:f}),e.saveWatchHistory(h).then((function(e){})).catch((function(e){}))),k=d+r}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function j(t,r,i){var o=r?"watchhistory-data-".concat(r):"watchhistory-data-guest-".concat(i),l=P(o),a=(new Date).getTime(),u=e.getCurrentVideo(),s=(null==u?void 0:u.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,t){return b(b({},e),{},n({},t,s[t]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===p}));d<0?l.push(b(b({content:c},t),{},{addedDate:a,updateDate:a})):l[d]=b(b(b({},l[d]),t),{},{updateDate:a}),localStorage.setItem("".concat(o),JSON.stringify(l))}function T(e,n,t){var r=P(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return r&&Array.isArray(r)&&(i=r.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}var I=function(){var e=t(r.mark((function e(n){var t,o,l,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=s.getPlayer(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=20;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return a=e.sent,e.prev=5,e.next=8,f("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,a.default(i),e.finish(13);case 16:null!==(l=window)&&void 0!==l&&l.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=21;break;case 20:console.log("Chromecast plugin is not available");case 21:null!=n&&n.airplay&&"Safari"==c.detectBrowser()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 22:case"end":return e.stop()}}),e,null,[[5,10,13,16]])})));return function(n){return e.apply(this,arguments)}}(),E=function(e,n){var t=s.getPlayer(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,r,o,l,a,u=this.el(),s=i.dom.getPointerPosition(u,n).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var c=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(o=r.framework)||void 0===o||null===(l=o.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(c),c&&"CONNECTED"===d){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*s,v.seek()}}))};var C=function(){var e=t(r.mark((function e(){return r.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)}}(),D=function(){var e=t(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=t(r.mark((function e(){var n;return r.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)}}(),R=function(){var e=t(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./index-3f0e537b.js")}));case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=t(r.mark((function e(){return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.resolve().then((function(){return require("./videojs_contrib_dash-5ec0e9bd.js")}));case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),V=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:C,loadEMELibrary:D,loadMuxPlugin:x,loadDvrSeekbar:R,loadContribDash:N});function A(e){return L.apply(this,arguments)}function L(){return(L=t(r.mark((function e(n){var t;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,C();case 3:t&&"Safari"==c.detectBrowser()&&Promise.resolve().then((function(){return V})).then((function(e){e.importAirplay()}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,n){return q.apply(this,arguments)}function q(){return(q=t(r.mark((function e(n,t){var i,o,l,a,u,s,d,v,p;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=(null==t?void 0:t.contentType)||"video",d=null==t||null===(i=t[s])||void 0===i?void 0:i.drmEnabled,null==t||null===(o=t[s])||void 0===o||null===(l=o.liveDetails)||void 0===l||l.isDvrEnabled,null==n||n.showPositiveSeekbar,v=(null==t||null===(a=t.video)||void 0===a?void 0:a.isSSAIEnabled)||!1,"Chrome"==c.detectBrowser()&&(v||null===(u=["dirtvision"])||void 0===u||u.includes(null==t?void 0:t.siteName)),e.prev=6,e.next=9,Promise.allSettled([d?"Safari"==c.detectBrowser()?D():"caliente"!=(null===(p=window)||void 0===p?void 0:p.siteName)?N():D():null,I(n)]);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:case"end":return e.stop()}}),e,null,[[6,11]])})))).apply(this,arguments)}function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var B=new Set,U=null,F=function(n,t,r){var i,o,l,a,u,s,c,d={},v=(null==n?void 0:n.contentType)||"video";d["c3.cm.id"]=(null===(i=n[v])||void 0===i?void 0:i.id)||"Null",d["c3.cm.contentType"]=X(n),d[null==r||null===(o=r.Constants)||void 0===o?void 0:o.IS_LIVE]=!(null==n||!n.linearchannel),d[null==r||null===(l=r.Constants)||void 0===l?void 0:l.STREAM_URL]=t.currentSrc(),d[null==r||null===(a=r.Constants)||void 0===a?void 0:a.VIEWER_ID]="undefined"===e.getUserId()?"NULL":e.getUserId(),d["c3.cm.categoryType"]=K(n),d["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"}}(),d.DRMEnabled=(null===(u=n[v])||void 0===u?void 0:u.drmEnabled)||"None",d.DAIStream=null!==(s=n[v])&&void 0!==s&&null!==(c=s.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",d[r.Constants.DEFAULT_RESOURCE]="AKAMAI",d["c3.cm.brand"]="NULL",d.CDVREnabled=J(n),d["c3.cm.genreList"]=z(n),d["c3.cm.genre"]=W(n),d["c3.cm.channel"]=G(n);var p=Q(e.getCurrentSeries(),n);return d=M(M({},d),p)},W=function(e){var n,t,r,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(r=t.primaryCategory)||void 0===r?void 0:r.title)||"Null"},z=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map((function(e){return null==e?void 0:e.title})).join(", ")||"Null"},G=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video";return"video"===r?"VOD":(null==e||null===(n=e[r])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},K=function(e){return(null==e?void 0:e.contentType)||"null"},J=function(e){var n,t,r=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[r])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},Y=function(e,n){var t,r,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var o=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[o])||void 0===t||null===(r=t.gist)||void 0===r?void 0:r.title)||"Null";return"".concat(l)},X=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Q=function(n,t){var r,i,o,l,a,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!n||!t||null!=t&&t.linearchannel)return u;var s=e.getSeasonNumber(),c=e.getEpisodeNumber();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==s?void 0:s.toString())||"Null",u["c3.cm.showTitle"]=(null==n||null===(o=n[s-1])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[c-1])||void 0===a?void 0:a.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},Z=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"}},$=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},ee=function(){var n=t(r.mark((function n(t,i){var o,l,a,u,c,d,v,p,f,m;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(o=(null==i?void 0:i.convivaConfig)||{},l=o.trackConvivaPlayerEvent,a=o.paymentHandler,u=o.tveProvider,c=o.enable,d=o.appName,v=(i||{}).token,c){n.next=4;break}return n.abrupt("return");case 4:if(p=s.getPlayer(t),"function"==typeof(f=l)){n.next=8;break}return n.abrupt("return");case 8:return n.next=10,f("getConvivaObject");case 10:if(m=n.sent){n.next=13;break}return n.abrupt("return");case 13:p.ready((function(){var e=p.tech(!0),n=!1;e.on("keysessioncreated",(function(e){n=!0;var t=e.target;if(t&&t.keySystem){var r=Z(t.keySystem);f("contentInfo",{DRMEnabled:r})}else f("contentInfo",{DRMEnabled:"None"})})),n||f("contentInfo",{DRMEnabled:"None"})})),p.on("loadstart",(function(){var n,t;U&&U!==p.currentSrc()&&f("playbackEnded"),f("setPlayer",p),B.clear(),U=p.currentSrc();var r=$(p.currentType()),o=e.getCurrentVideo(),l=F(o,p,m);l[null==m||null===(n=m.Constants)||void 0===n?void 0:n.PLAYER_NAME]=d||"WEB",l[null==m||null===(t=m.Constants)||void 0===t?void 0:t.ASSET_NAME]=Y(o,i),l.authToken=v||"NULL",l.streamType=r,l.D2CType=a||"NONE",l.subscriberType=u||(a?"D2C":"FREE"),l["c3.cm.affiliate"]=u||"NULL",f("contentInfo",l)})),p.on("loadedmetadata",(function(){var e,n=p.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),f("contentInfo",{screenResolution:e})})),p.on("play",(function(){B.has(p.currentSrc())||(B.add(p.currentSrc()),f("playbackStarted",null))})),p.on("ended",(function(){B.has(p.currentSrc())&&B.delete(p.currentSrc()),f("playbackEnded")})),p.on("ads-loader",(function(e){e&&null!=e&&e.adsLoader&&f("initAdSensor",{player:p,adsLoader:null==e?void 0:e.adsLoader})})),p.on("dispose",(function(){null==B||B.clear(),f("playbackEnded")}));case 20:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),ne=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-81af0a5e.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-131ddc1d.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-8644239a.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-a6410bc4.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-06dcc3fb.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-74976452.js")})).then((function(t){t.initialiseSkin(e,n)}))},te=!1,re=function(n,t){var r,i,o=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(r=n[o])||void 0===r||null===(i=r.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!te){var l=ie(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),te=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ie(e,n,t){if(Array.isArray(e))return e.map((function(e){return ie(e,n,t)}));if(null!==e&&"object"===v(e)){var r={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?r[i]=e[t]:i===t&&void 0!==e[n]?r[i]=e[n]:r[i]=ie(e[i],n,t)})),r}return e}function oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var ae=function(n,t,r,i){var o,a,u,d,v=i.res,f=i.sres,m=s.getPlayer(n),y=(null==v?void 0:v.contentType)||"video",h=(null==v||null===(o=v[y])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==v||null===(u=v[y])||void 0===u||null===(d=u.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;e.setCurrentVideo(v),m&&(m.on("loadstart",(function(){h?r.resolve({status:!0,msg:"Video Loaded",response:v}):r.resolve(le({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:v}:{response:v}))})),m.on("loadeddata",(function(){var r,i,o,a=l.getCaptions(n);if(null==a||a.map((function(e){return l.disableCaptions(n,e.id)})),b&&"Safari"===c.detectBrowser())try{var u;null==m||null===(u=m.liveTracker)||void 0===u||u.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&g(n,sessionStorage.getItem("volume")||"100");var d=e.getCurrentVideo();if(e.clearError(),null!=t&&t.watchHistory&&null!=t&&null!==(r=t.watchHistory)&&void 0!==r&&r.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var f,y,h=le(le({},t),v);!function(e,n,t){var r,i,o;null!=n&&n.series&&null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable&&(O=null==n||null===(i=n.series)||void 0===i?void 0:i.id),w=[],k=0,p=t;var l=(null==n||null===(o=n.watchHistory)||void 0===o?void 0:o.interval)||30,a=s.getPlayer(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());w.includes(k)||(e==k?(w.push(e),S(a,n,l)):e>k&&(k=e+l))})),a.one("ended",(function(){S(a,n,l,!0)})))}(n,h,null==d||null===(f=d.video)||void 0===f||null===(y=f.gist)||void 0===y?void 0:y.id)}if(null!=t&&null!==(o=t.analytics)&&void 0!==o&&o.muxKey&&null!=m&&m.mux){var P,j,T,I,E,C,D=(null===(P=e.getCurrentVideo())||void 0===P?void 0:P.video)||(null==v?void 0:v.video),x=null==D?void 0:D.gist,R={env_key:null==t||null===(j=t.analytics)||void 0===j?void 0:j.muxKey,player_name:"vl-web-player",player_version:null===(T=window)||void 0===T?void 0:T.vl_player_version,video_id:null==x?void 0:x.id,video_title:null==x?void 0:x.title,video_series:null==D||null===(I=D.series)||void 0===I?void 0:I.title,video_stream_type:null!=D&&null!==(E=D.streamingInfo)&&void 0!==E&&E.isLiveStream?"live":"video",viewer_user_id:null==t||null===(C=t.analytics)||void 0===C?void 0:C.userId};m.mux({debug:!1,data:R})}})),m.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];m.trigger("subtitlechanged",n)})),m.on("subtitlechanged",(function(e,n){var t,r,i,o,l,a,u,s,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(r=t.cast)||void 0===r||null===(i=r.framework)||void 0===i||null===(o=i.CastContext)||void 0===o||null===(l=o.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(s=u.framework)||void 0===s||null===(c=s.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.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)}})),m.tech_.on("retryplaylist",(function(){h&&re(v,n)})),m.on("error",(function(){var t,i;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?re(v,n):(e.handleError(n,(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured"),r.reject({status:!1,msg:(null==m||null===(i=m.error())||void 0===i?void 0:i.message)||"Some error occured",response:v}))})),m.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var r,i,o,l=null===(r=e.getCurrentVideo())||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.id,a=e.getSeriesWatchMap(),u=(null==a?void 0:a.get(l))||{t:0,p:0},s=u.t,c=u.p;s&&c<95&&setTimeout((function(){m.currentTime(s)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}})),m.on("volumechange",(function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),m.on("chromecastDisconnected",(function(){if(h){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}})))};function ue(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var ce,de=function(o,a,u,d){var v,p,f,m,g,y,h,b,w,k,O,S,P,j,T,I,C,D,x,R,N,V,A,L,q,H,M,B,U,F,W,z,G=a.res,K=void 0===G?null:G,J=a.sres,Y=void 0===J?null:J,X=null!=u&&u.chromecastReceiverId?["chromecast","html5"]:["html5"],Q=(null===(v=K)||void 0===v?void 0:v.contentType)||"video",Z=s.impolicy16x9(null===(p=K)||void 0===p||null===(f=p[Q])||void 0===f||null===(m=f.gist)||void 0===m?void 0:m.videoImageUrl)||s.impolicy16x9(null===(g=K)||void 0===g||null===(y=g[Q])||void 0===y||null===(h=y.gist)||void 0===h||null===(b=h.imageGist)||void 0===b?void 0:b.r16x9),$=(null===(w=K)||void 0===w||null===(k=w[Q])||void 0===k||null===(O=k.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,te=(null===(S=K)||void 0===S||null===(P=S[Q])||void 0===P||null===(j=P.streamingInfo)||void 0===j?void 0:j.isLiveStreafm)||!1,re=(null===(T=K)||void 0===T||null===(I=T.ads)||void 0===I||null===(C=I.preRoll)||void 0===C||null===(D=C.adTags)||void 0===D||null===(x=D.web)||void 0===x?void 0:x.active)&&(null===(R=K)||void 0===R||null===(N=R.ads)||void 0===N||null===(V=N.preRoll)||void 0===V||null===(A=V.adTags)||void 0===A||null===(L=A.web)||void 0===L?void 0:L.url),ie=(null===(q=K=se(se({},K),{},{audioAssetSource:null==u?void 0:u.audioAssetSource}))||void 0===q||null===(H=q.video)||void 0===H?void 0:H.isSSAIEnabled)||!1;"Chrome"==c.detectBrowser()&&(ie||null===(M=["dirtvision"])||void 0===M||M.includes(null===(B=K)||void 0===B?void 0:B.siteName));var oe=(z={enableSmoothSeeking:!0,controls:0!=(null==u?void 0:u.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==u?void 0:u.muted)||!1,autoplay:(null==u?void 0:u.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==u.skin,liveui:$},n(z,"autoplay",null==u?void 0:u.autoplay),n(z,"normalizeAutoplay",(null==u?void 0:u.autoplay)&&!re),n(z,"loop",(null==u?void 0:u.loop)||!1),n(z,"audioPosterMode",null==u?void 0:u.audioPosterMode),n(z,"html5",se(se({dash:se(se({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:20},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:se(se({liveRangeSafeTimeDelta:10,useDevicePixelRatio:!0,experimentalLLHLS:(null==u?void 0:u.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==u||null===(U=u.customData)||void 0===U?void 0:U.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),nativeTextTracks:!1},0==(null==u||null===(F=u.customData)||void 0===F?void 0:F.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==u||null===(W=u.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),n(z,"poster",Z),n(z,"techOrder",X),n(z,"chromecast",{requestCustomDataFn:function(e){var n=getPlayer(o),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 r,i,o,l,a,u,s,c,d,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m;f.isDrmEnabled=!0;var g=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,y=null==g?void 0:g.url;f.licenseUrl=y;var h=null==g?void 0:g.licenseHeaders["X-AxDRM-Message"];f.licenseToken=h}var b=(null==e||null===(r=e[p])||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=b;var w=null==e||null===(o=e[p])||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.runtime;f.duration=w;var k=null==e||null===(a=e[p])||void 0===a||null===(u=a.gist)||void 0===u?void 0:u.title;f.mediaTitle=k;var O=null==e||null===(s=e[p])||void 0===s||null===(c=s.gist)||void 0===c?void 0:c.videoImageUrl;return f.mediaImage=O,f.subTitles=t,f.DVR=(null==e||null===(d=e[p])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(K,e,t)}}),z);if(!i.getPlayers()[o])var le=i(o,oe,function(){var n=t(r.mark((function n(){var t,a,s,c,v,p,f,m,g,y,h,b,w,k,O,S,P,j,T,I;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(le),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,_(u,K);case 5:b=null===(t=K)||void 0===t||null===(a=t[Q])||void 0===a||null===(s=a.liveDetails)||void 0===s?void 0:s.startOverTime,te&&d.resolve(se({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:K}:{response:K})),e.inititateBeacon(o,null==u?void 0:u.analyticsCb),ee(o,u),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),$&&E(o,b),!re||null!=u&&null!==(c=u.customData)&&void 0!==c&&c.disableAds||e.initialiseAdvertisement(o,re,K),w=e.getSource(K,o),console.log(w),null!=u&&u.nearestClusterUrl&&(w=e.getUpdatedClusterSource(w,u.nearestClusterUrl)),w?e.loadVideo(o,w):(d.reject({status:!1,msg:"Incompatible / Missing Source",response:K}),e.handleError(o,"Incompatible / Missing Source")),((null===(v=K)||void 0===v||null===(p=v[Q])||void 0===p||null===(f=p.contentDetails)||void 0===f||null===(m=f.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(g=K)||void 0===g||null===(y=g[Q])||void 0===y||null===(h=y.closedCaptions)||void 0===h?void 0:h.length)>0)&&(I=(null===(O=K)||void 0===O||null===(S=O[Q])||void 0===S||null===(P=S.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(j=K)||void 0===j||null===(T=j[Q])||void 0===T?void 0:T.closedCaptions),k=I.filter((function(e){return"VTT"===e.format})),l.addCaptions(o,k)),null!=u&&u.disableControls?e.disableControls(o):ne(o,se(se(se({},u),oe),{},{liveVideo:te,isDvrEnabled:$,res:K,sres:Y})),ae(o,se(se(se({},u),oe),{},{liveVideo:te}),d,{res:K,sres:Y});case 19:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function ve(e,n){return pe.apply(this,arguments)}function pe(){return(pe=t(r.mark((function n(t,i){var o,l,a,u,s,c;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=i.resolve,l=i.reject,a=null==t?void 0:t.videoId,u=null==t?void 0:t.playerId,s=!(null==t||!t.anonymousId),n.next=6,e.getToken();case 6:c=n.sent,e.getVideoDetails(a,c).then((function(n){var r,i,d,v;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(d=i.gist)||void 0===d?void 0:d.contentType,e.setCurrentVideo(null==n?void 0:n.data);var p,f=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(v=t.watchHistory)&&void 0!==v&&v.enable&&!s)if((null===(p=t.watchHistory)||void 0===p?void 0:p.saveOffline)||!1){var m,g,y,h=T((null===(m=t.watchHistory)||void 0===m?void 0:m.profileId)||"",a,null==t?void 0:t.siteOwner);if(h&&h.length)t.watchHistoryResumeTime=(null===(g=h[0])||void 0===g?void 0:g.watchedTime)||null,t.watchedPercentage=(null===(y=h[0])||void 0===y?void 0:y.watchedPercentage)||null;f.contentType="video",de(u,{res:f},t,{resolve:o,reject:l})}else e.getVideoInfo(a,c).then((function(e){var n,r,i,o,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,t.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,f.contentType="video"})).catch((function(e){var n,t,r,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(e))})).finally((function(){de(u,{res:f},t,{resolve:o,reject:l})}));else de(u,{res:f},t,{resolve:o,reject:l})})).catch((function(n){e.initiateErrorHandling(n,u,l,a)}));case 8:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function fe(e,n){return me.apply(this,arguments)}function me(){return(me=t(r.mark((function n(t,i){var o,l,a,u,s;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=i.resolve,l=i.reject,n.next=3,e.getToken();case 3:a=n.sent,u=null==t?void 0:t.playerId,s=null==t?void 0:t.epg,e.getLinearChannelDetails(s,a).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==s?void 0:s.channelId,de(u,{res:n},t,{resolve:o,reject:l})})).catch((function(n){e.initiateErrorHandling(n,u,l,videoId)}));case 7:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function ge(e,n){return ye.apply(this,arguments)}function ye(){return(ye=t(r.mark((function n(t,i){var o,l,a,u,s,c,d;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=i.resolve,a=i.reject,n.next=3,e.getToken();case 3:u=n.sent,s=null==t?void 0:t.playerId,c=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(c)),d=null==t||null===(o=t.series)||void 0===o?void 0:o.id,e.getSeriesDetails(d,u).then((function(n){var r,i,o,c=n.data,v=n.data.seasons;e.setCurrentSeries(v);var p=videoId||(null==v||null===(r=v[0])||void 0===r||null===(i=r.episodes)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.id);e.createSeriesWatchMap(d,u),e.getVideoDetails(p,u).then((function(n){var r,i,o;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(i=r.video)||void 0===i||null===(o=i.gist)||void 0===o?void 0:o.contentType,e.setCurrentVideo(n.data),de(s,{res:null==n?void 0:n.data,sres:c},t,{resolve:l,reject:a})})).catch((function(n){e.initiateErrorHandling(n,s,a,videoId)}))})).catch((function(n){e.initiateErrorHandling(n,s,a)}));case 9:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:o.onTimeUpdate,getVideoDuration:o.getVideoDuration,onVideoEnded:o.onVideoEnded,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=t(r.mark((function t(i,o){var l,a,u,c,v,p,m,g,y,h,b,w,k,O,S,P,j,T,I,E,C,D,x,R,N,V;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.isPlayerInitialised(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(b=(null==n?void 0:n.videoSourceUrl)||!1,w=null==n?void 0:n.asat,k=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,O=null==n?void 0:n.videoId,S=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,P=(null==n?void 0:n.streamingInfo)||!1,window.videoId=O,j=null==n?void 0:n.token,!e.token_authentication_enabled(n)){t.next=17;break}if(sessionStorage.setItem("vlp_token",j),e.refreshTokenManager().set(null==n?void 0:n.refreshToken),j&&!e.isTokenExpired(j)){t.next=16;break}return o({status:!1,msg:"".concat(j?"Token is expired !":"Missing Authorization Token"),response:{token:j}}),t.abrupt("return");case 16:ce=JSON.parse(atob(j.split(".")[1]));case 17:return n.isAnonymousUser=!(null===(u=ce)||void 0===u||!u.anonymousId),n.siteOwner=(null===(c=ce)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=ce)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(p=ce)||void 0===p?void 0:p.userId),window.watchHistory=n.watchHistory||null,T=null==n?void 0:n.playerId,n.chromecastReceiverId=null!=n&&null!==(m=n.series)&&void 0!==m&&m.enable?null:null==n?void 0:n.chromecastReceiverId,I=(null==n||null===(g=n.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==n?void 0:n.errors)&&(window.customErrors=E),window.customData=null==n?void 0:n.customData,d.setLocalisation(null==n||null===(y=n.customData)||void 0===y?void 0:y.localisation),e.baseUrlManager.set(n.apiBaseUrl),null!=n&&n.skin&&!s.isNotAValidSkin(n.skin)||(n.skin="VL_ONE"),t.next=33,A(n);case 33:I&&f("https://www.googletagmanager.com/gtag/js?id=".concat(I)).then((function(){return e.runGtag(I)})).catch((function(e){})),(C=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(T)))&&C.addEventListener("contextmenu",(function(e){return e.preventDefault()})),b?(x={directPlaybackUrl:b,id:D="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},w?e.getVideoDetails(D,j).then((function(e){var t=(null==e?void 0:e.data)||{};de(T,{res:be(be({},t),x)},n,{resolve:i,reject:o})})).catch((function(n){e.initiateErrorHandling(n,T,o,D)})):de(T,{res:x},n,{resolve:i,reject:o})):P?(N=null==n||null===(R=n.streamingInfo)||void 0===R?void 0:R.videoAssets,V={directPlaybackUrl:null==N?void 0:N.url,id:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"},de(T,{res:V},n,{resolve:i,reject:o})):S?ge(n,{resolve:i,reject:o}):k?fe(n,{resolve:i,reject:o}):ve(n,{resolve:i,reject:o});case 37:case"end":return t.stop()}}),t)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:s.getPlayer,play:e.play,pause:e.pause,detectBrowser:c.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:o.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:l.enableCaptions,disableCaptions:l.disableCaptions,getCaptions:l.getCaptions,playSelectedResolution:u.playSelectedResolution,getSource:e.getSource,setVolume:g,getVolume:y,disableControls:e.disableControls,setPlaybackSpeed:o.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-4b7bb87d.js"),r=require("./skin-34fbc337.js");var l,n=(l=!0,{enable:function(){l=!0},disable:function(){l=!1},get enabled(){return l}});exports.initialiseKeyboardEvents=function(l,i){var a,t,o,c=r.getPlayer(l),u=null==c||null===(a=c.controlBar)||void 0===a||null===(t=a.playToggle)||void 0===t?void 0:t.el_,s=document.getElementsByTagName("video")[0];null===(o=document)||void 0===o||o.addEventListener("keydown",(function(r){var a;if(n.enabled&&"input"!=r.target.localName){var t=r.key,o=!0===i.liveVideo||!0===i.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(t)&&(r.preventDefault(),null==s||s.focus()),t){case" ":null==u||u.click();break;case"m":case"M":c.muted(!c.muted());break;case"f":case"F":null===(a=document.querySelector(".vjs-fullscreen-control"))||void 0===a||a.click();break;case"ArrowLeft":o&&!1===i.liveui||e.rewind(l,10);break;case"ArrowRight":o||e.skip(l,10)}}}),!0)},exports.keyboardManager=n;
|
|
@@ -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-1a3febef.js"),
|
|
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-1a3febef.js"),i=require("./generic-4b7bb87d.js"),l=require("./skin-34fbc337.js");function c(e){var t=d();return function(){var r,s=a(e);if(t){var o=a(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return n(this,r)}}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-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var u=s.getComponent("Component"),m=function(n){r(d,u);var a=c(d);function d(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=a.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(d,[{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")?(l.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var 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",i.load(t.playerId,t.streams[e].id).then((function(e){i.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),l.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")}))}}]),d}();exports.default=m;
|
|
@@ -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-1a3febef.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-1a3febef.js"),i=require("./generic-4b7bb87d.js"),l=require("./skin-34fbc337.js");function c(e){var t=d();return function(){var r,s=n(e);if(t){var o=n(this).constructor;r=Reflect.construct(s,arguments,o)}else r=s.apply(this,arguments);return a(this,r)}}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-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var u=s.getComponent("Component"),m=function(a){r(d,u);var n=c(d);function d(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=n.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(d,[{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-1efdbdb9.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)}}]),d}();exports.default=m;
|
|
@@ -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-1a3febef.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-1a3febef.js"),s=require("./generic-4b7bb87d.js"),a=require("./skin-34fbc337.js");function d(e){var n=u();return function(){var t,o=i(e);if(n){var l=i(this).constructor;t=Reflect.construct(o,arguments,l)}else t=o.apply(this,arguments);return r(this,t)}}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-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var c=o.getComponent("Component"),p=function(r){t(s,c);var i=d(s);function s(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(t=i.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(s,[{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")}))}}]),s}(),v=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},m=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}},f=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=p,exports.initaliseFunctionality=function(e,n){var t=v(e,n.video.gist.id),r=f(e[t],n.video.gist.id),i=m(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-1a3febef.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-1a3febef.js"),r=require("./generic-4b7bb87d.js"),c=require("./autoNextVideo-58bc1a2f.js"),d=require("./skin-34fbc337.js");function u(e){var t=p();return function(){var n,l=a(e);if(t){var o=a(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return i(this,n)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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-fbd6fefb.js"),require("./util-6edeeb8a.js");var m=o.getComponent("Component"),v=function(i){l(p,m);var a=u(p);function p(e){var n,l,i,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,p),(o=a.call(this,e,s)).playerId=s.playerId,o.seriesData=s.sres,o.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,o.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,o.autoNext=(null==s||null===(i=s.playlist)||void 0===i?void 0:i.autoNext)||!1,o.currentVideoData=s.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&c.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb}),o}return n(p,[{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")}}))}}]),p}();exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=require("./skin-34fbc337.js");exports.getRenditions=function(i){var n,e=l.getPlayer(i),t=[];if((null==e||null===(n=e.tech_)||void 0===n?void 0:n.vhs)||!1){var o,d,u=null==e||null===(o=e.tech_)||void 0===o||null===(d=o.vhs)||void 0===d?void 0:d.representations();(null==u?void 0:u.length)>0&&(t=null==u?void 0:u.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var v,r,h=null==e||null===(v=e.dash)||void 0===v||null===(r=v.mediaPlayer)||void 0===r?void 0:r.getBitrateInfoListFor("video");(null==h?void 0:h.length)>0&&(t=null==h?void 0:h.sort((function(l,i){return i.height-l.height})))}return t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-4b7bb87d.js"),u=require("./icons-1a3febef.js"),p=require("./skin-34fbc337.js");require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(e){var i=f();return function(){var t,n=a(e);if(i){var s=a(this).constructor;t=Reflect.construct(n,arguments,s)}else t=n.apply(this,arguments);return r(this,t)}}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}var m,g=c.getComponent("Component"),b=function(e){s(a,g);var r=h(a);function a(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,a),t=r.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,m=s.playerId;var l=t.el();return C(l,t.seriesData),t.loadCSS(),t}return t(a,[{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)}))}}]),a}();function y(){return(y=e(l.mark((function e(i,t,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(m),v(m),d.load(m,t).then((function(e){d.setCurrentVideo(e.response),d.play(m)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(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 n=p.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=C,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=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){}))}(n),s.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")}(s,r)}));for(var g=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),v[i].addEventListener("click",(function(){return function(e,i,t,n){return y.apply(this,arguments)}(i,m[i].id,t,u)})),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)},exports.seriesModule=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-1a3febef.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-1a3febef.js"),d=require("./generic-4b7bb87d.js"),c=require("./skin-34fbc337.js"),u=require("./autoNextVideo-58bc1a2f.js");function v(e){var t=p();return function(){var n,s=r(e);if(t){var i=r(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return o(this,n)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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-fbd6fefb.js"),require("./util-6edeeb8a.js");var m=l.getComponent("Component"),h=function(o){i(p,m);var r=v(p);function p(n){var i,o,l,a,c,v,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,p),(v=r.call(this,n,m)).playerId=m.playerId,v.seriesData=m.sres,v.videos=null==m||null===(i=m.sres)||void 0===i?void 0:i.seasons,v.currentVideoData=m.res,v.initialiseStructure(),v.loadCSS(),v.selectedSeason=0,v.cb=null==m||null===(o=m.series)||void 0===o?void 0:o.cb,v.autoPlayNext=(null==m||null===(l=m.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),v.watchMap=d.getSeriesWatchMap(),null!==(a=s(v))&&void 0!==a&&a.autoPlayNext&&null!=m&&null!==(c=m.series)&&void 0!==c&&c.enable){var h,g,f,C,y=null==m||null===(h=m.sres)||void 0===h?void 0:h.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(g=v.options_)||void 0===g||null===(f=g.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:v.playerId,content:b,cb:v.cb,series:null==m?void 0:m.sres})}return v}return n(p,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-e037e14e.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),c.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=c.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),p}();exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-1a3febef.js"),d=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-1a3febef.js"),d=require("./generic-4b7bb87d.js"),c=require("./skin-34fbc337.js"),u=require("./autoNextVideo-58bc1a2f.js");function v(e){var t=p();return function(){var s,n=r(e);if(t){var i=r(this).constructor;s=Reflect.construct(n,arguments,i)}else s=n.apply(this,arguments);return o(this,s)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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-fbd6fefb.js"),require("./util-6edeeb8a.js");var m=l.getComponent("Component"),h=function(o){i(p,m);var r=v(p);function p(s){var i,o,l,a,c,v,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,p),(v=r.call(this,s,m)).playerId=m.playerId,v.seriesData=m.sres,v.videos=null==m||null===(i=m.sres)||void 0===i?void 0:i.seasons,v.currentVideoData=m.res,v.initialiseStructure(),v.loadCSS(),v.selectedSeason=0,v.cb=null==m||null===(o=m.series)||void 0===o?void 0:o.cb,v.autoPlayNext=(null==m||null===(l=m.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),v.watchMap=d.getSeriesWatchMap(),null!==(a=n(v))&&void 0!==a&&a.autoPlayNext&&null!=m&&null!==(c=m.series)&&void 0!==c&&c.enable){var h,f,g,C,y=null==m||null===(h=m.sres)||void 0===h?void 0:h.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(f=v.options_)||void 0===f||null===(g=f.res)||void 0===g||null===(C=g.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:v.playerId,content:b,cb:v.cb,series:null==m?void 0:m.sres})}return v}return s(p,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-68886cd2.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"px"),l.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),s.classList.remove("open");else if("series-selector-back-icon"===i.className){var n=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(n,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(n,i),l.dom.appendContent(n,o),l.dom.appendContent(e,n),l.dom.appendContent(e,r),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=l.dom.createEl("div",{className:"season-container"}),n=function(n){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(n));var r=document.createElement("div");r.className="season - ".concat(n),r.textContent=null===(i=t[n])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==n&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(s,o)},i=0;i<t.length;i++)n(i);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map((function(e){var t,s,i,o,r,l,a,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(i=s.imageGist)||void 0===i?void 0:i.r16x9)||(null===(o=window)||void 0===o||null===(r=o.app_data)||void 0===r||null===(l=r.appcmsMain)||void 0===l||null===(a=l.images)||void 0===a?void 0:a.placeholderCover),watchedPercentage:(null==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var i=function(i){var o,r,a,u,v,p=l.dom.createEl("div",{className:"series-container"}),m=l.dom.createEl("div",{className:"series-section-data",index:i,innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")});l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(r=t[i])||void 0===r?void 0:r.title)||"")}),l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var h=l.dom.createEl("div",{className:"series-section-image"}),f=(null===(a=t[i])||void 0===a?void 0:a.description)||"";(null===(u=f)||void 0===u?void 0:u.length)>170&&(f=f.substr(0,170)+"..."),l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(f||"")});var g=l.dom.createEl("img",{className:"series-image"});g.src="".concat(c.impolicy16x9(null===(v=t[i])||void 0===v?void 0:v.img)),g.alt="Episode ".concat(i+1),l.dom.appendContent(h,g),l.dom.appendContent(p,h),l.dom.appendContent(p,m),l.dom.appendContent(s,p),p.onclick=function(e){var s;e.stopPropagation(),d.setVideoIdxById(null===(s=t[i])||void 0===s?void 0:s.id),d.load(n.playerId,t[i].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},m.onclick=function(t){var s,n,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(s=r.classList)&&void 0!==s&&s.contains("hidden")?(p.style.backgroundColor="#0000007d",null==r||null===(n=r.classList)||void 0===n||n.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),p.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=l.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=c.parseSvgString(a.BackIcon());n.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),p}();exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-1a3febef.js"),d=require("./skin-34fbc337.js"),s=require("./renditions-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),l=require("./icons-1a3febef.js"),d=require("./skin-34fbc337.js"),s=require("./renditions-b41243b6.js"),c=require("./resolution-719c85a4.js"),u=require("./localisation-56e0a999.js");function p(e){var t=v();return function(){var n,a=o(e);if(t){var r=o(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return i(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("./browser-77c57718.js");var h=r.getComponent("Component"),m=function(i){a(v,h);var o=p(v);function v(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,v),(n=o.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.resolutionBitrateMap,n}return n(v,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(n){var a=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(n,a||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),a=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!n||!a)&&n>a}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l.SettingsSvgV2())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./settings-icon-8d364c01.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var a;null!==(a=n.classList)&&void 0!==a&&a.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var i=window.getComputedStyle(a,null).getPropertyValue("height");n.style.height="".concat(i),r.dom.appendContent(t,n),a.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=r.dom.createEl("div",{className:"settings-selector-head"}),a=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(l.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),s=r.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();r.dom.appendContent(s,c);var p=this.createAudioQualityContainer();r.dom.appendContent(s,p),r.dom.appendContent(n,a),r.dom.appendContent(n,i),r.dom.appendContent(e,n),r.dom.appendContent(e,o),r.dom.appendContent(o,s),d.handleDrawerResizing(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=d.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=r.dom.createEl("div",{className:"audio-language-container"}),a=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:u.getLocalisation("audioLanguageText")||"Audio Language"});r.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});r.dom.appendContent(n,a);var i=[].concat(e(s.getRenditions(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),c.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,s,p=document.createElement("label"),v=document.createElement("div"),h=document.createElement("div");h.className="video-quality-bitrate-label",v.className="video-quality-holder",p.className="video-quality-label-container",p.setAttribute("for","quality".concat(e));var m=document.createElement("div");m.className="video-quality - ".concat(e);var g=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),y=document.createTextNode(g),f="".concat(t.isEnhancedBitrate(i[e])?u.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(f);if(h.appendChild(C),m.appendChild(y),(null==i||null===(s=i[e])||void 0===s?void 0:s.height)>=720)for(var b=d.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=b&&b.firstChild;)m.appendChild(b.firstChild);var E=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});E.setAttribute("type","radio"),E.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?c.playSelectedResolution(t.playerId,a,!0):c.playSelectedResolution(t.playerId,a)};var q=document.createElement("span");q.className=f?"check-mark center":"check-mark";var N=d.parseSvgString(l.TickMarkIcon());q.appendChild(N),v.appendChild(E),v.appendChild(q),v.appendChild(m),r.dom.appendContent(p,v),p.appendChild(h),r.dom.appendContent(n,p)},p=0;p<i.length;p++)o(p);return n}}]),v}();exports.default=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-4b7bb87d.js"),r=require("./skin-34fbc337.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(i){var n=r.getPlayer(i),t=document.getElementById("".concat(i));t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(i):e.pause(i)}))},n=function(e){var i=r.getPlayer(e);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){n(e),i(e)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-4b7bb87d.js"),r=require("./skin-34fbc337.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(n){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),i(),function(i){var n=document.getElementById("".concat(i)),t=r.getPlayer(i);n&&n.addEventListener("touchstart",(function(){t.paused()?e.play(i):e.pause(i)}))}(n)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-bbf12d8e.js"),r=require("./skin-34fbc337.js"),n=require("./index-a4968be0.js"),t=require("./browser-77c57718.js");require("videojs-contrib-quality-menu");var o=require("video.js"),a=require("./keyboardShortcuts-2b3e75e4.js"),i=require("./generic-4b7bb87d.js"),l=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/slicedToArray"),d=require("@babel/runtime/helpers/defineProperty"),u=require("@babel/runtime/helpers/asyncToGenerator"),c=require("@babel/runtime/regenerator"),v=require("./icons-1a3febef.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-b41243b6.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-58bc1a2f.js"),require("./util-6edeeb8a.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js");function p(o,a){var i=r.getPlayer(o);i&&(i.on("loadeddata",(function(){var e,i,l,s,d;!function(e){var n=r.getPlayer(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(o),!(null!=a&&null!==(e=a.series)&&void 0!==e&&e.enable||null!==(i=window)&&void 0!==i&&null!==(l=i.app_data)&&void 0!==l&&null!==(s=l.appcmsMain)&&void 0!==s&&null!==(d=s.features)&&void 0!==d&&d.auto_play)||null!=a&&a.liveVideo||n.addNextEpPreview(o,a),null!=a&&a.liveVideo||t.isMobile()||n.initiateTrickplay(o)})),i.one("play",(function(){var r,n,t,a;null!==(r=window)&&void 0!==r&&null!==(n=r.customData)&&void 0!==n&&n.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(t=window)||void 0===t||null===(a=t.customData)||void 0===a?void 0:a.iframeOverlayUrl)})))}function f(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return m(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var t=0,o=function(){};return{s:o,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function m(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function y(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function b(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach((function(r){d(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function h(){return h=u(c.mark((function e(n,t){var o,d,p,m,y,h,g,S,k,j,q,w,C,I,O,T,P,M,x;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x=function(e,t,o){var a=r.getPlayer(n);Math.floor(a.currentTime());var i,l,s,d,u,c,v,p,m,y,b,h,g,S,k=f(t);try{for(k.s();!(i=k.n()).done;)l=void 0,s=void 0,d=void 0,u=void 0,c=void 0,v=void 0,p=void 0,m=void 0,y=void 0,b=void 0,h=void 0,g=void 0,S=void 0,c=i.value,v=c.eventType,p=c.beaconUrls,m=c.startTimeInSeconds,y=c.startTime,b=c.durationInSeconds,h=Math.round(m),g=p[0],S=(null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s||null===(d=s.ads)||void 0===d?void 0:d.adEventHandler)||null,h!=Math.round(a.currentTime())||M.has(y)||(M.set(y,!0),"function"==typeof S&&S({adsData:{eventType:v,startTimeInSeconds:m,startTime:y,durationInSeconds:b,ad:null==e||null===(u=e.ads)||void 0===u?void 0:u[o],adIndex:o}}),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",v,"Fired:".concat(Math.round(a.currentTime())),"AD_POD:",e),fetch(g))}catch(e){k.e(e)}finally{k.f()}},P=function(e){var r=Math.floor(e/60),n=Math.floor(e%60);return"".concat(r,":").concat(n.toString().padStart(2,"0"))},O=function(e){var r={},n=e.split("?")[1];if(!n)return r;var t,o=f(n.split("&"));try{for(o.s();!(t=o.n()).done;){var a=t.value.split("="),i=s(a,2),l=i[0],d=i[1];r[decodeURIComponent(l)]=decodeURIComponent(d||"")}}catch(e){o.e(e)}finally{o.f()}for(var u={},c=0,v=Object.entries(r);c<v.length;c++){var p=s(v[c],2),m=p[0],y=p[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=y;else u[m]=y}return u},o=r.getPlayer(n),d=t.replace("dash","session").replace("master","session"),d=i.replaceMacros(d,n,{}),p=O(d),d=d.split("?")[0],e.next=10,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:b({},p)})});case 10:return m=e.sent,e.next=13,m.json();case 13:y=e.sent,h="https://"+new URL(d).hostname,g=y.trackingUrl,S=y.manifestUrl,k=h+g,j=h+S,console.log("%c TRACKING URL","background: #bdf369; color: #000",k),null!=t&&t.includes(".mpd")?(w=(null==o||null===(q=o.currentSource())||void 0===q?void 0:q.keySystemOptions)||null,i.loadVideo(n,{src:j,type:"application/x-mpegURL",keySystemOptions:w})):(I=(null==o||null===(C=o.currentSource())||void 0===C?void 0:C.keySystems)||null,i.loadVideo(n,{src:j,type:"application/x-mpegURL",keySystems:I})),o.one("loadeddata",(function(){T(k)})),T=function(){var e=u(c.mark((function e(t){var o,i,s,d,u,p,f,m,y,b,h,g,S,k,j,q,w;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return i=e.sent,e.next=5,i.json();case 5:s=e.sent,d=s.avails,u=[],p=r.getPlayer(n),f=p.controlBar.progressControl,m=f.seekBar.el(),d.map((function(e){var r;Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(r=e.ads)||void 0===r?void 0:r.length)>0&&u.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds)})})),u.forEach((function(e){var r=e.markerPositionInSeconds,n=p.duration();if(!(r>n)){var t=r/n*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",m.appendChild(o)}})),y=new Map,b=-1,p.on("timeupdate",r.throttle((function(){var e=Math.floor(p.currentTime());if(e!==b){b=e;for(var r=!1,n=function(){var n=o[t],i=n.startTimeInSeconds,s=n.durationInSeconds,d=n.ads,u=Math.floor(i+s);if(e>=i&&e<=u){r=!0,y.set(i,!0),a.keyboardManager.disable(),f.el().style.visibility="hidden";for(var c=e-i,v=0,p=0,m=0;m<d.length;m++){var b,g=null==d||null===(b=d[m])||void 0===b?void 0:b.durationInSeconds;if(c<v+g){p=m;break}v+=g}var S=d[p],k=c-v,j=Math.max(0,S.durationInSeconds-k),w=Math.round(j);h.style.display="block",q.textContent="".concat(p+1," of ").concat(d.length," • ").concat(P(w));var C=[];return d.forEach((function(e){var r=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression"].includes(e.eventType)}));C.push.apply(C,l(r))})),x(n,C,p),"break"}},t=0,o=u;t<o.length;t++){if("break"===n())break}r||(h.style.display="none",f.el().style.visibility="visible",a.keyboardManager.enable())}}),1e3)),p.on("seeked",(function(){for(var e=null,r=0,n=u;r<n.length;r++){var t=n[r],o=null==p?void 0:p.currentTime(),a=t.startTimeInSeconds,i=t.durationInSeconds;o>Math.floor(a+i)&&!y.has(a)&&(e=a,y.set(a,!0))}e&&(p.currentTime(e),console.log("seeking back to",e),e=null)})),(h=document.createElement("div")).className="ssai-ad-container",(g=document.createElement("div")).className="sponsored-adbox",(S=document.createElement("div")).className="sponsored-text",S.textContent="Sponsored Ad",(k=document.createElement("div")).className="ad-info-icon",j=r.parseSvgString(v.InfoIcon()),k.appendChild(j),g.append(S),g.append(k),(q=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(w=document.createElement("div")).className="ad-visit-advertiser",w.textContent="Visit Advertiser",(null===(o=document.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])&&(w.style.right="8.6rem"),h.append(g),h.append(q),h.append(w),p.el().appendChild(h);case 43:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),M=new Map;case 24:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}var g=function(e,n){var t,a,i,l,s,d,u,c,v,p,f,m,y=r.getPlayer(e),b=(null==n?void 0:n.theme)||{},h=o.dom.$(".vjs-play-progress"),g=o.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(t=window)||void 0===t||null===(a=t.app_data)||void 0===a||null===(i=a.appcmsMain)||void 0===i||null===(l=i.brand)||void 0===l||null===(s=l.cta)||void 0===s||null===(d=s.primary)||void 0===d?void 0:d.backgroundColor)),h&&(h.style.background="".concat(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(f=p.cta)||void 0===f||null===(m=f.primary)||void 0===m?void 0:m.backgroundColor));var S=y.getChild("BigPlayButton")||null;(null==b?void 0:b.progressBarColor)&&h&&(h.style.background=b.progressBarColor),(null==b?void 0:b.playBtnBgColor)&&S&&(S.el().style.background=b.playBtnBgColor),(null==b?void 0:b.playBtnColor)&&g&&(g.style.color=b.playBtnColor),(null==b?void 0:b.playBtnType)&&("square"==(null==b?void 0:b.playBtnType)?S.el().style.borderRadius=".3em":S.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(t,o){r.getPlayer(t).addClass("skin_vlone"),p(t,o),function(r,t){var o,l,s,d,u,c,v=null==t||null===(o=t.res)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.isSSAIEnabled,p=i.getSource(null==t?void 0:t.res,r),f=p.src;(null==t||null===(s=t.relatedVideos)||void 0===s||null===(d=s.content)||void 0===d?void 0:d.length)>0&&e.addVideoSelector(r,null==t?void 0:t.relatedVideos);null!=t&&null!==(u=t.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(r,t);(null==t||null===(c=t.streams)||void 0===c?void 0:c.length)>1&&e.addMulticamSelector(r,null==t?void 0:t.streams);n.addTVProviderImage(r,t),a.initialiseKeyboardEvents(r,t),v&&function(e,r){h.apply(this,arguments)}(r,f)}(t,o),g(t,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-bbf12d8e.js"),r=require("./keyboardShortcuts-2b3e75e4.js"),i=require("./icons-1a3febef.js"),n=require("./skin-34fbc337.js"),t=require("./generic-4b7bb87d.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-b41243b6.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-77c57718.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-fbd6fefb.js"),exports.initialiseSkin=function(s,l){n.getPlayer(s).addClass("skin_default"),r.initialiseKeyboardEvents(s,l),Promise.resolve().then((function(){return require("./skin-ba38afdb.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(s,l),function(r,s){var l=n.getPlayer(r),o=(null==s?void 0:s.sres)||null;l.on("loadeddata",(function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-f7707d1d.js")})).then((function(e){e.initaliseFunctionality(s.sres.seasons,t.getCurrentVideo())}))})),l.one("loadedmetadata",(function(){var i;o&&(e.addSeriesModule(r,null==s||null===(i=s.sres)||void 0===i?void 0:i.seasons,s),e.addNextEpisodeButton(s.sres,s.res,r))}))}(s,l),function(e,r){var t,s,l,o,a=n.getPlayer(e),u=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(u&&(u.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=a.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=a.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=a.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(s,l)};
|