@viewlift/player-backup 2.0.97-smartTv → 2.0.98-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-948fb789.js +1 -0
- package/cjs/browser-77c57718.js +1 -0
- package/cjs/bundle.css +3 -1590
- package/cjs/{caption-settings-d31caa42.js → caption-settings-5c1f7b67.js} +1 -1
- package/cjs/captions-07bd3069.js +1 -0
- package/cjs/{features-20aea890.js → features-0b4f463b.js} +1 -1
- package/cjs/generic-77c1578a.js +1 -0
- package/cjs/index-b0ccbe15.js +1 -0
- package/cjs/index-dc2d5939.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-274187ee.js → multicamv2-048e9ae5.js} +1 -1
- package/cjs/{multicamv2-09d7cc5b.js → multicamv2-c31baae6.js} +1 -1
- package/cjs/{nextEpisodeButton-0a4b3776.js → nextEpisodeButton-3b022b8f.js} +1 -1
- package/cjs/{playlist-acf20a84.js → playlist-14b2faaf.js} +1 -1
- package/cjs/renditions-fed22c12.js +1 -0
- package/cjs/{resolution-0a6680be.js → resolution-e46c9615.js} +1 -1
- package/cjs/{series-4e1e045e.js → series-201db969.js} +1 -1
- package/cjs/{series-v2-0c532b09.js → series-v2-3ef3be0a.js} +1 -1
- package/cjs/series-v2-458114ec.js +1 -0
- package/cjs/series-v2-68886cd2.js +1 -0
- package/cjs/{settings-icon-772875ec.js → settings-icon-6f9e9a90.js} +1 -1
- package/cjs/{skin-ba5665c0.js → skin-24be5547.js} +1 -1
- package/cjs/{skin-a1d317e2.js → skin-33248e57.js} +1 -1
- package/cjs/skin-3544db58.js +1 -0
- package/cjs/skin-39a38840.js +1 -0
- package/cjs/{skin-d60f1399.js → skin-8dcda2d4.js} +1 -1
- package/cjs/skin-a1489129.js +1 -0
- package/cjs/{skin-f1304c1c.js → skin-e0c4f6e1.js} +1 -1
- package/cjs/util-ef2cd61e.js +1 -0
- package/cjs/{videoSelector-912ddc08.js → videoSelector-8ef9ec73.js} +1 -1
- package/cjs/{videoSelector-07ca3c66.js → videoSelector-dce708c0.js} +1 -1
- package/cjs/{videojs-dash5.es-ced4b564.js → videojs-dash5.es-0c89add5.js} +1 -1
- package/esm/autoNextVideo-613b5bf9.js +1 -0
- package/esm/browser-d4613b36.js +1 -0
- package/esm/bundle.css +3 -1590
- package/esm/{caption-settings-5e4c50d1.js → caption-settings-8804cef9.js} +1 -1
- package/esm/captions-b7fd8308.js +1 -0
- package/esm/{features-96f3ac80.js → features-b565f69d.js} +1 -1
- package/esm/generic-76d748e7.js +1 -0
- package/esm/index-810dc03a.js +1 -0
- package/esm/index-f3cde562.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-1b5a4340.js → multicamv2-93b415f6.js} +1 -1
- package/esm/{multicamv2-d114b114.js → multicamv2-a5915be0.js} +1 -1
- package/esm/{nextEpisodeButton-5fd8430d.js → nextEpisodeButton-df6e9d73.js} +1 -1
- package/esm/{playlist-55295c26.js → playlist-30ca3b74.js} +1 -1
- package/esm/renditions-4c09c626.js +1 -0
- package/esm/{resolution-73611ca6.js → resolution-920515d1.js} +1 -1
- package/esm/{series-55848c07.js → series-ac83a128.js} +1 -1
- package/esm/series-v2-762980f3.js +1 -0
- package/esm/series-v2-8a8b6f0c.js +1 -0
- package/esm/{series-v2-43ac947e.js → series-v2-eb8252bd.js} +1 -1
- package/esm/{settings-icon-0fd94cf4.js → settings-icon-7e5f9a3a.js} +1 -1
- package/esm/{skin-a74b2d26.js → skin-414432ef.js} +1 -1
- package/esm/skin-58b9263c.js +1 -0
- package/esm/skin-65337b99.js +1 -0
- package/esm/{skin-9c97a06c.js → skin-66fc3448.js} +1 -1
- package/esm/skin-8ba84b20.js +1 -0
- package/esm/{skin-bfd83db6.js → skin-b121228d.js} +1 -1
- package/esm/{skin-979229c9.js → skin-b663f88e.js} +1 -1
- package/esm/util-80257541.js +1 -0
- package/esm/{videoSelector-76f3dea4.js → videoSelector-1e40c9c3.js} +1 -1
- package/esm/{videoSelector-8ad1d136.js → videoSelector-994c8adf.js} +1 -1
- package/esm/{videojs-dash5.es-2dcf13b7.js → videojs-dash5.es-6c1ba1fe.js} +1 -1
- package/package.json +4 -10
- package/cjs/autoNextVideo-a5bd03c7.js +0 -1
- package/cjs/browser-38ff3331.js +0 -1
- package/cjs/captions-bc814903.js +0 -1
- package/cjs/generic-ba36a442.js +0 -1
- package/cjs/index-5bfdc0ed.js +0 -1
- package/cjs/index-d2b3653c.js +0 -1
- package/cjs/renditions-00bfda1f.js +0 -1
- package/cjs/series-v2-2105fd89.js +0 -1
- package/cjs/series-v2-a9b97769.js +0 -1
- package/cjs/skin-0e506a38.js +0 -1
- package/cjs/skin-b1c390e3.js +0 -1
- package/cjs/skin-b6ed46d6.js +0 -1
- package/cjs/skin-f87e1c22.js +0 -1
- package/cjs/util-e1bc715c.js +0 -1
- package/esm/autoNextVideo-ec6a4046.js +0 -1
- package/esm/browser-512cd55a.js +0 -1
- package/esm/captions-bbc7eb98.js +0 -1
- package/esm/generic-adf94b3d.js +0 -1
- package/esm/index-8c443ff1.js +0 -1
- package/esm/index-e8a82518.js +0 -1
- package/esm/renditions-7393c027.js +0 -1
- package/esm/series-v2-11efc578.js +0 -1
- package/esm/series-v2-6e9853f8.js +0 -1
- package/esm/skin-46862baf.js +0 -1
- package/esm/skin-86e7e2b5.js +0 -1
- package/esm/skin-e75ce862.js +0 -1
- package/esm/skin-f03e04cd.js +0 -1
- package/esm/util-f9af2f94.js +0 -1
package/esm/generic-adf94b3d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as l}from"./skin-86e7e2b5.js";import{i as a,d}from"./browser-512cd55a.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-bbc7eb98.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var I={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function g(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?w(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):w(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var T={name:"@viewlift/player-backup",version:"2.0.97-smartTv",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7","videojs-contrib-dash":"^5.1.1","videojs-ima":"^2.1.0"}};window.vl_player_version=T.version;var E,h=function(e,t){var n,i,r,l,a,d,u,s,c,v;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(u=window)&&void 0!==u&&null!==(s=u.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v?void 0:v.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==I?void 0:I.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":T.version,adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},y=function(e,t){var n,i,r,l,a,d;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+I.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,t){var n,i,r=k(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},F=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==I?void 0:I.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},t),params:g({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),b=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var t=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},O=(E=null==I?void 0:I.apiBaseUrl,{set:function(e){e&&(E=e)},get:function(){return E}}),R=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},L=null;function V(){return{set:function(e){e&&(L=e)},get:function(){return L}}}var W,P,C,A,N,x,U=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=V().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),j=null,B=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return j||(j=U().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&V().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){j=null})),e.abrupt("return",j);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){P=e},z=function(){return P},G=function(e){W=e},Y=function(){return W},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,t){A.set(e.id,t)})},Q=function(e){if(A){var t=A.get(e);q(t+1)}},Z=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var te=0,ne=!1,ie=function(){var e,t,n,i,o,r,l,a=z();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function oe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function re(){var e=window.sessionStorage.getItem("uid");return e||(e=oe(),window.sessionStorage.setItem("uid",e),e)}function le(){return ae.apply(this,arguments)}function ae(){return(ae=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function de(e){return e?String(e):""}window.initialise=function(e){window.sid=oe(),window.environment="production",window.platform="WEBSITE",ne=!1;try{ne(e),buffering(e),ads(e),ping(e)}catch(e){}},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.handleBufferTimer=null,ne=!0,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:re(),vid:ie(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:re(),vid:ie(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":ie(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||ne||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:re(),vid:ie(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),vid:ie(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:re(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:ie()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(ue(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var ue=function(e,t,n){return e>=t&&e<=n};function se(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}}window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,v,m,f,p,w,g,T,E,h,y,_,F;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return E=e.sent,h=k(E),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=re(),e.t5=ie(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?de(t.adPosition):"",e.next=26,le();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),F=[e.t31],o({url:(null===(w=window)||void 0===w||null===(g=w.customData)||void 0===g||null===(T=g.beacon)||void 0===T?void 0:T.url)||O.get()+I.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ce=function(e,t){var n=new Map;D({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=n}).catch(function(e){return console.log(e)})},ve=function(){var e=Z.get();return e>=0?e+1:1},me=function(){var e,t,n,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=Z.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function pe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?fe(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=s(navigator.userAgent);var Ie=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},we=function(e){var t=ge(e,"video.tags",[]),n=ge(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},ge=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},Te=function(){var e,t,n,i,o,l,a,d,s,c,v,m,f,p,I,w,g,T,E,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",F=arguments.length>1?arguments[1]:void 0,b=arguments.length>2?arguments[2]:void 0,D=(null==b?void 0:b.siteName)||"",O=(null==b?void 0:b.contentType)||"video",R=(null==b||null===(e=b[O])||void 0===e?void 0:e.metadata)||(null==b||null===(t=b[O])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r(F);if(!_.includes("VIEWLIFT_"))return _;var L,V=window.getComputedStyle(document.getElementById(F),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),P=Math.trunc(V.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?null==b||null===(i=b.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==b?void 0:b.channelId)}))||void 0===l||null===(a=l.content)||void 0===a?void 0:a.id:ge(b,"video.gist.id",""),A="linearchannel"===O?null==b||null===(d=b.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==b?void 0:b.channelId)}))||void 0===c?void 0:c.title:ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,x=null;"function"==typeof window.__gpp&&(null===(L=window)||void 0===L||L.__gpp("ping",function(e){N=null==e?void 0:e.gppString,x=null==e?void 0:e.sectionList[0]}));var U=pe(pe({},Ee(R)),{},{VIEWLIFT_WIDTH:P,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:Ie(P,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ge(b,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(f=S.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(b),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ge(b,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ge(null===(p=window)||void 0===p||null===(I=p.app_data)||void 0===I||null===(w=I.site)||void 0===w?void 0:w.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":ge(null===(g=window)||void 0===g||null===(T=g.app_data)||void 0===T||null===(E=T.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:ge(b,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ge(b,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:me(),VIEWLIFT_SEASON_NUMBER:ve(),VIEWLIFT_CONTENT_TAGS:we(b),VIEWLIFT_GPP_SID:x||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var j in U){var B=new RegExp(j,"g");_=_.replace(B,U[j])}return _},Ee=function(e){var t,n,i,o,r,l,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return he(e);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(d=l.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(a()?c?u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=a()?pe(pe({},u),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):pe(pe({},u),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=pe(pe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=a()?pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):pe(pe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=pe(pe({},u),{},{VIEWLIFT_AFID:s.get("afid")})},he=function(e){var t,n,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i||i.SVOD,(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1?"lgTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=pe(pe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=pe(pe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},ye=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,I,w,g,T,E,h,y,_,F,b,D,O,R,S,L,V,W,P,C,A,N,x,U;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)t=null==e||null===(O=e.ads)||void 0===O||null===(R=O.preRoll)||void 0===R||null===(S=R.adTags)||void 0===S||null===(L=S.samsung_tv)||void 0===L?void 0:L.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var j,B,M,k;t=null==e||null===(j=e.ads)||void 0===j||null===(B=j.preRoll)||void 0===B||null===(M=B.adTags)||void 0===M||null===(k=M.lg_tv)||void 0===k?void 0:k.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var H,z,G,Y;t=null==e||null===(H=e.ads)||void 0===H||null===(z=H.preRoll)||void 0===z||null===(G=z.adTags)||void 0===G||null===(Y=G.vizioTv)||void 0===Y?void 0:Y.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(I=p.preRoll)&&void 0!==I&&null!==(w=I.adTags)&&void 0!==w&&null!==(g=w.xbox)&&void 0!==g&&g.active){var X,q,J,K;t=null==e||null===(X=e.ads)||void 0===X||null===(q=X.preRoll)||void 0===q||null===(J=q.adTags)||void 0===J||null===(K=J.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&null!=e&&null!==(T=e.ads)&&void 0!==T&&null!==(E=T.preRoll)&&void 0!==E&&null!==(h=E.adTags)&&void 0!==h&&null!==(y=h.xbox)&&void 0!==y&&y.active){var Q,Z,$,ee;t=null==e||null===(Q=e.ads)||void 0===Q||null===(Z=Q.preRoll)||void 0===Z||null===($=Z.adTags)||void 0===$||null===(ee=$.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(_=e.ads)&&void 0!==_&&null!==(F=_.preRoll)&&void 0!==F&&null!==(b=F.adTags)&&void 0!==b&&null!==(D=b.firetv)&&void 0!==D&&D.active){var te,ne,ie,oe;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(ie=ne.adTags)||void 0===ie||null===(oe=ie.firetv)||void 0===oe?void 0:oe.url}}else t=(null==e||null===(V=e.ads)||void 0===V||null===(W=V.preRoll)||void 0===W||null===(P=W.adTags)||void 0===P||null===(C=P.web)||void 0===C?void 0:C.active)&&(null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(x=N.adTags)||void 0===x||null===(U=x.web)||void 0===U?void 0:U.url)}catch(e){}return t},_e=function(e,t){var n,i,o,r,l,a,u,s,c,v,m,f,p,I=(null==e?void 0:e.contentType)||"video",w=null==e||null===(n=e[I])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[I])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,T=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,E=(null==e||null===(a=e[I])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[I])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[I])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=T&&T.hls)return be(T);if(w){var y=De(g,t);return y.src=Te(y.src,t,e),y}if("Safari"!==d()&&h){var _=Fe(g);return _.src=Te(_.src,t,e),_}if(E){var F=be(g);return F.src=Te(F.src,t,e),F}if(null!=g&&g.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return b.src=Te(b.src,t,e),b}return null},Fe=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},be=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},De=function(e,t){var n=(null==e?void 0:e.drmProvider)||null,o=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,u=d();if(r(t),"Safari"===u){var s=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(o);return Oe(t),s}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Oe(t),v.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==n?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Oe=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Re=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Se=function(e,t){if(import("./error-2395864b.js").then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},Le=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ve=!1,We=function(e,t,n){var i=Te(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r(e);if(null!==l.el_){Ve=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Ve&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var Ce=function(e){i(e).play()},Ae=function(e){i(e).pause()},Ne=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},xe=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ue=function(e){return!!i.getPlayer("".concat(e))},je=function(e){return i(e).paused()},Be=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,B();case 3:return l=e.sent,a=r(t),e.abrupt("return",new Promise(function(e,n){y(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=oe(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=_e(r,t);H(r),l&&o?(Ge(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Me=function(){var e=t(n.mark(function e(t,i){var o,l,a,d,u,s,m=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=m.length>2&&void 0!==m[2]?m[2]:null){e.next=5;break}return e.next=4,B();case 4:d=e.sent;case 5:return(Y()||null)&&Q(i),u=0,s=0,null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&b(i,d).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){h(i,d).then(function(i){var o,l,a=null==i?void 0:i.data,d=(null==a||null===(o=a.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;H(i.data);var m=ye(a);m&&We(t,m,a);var f=_e(a,t);if(f){var p,I,w,g,T,E,h,y,_,F,b,D,O,R,S=(null==a||null===(p=a.video)||void 0===p||null===(I=p.gist)||void 0===I?void 0:I.videoImageUrl)||(null==a||null===(w=a.video)||void 0===w||null===(g=w.gist)||void 0===g||null===(T=g.imageGist)||void 0===T?void 0:T.r16x9),L=r(t);if(L.poster(S),Ge(t,f),L.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),L.on("loadeddata",function(){Le(),e({status:!0,msg:"Video Loaded",response:a})}),L.one("play",function(){u&&s<95&&setTimeout(function(){L.currentTime(u)},0)}),L.one("error",function(){var e;n({status:!1,msg:(null==L||null===(e=L.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(E=a.video)||void 0===E||null===(h=E.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(F=_.closedCaptions)||void 0===F?void 0:F.length)>0)b=((null==a||null===(D=a.video)||void 0===D||null===(O=D.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(R=a.video)||void 0===R?void 0:R.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(t,b);else v(t)}else Se(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Ye(e,t,n,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),ke=function(e,t,n){var i=r(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},He=function(e){var t=r(e);if(ze(),l(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ze=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Ge=function(e,t){var n=r(e);n&&n.src(t)},Ye=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ue(n)&&Se(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},Xe=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{_ as A,ce as B,Z as C,G as D,ke as E,Ce as F,Ae as G,je as H,Ue as I,Me as J,Be as K,He as L,R as M,O as N,M as O,V as P,S as Q,f as R,X as S,q as T,D as U,K as V,Q as W,me as a,Y as b,ve as c,z as d,_e as e,H as f,re as g,Le as h,Se as i,J as j,Ne as k,Ge as l,Te as m,ye as n,Xe as o,se as p,We as q,xe as r,F as s,Re as t,k as u,h as v,b as w,Ye as x,B as y,y as z};
|
package/esm/index-8c443ff1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,t as r}from"./skin-86e7e2b5.js";import{S as i,b as o,d as a}from"./generic-adf94b3d.js";import{s as l}from"./autoNextVideo-ec6a4046.js";import{e as u}from"./icons-0676e9c7.js";import s from"@babel/runtime/helpers/typeof";import c from"video.js";import d from"@babel/runtime/helpers/asyncToGenerator";import p from"@babel/runtime/regenerator";import m from"@babel/runtime/helpers/defineProperty";import v from"@babel/runtime/helpers/slicedToArray";var f,g,h,b,y=[],x=!1,w=function(r,a){var l;if(x=!1,null!=a&&null!==(l=a.series)&&void 0!==l&&l.enable){var s;y=[];var c=o();null==c||c.map(function(t){var n;return(n=y).push.apply(n,e(t.episodes))}),null==a||null===(s=a.series)||void 0===s||s.cb}else{var d,p;y=(null==a||null===(d=a.relatedVideos)||void 0===d?void 0:d.content)||[],null==a||null===(p=a.relatedVideos)||void 0===p||p.cb}var m=t(r);m.on("timeupdate",function(){var e,t;if(!x){var n=Math.floor(m.currentTime()),r=m.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];r-n<=10&&i()<=(null===(t=y)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}});var v,f=y.filter(function(e,t){return t==i()});if((null==f?void 0:f.length)>0)if(null!==(v=document.getElementsByClassName("next-ep-preview"))&&void 0!==v&&v[0]){var g,h,b,w,A,N,k,j,C,T,I,O;(null===(g=document.getElementsByClassName("next-ep-preview"))||void 0===g?void 0:g[0]).style.visibility="hidden";var L=null===(h=document.getElementsByClassName("next-ep-title"))||void 0===h?void 0:h[0],B=null===(b=document.getElementsByClassName("next-ep-img"))||void 0===b?void 0:b[0],S=null===(w=document.getElementsByClassName("next-ep-content"))||void 0===w?void 0:w[0],M=null===(A=f[0])||void 0===A?void 0:A.title;(null===(N=M)||void 0===N?void 0:N.length)>60&&(M=M.substr(0,60)+"..."),L.textContent="".concat(M),B.src=(null===(k=f[0])||void 0===k||null===(j=k.gist)||void 0===j||null===(C=j.imageGist)||void 0===C?void 0:C.r16x9)||(null==f||null===(T=f[0])||void 0===T?void 0:T.img)||(null===(I=window)||void 0===I||null===(O=I.customData)||void 0===O?void 0:O.fallbackImage),S.onclick=function(){return E(r)}}else{var P,R,D,$,X,_,F,U,W=document.createElement("div");W.className="next-ep-preview",W.style.visibility="hidden",document.getElementById(r).append(W);var q=document.createElement("div");q.className="next-heading-wrapper";var G=document.createElement("div");G.className="next-ep-header",G.textContent="Next up";var V=document.createElement("div");V.className="next-ep-close",V.onclick=function(){W.style.visibility="hidden",x=!0},V.appendChild(n(u())),q.append(G),q.append(V);var z=null===(P=f[0])||void 0===P?void 0:P.title,H=document.createElement("img");H.className="next-ep-img",H.src=(null===(R=f[0])||void 0===R||null===(D=R.gist)||void 0===D||null===($=D.imageGist)||void 0===$?void 0:$.r16x9)||(null==f||null===(X=f[0])||void 0===X?void 0:X.img)||(null===(_=window)||void 0===_||null===(F=_.customData)||void 0===F?void 0:F.fallbackImage);var Q=document.createElement("div");Q.className="next-ep-title",(null===(U=z)||void 0===U?void 0:U.length)>60&&(z=z.substr(0,60)+"..."),Q.textContent="".concat(z);var Y=document.createElement("div");Y.className="next-ep-content",Y.append(H),Y.append(Q),Y.onclick=function(){return E(r)},W.append(q),W.append(Y)}},E=function(e,n){var r=t(e),o=Math.floor(r.currentTime());if(Math.floor(r.duration())!=o){r.pause(e);var a=i();l(a,e,y)}};function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}f={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},g=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===s(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},h=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},b=function e(t){return"HTML"!==t.nodeName&&"static"===h(t)("position")?e(t.offsetParent):t},c.registerPlugin("thumbnails",function(e){var t,n,r,i,o,a,l,u,s,c;if(i=g({},f,e),a=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=a.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(r=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),r.appendChild(o),o.src=i[0].src,o.className="vjs-thumbnail",g(o.style,i[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),u=a.duration(),a.on("durationchange",function(e){u=a.duration()}),a.on("loadedmetadata",function(e){u=a.duration()}),(l=a.controlBar.progressControl).el().appendChild(r),s=function(e){var t,n,a,s,c,d,p,m,v,f;for(n in a=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=b(l.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=b(l.el()).getBoundingClientRect().left+v,t=Math.floor((s-l.el().offsetLeft)/l.width()*u),i)t>n&&(a=Math.max(a,n));(c=i[a]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&g(o.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=h(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||i[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),r.style.left=s+"px"},null!==(t=window)&&void 0!==t&&null!==(n=t.customData)&&void 0!==n&&n.isSmartTV){var d=function(){var e,t,n=0,u=(null===(e=l.el_.children[0].children[2])||void 0===e?void 0:e.offsetWidth)||5;u<65?u=5:u>=a.el().offsetWidth-180?u=a.el().offsetWidth-240:u-=58;var s=a.currentTime();for(t in i)s>t&&(n=Math.max(n,t));var c=i[n];c.uri&&""!=c.uri&&o.src!=c.uri?(o.src=c.uri,r.style.left=u+"px",o.style.opacity="1"):(r.style.left="-1000px",o.style.opacity="0")},p=null;l.el_.children[0].onfocus=function(){d(),p=setInterval(function(){d()},250)},l.el_.children[0].addEventListener("blur",function(){try{r.style.left="-1000px",o.style.opacity="0",p&&(clearInterval(p),p=null)}catch(e){}})}else l.on("mousemove",s),l.on("touchmove",s);function m(){document.removeEventListener("pointermove",s),document.removeEventListener("pointerup",m),c()}l.on("pointerdown",function(e){document.addEventListener("pointermove",s),document.addEventListener("pointerup",m)}),c=function(e){r.style.left="-1000px"},l.on("mouseout",c),l.on("touchcancel",c),l.on("touchend",c),a.on("userinactive",c)});var k="my-player";function j(e){var t=e.split("\n"),n=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))}),n.push(r)}}),n}function C(){return(C=d(p.mark(function e(t){var n,r,i,o,a,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,k,j,C;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=v(o,2),l=a[0],u=a[1],s=i.width/u,c=i.height/l,d=[],m=0;m<l;m++)for(f=0;f<u;f++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,f*s,m*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=v(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(k=N.app_data)||void 0===k||null===(j=k.appcmsMain)||void 0===j||null===(C=j.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function T(e,t){return I.apply(this,arguments)}function I(){return(I=d(p.mark(function e(t,n){var r,i;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",j(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function O(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(k);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return C.apply(this,arguments)}(s).then(function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri}))}}function L(e){return B.apply(this,arguments)}function B(){return(B=d(p.mark(function e(t){var n,i,o,a;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),i=v(r,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);n[s]=N(N({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},m(u,"left","-60px"),m(u,"border","1px solid transparent"),m(u,"borderRadius","4px"),u)})}}),i=Object.keys(n).map(Number).sort(function(e,t){return e-t}),null==(o=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||o.addEventListener("mousemove",r(function(e){return O(e,n,i)},500)),null==(a=document.querySelector(".vjs-progress-control.vjs-control"))||a.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r(function(e){return O(e,n,i)},500))}),e.abrupt("return",n);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var S=function(){var e=d(p.mark(function e(t,n){var r,i,o,a,l,u,s,c;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,o=i.split("\n").map(function(e){return e.trim()}),a=[],l=null,u=0;case 10:if(!(u<(null==o?void 0:o.length))){e.next=27;break}if(!(s=o[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach(function(e){var t=e.split("="),n=v(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,a.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}();function M(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function P(e,t){return R.apply(this,arguments)}function R(){return(R=d(p.mark(function e(n,r){var i,o,l,u,s,c,d,m,f,g,h,b,y,x,w,E,A,N,j,C,T,I,O,L,B,S,P,R,X,_,F,U,W,q,G,V,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,i=t(r),o=n.split("/"),l=o.findIndex(function(e){return"dash"===e.toLowerCase()}),u=M(-1!==l?o.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return m=e.sent,e.next=11,m.text();case 11:f=e.sent,g=new DOMParser,h=g.parseFromString(f,"application/xml"),b=(null==i?void 0:i.duration())||(null===(s=a())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(I=j.getElementsByTagName("S"),O=parseInt(null===(C=I[0])||void 0===C?void 0:C.getAttribute("t")),L=parseInt(null===(T=I[0])||void 0===T?void 0:T.getAttribute("d")),B=E.getElementsByTagName("Representation")[0],S=B.getElementsByTagName("EssentialProperty")[0],P=S.getAttribute("value"),R=null==P?void 0:P.split("x"),X=v(R,2),_=X[0],F=X[1],!N){e.next=46;break}if(N.getAttribute("media"),U=N.getAttribute("timescale"),W=(U?L/U:L)/(_*F),q=B.getAttribute("id"),G=Math.round(b/W),V=Math.ceil(G/(_*F)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(V))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<V;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:W,layout:P,uri:Y+Q.replace("$Time$",O+w*L).replace("$RepresentationID$",q)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=v(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),oe=N.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=D(ce),w=0;w<se;w++)ve=me?$(me,w+de):ce,pe.push({duration:ae,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function D(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function $(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function X(e){return _.apply(this,arguments)}function _(){return(_=d(p.mark(function e(n){var r,i,o,a,l,u,s,c,d,m,v,f,g,h,b,y;return p.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,T(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return m=(null==d?void 0:d[0])||null,v=m.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,S(f,v);case 12:return g=e.sent,e.next=15,L(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,P(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,L(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}function F(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",function(){o.classList.remove("vjs-fade")}),r.on("userinactive",function(){r.paused()||o.classList.add("vjs-fade")}),r.on("fullscreenchange",function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"})}}export{w as a,F as b,X as i};
|
package/esm/index-e8a82518.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as g,q as h,t as b,u as w,v as k,w as S,x as T,y as O,z as I,A as j,B as E,C as P,D,E as A,F as x,G as C,H as L,I as R,J as N,K as M,L as _,M as V,N as U,O as B,P as H,Q as F,R as Q}from"./generic-adf94b3d.js";import K from"@babel/runtime/helpers/defineProperty";import q from"@babel/runtime/helpers/asyncToGenerator";import z from"@babel/runtime/regenerator";import G from"video.js";import{o as W,g as J,a as X,b as Y,s as $,c as Z,p as ee}from"./util-f9af2f94.js";import{g as ne,d as te,a as oe,e as re,b as ie}from"./captions-bbc7eb98.js";import{g as le,t as ae,i as se,a as ue}from"./skin-86e7e2b5.js";import{g as ce,a as de,s as ve}from"./renditions-7393c027.js";import{playSelectedResolution as fe}from"./resolution-73611ca6.js";import{d as pe}from"./browser-512cd55a.js";import{s as me}from"./localisation-0bf399a1.js";import ye from"@babel/runtime/helpers/typeof";import ge from"@babel/runtime/helpers/toConsumableArray";import he from"@babel/runtime/helpers/slicedToArray";var be=function(e){return new Promise(function(n,t){if(we(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},we=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ke=function(e){var n,t=le(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},Se=function(e,n){for(var t=le(e).audioTracks().tracks_||[],o=0;o<t.length;o++){var r=t[o];r.id==n?r.enabled=!0:r.enabled=!1}},Te=function(e,n,t){var o=le(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.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,"'")})},Oe=function(e){var n=le(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Ie=function(){var e=q(z.mark(function e(n){var t,o,r,i,l;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=le(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,be("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,i.default(G),e.finish(13);case 16:(l=G.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.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=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==pe()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),je=function(e,n){var t=le(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=G.dom.getPointerPosition(a,n).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var Ee=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),be("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)}}(),Pe=function(){var e=q(z.mark(function e(){return z.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){G.getPlugin("eme")||G.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),De=function(){var e=q(z.mark(function e(){var n;return z.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(G),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)}}(),Ae=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.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)}}(),xe=function(){var e=q(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-2dcf13b7.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)}}(),Ce=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(G)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(G)})},loadAdsLibrary:Ee,loadEMELibrary:Pe,loadMuxPlugin:De,loadDvrSeekbar:Ae,loadContribDash:xe});function Le(e){return Re.apply(this,arguments)}function Re(){return(Re=q(z.mark(function e(n){var t;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,Ee();case 3:t&&"Safari"==pe()&&Promise.resolve().then(function(){return Ce}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ne(e,n){return Me.apply(this,arguments)}function Me(){return(Me=q(z.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==pe()?Pe():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?xe():Pe():"Safari"!=pe()&&d?xe():null,Ie(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function _e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ve(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_e(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_e(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ue=new Set,Be=null,He=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=We(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=qe(n),v["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"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=ze(n),v["c3.cm.genreList"]=Qe(n),v["c3.cm.genre"]=Fe(n),v["c3.cm.channel"]=Ke(n);var p=Xe(t(),n);return v=Ve(Ve({},v),p)},Fe=function(e){var n,t,o,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===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},Qe=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"},Ke=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},qe=function(e){return(null==e?void 0:e.contentType)||"null"},ze=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ge=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},We=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Je,Xe=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();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==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ye=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"}},$e=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ze=function(){var e=q(z.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=le(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ye(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Be&&Be!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Ue.clear(),Be=d.currentSrc();var o=$e(d.currentType()),i=r(),s=He(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ge(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Ue.has(d.currentSrc())||(Ue.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Ue.has(d.currentSrc())&&Ue.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Ue||Ue.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),en=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-a74b2d26.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-bfd83db6.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-e75ce862.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-979229c9.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-9c97a06c.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-f03e04cd.js").then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&import("./skin-46862baf.js").then(function(t){t.initialiseSkin(e,n)})};function nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function tn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var on=[],rn=0,ln=null;function an(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),g=c?100:Math.floor(v/f*100),h={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=sn(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return tn(tn({},e),{},K({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Je});c<0?i.push(tn(tn({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=tn(tn(tn({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:c,watchedTime:y,watchedPercentage:g},d,n.siteOwner):(h=tn(tn({videoId:Je,watchedTime:y,watchedPercentage:g,doneWatching:c,profileId:d},ln&&{seriesId:ln}),p&&{originalObjectId:p}),i(h).then(function(e){}).catch(function(e){})),rn=v+t}function sn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function un(e,n,t){var o=sn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var cn=!1,dn=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!cn){var i=vn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),cn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function vn(e,n,t){if(Array.isArray(e))return e.map(function(e){return vn(e,n,t)});if(null!==e&&"object"===ye(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=vn(e[r],n,t)}),o}return e}function fn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return pn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?pn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function pn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function mn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function yn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var gn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=le(e),y=(null==f?void 0:f.contentType)||"video",g=(null==f?void 0:f[y].drmEnabled)||!1,h=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadedmetadata",function(){h?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(yn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=ne(e);if(null==l||l.map(function(n){return te(e,n.id)}),b&&"Safari"===pe())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&Te(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=yn(yn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(ln=null==n||null===(r=n.series)||void 0===r?void 0:r.id),on=[],rn=0,Je=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=le(e);a&&(a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());on.includes(rn)||(e==rn?(on.push(e),an(a,n,l)):e>rn&&(rn=e+l))}}),a.one("ended",function(){an(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,g,h,w,k,S=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),T=null==S?void 0:S.gist,O={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(g=window)||void 0===g?void 0:g.vl_player_version,video_id:null==T?void 0:T.id,video_title:null==T?void 0:T.title,video_series:null==S||null===(h=S.series)||void 0===h?void 0:h.title,video_stream_type:null!=S&&null!==(w=S.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:O})}}),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,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=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"===f){var m,y=p.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&&dn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&h)?(console.log(1),dn(f,e)):(console.log(2,t),c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e,t,o,i,l;if(null===(e=window)||void 0===e||null===(t=e.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=n&&null!==(l=n.series)&&void 0!==l&&l.enable){var a,s,u,c=null===(a=r())||void 0===a||null===(s=a.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id,v=d(),f=(null==v?void 0:v.get(c))||{t:0,p:0},p=f.t,y=f.p;p&&y<95&&setTimeout(function(){m.currentTime(p)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.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])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if(n.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ye(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=fn(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=fn(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;if(("Chrome"==pe()||"Edge"==pe()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!g))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1"))m.audioTracks().removeTrack(p);else{if("main"==p.kind){p.enabled=!0;break}p.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function hn(e,n){var t,o,r,i=le(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,s,u,c,d,p,m,y;if(wn.enabled&&"input"!=t.target.localName){var g=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(g)&&(t.preventDefault(),null==a||a.focus()),g){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":h&&!1===n.liveui||f(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(s=r.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u||null===(c=u.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)&&null!==(d=window)&&void 0!==d&&null!==(p=d.app_data)&&void 0!==p&&null!==(m=p.appcmsMain)&&void 0!==m&&null!==(y=m.adsConfig)&&void 0!==y&&y.vodAdClientSideTracking)return;h||v(e,10)}}},!0)}var bn,wn=(bn=!0,{enable:function(){bn=!0},disable:function(){bn=!1},get enabled(){return bn}}),kn="ssai-breakStart",Sn="ssai-adImpression",Tn="ssai-firstQuartile",On="ssai-midpoint",In="ssai-thirdQuartile",jn="ssai-complete",En="ssai-breakEnd",Pn={breakStart:kn,impression:Sn,firstQuartile:Tn,midpoint:On,thirdQuartile:In,complete:jn,breakEnd:En};function Dn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=le(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Pn[o];r&&t.trigger(r,n)}function An(e){var n=le(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(kn,e)},adImpression:function(e){return t(Sn,e)},adFirstQuartile:function(e){return t(Tn,e)},adMidpoint:function(e){return t(On,e)},adThirdQuartile:function(e){return t(In,e)},adComplete:function(e){return t(jn,e)},adBreakEnd:function(e){return t(En,e)}}}function xn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ln(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Rn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Rn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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 i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Rn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Nn,Mn,_n=(Nn="",{set:function(e){e&&(Nn=e)},get:function(){return Nn}}),Vn=(Mn=null,{set:function(e){Mn=e},get position(){return Mn}});function Un(e,n){return Bn.apply(this,arguments)}function Bn(){return(Bn=q(z.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,g,h;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return le(n),o=l(t,n),r=o.src,i=r.replace("/dash/","/session/").replace("master","session"),i=p(i,n,t),a=Hn(i),s=he(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=he(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.prev=8,e.next=11,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:Cn({},u)})});case 11:return d=e.sent,e.next=14,d.json();case 14:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,g=f+m,h=f+y,_n.set(g),console.log("%c TRACKING URL","background: #bdf369; color: #000",g),o.src=h,e.abrupt("return",o);case 26:return e.prev=26,e.t0=e.catch(8),e.abrupt("return",o);case 29:case"end":return e.stop()}},e,null,[[8,26]])}))).apply(this,arguments)}function Hn(e){var n={},t=e.split("?")[1];if(!t)return[{},{}];var o,r=Ln(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=he(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=he(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Fn(e,n){return Qn.apply(this,arguments)}function Qn(){return Qn=q(z.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,f,p,m,y,g,h,b,w;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w=function(e,t,o,r,i,l){var a=le(n);if(!a.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(a.currentTime());var s,u=Ln(o);try{var c=function(){var o,u,c,d=s.value,v=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,m=d.startTime,y=d.durationInSeconds,g=p||0,w=f,k=(null===(o=window)||void 0===o||null===(u=o.customData)||void 0===u||null===(c=u.ads)||void 0===c?void 0:c.adEventHandler)||null,S="".concat(g,"_").concat(v),T=h.get("pod-".concat(i))||[];if(e>=g&&!T.includes(S)){var O;T.push(S),h.set("pod-".concat(i),T);try{b(v,t,w,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,t)}if("breakEnd"==v){var I=Vn.position;Vn.set(null),setTimeout(function(){null!=I&&(a.currentTime(I),l())},500)}if("function"==typeof k&&null!=t&&null!==(O=t.ads)&&void 0!==O&&O[r])try{var j,E={eventType:v,startTimeInSeconds:p,startTime:m,durationInSeconds:y,ad:null==t||null===(j=t.ads)||void 0===j?void 0:j[r],adIndex:r};k({adsData:E}),Dn(n,E)}catch(e){console.error("Error when calling ads callback:",e)}}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},b=function(e,n,t,o){null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},g=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Vn.set(t),a=_n.get(),(s=le(n)).one("loadeddata",function(){a&&y(a)}),u=new Map,c=new Map,d=-1,f=(null===(o=document)||void 0===o||null===(r=o.getElementsByClassName("tvProviderImage"))||void 0===r?void 0:r[0])||null,p=(null==s||null===(i=s.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,m=(null==s||null===(l=s.controlBar)||void 0===l?void 0:l.getChild("seriesV2"))||null,y=function(){var e=q(z.mark(function e(o){var r,i,l,a,s,y,h,b,k,S,T,O,I,j,E,P,D;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return I=function(e){document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",I),0===e.button&&S()},O=function(e){},T=function(){var e,n=h.currentTime(),t=null,o=Ln(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,u.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){h.currentTime(t+2.2)},100))},S=function(){var e,n=h.currentTime(),t=null,o=Ln(y);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!u.has(i)||n>=i&&n<=s)&&(t=i,u.set(i,!0),c.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){h.currentTime(t+.4)},100))},i=!1,e.next=7,fetch(o);case 7:return l=e.sent,e.next=10,l.json();case 10:a=e.sent,s=a.avails,y=[],h=le(n),b=h.controlBar.progressControl,k=b.seekBar.el(),s.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(i=!0),y.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),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!i&&t&&(h.currentTime(t),T()),null!=y&&y.length&&(window.adsQueueList=y),console.log(y,"data"),y.forEach(function(e){var n,t,o=e.markerPositionInSeconds,r=e.ads,i=h.duration();if(!(o>i||Array.isArray(r)&&0==(null==r?void 0:r.length))){var l=o/i*100,a=document.createElement("div");a.className="vjs-seekbar-marker",a.style.left="".concat(l,"%"),a.style.position="absolute",a.style.top="0",a.style.bottom="0",a.style.width="2px",a.style.backgroundColor="#fecc09",a.style.left="".concat(l,"%"),a.style.pointerEvents="none",k.appendChild(a),null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableControls&&(k.style.display="none")}}),h.on("timeupdate",ae(function(){var e=h.currentTime();if(e!==d){d=e;for(var n=!1,t=function(){var t=y[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&u.set(r,!0),wn.disable(),f&&f.classList.add("vjs-hidden"),p&&(p.el().style.pointerEvents="none",p.el().classList.add("vjs-hidden")),m&&(m.el().style.pointerEvents="none",m.el().classList.add("vjs-hidden")),b.el().style.visibility="hidden";for(var s=e-r,d=0,v=0,h=0;h<l.length;h++){var k,S=null==l||null===(k=l[h])||void 0===k?void 0:k.durationInSeconds;if(s<d+S){v=h;break}d+=S}l[v];var O=Math.max(0,i-s),I=Math.round(O);j.style.display="block",D.textContent="".concat(v+1," of ").concat(l.length," • ").concat(g(I));var E=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});E.push.apply(E,ge(n))}),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),w(e,t,E,v,o,T),"break"}c.delete(r)},o=0;o<y.length;o++){if("break"===t())break}n||(j.style.display="none",b.el().style.visibility="visible",p&&(p.el().style.pointerEvents="auto",p.el().classList.remove("vjs-hidden")),m&&(m.el().style.pointerEvents="auto",m.el().classList.remove("vjs-hidden")),f&&f.classList.remove("vjs-hidden"),wn.enable())}},1e3)),null===(r=document)||void 0===r||r.addEventListener("keydown",function(e){wn.enabled&&"ArrowRight"==e.key&&(S(),v(n,10),e.stopPropagation())}),b.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",O),document.addEventListener("pointerup",I))}),(j=document.createElement("div")).className="ssai-ad-container",(E=document.createElement("div")).className="sponsored-adbox",(P=document.createElement("div")).className="sponsored-text",P.textContent="Sponsored Ad",E.append(P),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",j.append(E),j.append(D),h.el().appendChild(j);case 40:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),h=new Map;case 16:case"end":return e.stop()}},e)})),Qn.apply(this,arguments)}function Kn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Kn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var zn=function(e,n,t,o){var r,i,s,u,d,v,f,p,w,k,S,T,O,I,j,E,P,D,A,x,C,L,R,N,M,_,V,U,B,H,F,Q,W=n.res,J=void 0===W?null:W,X=n.sres,Y=void 0===X?null:X,$=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],Z=(null===(r=J)||void 0===r?void 0:r.contentType)||"video",ee=se(null===(i=J)||void 0===i||null===(s=i[Z])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||se(null===(d=J)||void 0===d||null===(v=d[Z])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),ne=(null===(w=J)||void 0===w||null===(k=w[Z])||void 0===k||null===(S=k.liveDetails)||void 0===S?void 0:S.isDvrEnabled)||!1,te=(null===(T=J)||void 0===T||null===(O=T[Z])||void 0===O||null===(I=O.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,re=m(J);J=qn(qn({},J),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ie="MEDIA_TAILOR"==(null===(j=window)||void 0===j||null===(E=j.app_data)||void 0===E||null===(P=E.appcmsMain)||void 0===P||null===(D=P.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||"MEDIA_TAILOR"==(null===(A=window)||void 0===A||null===(x=A.customData)||void 0===x||null===(C=x.ads)||void 0===C?void 0:C.vodAdSticherProvider)||!1,ae=(null==t?void 0:t.latency)||6,ue=(null==t?void 0:t.skin_settings)||{},ce=(F={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ue?void 0:ue.pictureInPictureToggle)||!1},playbackRates:null!=ue&&ue.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==t.skin,liveui:ne},K(F,"autoplay",null==t?void 0:t.autoplay),K(F,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!re),K(F,"loop",(null==t?void 0:t.loop)||!1),K(F,"audioPosterMode",null==t?void 0:t.audioPosterMode),K(F,"html5",qn(qn({dash:qn(qn(qn({},!G.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(L=t.debugConfig)||void 0===L?void 0:L.enable)&&{debug:!1,logLevel:null!=t&&null!==(R=t.debugConfig)&&void 0!==R&&R.logLevel?null==t||null===(N=t.debugConfig)||void 0===N?void 0:N.logLevel:"off"}),{},{updateSettings:{streaming:{delay:{liveDelay:ae},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:qn({},"IE"==pe()&&{enableStallFix:!0,stallSeek:1}),abr:{autoSwitchBitrate:{video:!0,audio:!0}}}}},null!==(M=window)&&void 0!==M&&null!==(_=M.customData)&&void 0!==_&&_.isSmartTV?{bufferToKeep:10,bufferTimeAtTopQuality:15,bufferTimeAtTopQualityLongForm:15,bufferPruningInterval:5}:{}),vhs:qn(qn({liveRangeSafeTimeDelta:ae,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(V=t.customData)||void 0===V?void 0:V.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null===(U=null==t?void 0:t.enableLowInitialPlaylist)||void 0===U||U}),nativeTextTracks:"Safari"==pe()},0==(null==t||null===(B=t.customData)||void 0===B?void 0:B.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(H=t.customData)||void 0===H?void 0:H.nativeVideoTracks)&&{nativeVideoTracks:!1})),K(F,"poster",ee),K(F,"techOrder",$),K(F,"chromecast",{requestCustomDataFn:function(n){var t=le(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,g,h,b,w,k,S;p.isDrmEnabled=!0;var T=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,O=(null==T?void 0:T.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(g=y[0])||void 0===g||null===(h=g.options)||void 0===h?void 0:h.serverURL);p.licenseUrl=O;var I=(null==T?void 0:T.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);p.licenseToken=I}var j=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=j;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(J,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=le(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=J)||void 0===t||null===(o=t[Z])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),F);if(!G.getPlayers()[e]){null===(Q=window)||void 0===Q||!Q.customData.isSmartTV||null!=t&&t.disableControls||(ce.spatialNavigation={enabled:!0,horizontalSeek:!0});try{G.log.level("off")}catch(e){}var de=G(e,ce,function(){var n=q(z.mark(function n(){var r,i,s,u,d,v,f,p,m,w,k,S,T,O,I,j,E,P,D,A,x,C,L,R,N,M,_,V,U,B,H,F,Q,K,q,W,X,$,ee;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:try{de.log.level("off")}catch(e){}return console.log(de),console.log(G.VERSION),console.log(G.getPlugins()),n.next=6,Ne(t,J);case 6:try{null===(V=window)||void 0===V||!V.customData.isSmartTV||null!=t&&t.disableControls||de.spatialNavigation.start()}catch(e){}if(U=null===(r=J)||void 0===r||null===(i=r[Z])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,te&&o.resolve(qn({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:J}:{response:J})),g(e,null==t?void 0:t.analyticsCb),Ze(e,t),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),ne&&je(e,U),!re||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||h(e,re,J),B=l(J,e),console.log(B),null!=t&&t.nearestClusterUrl&&(B=b(B,t.nearestClusterUrl)),!ie||null===(d=J)||void 0===d||null===(v=d.video)||void 0===v||!v.isSSAIEnabled){n.next=21;break}return n.next=20,Un(e,J);case 20:B=n.sent;case 21:B?a(e,B):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:J}),c(e,"Incompatible / Missing Source")),((null===(f=J)||void 0===f||null===(p=f[Z])||void 0===p||null===(m=p.contentDetails)||void 0===m||null===(w=m.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=J)||void 0===k||null===(S=k[Z])||void 0===S||null===(T=S.closedCaptions)||void 0===T?void 0:T.length)>0)&&(X=(null===(F=J)||void 0===F||null===(Q=F[Z])||void 0===Q||null===(K=Q.contentDetails)||void 0===K?void 0:K.closedCaptions)||(null===(q=J)||void 0===q||null===(W=q[Z])||void 0===W?void 0:W.closedCaptions),H=X.filter(function(e){return"VTT"===e.format}),oe(e,H)),null!=t&&t.disableControls&&y(e),"MEDIA_TAILOR"==(null===(O=window)||void 0===O||null===(I=O.app_data)||void 0===I||null===(j=I.appcmsMain)||void 0===j||null===(E=j.adsConfig)||void 0===E?void 0:E.vodAdSticherProvider)&&null!==(P=window)&&void 0!==P&&null!==(D=P.app_data)&&void 0!==D&&null!==(A=D.appcmsMain)&&void 0!==A&&null!==(x=A.adsConfig)&&void 0!==x&&x.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(C=window)||void 0===C||null===(L=C.customData)||void 0===L||null===(R=L.ads)||void 0===R?void 0:R.vodAdSticherProvider)&&null!==(N=window)&&void 0!==N&&null!==(M=N.customData)&&void 0!==M&&null!==(_=M.ads)&&void 0!==_&&_.vodAdClientSideTracking?(t.customData.disableControls=!0,$=l(null==ce?void 0:ce.res,e)||{},ee=$.src,Fn(e,ee)):en(e,qn(qn(qn({},t),ce),{},{liveVideo:te,isDvrEnabled:ne,res:J,sres:Y})),gn(e,qn(qn(qn({},t),ce),{},{liveVideo:te}),o,{res:J,sres:Y});case 26:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Gn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Wn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Jn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Wn(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Wn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Xn,Yn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=$n(e);zn(r,{res:i},e,{resolve:t,reject:o})},$n=function(e){var n,t,o,r,i,l,a,s,u=null==e?void 0:e.streamingInfo,c=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,d=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,v=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.url)||null,f=(null==e||null===(i=e.streamingInfo)||void 0===i?void 0:i.posterUrl)||null,p=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.subtitles)||[],m=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,y=null==e?void 0:e.token,g=w(y),h=null==g?void 0:g.site;return Jn(Jn({id:null==Gn?void 0:Gn[h]},!d&&{directPlaybackUrl:null==c?void 0:c.url}),{},{video:{drmEnabled:d,streamingInfo:{videoAssets:Jn(Jn({},m&&{drmProvider:m}),{},{widevine:null==c?void 0:c.widevine,fairPlay:null==c?void 0:c.fairPlay,playReady:null==c?void 0:c.playReady})},liveDetails:{isDvrEnabled:null==u?void 0:u.isDvrEnabled},gist:Jn({},f&&{videoImageUrl:f}),contentDetails:Jn({},(null==p?void 0:p.length)>0&&{closedCaptions:ge(p)})},ads:{preRoll:{adTags:{web:Jn(Jn({},v&&{active:!0}),v&&{url:v})}}}})};function Zn(e,n){return et.apply(this,arguments)}function et(){return(et=q(z.mark(function e(n,t){var o,r,i,l,a,u;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,O();case 6:u=e.sent,k(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,g,h=un((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(h&&h.length)n.watchHistoryResumeTime=(null===(y=h[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(g=h[0])||void 0===g?void 0:g.watchedPercentage)||null;p.contentType="video",zn(l,{res:p},n,{resolve:o,reject:r})}else S(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){zn(l,{res:p},n,{resolve:o,reject:r})});else zn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){T(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nt(e,n){return tt.apply(this,arguments)}function tt(){return(tt=q(z.mark(function e(n,t){var o,r,i,l,a;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,O();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,I(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,zn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){T(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ot(e,n){return rt.apply(this,arguments)}function rt(){return(rt=q(z.mark(function e(n,t){var o,r,i,l,a,u,c;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,O();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,j(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),zn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){T(e,a,i,videoId)})}).catch(function(e){T(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function it(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function lt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?it(Object(t),!0).forEach(function(n){K(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):it(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function at(){return{loadVideoInstantly:A,onTimeUpdate:W,getVideoDuration:J,getVideoCurrentTime:X,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=q(z.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,g,h,b,w,S,O,I,j,E,P;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!R(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,g=null==e?void 0:e.videoId,h=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=g,w=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),H().set(null==e?void 0:e.refreshToken),w&&!F(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:Xn=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Xn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Xn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Xn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Xn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,S=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,O=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(I=null==e?void 0:e.errors)&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,me(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),U.set(e.apiBaseUrl),null!=e&&e.skin&&!ue(e.skin)||(e.skin="VL_ONE"),n.next=33,Le(e);case 33:O&&be("https://www.googletagmanager.com/gtag/js?id=".concat(O)).then(function(){return Q(O)}).catch(function(e){}),(j=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(S)))&&j.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};zn(S,{res:lt(lt({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){T(e,S,o,E)}):zn(S,{res:P},e,{resolve:t,reject:o})):b?Yn(e,{resolve:t,reject:o}):h?ot(e,{resolve:t,reject:o}):y?nt(e,{resolve:t,reject:o}):Zn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ce,getSelectedRendition:de,skip:v,getPlayer:le,play:x,pause:C,isPaused:L,detectBrowser:pe,rewind:f,loadVideo:a,seekToTimeStamp:$,isPlayerInitialised:R,load:N,authenticateLC:M,dispose:_,enableCaptions:re,disableCaptions:te,getCaptions:ne,getAudioTracks:ke,enableAudioTrack:Se,playSelectedResolution:fe,getSource:l,setVolume:Te,getVolume:Oe,disableControls:y,setPlaybackSpeed:Z,getEntitlementData:V,getSsaiEvents:An,getPlayerVersion:function(){return window.vl_player_version},getTextTracksWithCuesDetails:ie,playerEvents:ee,setMaxMinQualitySelector:ve}}export{at as V,hn as i,Fn as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as l}from"./skin-86e7e2b5.js";var n=function(n){var i,e=l(n),t=[];if((null==e||null===(i=e.tech_)||void 0===i?void 0:i.vhs)||!1){var o,u,v,d=null==e||null===(o=e.tech_)||void 0===o||null===(u=o.vhs)||void 0===u||null===(v=u.representations)||void 0===v?void 0:v.call(u);(null==d?void 0:d.length)>0&&(t=null==d?void 0:d.sort(function(l,n){return(null==l?void 0:l.height)==(null==n?void 0:n.height)?(null==n?void 0:n.bandwidth)-(null==l?void 0:l.bandwidth):(null==n?void 0:n.height)-(null==l?void 0:l.height)}))}else try{var h,a,r,s=null==e||null===(h=e.dash)||void 0===h||null===(a=h.mediaPlayer)||void 0===a||null===(r=a.getRepresentationsByType)||void 0===r?void 0:r.call(a,"video");(null==s?void 0:s.length)>0&&(t=null==s?void 0:s.sort(function(l,n){return n.height-l.height}))}catch(l){var c,g=null==e||null===(c=e.qualityLevels())||void 0===c?void 0:c.levels_;(null==g?void 0:g.length)>0&&(t=null==g?void 0:g.sort(function(l,n){return n.height-l.height}))}return t},i=function(n){var i,e,t,o,u,v,d=l(n);return null!=d&&d.qualityLevels?null==d||null===(e=d.qualityLevels())||void 0===e?void 0:e.selectedIndex_:null!=d&&null!==(i=d.tech_)&&void 0!==i&&i.vhs?null==d||null===(t=d.tech_)||void 0===t||null===(o=t.vhs)||void 0===o||null===(u=o.selectedRepresentation)||void 0===u||null===(v=u.call(o))||void 0===v?void 0:v.id:0},e=function(n,i,e){var t=l(n);try{t.maxQualitySelector({minHeight:i,maxHeight:e})}catch(l){}};export{i as a,n as g,e as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as r,e as d,B as c}from"./icons-0676e9c7.js";import{j as u,V as m,W as v,J as p,b as h,C as f}from"./generic-adf94b3d.js";import{e as b,s as y,p as C,j as g,g as E,i as N}from"./skin-86e7e2b5.js";import{a as k}from"./autoNextVideo-ec6a4046.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-512cd55a.js";import"js-cookie";import"ua-parser-js";import"./captions-bbc7eb98.js";import"./util-f9af2f94.js";function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}var S=a.getComponent("Component"),x=function(){n(w,S);var x,L,B=(x=w,L=I(),function(){var e,t=l(x);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function w(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,w),(d=B.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,b,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),m(C),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),k({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(w,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.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")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,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===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(N(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),w}();export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=".video-js .series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.video-js .series-selection .series-selector-icon {\n cursor: pointer;\n}\n\n.video-js .series-selection .series-selection-container {\n position: absolute;\n width: 250px;\n bottom: 0px;\n right: 0px;\n background: #000000 !important;\n z-index: 1;\n transition: right 300ms ease-out;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-container:hover{\n cursor: pointer;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-container {\n display: flex;\n align-items: center;\n width: 100%;\n padding: 8px;\n border-bottom: 1.5px solid gray;\n margin: 0;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-container:first-child {\nborder-top: 1.5px solid gray;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head {\n display: flex;\n align-items: center;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head .series-selector-title {\n text-align: left;\n background: #000;\n border-bottom: 1px solid #484848;\n width: 100%;\n padding: 0 3px 0 30px;\n font-size: 13px;\n line-height: 38px;\n margin: 0;\n}\n\n.video-js .series-selection .series-selector-cross-icon {\n cursor: pointer;\n position: absolute;\n right: 10px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-head .series-selector-back-icon {\n cursor: pointer;\n position: absolute;\n padding: 10px 8px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content {\n height: 90%;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n scrollbar-color: #666 #444;\n width: 100%;\n overflow: hidden auto;\n}\n\n/* Scroll Bar */\n/* .video-js .series-selection .series-selection-container .series-selector-content::-webkit-scrollbar { */\n /* display: none; */\n/* } */\n\n/* Hide scrollbar for IE, Edge and Firefox */\n/* .video-js .series-selection .series-selection-container .series-selector-content { */\n /* -ms-overflow-style: none; */\n /* IE and Edge */\n /* scrollbar-width: none; */\n /* Firefox */\n/* } */\n\n\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data{\n font-size: 12px;\n text-align: left;\n margin-left: 5px;\n flex: 1;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image{\n width: 96px;\n height: 65px;\n flex: 1;\n background-repeat: no-repeat;\n background-size: contain;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data .series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-data .series-title:hover{\n cursor: pointer;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-image .series-image {\n width: 100%;\n height: 100%;\n}\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n display: none;\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder:hover {\n cursor: pointer;\n}\n.video-js .series-selection .series-selection-container .series-selector-content .season-container .season-holder .season {\n display: flex;\n align-items: center;\n font-size: 13px;\n margin-left: 14px;\n}\n\n.video-js .series-selection .series-selection-container.hidden{\n right: -250px;\n}\n\n@media (max-width:600px){\n .video-js .series-selection{\n display: none;\n }\n}\n";export{e as default};
|
package/esm/skin-46862baf.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./features-96f3ac80.js";import{g as t}from"./skin-86e7e2b5.js";import{a as i,i as n,b as o}from"./index-8c443ff1.js";import{i as l}from"./browser-512cd55a.js";import r from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import c from"video.js";import v from"@babel/runtime/helpers/toConsumableArray";import p from"@babel/runtime/helpers/typeof";import{e as h}from"./generic-adf94b3d.js";import{s as m}from"./index-e8a82518.js";import"@babel/runtime/helpers/defineProperty";import"./renditions-7393c027.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-ec6a4046.js";import"./util-f9af2f94.js";import"./icons-0676e9c7.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"ua-parser-js";import"./captions-bbc7eb98.js";import"video.js/dist/video-js.min.css";import"./resolution-73611ca6.js";import"@babel/runtime/helpers/assertThisInitialized";var f=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},y=function(){function e(t){if(r(this,e),!t||"object"!==p(t))throw new Error("SettingsOptionOneWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.handleClick=t.callback||function(){},this.focused=t.focused||!1,"function"!=typeof this.handleClick)throw new Error("SettingsOptionOneWrapper: callback must be a function");this.handleClick=this.handleClick.bind(this)}return a(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionOneWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");n.textContent=this.title,i.appendChild(n);var o=document.createElement("p");o.textContent="›",o.style.fontSize="24px",i.appendChild(o),this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),i.addEventListener("keydown",function(e){"Enter"!==e.key&&"OK"!==e.key||t.handleClick()}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),g=function(){function e(t){if(r(this,e),!t||"object"!==p(t))throw new Error("SettingsOptionTwoWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.selected=t.selected||!1,this.focused=t.focused||!1,this.id=t.id,"string"!=typeof this.title)throw new Error("SettingsOptionTwoWrapper: title must be a string")}return a(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionTwoWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");if(n.textContent=this.title,i.appendChild(n),this.selected){i.classList.add("selected");var o=document.createElement("span");o.appendChild(f('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),i.appendChild(o)}this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),b=function(){function e(t){if(r(this,e),!t||"object"!==p(t))throw new Error("Sidebar: props must be a valid object");if(this.title=t.title||"Settings",this.items=t.items||[{text:"Video Quality",isSelected:!0,callback:function(){}},{text:"Audio Language",isSelected:!1,callback:function(){}},{text:"Subtitles",isSelected:!1,callback:function(){}}],this.klassname=t.klassname||"default-sidebar",this.currentFocusedOption=null,this.lastFocusedElement=t.lastFocusedElement||null,this.type=t.type||"navigation",this.focused=t.focused||!1,this.callback=t.callback||function(){},this.onselect=t.onselect||function(){},"function"!=typeof this.callback)throw new Error("Sidebar: callback must be a function");if(!["navigation","selection"].includes(this.type))throw new Error('Sidebar: type must be either "navigation" or "selection"')}return a(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("Sidebar: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname;var n=document.createElement("div");n.textContent=this.title,n.className="settingsHeading",i.appendChild(n);var o=document.createElement("div");"navigation"===this.type?this.items.forEach(function(e,i){var n=new y({title:e.text,klassname:"default-option-wrapper",focused:0===i,callback:e.callback});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}):"selection"===this.type&&this.items.forEach(function(e,i){var n=new g({title:e.text,klassname:"default-option-wrapper",focused:0===i,selected:e.isSelected,id:e.id});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}),i.appendChild(o),this.sidebarElement=i,e.appendChild(i),this.addEventListeners(),this.focus()}},{key:"addEventListeners",value:function(){var e=this;if(!this.sidebarElement)throw new Error("Sidebar: sidebarElement is not initialized");this.sidebarElement.addEventListener("keydown",function(t){"ArrowDown"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusNext()):"ArrowUp"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusPrevious()):"Backspace"===t.key||"Escape"===t.key||10009===t.keyCode||461===t.keyCode||196===t.keyCode||8===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.unfocus(),e.unmount()):"Enter"!==t.key&&"OK"!==t.key||(t.preventDefault(),t.stopPropagation(),"selection"===e.type&&e.selectionTypeAction())})}},{key:"selectionTypeAction",value:function(){if(this.currentFocusedOption){this.items.forEach(function(e){if(e.instance){e.instance.optionWrapper.classList.remove("selected"),e.instance.selected=!1;var t=e.instance.optionWrapper.querySelector("span");t&&t.remove();var i=e.instance.optionWrapper.querySelector("svg");i&&i.remove()}}),this.currentFocusedOption.optionWrapper.classList.add("selected"),this.currentFocusedOption.selected=!0;this.currentFocusedOption.optionWrapper.appendChild(f('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),this.onselect(this.currentFocusedOption)}}},{key:"focusNext",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.nextElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focusPrevious",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.previousElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.focus()}},{key:"unfocus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.blur()}},{key:"unmount",value:function(){this.sidebarElement&&(this.sidebarElement.remove(),this.sidebarElement=void 0,this.lastFocusedElement&&(this.callback(),this.lastFocusedElement.focus()),this.currentFocusedOption=null)}}]),e}();function k(e,t){var i,n,o,l,r,a,s,u=[{text:"Video Quality",isSelected:!0,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l,r;if(!e)return;var a=null===(i=t.qualityLevels())||void 0===i?void 0:i.levels_,s=-1==(null===(n=t.qualityLevels())||void 0===n?void 0:n.selectedIndex_)?"auto":null===(o=t.qualityLevels())||void 0===o?void 0:o.levels_[null===(l=t.qualityLevels())||void 0===l?void 0:l.selectedIndex_].height,u=[{text:"Auto",id:"auto",isSelected:"auto"===s,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}].concat(v(a.map(function(t){return{text:"".concat(t.height,"p"),id:t.height,isSelected:s===t.height,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}})));r=new b({title:"Video Quality",items:u,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){if("auto"===e.id)t.el_.player.qualityLevels().selectedIndex_=-1;else{var i=a.findIndex(function(t){return t.height===e.id});-1!==i&&(t.el_.player.qualityLevels().selectedIndex_=i)}},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),r.mount(null==t?void 0:t.el())}(s,e)}}];null!=e&&null!==(i=e.audioTracks())&&void 0!==i&&i.tracks_&&(null==e||null===(n=e.audioTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.length)>1&&u.push({text:"Audio Language",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l;if(!e)return;var r=null==t||null===(i=t.audioTracks())||void 0===i?void 0:i.tracks_,a=(null==r||null===(n=r.find(function(e){return e.enabled}))||void 0===n?void 0:n.label)||(null==r||null===(o=r[0])||void 0===o?void 0:o.label)||"Default",s=r.map(function(t){return{text:t.label,id:t.id,isSelected:a===t.label,callback:function(){e.currentFocusedOption.focus(),l.unmount()}}});l=new b({title:"Audio Language",items:s,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){null==r||r.forEach(function(t){t.enabled=!1,t.enabled=t.id===e.id})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),l.mount(null==t?void 0:t.el())}(s,e)}});var d=null==e||null===(l=e.textTracks())||void 0===l?void 0:l.tracks_;return(d=d.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))&&(null===(r=d)||void 0===r?void 0:r.length)>0&&u.push({text:"Subtitles",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o;if(!e)return;var l=t.textTracks().tracks_;l=l.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var r=(null===(i=l)||void 0===i||null===(n=i.find(function(e){return"showing"===e.mode}))||void 0===n?void 0:n.label)||"Captions Off",a=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===r,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}].concat(v(l.map(function(t){return{text:t.label,id:t.id,kind:t.kind,lang:t.language,mode:t.mode,isSelected:r===t.label,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}})));o=new b({title:"Closed Captions",items:a,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){var t;null===(t=l)||void 0===t||t.forEach(function(t){t.mode=t.id===e.id?"showing":"hidden"})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),o.mount(null==t?void 0:t.el())}(s,e)}}),(s=new b({title:"Settings",items:u,klassname:"default-sidebar",lastFocusedElement:t,type:"navigation",focused:!0,callback:function(){var i;null===(i=e.controlBar)||void 0===i||i.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){t.focus()},100)}})).mount(null==e?void 0:e.el()),null===(a=e.controlBar)||void 0===a||a.addClass("hidePlayerControls"),e.options({inactivityTimeout:0}),s}function C(e){var t=w();return function(){var i,n=d(e);if(t){var o=d(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return u(this,i)}}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}var L=function(e){var t=function(t){s(n,t);var i=C(n);function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);var l=(t=i.call(this,e,o)).el_,a=l.querySelector(".vjs-icon-placeholder");l.querySelector(".vjs-control-text").textContent="CC",l.classList.add("vjs-ClosedCaption-button");return a.append(f('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M92.7268 78.3757H81.5999V88.0906L57.4173 78.3757H9.27274V16.2273H92.7268V78.3757ZM17.6184 69.5027H57.3108L73.7991 74.6169L73.8001 69.5027H84.3821V25.2107H17.6184V69.5027Z" fill="currentColor"/>\n<rect x="20.8628" y="34.7727" width="39.4091" height="6.95455" fill="currentColor"/>\n<rect x="69.5446" y="34.7727" width="11.5909" height="6.95455" fill="currentColor"/>\n<rect x="44.0446" y="51" width="37.0909" height="9.27273" fill="currentColor"/>\n<rect x="20.8628" y="51" width="13.9091" height="9.27273" fill="currentColor"/>\n</svg>')),t}return a(n,[{key:"handleClick",value:function(){!function(e){var t,i,n,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.textTracks().tracks_,a=(null===(t=r=r.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))||void 0===t||null===(i=t.find(function(e){return"showing"===e.mode}))||void 0===i?void 0:i.label)||"Captions Off",s=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===a,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}].concat(v(r.map(function(e){return{text:e.label,id:e.id,kind:e.kind,lang:e.language,mode:e.mode,isSelected:a===e.label,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}})));(o=new b({title:"Closed Captions",items:s,klassname:"default-sidebar",lastFocusedElement:l,type:"selection",focused:!0,onselect:function(t){var i,n;null===(i=r)||void 0===i||i.forEach(function(e){e.mode=e.id===t.id?"showing":"hidden"}),o.unmount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)},callback:function(){var t;o.unmount(null==e?void 0:e.el()),null===(t=e.controlBar)||void 0===t||t.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)}})).mount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.addClass("hidePlayerControls"),e.options({inactivityTimeout:0})}(e,this)}}]),n}(c.getComponent("Button"));return c.registerComponent("CloseCaptionButton",t),new t(e,{})};var S=function(e){if(e)try{var t,i,n,o=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(n=i.entitlement)||void 0===n?void 0:n.deviceType)||"smart_tv_samsung";e&&(!function(e){try{var t;"smart_tv_samsung"==e&&null!==(t=window)&&void 0!==t&&t.tizen&&(window.tizen.tvinputdevice.registerKey("MediaPlayPause"),window.tizen.tvinputdevice.registerKey("MediaRewind"),window.tizen.tvinputdevice.registerKey("MediaFastForward"),window.tizen.tvinputdevice.registerKey("Exit"),window.tizen.tvinputdevice.registerKey("MediaPlay"),window.tizen.tvinputdevice.registerKey("MediaPause"),window.tizen.tvinputdevice.registerKey("MediaStop"))}catch(e){}}(o),e.on("keydown",function(t){10252==t.keyCode||"xfinityX1"==o&&179==t.keyCode?e.paused()?e.play():e.pause():415==t.keyCode?e.play():19==t.keyCode?e.pause():412===t.keyCode||"xfinityX1"==o&&227==t.keyCode?e.currentTime(e.currentTime()-10):(417===t.keyCode||"xfinityX1"==o&&228==t.keyCode)&&e.currentTime(e.currentTime()+10)}))}catch(e){}};function E(u,d){var v=t(u);v.addClass("skin_smartTV"),function(e,t){var i,n,o,l,u,d,v,p,h,m,y,g,b,w,L,E,x,T,B,O,F,_,j,W,q,D,M,P,V,A,z,I=null==e?void 0:e.el();I&&(I.style.color=(null==t||null===(i=t.theme)||void 0===i?void 0:i.color)||(null===(n=window)||void 0===n||null===(o=n.app_data)||void 0===o||null===(l=o.appcmsMain)||void 0===l||null===(u=l.brand)||void 0===u||null===(d=u.cta)||void 0===d||null===(v=d.primary)||void 0===v?void 0:v.backgroundColor)||"#FFFFFF");null===(p=e.controlBar)||void 0===p||p.removeChild("VolumePanel"),null===(h=e.controlBar)||void 0===h||h.removeChild("AudioTrackButton"),null===(m=e.controlBar)||void 0===m||m.removeChild("FullscreenToggle"),null===(y=e.controlBar)||void 0===y||y.removeChild("PictureInPictureToggle"),null===(g=e.controlBar)||void 0===g||g.removeChild("skipBackward"),null===(b=e.controlBar)||void 0===b||b.removeChild("skipForward"),null===(w=e.controlBar)||void 0===w||w.removeChild("PictureInPictureToggle");var H=document.createElement("div");H.className="custom-smartTV-progress-bar",null===(L=e.controlBar)||void 0===L||null===(E=L.el())||void 0===E||E.append(H);var R=null===(x=e.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");try{H.style.opacity=0,R.el_.style.opacity=0}catch(e){}var G=null===(T=e.controlBar)||void 0===T?void 0:T.getChild("ProgressControl"),K=null===(B=e.controlBar)||void 0===B?void 0:B.getChild("CurrentTimeDisplay"),N=null===(O=e.controlBar)||void 0===O?void 0:O.getChild("SeekToLive");N&&(N.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live");var Z=null===(F=e.controlBar)||void 0===F?void 0:F.getChild("LiveDisplay"),Q=null===(_=e.controlBar)||void 0===_?void 0:_.getChild("RemainingTimeDisplay");G&&K&&N&&H.append(K.el(),G.el(),Q.el(),null==Z?void 0:Z.el());null==R||R.addChild(N);var U=e.getChild("TitleBar");null==R||R.addChild(U);var X=function(e){var t=function(t){s(n,t);var i=C(n);function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);var l=(t=i.call(this,e,o)).el_;return l.querySelector(".vjs-control-text").textContent="Start From Beginning",l.classList.add("vjs-startFromBeginning-button"),t}return a(n,[{key:"handleClick",value:function(){(null==e?void 0:e.currentTime())>0&&e.currentTime(0)}}]),n}(c.getComponent("Button"));return c.registerComponent("StartFromBeginning",t),new t(e,{})}(e);null==R||R.addChild(X);var J,Y,$,ee=function(e){var t=function(t){s(n,t);var i=C(n);function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);var l=(t=i.call(this,e,o)).el_,a=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Settings",l.classList.add("vjs-Settings-button"),a.append(f('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M90.913 45.8867V56.1132L80.0959 58.1496C79.4266 61.1027 78.2623 63.9214 76.6523 66.4864L82.8603 75.597L75.586 82.8192L66.5158 76.664C63.9394 78.2538 61.1222 79.4156 58.1737 80.1041L56.1361 90.913H45.8542L43.8193 80.1041C40.8708 79.4158 38.0535 78.2541 35.4773 76.664L26.4071 82.8192L19.1313 75.597L25.2918 66.4864C23.7008 63.9116 22.5379 61.0962 21.8482 58.1496L11.087 56.1132V45.8867L21.8482 43.8028C22.5428 40.8493 23.7235 38.0315 25.3421 35.4646L19.1327 26.4016L26.4085 19.1807L35.4787 25.3359C38.045 23.7263 40.8656 22.5627 43.8207 21.8945L45.8556 11.0869H56.1375L58.1751 21.8945C61.1301 22.5631 63.9506 23.7267 66.5172 25.3359L75.5874 19.1807L82.8617 26.4016L76.6537 35.5135C78.2633 38.0617 79.4277 40.8647 80.0973 43.8028L90.913 45.8867ZM28.9308 51.0214C28.9434 63.1872 38.8221 73.0394 50.9956 73.0271C56.8418 73.0212 62.4462 70.6944 66.5758 66.5588C70.7054 62.4232 73.0219 56.8174 73.0156 50.9748C73.0025 38.809 63.1234 28.9572 50.9499 28.9701C38.7764 28.983 28.9182 38.8556 28.9308 51.0214Z" fill="currentColor"/>\n</svg>')),t}return a(n,[{key:"handleClick",value:function(){k(e,this)}}]),n}(c.getComponent("Button"));return c.registerComponent("SettingsButton",t),new t(e,{})}(e);if(null==R||R.addChild(ee),!(null!=t&&null!==(j=t.res)&&void 0!==j&&null!==(W=j.video)&&void 0!==W&&null!==(q=W.streamingInfo)&&void 0!==q&&q.isLiveStream)||null!=t&&null!==(D=t.res)&&void 0!==D&&null!==(M=D.video)&&void 0!==M&&null!==(P=M.liveDetails)&&void 0!==P&&P.isDvrEnabled){var te,ie,ne=function(e){var t=function(t){s(n,t);var i=C(n);function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);var l=(t=i.call(this,e,o)).el_,a=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Forward",l.classList.add("vjs-forward-button"),a.append(f('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M461.37 551.05a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67t-12.02 3.59zm109.47-75.65a33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85 33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83zm-1.5 66.6q-4.43 8.19-13.15 8.19c-5.91 0-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.83-4.43 22.32z"></path><path d="M687.85 490l-25.1 5a153.7 153.7 0 1 1-301.6.77c15.68-80.78 92.29-134.47 173-122.56L528.5 389l66.74-8-46.45-48.58-5.79 16.24C447 331.88 354.66 395 336 490.9a179.29 179.29 0 0 0 141.77 210.2 182.22 182.22 0 0 0 34.61 3.35A179.4 179.4 0 0 0 687.85 490z"></path></g></svg>')),t}return a(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t>=0){var i=t+30;e.currentTime(i)}}}]),n}(c.getComponent("Button"));return c.registerComponent("ForwardButton",t),new t(e,{})}(e);null===(te=e.controlBar)||void 0===te||te.addChild(ne);var oe=function(e){var t=function(t){s(n,t);var i=C(n);function n(e){var t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,n);var l=(t=i.call(this,e,o)).el_,a=l.querySelector(".vjs-icon-placeholder");return l.querySelector(".vjs-control-text").textContent="Rewind",l.classList.add("vjs-rewind-button"),a.append(f('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M473.39 547.46q-4.22 3.6-12 3.59a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67zm68.15 16.45a33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83 33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85zm1.57-66.65q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.86-4.43 22.32-7.34 8.19-13.15 8.19-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39z"></path><path d="M688 490.9c-18.66-95.93-111-159-207-142.24l-5.84-16.29L428.74 381l66.74 8-5.64-15.72c80.7-11.91 157.31 41.78 173 122.56a153.67 153.67 0 1 1-301.6-.78l-25.1-5a179.47 179.47 0 0 0 175.47 214.39 182.93 182.93 0 0 0 34.6-3.35A179.29 179.29 0 0 0 688 490.9z"></path></g></svg>')),t}return a(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t-30>=0){var i=t-30;e.currentTime(i)}else e.currentTime(0)}}]),n}(c.getComponent("Button"));return c.registerComponent("RewindButton",t),new t(e,{})}(e);null===(ie=e.controlBar)||void 0===ie||ie.addChild(oe)}null!=t&&null!==(V=t.res)&&void 0!==V&&null!==(A=V.video)&&void 0!==A&&null!==(z=A.gist)&&void 0!==z&&z.title&&e.titleBar.update({title:null==t||null===(J=t.res)||void 0===J||null===(Y=J.video)||void 0===Y||null===($=Y.gist)||void 0===$?void 0:$.title});S(e)}(v,d),function(o,r){var a=t(o);a&&(a.on("loadeddata",function(){var e,t,s,u,d;try{var c,v,p,h,m,f;if(null!=r&&null!==(c=r.res)&&void 0!==c&&null!==(v=c.video)&&void 0!==v&&null!==(p=v.streamingInfo)&&void 0!==p&&p.isLiveStream&&null!=r&&null!==(h=r.res)&&void 0!==h&&null!==(m=h.video)&&void 0!==m&&null!==(f=m.liveDetails)&&void 0!==f&&f.isDvrEnabled){var y,g,b=(null===(y=a.seekable())||void 0===y?void 0:y.end(0))-(null===(g=a.seekable())||void 0===g?void 0:g.start(0));window.customData.dvrWindow=b}else window.customData.dvrWindow=null}catch(e){}try{var k,C,w;if(null!=r&&null!==(k=r.res)&&void 0!==k&&null!==(C=k.video)&&void 0!==C&&null!==(w=C.streamingInfo)&&void 0!==w&&w.isLiveStream){var S,E=null===(S=a.controlBar)||void 0===S?void 0:S.getChild("ProgressControl");if(E){var x=E.el().querySelector(".vjs-play-progress");x&&(x.style.width="100%")}}}catch(e){}try{a.qualityLevels().selectedIndex_=-1}catch(e){}try{var T,B,O=a.textTracks().tracks_;O=O.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var F=null===(T=a.controlBar)||void 0===T?void 0:T.getChild("CustomControlSpacer");if(O&&(null===(B=O)||void 0===B?void 0:B.length)>0){var _=L(a);null==F||F.addChild(_)}else try{F.children_[2].el_.style.right="115px"}catch(e){}try{var j,W;F.el_.style.opacity=1,(null===(j=a.controlBar)||void 0===j||null===(W=j.el_)||void 0===W?void 0:W.querySelector(".custom-smartTV-progress-bar")).style.opacity=1}catch(e){}}catch(e){}!(null!=r&&null!==(e=r.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(s=t.app_data)&&void 0!==s&&null!==(u=s.appcmsMain)&&void 0!==u&&null!==(d=u.features)&&void 0!==d&&d.auto_play)||null!=r&&r.liveVideo||i(o,r),null!=r&&r.liveVideo||l()||n(o)}),a.one("play",function(){var t,i,n,l;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(o,null===(n=window)||void 0===n||null===(l=n.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}(u,d),function(e,i){var n,l,r,a,s,u,d,c,v,p,f,y,g,b,k=h(null==i?void 0:i.res,e)||{},C=k.src;o(e,i),("MEDIA_TAILOR"==(null===(n=window)||void 0===n||null===(l=n.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.adsConfig)||void 0===a?void 0:a.vodAdSticherProvider)&&null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(c=d.adsConfig)&&void 0!==c&&c.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(p=v.customData)||void 0===p||null===(f=p.ads)||void 0===f?void 0:f.vodAdSticherProvider)&&null!==(y=window)&&void 0!==y&&null!==(g=y.customData)&&void 0!==g&&null!==(b=g.ads)&&void 0!==b&&b.vodAdClientSideTracking)&&m(e,C);!function(e,i){var n=t(e);if(n){var o,l,r=!1,a=!1;null===(o=n.controlBar)||void 0===o||o.on("keydown",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!0)}),null===(l=n.controlBar)||void 0===l||l.on("keyup",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!1)}),n.on("seeking",function(){var e,t,i;n.paused()||r||(r=!0,n.pause());var o=n.currentTime();if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.dvrWindow)if(o=n.liveTracker.liveCurrentTime()-o,0==Math.round(o)){var l,a;o=window.customData.dvrWindow;var s=null===(l=n.controlBar)||void 0===l||null===(a=l.customControlSpacer)||void 0===a?void 0:a.getChild("SeekToLive");s&&(s.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=0)}else if(o>window.customData.dvrWindow){var u,d;o=0;var c=null===(u=n.controlBar)||void 0===u||null===(d=u.customControlSpacer)||void 0===d?void 0:d.getChild("SeekToLive");c&&(c.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}else{var v,p;o=window.customData.dvrWindow-o;var h=null===(v=n.controlBar)||void 0===v||null===(p=v.customControlSpacer)||void 0===p?void 0:p.getChild("SeekToLive");h&&(h.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}var m=o/(window.customData.dvrWindow?window.customData.dvrWindow:n.duration())*100,f=null===(i=n.controlBar)||void 0===i?void 0:i.getChild("ProgressControl");if(f){var y=f.el().querySelector(".vjs-play-progress");y&&(y.style.width=m+"%")}}),n.on("seeked",function(){var e,t,o,l,s,u;if(n.paused()&&r&&!a&&(r=!1,n.play()),null!=i&&null!==(e=i.res)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&null!==(o=t.streamingInfo)&&void 0!==o&&o.isLiveStream&&null!=i&&null!==(l=i.res)&&void 0!==l&&null!==(s=l.video)&&void 0!==s&&null!==(u=s.liveDetails)&&void 0!==u&&u.isDvrEnabled){var d,c,v=null===(d=n.controlBar)||void 0===d||null===(c=d.customControlSpacer)||void 0===c?void 0:c.getChild("SeekToLive");n.liveTracker.seekedBehindLive_?v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0):v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=1)}})}}(e,i)}(u,d)}export{E as initialiseSkin};
|
package/esm/skin-86e7e2b5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import n from"video.js";var t=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},i=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","VL_SmartTV"],o=function(e){return!i.includes(e)},r=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},l=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},a=function(e){return l(e)},u=function(n,i){if(i){var o,r,l=t(i);if(l&&"function"==typeof l.el&&null!=l&&null!==(o=l.el())&&void 0!==o&&null!==(r=o.classList)&&void 0!==r&&r.contains("skin_defaultv2"))return void d(n)}var a=e(document.querySelectorAll("[video-idx]"));console.log(a),a.map(function(e){var t=e.parentNode,i=e.getAttribute("video-idx");t.style.background=i==n?"gray":"none"})},d=function(n){e(document.querySelectorAll("[video-idx]")).map(function(e){var t=e.getAttribute("video-idx");e.style.border=t==n?"2px solid white":"none"})},c=function(){var n=e(document.getElementsByClassName("vjs-control vjs-button open"));null==n||n.map(function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()})},s=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},m="",v=function(e,n){var t,i=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&m!==t){var o=window.getComputedStyle(i,null).getPropertyValue("height");n&&(n.style.height="".concat(o)),m=t}}(e,n)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){i()},100)})},w=function(e,n){var i,o=t(e),r=t(e).el(),l=new ResizeObserver(function(){var t;null!==(t=n.classList)&&void 0!==t&&t.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){f(e,n)},300))});l.observe(r),o.on("dispose",function(){l.disconnect()}),o.on("fullscreenchange",function(){setTimeout(function(){f(e,n)},50)})},f=function(e,n){var t;if(n){var i=document.getElementById(e),o=null===(t=window.getComputedStyle(i,null))||void 0===t?void 0:t.height;n.style.height!==o&&(n.style.height="".concat(o))}},p=function(){window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler)};function y(e,n){var t=null,i=null;return function(){for(var o=this,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];i?(clearTimeout(t),t=setTimeout(function(){Date.now()-i>=n&&(e.apply(o,l),i=Date.now())},n-(Date.now()-i))):(e.apply(this,l),i=Date.now())}}export{o as a,a as b,p as c,r as d,c as e,v as f,t as g,u as h,s as i,w as j,d as k,l as p,f as s,y as t};
|
package/esm/skin-e75ce862.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as s,m as d}from"./features-96f3ac80.js";import{M as u,a as m,c as v,d as p}from"./icons-0676e9c7.js";import{g as c,b as h}from"./skin-86e7e2b5.js";import{g as f}from"./renditions-7393c027.js";import{g as b}from"./captions-bbc7eb98.js";import{a as g,i as j,b as y}from"./index-8c443ff1.js";import{i as C,d as V}from"./browser-512cd55a.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./generic-adf94b3d.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-ec6a4046.js";import"./util-f9af2f94.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function w(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,r,a,s,d,u,m;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(r=b(i))||void 0===r?void 0:r.length)>0&&e(i,n),!(null!=n&&null!==(a=n.series)&&void 0!==a&&a.enable||null!==(s=window)&&void 0!==s&&null!==(d=s.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(m=u.features)&&void 0!==m&&m.auto_play)||null!=n&&n.liveVideo||g(i,n),function(l,e){var o,i=Math.floor(l/60),n=null===(o=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===o?void 0:o[0];n&&(n.style.marginRight=i>60?"56px":"41px");var t=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");e&&t.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(t.duration(),(null==n?void 0:n.liveVideo)||!1),null!=n&&n.liveVideo||C()||j(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function k(l,e){c(l).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-e4b35c14.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),w(l,e),function(l,e){var o,i,n,t,r,a,s=c(l);null==s||null===(o=s.controlBar)||void 0===o||null===(i=o.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(h(u(window.controlsColor))),null==s||null===(t=s.controlBar)||void 0===t||null===(r=t.getChild("FullscreenToggle"))||void 0===r||null===(a=r.el())||void 0===a||a.appendChild(h(m(window.controlsColor)));var d=document.getElementsByClassName("vjs-time-control");e.liveVideo&&d[0]&&(d[0].style.display="none")}(l,e),function(l,e){var o,u,m,c,h,f;0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());e.liveVideo||t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&s(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&d(l,e)}(l,e),y(l,e)}export{k as initialiseSkin};
|
package/esm/skin-f03e04cd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as l,d as o,e as i,o as e,p as n,q as r}from"./features-96f3ac80.js";import{g as a}from"./skin-86e7e2b5.js";import{a as d,i as t,b as s}from"./index-8c443ff1.js";import{i as u}from"./browser-512cd55a.js";import"videojs-contrib-quality-menu";import v from"video.js";import{i as p,s as m}from"./index-e8a82518.js";import{e as c,d as b,j as y}from"./generic-adf94b3d.js";import{c as f,d as g}from"./icons-0676e9c7.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-7393c027.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-ec6a4046.js";import"./util-f9af2f94.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"video.js/dist/video-js.min.css";import"./captions-bbc7eb98.js";import"./resolution-73611ca6.js";import"@babel/runtime/helpers/assertThisInitialized";import"axios";import"js-cookie";import"ua-parser-js";function h(o,i){var e,n=a(o),r=(null==i||null===(e=i.res)||void 0===e?void 0:e.siteId)||"";n&&(n.on("loadeddata",function(){var l,e,n,s,v;!function(l){var o=a(l);o&&(null==o||o.qualityMenu,o.qualityMenu({useResolutionLabels:!0}))}(o),!(null!=i&&null!==(l=i.series)&&void 0!==l&&l.enable||null!==(e=window)&&void 0!==e&&null!==(n=e.app_data)&&void 0!==n&&null!==(s=n.appcmsMain)&&void 0!==s&&null!==(v=s.features)&&void 0!==v&&v.auto_play)||null!=i&&i.liveVideo||d(o,i),null!=i&&i.liveVideo||u()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===r||t(o)}),n.one("play",function(){var i,e,n,r;null!==(i=window)&&void 0!==i&&null!==(e=i.customData)&&void 0!==e&&e.iframeOverlayUrl&&l(o,null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function j(l,d){a(l).addClass("skin_vlone"),h(l,d),function(l,a){var d,t,u,v,h,j,w,C,k,B,_,A,T,M,V,O,R,D,I=c(null==a?void 0:a.res,l)||{};I.src;var P=(null==a?void 0:a.skin_settings)||{};null!=P&&P.skipBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)&&o(l,"VL_ONE",f());(null!=P&&P.rewindBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)||1==(null==a?void 0:a.liveui))&&i(l,"VL_ONE",g());(null==a||null===(d=a.relatedVideos)||void 0===d||null===(t=d.content)||void 0===t?void 0:t.length)>0&&e(l,null==a?void 0:a.relatedVideos);null!=a&&null!==(u=a.series)&&void 0!==u&&u.enable&&n(l,a);(null==a||null===(v=a.streams)||void 0===v?void 0:v.length)>1&&r(l,null==a?void 0:a.streams);if(s(l,a),p(l,a),"MEDIA_TAILOR"==(null===(h=window)||void 0===h||null===(j=h.app_data)||void 0===j||null===(w=j.appcmsMain)||void 0===w||null===(C=w.adsConfig)||void 0===C?void 0:C.vodAdSticherProvider)&&null!==(k=window)&&void 0!==k&&null!==(B=k.app_data)&&void 0!==B&&null!==(_=B.appcmsMain)&&void 0!==_&&null!==(A=_.adsConfig)&&void 0!==A&&A.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(T=window)||void 0===T||null===(M=T.customData)||void 0===M||null===(V=M.ads)||void 0===V?void 0:V.vodAdSticherProvider)&&null!==(O=window)&&void 0!==O&&null!==(R=O.customData)&&void 0!==R&&null!==(D=R.ads)&&void 0!==D&&D.vodAdClientSideTracking){var q,x=null;if(null!=a&&null!==(q=a.series)&&void 0!==q&&q.enable){var L,E,S,N=null===(L=b())||void 0===L||null===(E=L.video)||void 0===E||null===(S=E.gist)||void 0===S?void 0:S.id,U=y(),$=(null==U?void 0:U.get(N))||{t:0,p:0},z=$.t;$.p<95&&(x=z)}else{var G=a.watchHistoryResumeTime;a.watchedPercentage<95&&(x=G)}m(l,x)}}(l,d),w(l,d)}var w=function(l,o){var i,e,n,r,d,t,s,u,p,m,c,b,y=a(l),f=(null==o?void 0:o.theme)||{},g=v.dom.$(".vjs-play-progress"),h=v.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(i=window)||void 0===i||null===(e=i.app_data)||void 0===e||null===(n=e.appcmsMain)||void 0===n||null===(r=n.brand)||void 0===r||null===(d=r.cta)||void 0===d||null===(t=d.primary)||void 0===t?void 0:t.backgroundColor)),g&&(g.style.background="".concat(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(p=u.appcmsMain)||void 0===p||null===(m=p.brand)||void 0===m||null===(c=m.cta)||void 0===c||null===(b=c.primary)||void 0===b?void 0:b.backgroundColor));var j=y.getChild("BigPlayButton")||null;(null==f?void 0:f.progressBarColor)&&g&&(g.style.background=f.progressBarColor),(null==f?void 0:f.playButtonBackgroundColor)&&j&&(j.el().style.background=f.playButtonBackgroundColor),(null==f?void 0:f.playButtonColor)&&h&&(h.style.color=f.playButtonColor),(null==f?void 0:f.playButtonType)&&("square"==(null==f?void 0:f.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{j as initialiseSkin};
|
package/esm/util-f9af2f94.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as n}from"./skin-86e7e2b5.js";var t=function(t,e,o){var i=n(t);i?e>=0&&e<=i.duration()?(o({status:!0,msg:"Successfully seeked to timestamp : ".concat(e)}),i.currentTime(e)):o({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):o("Cannot find player with id: '".concat(t,"'"))},e=function(t,e){var o=n(t);if(!o)return"Cannot find player with id: '".concat(t,"'");try{return o.playbackRate(e),"Playback speed set to ".concat(e,"x")}catch(n){return"Error: ".concat(n)}},o=function(t,e){var o=n(t);o?o.on("timeupdate",function(){return e(o.currentTime())}):e("Cannot find player with id: '".concat(t,"'"))},i=function(t,e){var o=n(t);o?o.on("ended",function(){return e(!0)}):e("Cannot find player with id: '".concat(t,"'"))},a=function(t){var e=n(t);return e?e.duration():"Cannot find player with id: '".concat(t,"'")},c=function(t){var e=n(t);return e?e.currentTime():"Cannot find player with id: '".concat(t,"'")};function r(){var t=function(t,e){var o=n(t);if(!o)throw"Cannot find player with id: '".concat(t,"'");if("function"!=typeof e)throw"Callback function (cb) is missing or not a function";return o};return{onPlay:function(n,e){t(n,e).on("play",function(){return e()})},onPause:function(n,e){t(n,e).on("pause",function(){return e()})},onMute:function(n,e){var o=t(n,e);o.on("volumechange",function(){o.muted()?e({muted:!0}):e({muted:!1})})},onPictureInPictureChange:function(n,e){var o=t(n,e);o.on("enterpictureinpicture",function(){e({pip:!0})}),o.on("leavepictureinpicture",function(){e({pip:!1})})},onFullScreenChange:function(n,e){var o=t(n,e);o.on("fullscreenchange",function(n){o.isFullscreen_?e({isFullscreen:!0}):e({isFullscreen:!1})})},onSetVolume:function(n,e){var o=t(n,e);o.on("volumechange",function(){var n=100*o.volume().toFixed(2);o.muted()?e({vol:0}):e({vol:n})})},onSeeked:function(n,e){var o=t(n,e);o.on("seeked",function(){e({seeked:o.currentTime()})})},onSubtitleEnable:function(n,e){var o=t(n,e);o.textTracks().on("change",function(n){console.log(o.textTracks());var t=o.textTracks().tracks_.filter(function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode});t.length>0&&e({enabled:t[0]})})},onDisableSubtitles:function(n,e){var o=t(n,e);o.textTracks().on("change",function(n){var t,i;console.log(o.textTracks()),(null==o||null===(t=o.textTracks())||void 0===t||null===(i=t.tracks_)||void 0===i?void 0:i.every(function(n){return"showing"!=n.mode}))&&e({captions_disabled:!0})})}}}export{c as a,i as b,e as c,a as g,o,r as p,t as s};
|