@viewlift/player-backup 0.0.4 → 0.0.5
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/assets/chromecast/ic_cast_connected_white_24dp.png +0 -0
- package/assets/chromecast/ic_cast_white_24dp.png +0 -0
- package/assets/icons.js +280 -0
- package/cjs/bundle.css +6 -4
- package/cjs/{icons-31107288.js → icons-13fe8cd2.js} +1 -1
- package/cjs/{index-bff7e44d.js → index-a8eea6fa.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-442ced01.js → keyboardShortcuts-08766e33.js} +1 -1
- package/cjs/{multicam-641c8936.js → multicam-40730da9.js} +1 -1
- package/cjs/{multicamv2-1785d103.js → multicamv2-2f12e994.js} +1 -1
- package/cjs/{mwebPotraitTray-5e40f387.js → mwebPotraitTray-e368959b.js} +1 -1
- package/cjs/{nextEpisodeButton-cf0fba6c.js → nextEpisodeButton-9fdf3008.js} +1 -1
- package/cjs/{playlist-f4194c77.js → playlist-f64f211f.js} +1 -1
- package/cjs/{series-19ca0b31.js → series-6f8bc1ec.js} +1 -1
- package/cjs/{skin-5c528eb9.js → skin-131e28b8.js} +1 -1
- package/cjs/{skin-d273a67c.js → skin-24049085.js} +1 -1
- package/cjs/{skin-3b924699.js → skin-f046cec8.js} +1 -1
- package/cjs/{skin-33c99681.js → skin-f11cb5ae.js} +1 -1
- package/cjs/{videoSelector-94aef4c4.js → videoSelector-9e9af1dd.js} +1 -1
- package/esm/bundle.css +6 -4
- package/esm/{icons-1b3dc9b8.js → icons-b4262cf4.js} +1 -1
- package/esm/{index-4b461f6b.js → index-43a926d8.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-2c4aedf3.js → keyboardShortcuts-0dcc8c1b.js} +1 -1
- package/esm/{multicam-368a139e.js → multicam-10d5b522.js} +1 -1
- package/esm/{multicamv2-bf02fe29.js → multicamv2-3e741991.js} +1 -1
- package/esm/{mwebPotraitTray-8da1133d.js → mwebPotraitTray-6958c3d4.js} +1 -1
- package/esm/{nextEpisodeButton-c1ed4d6a.js → nextEpisodeButton-b4bb3e6b.js} +1 -1
- package/esm/{playlist-10f6c1b7.js → playlist-7bd2abaf.js} +1 -1
- package/esm/{series-1a29aba5.js → series-f6401a60.js} +1 -1
- package/esm/{skin-be5e0051.js → skin-28ff6a04.js} +1 -1
- package/esm/{skin-494bdada.js → skin-6fd19538.js} +1 -1
- package/esm/{skin-a1d7a42d.js → skin-8921c8d8.js} +1 -1
- package/esm/{skin-e200e100.js → skin-c9d9606e.js} +1 -1
- package/esm/{videoSelector-e34ce32a.js → videoSelector-b963cd6c.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),t=require("axios"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("@babel/runtime/helpers/toConsumableArray"),a=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),d=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status","beacon-msn-dev":"https://analytics-api.develop.monumentalsportsnetwork.com/player-beacon","beacon-msn-qa":"https://analytics-api.qa.monumentalsportsnetwork.com/player-beacon","beacon-msn-uat":"https://analytics-api.uat.monumentalsportsnetwork.com/player-beacon","beacon-msn-prod":"https://analytics-api.monumentalsportsnetwork.com/player-beacon","beacon-prod":"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",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"};function m(){window.dataLayer.push(arguments)}function p(e,t){m("event",e,t)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?f(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var w=3e4;function g(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function y(){var e=window.sessionStorage.getItem("uid");return e||(e=g(),window.sessionStorage.setItem("uid",e),e)}function b(e){return e?String(e):""}window.initialise=function(e){var t,n,o;window.sid=g();var i=function(e){switch(e){case"prod":default:return v["beacon-prod"];case"msndev":return v["beacon-msn-dev"];case"msnqa":return v["beacon-msn-qa"];case"msnuat":return v["beacon-msn-uat"];case"msnprod":return v["beacon-msn-prod"]}}((null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.url)||"prod");window.beaconUrl=i,window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());p(r?"FAILED_TO_START":"DROPPED_STREAM",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),w),p("PLAY",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),w))})))},window.handleBufferTimer=function(e,t){if(t.el_){var n,o,i,r=e+30;if(Math.round(r,2)%5==0)p("BUFFERING",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",h({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.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,o,i,r,a;p("AD_REQUEST",h({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),p("AD_IMPRESSION",h({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,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(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),a=o.end(i);if(T(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var T=function(e,t,n){return e>=t&&e<=n};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?O(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r=[h(h({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:b(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?b(e.videoPosition):"",apod:!0===e.isAdEvent?b(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:b(e.ttFirstFrame),bitrate:b(e.bitrate),connectionspeed:"",resolutionheight:b(e.resHeight),resolutionwidth:b(e.resWidth),bufferhealth:b(e.bufferHealth)})];t({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:r}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var I=function(e,n){var o,i;return t({url:R(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})},k=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:C(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:D(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},P=function(e){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(e)},S=function(){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV1)},C=function(e){return H()+"".concat(null==v?void 0:v.getVideoInfoV1,"/").concat(e)},D=function(e,t){return H()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(t,"/").concat(e)},j=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV1)},x=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV2)},R=function(){return H()+"".concat(null==v?void 0:v.getVideoDetails)},A=function(e,t){return H()+"".concat(null==v?void 0:v.getSeriesDetails)},H=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==v?void 0:v.apiBaseUrl)},_=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},F=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var B=function(){return navigator.userAgent.indexOf("Edg")>-1?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?N(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var V,L=function(e,t){var n,o,i,r,a,l,d,s,u=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,c=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,v=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,m=(null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;if(u){var p=z(c,t);return m&&(p=M(M({},p),{},{src:q(M(M({},e.video),{},{src:"".concat(p.src)}))})),p}if(v){var f=U(c);return m&&(f=M(M({},f),{},{src:q(M(M({},e.video),{},{src:"".concat(f.src)}))})),f}if(null!=c&&c.mpeg){var h=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(c);return h}return null},q=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},U=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},z=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=B(),l=ne(t);if("Safari"===a){var d=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,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken}}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken}}}),u}};var W=function(e){V=e},K=function(){return V},G=function(e,t){for(var n=ne(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},J=function(e,t){for(var n=ne(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},$=function(e){var t,n=ne(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},Q=function(e,t){var n=ne(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},X=function(e){i(e).play()},Y=function(e){i(e).pause()},Z=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},ee=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},te=function(e){return!!i.getPlayer("".concat(e))},ne=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},oe=function(e,t,n){var o,i,r,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&k(t,n).then((function(e){var t,n,o,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){I(t,n).then((function(t){var n,r,l=null==t?void 0:t.data,d=(null==l||null===(n=l.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;W(t.data);var s=L(l,e);if(s){var u,c,v,m,p,f,h,w,g,y,b,T=null==l||null===(u=l.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl,O=ne(e);if(O.pause(e),O.poster(T),le(e,s),O.on("loadstart",(function(){d&&o({status:!0,msg:"Video Loaded",response:l})})),O.on("loadeddata",(function(){F(),o({status:!0,msg:"Video Loaded",response:l})})),O.one("play",(function(){a&&O.currentTime(a)})),O.one("error",(function(){var e;i({status:!1,msg:(null==O||null===(e=O.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==l||null===(v=l.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==l||null===(f=l.video)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0)w=((null==l||null===(g=l.video)||void 0===g||null===(y=g.contentDetails)||void 0===y?void 0:y.closedCaptions)||(null==l||null===(b=l.video)||void 0===b?void 0:b.closedCaptions)).filter((function(e){return"VTT"===e.format})),Q(e,w);else!function(e){var t=ne(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else _(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){de(t,e,i)}))}))},ie=function(e,t){var n=ne(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},re=function(e){var t=ne(e);if(ae(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ae=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()},le=function(e,t){ne(e).src(t)},de=function(e,t,n){var o,r,a,l,d,s,u,c=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,v=(null==e||null===(a=e.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.errorMessage)||(null==e?void 0:e.message);te(t)||i(t,{fluid:!0}),_(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),n&&n({response:null==e||null===(u=e.response)||void 0===u?void 0:u.data,messsage:"".concat(v)})},se=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var t=document.getElementsByClassName("vjs-big-play-button")[0];t&&(t.style.display="none");var n=document.getElementsByClassName("vjs-fullscreen-control")[0];n&&(n.style.display="none")};function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ce(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ue(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ve=function(e,t){var n=ne(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,i,r,a,l=this.el(),d=videojs.dom.getPointerPosition(l,t).x;videojs.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(s),s&&"CONNECTED"===u){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*d,c.seek()}}))},me=function(e){return new Promise((function(t,n){if(pe(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),t()}}))},pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};var fe,he,we=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=Object.freeze({__proto__:null,importChromecast:function(){me("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"),import("@silvermine/videojs-chromecast").then((function(e){e.default(i)}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),me("https://imasdk.googleapis.com/js/sdkloader/ima3.js")},loadDashLibrary:we,loadEMELibrary:ge}),be=[],Te=0;function Oe(e,n,o){var i;be=[],Te=0,fe=o;var r=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=ne(e);a&&a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());be.includes(Te)||(e==Te?(be.push(e),function(e,n,o){var i,r,a;he=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var l=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),s=Math.floor(e.duration()),u=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,c={};"v1"==he?c={videoId:fe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:u}:"v2"==he&&(c={videoId:fe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),doneWatching:d>=s-5,profileId:l});(function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:j(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r={doneWatching:!1,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime,profileId:null==e?void 0:e.profileId};return t({url:x(),method:"POST",headers:{Authorization:n},data:r})}})(c,n.token,he).then((function(e){})).catch((function(e){})),Te=d+o}(a,n,r)):e>Te&&(Te=e+r))}))}var Ee=function(e,t,n){var o=ne(e);o?t>=0&&t<=o.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),o.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},Ie=function(e,t){var n=ne(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},ke=function(e,t){var n=ne(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},Pe=function(e,t){var n=ne(e);n?n.one("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},Se=function(e){var t=ne(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")},Ce=0,De=-1,je=function e(t,n,o,i,r){t>o.length-1||oe(n,o[t].id,i).then((function(e){r&&r(e)})).catch((function(t){setTimeout((function(){De++,e(De,n,o,i,r)}),3e3)}))},xe=function(e,t,n){var o=ne(e);if(o)if(t>=0&&t<=100){var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Re=function(e){var t=ne(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var He=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=ne(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;W(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;xe(t,sessionStorage.getItem("volume")||"100");var r,a,s=K();(F(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:l}:{response:l})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&Oe(t,n,null==s||null===(r=s.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id);null!=n&&n.nextVideos&&function(e){var t,n;console.log(e,"HERRE"),De++,clearTimeout(Ce);var o=null==e||null===(t=e.nextVideos)||void 0===t?void 0:t.content,i=null==e||null===(n=e.nextVideos)||void 0===n?void 0:n.cb,r=e.playerId,a=e.token;De>o.length-1||Pe(r,(function(){oe(r,o[De].id,a).then((function(e){W(e.response),i&&i(e)})).catch((function(e){De++,Ce=setTimeout((function(){je(De,r,o,a,i)}),3e3)}))}))}(n)})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,o,i,r,a,l,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S,p=null===(l=window)||void 0===l||null===(d=l.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;_(t,(null==s||null===(e=s.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==s||null===(n=s.error())||void 0===n?void 0:n.message)||"Some error occured"})})),s.one("play",(function(){null!=n&&n.watchHistoryResumeTime&&s.currentTime(null==n?void 0:n.watchHistoryResumeTime)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},_e=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-33c99681.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-d273a67c.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-3b924699.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&Promise.resolve().then((function(){return require("./skin-5c528eb9.js")})).then((function(n){n.initialiseSkin(e,t)}))},Fe=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}var Ne,Me=i.getComponent("Component"),Ve=function(t){s(o,Me);var n=Be(o);function o(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,o),l=n.call(this,t,s),e(d(l),"masterRenditions",[]),e(d(l),"addCustomFont",(function(e){var t=i.dom.createEl("div",{className:"font hideCustomFonts"}),n=i.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});i.dom.appendContent(t,n);var o=i.dom.createEl("div",{className:"font-options"});o.style.fontSize="12px",l.fontSizeOptions.map((function(e,t){var n=i.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;l.changeFontSize(t)})),i.dom.appendContent(o,n)})),i.dom.appendContent(t,o),i.dom.appendContent(e,t)})),e(d(l),"resetRenditions",(function(){r(document.getElementsByClassName("rendition")).map((function(e){i.dom.removeClass(e,"selected")}))})),l.playerId=null==s?void 0:s.playerId,l.skin=null==s?void 0:s.skin,l.icon=null==s?void 0:s.icon,l.masterRenditions=[],l.fontSizeOptions=[10,12,14],l.createRenditions(s.renditions),window.height=null,l}return l(o,[{key:"toggleContentOnHover",value:function(e,t){var n=i.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=i.dom.$(".renditions",this.contentEl()),n=i.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el();i.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"  Settings":""," ");var o=i.dom.createEl("div",{className:"content hidden"}),r=i.dom.createEl("div",{innerHTML:"Quality",className:"title"}),a=i.dom.createEl("div",{className:"resolution"});i.dom.appendContent(a,r),this.toggleContentOnHover(n,o);var l=i.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var o,r=i.dom.createEl("div",{className:"relative"}),a=((null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes["AVERAGE-BANDWIDTH"])/1048576).toFixed(1),d="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");d="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=i.dom.createEl("p",{innerHTML:d,className:"rendition",res:e.height,bandwidth:e.bandwidth});i.dom.appendContent(r,s),i.dom.appendContent(l,r),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Le(t.playerId,e.target),i.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=B()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var o=i.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(r,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=i.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});i.dom.appendContent(o,d),i.dom.appendContent(l,o),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,Le(t.playerId,e.target),i.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",l)),i.dom.appendContent(a,l),i.dom.appendContent(o,a),i.dom.appendContent(n,o)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var o=null;e&&e.on("cuechange",(function(){var t=e.activeCues[0];if(t&&document.querySelector(".auto.selected")){var n,i,r,a,l,d,s,u;if(null!=t&&null!==(n=t.value)&&void 0!==n&&null!==(i=n.resolution)&&void 0!==i&&i.height&&o!==(null==t||null===(r=t.value)||void 0===r||null===(a=r.resolution)||void 0===a?void 0:a.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==t||null===(s=t.value)||void 0===s||null===(u=s.resolution)||void 0===u?void 0:u.height,"p");o=null==t||null===(l=t.value)||void 0===l||null===(d=l.resolution)||void 0===d?void 0:d.height}}))}},{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"container"}),t=i.dom.createEl("div",{className:"setting-icon"});return i.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var o,r,a,l,d=null===(o=this.player_)||void 0===o||null===(r=o.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(l=a.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=i.dom.createEl("div",{className:"relative"}),c=i.dom.createEl("p",{innerHTML:"Auto ".concat(d,"p"),className:"rendition auto selected",bandwidth:s,res:d});c.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),i.dom.addClass(c,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Le(n.playerId,null,!0))})),i.dom.appendContent(u,c),i.dom.appendContent(t,u)}else{var v=i.dom.createEl("div",{className:"relative"}),m=i.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),i.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,Le(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),Le=function(e,t,n){var o,r=ne(e),a=null==t?void 0:t.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var l=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(l),r.play()}),100);var d=i.dom.$(".content");d&&i.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u,c;null==r||null===(u=r.dash)||void 0===u||null===(c=u.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,m,p,f;null==r||null===(v=r.dash)||void 0===v||null===(m=v.mediaPlayer)||void 0===m||m.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(p=r.dash)||void 0===p||null===(f=p.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var h=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(h),r.play()}),100);var w=i.dom.$(".content");w&&i.dom.addClass(w,"hidden")}}},qe=Object.freeze({__proto__:null,playSelectedResolution:Le,default:Ve}),Ue=function(e){var t,n=ne(e),o=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var i,r,a=null==n||null===(i=n.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==a?void 0:a.length)>0&&(o=null==a?void 0:a.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,d,s=null==n||null===(l=n.dash)||void 0===l||null===(d=l.mediaPlayer)||void 0===d?void 0:d.getBitrateInfoListFor("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort((function(e,t){return t.height-e.height})))}return o};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function We(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ze(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ze(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Ke=function(t,r,a,l){var d,s,u,c,v,m,p,f,h,w,g,y,b,T,O=r.res,E=void 0===O?null:O,I=r.sres,k=void 0===I?null:I,P=(null===(d=window)||void 0===d||null===(s=d.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,S=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==P&&"NOT_CONNECTED"!==P?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==E||null===(m=E.video)||void 0===m||null===(p=m.gist)||void 0===p?void 0:p.videoImageUrl,D=(null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.isDvrEnabled)||!1,j=function(e){var t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&(t={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-6,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==B()&&(t=ce(ce({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),t}(a),x=(null==E||null===(w=E.video)||void 0===w||null===(g=w.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,R=(T={controls:!0,playsinline:!0,fluid:!0,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,pictureInPictureToggle:(a.skin,!1)},liveui:D},e(T,"autoplay",null==a?void 0:a.autoplay),e(T,"html5",We(We(We({vhs:{limitRenditionByPlayerDimensions:!1}},0==(null==a||null===(y=a.customData)||void 0===y?void 0:y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(b=a.customData)||void 0===b?void 0:b.nativeVideoTracks)&&{nativeVideoTracks:!1}),{},{nativeTextTracks:!1})),e(T,"poster",C),e(T,"techOrder",S),e(T,"chromecast",{requestCustomDataFn:function(e){var n=ne(t);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var o,i,r,a,l,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var h=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var w=null==e||null===(r=e.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.runtime;m.duration=w;var g=null==e||null===(l=e.video)||void 0===l||null===(d=l.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(E,e,o)}}),e(T,"plugins",j),T),A=i(t,R,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,p,f,h,w,g,y,b,T,O,I,P,S,C,j,H,F,N;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x&&l.resolve(We({status:!0,msg:"Player Initialised"},k?{seriesResponse:k,response:E}:{response:E})),window.initialise(A),window.firstFrame(A),"white"!==window.controlsColor&&Fe(window.controlsColor,A),/Android|iPhone/i.test(navigator.userAgent)&&(i.options.hls.overrideNative=!0),O=null==E||null===(n=E.video)||void 0===n?void 0:n.drmEnabled,I=(null==E||null===(r=E.ads)||void 0===r||null===(d=r.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(u=s.web)||void 0===u?void 0:u.active)&&(null==E||null===(c=E.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(p=m.web)||void 0===p?void 0:p.url),P=null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.startOverTime,!O){e.next=16;break}if("Safari"!==B()){e.next=14;break}return e.next=12,ge();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ge(),we()]);case 16:D&&ve(t,P),I&&initialiseAdvertisement(t,I),(S=L(E,t))?le(t,S):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:E}),_(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==E||null===(w=E.video)||void 0===w||null===(g=w.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null==E||null===(b=E.video)||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(N=(null==E||null===(j=E.video)||void 0===j||null===(H=j.contentDetails)||void 0===H?void 0:H.closedCaptions)||(null==E||null===(F=E.video)||void 0===F?void 0:F.closedCaptions),C=N.filter((function(e){return"VTT"===e.format})),Q(t,C)),null!=a&&a.disableControls?se():_e(t,We(We(We({},a),R),{},{liveVideo:x,isDvrEnabled:D,res:E,sres:k})),He(t,We(We(We({},a),R),{},{liveVideo:x}),l,{res:E,sres:k});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};exports.VLPlayerCore=function(){return{loadVideoInstantly:ie,onTimeUpdate:ke,getVideoDuration:Se,onVideoEnded:Pe,init:function(e){return new Promise((function(n,o){var i,r,a,l,d;if(!te(null==e?void 0:e.playerId)){var s=null==e?void 0:e.videoId,u=(null==e?void 0:e.series)||!1;window.videoId=s;var c=null==e?void 0:e.token;Ne=JSON.parse(atob(c.split(".")[1])),e.isAnonymousUser=!(null===(i=Ne)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=Ne)||void 0===r?void 0:r.site)||null,e.userId=(null===(a=Ne)||void 0===a?void 0:a.userId)||null,window.sessionStorage.setItem("uid",null===(l=Ne)||void 0===l?void 0:l.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",c);var v,p=null==e?void 0:e.playerId,f=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,h=null==e?void 0:e.airplay,w=null==e?void 0:e.apiBaseUrl,g=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,y=null==e?void 0:e.errors;y&&(window.customErrors=y),window.customData=null==e?void 0:e.customData,w&&(window.playerEntitlementUrl=w),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(v=e.skin)||"carousel"===v||"V2"===v||"defaultV2"===v)||(e.skin="default"),null!=e&&e.enableAdvertisements&&Promise.resolve().then((function(){return ye})).then((function(e){e.importIMA()})),!f||null!=e&&e.series||Promise.resolve().then((function(){return ye})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return ye})).then((function(e){e.importAirplay()})),g&&me("https://www.googletagmanager.com/gtag/js?id=".concat(g)).then((function(){return e=g,window.dataLayer=window.dataLayer||[],m("js",new Date),void m("config",e);var e})).catch((function(e){})),u?function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),a=r&&r.countryCode;return t({url:A(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web",countryCode:a,episodeData:!0},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})}(s,c).then((function(t){var i=t.data.series,r=t.data.series.seasons[0].episodes[0].id;I(r,c).then((function(t){var r,a,l;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(a=r.video)||void 0===a||null===(l=a.gist)||void 0===l?void 0:l.contentType,W(t.data),Ke(p,{res:null==t?void 0:t.data,sres:i},e,{resolve:n,reject:o})})).catch((function(e){de(e,p,o)}))})).catch((function(e){de(e,p,o)})):I(s,c).then((function(t){var i,r,a,l;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,W(null==t?void 0:t.data);var d=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(l=e.watchHistory)&&void 0!==l&&l.enable?k(s,c).then((function(t){var i,r,a,l,s;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(s=t.data)||void 0===s?void 0:s.watchedTime)||null,Ke(p,{res:d},e,{resolve:n,reject:o})})).catch((function(t){var i,r,a,l;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(t)),Ke(p,{res:d},e,{resolve:n,reject:o})})):Ke(p,{res:d},e,{resolve:n,reject:o})})).catch((function(e){de(e,p,o)}))}}))},getRenditions:Ue,skip:Z,getPlayer:ne,play:X,pause:Y,detectBrowser:B,rewind:ee,loadVideo:le,seekToTimeStamp:Ee,isPlayerInitialised:te,load:oe,dispose:re,enableCaptions:G,disableCaptions:J,getCaptions:$,playSelectedResolution:Le,getSource:L,setVolume:xe,getVolume:Re,disableControls:se,setPlaybackSpeed:Ie}},exports.createIconMarkup=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},exports.detectBrowser=B,exports.getCurrentVideo=K,exports.getPlayer=ne,exports.getRenditions=Ue,exports.getSeriesWatchHistory=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:S(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:P(i),headers:{Authorization:e.token}})},exports.load=oe,exports.pause=Y,exports.play=X,exports.resolution=qe,exports.rewind=ee,exports.setCurrentVideo=W,exports.skip=Z;
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),t=require("axios"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("@babel/runtime/helpers/toConsumableArray"),a=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),d=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status","beacon-msn-dev":"https://analytics-api.develop.monumentalsportsnetwork.com/player-beacon","beacon-msn-qa":"https://analytics-api.qa.monumentalsportsnetwork.com/player-beacon","beacon-msn-uat":"https://analytics-api.uat.monumentalsportsnetwork.com/player-beacon","beacon-msn-prod":"https://analytics-api.monumentalsportsnetwork.com/player-beacon","beacon-prod":"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",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"};function m(){window.dataLayer.push(arguments)}function p(e,t){m("event",e,t)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?f(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var w=3e4;function g(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function y(){var e=window.sessionStorage.getItem("uid");return e||(e=g(),window.sessionStorage.setItem("uid",e),e)}function b(e){return e?String(e):""}window.initialise=function(e){var t,n,o;window.sid=g();var i=function(e){switch(e){case"prod":default:return v["beacon-prod"];case"msndev":return v["beacon-msn-dev"];case"msnqa":return v["beacon-msn-qa"];case"msnuat":return v["beacon-msn-uat"];case"msnprod":return v["beacon-msn-prod"]}}((null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.url)||"prod");window.beaconUrl=i,window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());p(r?"FAILED_TO_START":"DROPPED_STREAM",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),w),p("PLAY",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),w))})))},window.handleBufferTimer=function(e,t){if(t.el_){var n,o,i,r=e+30;if(Math.round(r,2)%5==0)p("BUFFERING",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",h({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.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,o,i,r,a;p("AD_REQUEST",h({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),p("AD_IMPRESSION",h({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,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(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),a=o.end(i);if(T(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var T=function(e,t,n){return e>=t&&e<=n};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?O(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r=[h(h({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:b(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?b(e.videoPosition):"",apod:!0===e.isAdEvent?b(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:b(e.ttFirstFrame),bitrate:b(e.bitrate),connectionspeed:"",resolutionheight:b(e.resHeight),resolutionwidth:b(e.resWidth),bufferhealth:b(e.bufferHealth)})];t({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:r}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var I=function(e,n){var o,i;return t({url:R(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})},k=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:C(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:D(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},P=function(e){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(e)},S=function(){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV1)},C=function(e){return H()+"".concat(null==v?void 0:v.getVideoInfoV1,"/").concat(e)},D=function(e,t){return H()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(t,"/").concat(e)},j=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV1)},x=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV2)},R=function(){return H()+"".concat(null==v?void 0:v.getVideoDetails)},A=function(e,t){return H()+"".concat(null==v?void 0:v.getSeriesDetails)},H=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==v?void 0:v.apiBaseUrl)},_=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},F=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var B=function(){return navigator.userAgent.indexOf("Edg")>-1?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?N(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var V,L=function(e,t){var n,o,i,r,a,l,d,s,u=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,c=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,v=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,m=(null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;if(u){var p=z(c,t);return m&&(p=M(M({},p),{},{src:q(M(M({},e.video),{},{src:"".concat(p.src)}))})),p}if(v){var f=U(c);return m&&(f=M(M({},f),{},{src:q(M(M({},e.video),{},{src:"".concat(f.src)}))})),f}if(null!=c&&c.mpeg){var h=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(c);return h}return null},q=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},U=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},z=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=B(),l=ne(t);if("Safari"===a){var d=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,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken}}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken}}}),u}};var W=function(e){V=e},K=function(){return V},G=function(e,t){for(var n=ne(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},J=function(e,t){for(var n=ne(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},$=function(e){var t,n=ne(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},Q=function(e,t){var n=ne(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},X=function(e){i(e).play()},Y=function(e){i(e).pause()},Z=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},ee=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},te=function(e){return!!i.getPlayer("".concat(e))},ne=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},oe=function(e,t,n){var o,i,r,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&k(t,n).then((function(e){var t,n,o,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){I(t,n).then((function(t){var n,r,l=null==t?void 0:t.data,d=(null==l||null===(n=l.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;W(t.data);var s=L(l,e);if(s){var u,c,v,m,p,f,h,w,g,y,b,T=null==l||null===(u=l.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl,O=ne(e);if(O.pause(e),O.poster(T),le(e,s),O.on("loadstart",(function(){d&&o({status:!0,msg:"Video Loaded",response:l})})),O.on("loadeddata",(function(){F(),o({status:!0,msg:"Video Loaded",response:l})})),O.one("play",(function(){a&&O.currentTime(a)})),O.one("error",(function(){var e;i({status:!1,msg:(null==O||null===(e=O.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==l||null===(v=l.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==l||null===(f=l.video)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0)w=((null==l||null===(g=l.video)||void 0===g||null===(y=g.contentDetails)||void 0===y?void 0:y.closedCaptions)||(null==l||null===(b=l.video)||void 0===b?void 0:b.closedCaptions)).filter((function(e){return"VTT"===e.format})),Q(e,w);else!function(e){var t=ne(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else _(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){de(t,e,i)}))}))},ie=function(e,t){var n=ne(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},re=function(e){var t=ne(e);if(ae(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ae=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()},le=function(e,t){ne(e).src(t)},de=function(e,t,n){var o,r,a,l,d,s,u,c=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,v=(null==e||null===(a=e.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.errorMessage)||(null==e?void 0:e.message);te(t)||i(t,{fluid:!0}),_(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),n&&n({response:null==e||null===(u=e.response)||void 0===u?void 0:u.data,messsage:"".concat(v)})},se=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var t=document.getElementsByClassName("vjs-big-play-button")[0];t&&(t.style.display="none");var n=document.getElementsByClassName("vjs-fullscreen-control")[0];n&&(n.style.display="none")};function ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ce(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ue(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ue(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ve=function(e,t){var n=ne(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,i,r,a,l=this.el(),d=videojs.dom.getPointerPosition(l,t).x;videojs.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var s=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S;if(console.log(s),s&&"CONNECTED"===u){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*d,c.seek()}}))},me=function(e){return new Promise((function(t,n){if(pe(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),t()}}))},pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};var fe,he,we=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=Object.freeze({__proto__:null,importChromecast:function(){me("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"),import("@silvermine/videojs-chromecast").then((function(e){e.default(i)}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),me("https://imasdk.googleapis.com/js/sdkloader/ima3.js")},loadDashLibrary:we,loadEMELibrary:ge}),be=[],Te=0;function Oe(e,n,o){var i;be=[],Te=0,fe=o;var r=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=ne(e);a&&a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());be.includes(Te)||(e==Te?(be.push(e),function(e,n,o){var i,r,a;he=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var l=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),s=Math.floor(e.duration()),u=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,c={};"v1"==he?c={videoId:fe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:u}:"v2"==he&&(c={videoId:fe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),doneWatching:d>=s-5,profileId:l});(function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:j(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r={doneWatching:!1,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime,profileId:null==e?void 0:e.profileId};return t({url:x(),method:"POST",headers:{Authorization:n},data:r})}})(c,n.token,he).then((function(e){})).catch((function(e){})),Te=d+o}(a,n,r)):e>Te&&(Te=e+r))}))}var Ee=function(e,t,n){var o=ne(e);o?t>=0&&t<=o.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),o.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},Ie=function(e,t){var n=ne(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},ke=function(e,t){var n=ne(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},Pe=function(e,t){var n=ne(e);n?n.one("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},Se=function(e){var t=ne(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")},Ce=0,De=-1,je=function e(t,n,o,i,r){t>o.length-1||oe(n,o[t].id,i).then((function(e){r&&r(e)})).catch((function(t){setTimeout((function(){De++,e(De,n,o,i,r)}),3e3)}))},xe=function(e,t,n){var o=ne(e);if(o)if(t>=0&&t<=100){var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Re=function(e){var t=ne(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var He=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=ne(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;W(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;xe(t,sessionStorage.getItem("volume")||"100");var r,a,s=K();(F(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ae(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:l}:{response:l})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&Oe(t,n,null==s||null===(r=s.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id);null!=n&&n.nextVideos&&function(e){var t,n;console.log(e,"HERRE"),De++,clearTimeout(Ce);var o=null==e||null===(t=e.nextVideos)||void 0===t?void 0:t.content,i=null==e||null===(n=e.nextVideos)||void 0===n?void 0:n.cb,r=e.playerId,a=e.token;De>o.length-1||Pe(r,(function(){oe(r,o[De].id,a).then((function(e){W(e.response),i&&i(e)})).catch((function(e){De++,Ce=setTimeout((function(){je(De,r,o,a,i)}),3e3)}))}))}(n)})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,o,i,r,a,l,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S,p=null===(l=window)||void 0===l||null===(d=l.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;_(t,(null==s||null===(e=s.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==s||null===(n=s.error())||void 0===n?void 0:n.message)||"Some error occured"})})),s.one("play",(function(){null!=n&&n.watchHistoryResumeTime&&s.currentTime(null==n?void 0:n.watchHistoryResumeTime)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},_e=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-f11cb5ae.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-24049085.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-f046cec8.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&Promise.resolve().then((function(){return require("./skin-131e28b8.js")})).then((function(n){n.initialiseSkin(e,t)}))},Fe=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)};function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}var Ne,Me=i.getComponent("Component"),Ve=function(t){s(o,Me);var n=Be(o);function o(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,o),l=n.call(this,t,s),e(d(l),"masterRenditions",[]),e(d(l),"addCustomFont",(function(e){var t=i.dom.createEl("div",{className:"font hideCustomFonts"}),n=i.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});i.dom.appendContent(t,n);var o=i.dom.createEl("div",{className:"font-options"});o.style.fontSize="12px",l.fontSizeOptions.map((function(e,t){var n=i.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;l.changeFontSize(t)})),i.dom.appendContent(o,n)})),i.dom.appendContent(t,o),i.dom.appendContent(e,t)})),e(d(l),"resetRenditions",(function(){r(document.getElementsByClassName("rendition")).map((function(e){i.dom.removeClass(e,"selected")}))})),l.playerId=null==s?void 0:s.playerId,l.skin=null==s?void 0:s.skin,l.icon=null==s?void 0:s.icon,l.masterRenditions=[],l.fontSizeOptions=[10,12,14],l.createRenditions(s.renditions),window.height=null,l}return l(o,[{key:"toggleContentOnHover",value:function(e,t){var n=i.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=i.dom.$(".renditions",this.contentEl()),n=i.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el();i.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"  Settings":""," ");var o=i.dom.createEl("div",{className:"content hidden"}),r=i.dom.createEl("div",{innerHTML:"Quality",className:"title"}),a=i.dom.createEl("div",{className:"resolution"});i.dom.appendContent(a,r),this.toggleContentOnHover(n,o);var l=i.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var o,r=i.dom.createEl("div",{className:"relative"}),a=((null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes["AVERAGE-BANDWIDTH"])/1048576).toFixed(1),d="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");d="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var s=i.dom.createEl("p",{innerHTML:d,className:"rendition",res:e.height,bandwidth:e.bandwidth});i.dom.appendContent(r,s),i.dom.appendContent(l,r),s.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Le(t.playerId,e.target),i.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=B()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var o=i.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(r,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=i.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});i.dom.appendContent(o,d),i.dom.appendContent(l,o),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,Le(t.playerId,e.target),i.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",l)),i.dom.appendContent(a,l),i.dom.appendContent(o,a),i.dom.appendContent(n,o)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var o=null;e&&e.on("cuechange",(function(){var t=e.activeCues[0];if(t&&document.querySelector(".auto.selected")){var n,i,r,a,l,d,s,u;if(null!=t&&null!==(n=t.value)&&void 0!==n&&null!==(i=n.resolution)&&void 0!==i&&i.height&&o!==(null==t||null===(r=t.value)||void 0===r||null===(a=r.resolution)||void 0===a?void 0:a.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==t||null===(s=t.value)||void 0===s||null===(u=s.resolution)||void 0===u?void 0:u.height,"p");o=null==t||null===(l=t.value)||void 0===l||null===(d=l.resolution)||void 0===d?void 0:d.height}}))}},{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"container"}),t=i.dom.createEl("div",{className:"setting-icon"});return i.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var o,r,a,l,d=null===(o=this.player_)||void 0===o||null===(r=o.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(l=a.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=i.dom.createEl("div",{className:"relative"}),c=i.dom.createEl("p",{innerHTML:"Auto ".concat(d,"p"),className:"rendition auto selected",bandwidth:s,res:d});c.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),i.dom.addClass(c,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Le(n.playerId,null,!0))})),i.dom.appendContent(u,c),i.dom.appendContent(t,u)}else{var v=i.dom.createEl("div",{className:"relative"}),m=i.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),i.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,Le(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),Le=function(e,t,n){var o,r=ne(e),a=null==t?void 0:t.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var l=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(l),r.play()}),100);var d=i.dom.$(".content");d&&i.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u,c;null==r||null===(u=r.dash)||void 0===u||null===(c=u.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,m,p,f;null==r||null===(v=r.dash)||void 0===v||null===(m=v.mediaPlayer)||void 0===m||m.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(p=r.dash)||void 0===p||null===(f=p.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var h=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(h),r.play()}),100);var w=i.dom.$(".content");w&&i.dom.addClass(w,"hidden")}}},qe=Object.freeze({__proto__:null,playSelectedResolution:Le,default:Ve}),Ue=function(e){var t,n=ne(e),o=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var i,r,a=null==n||null===(i=n.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==a?void 0:a.length)>0&&(o=null==a?void 0:a.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,d,s=null==n||null===(l=n.dash)||void 0===l||null===(d=l.mediaPlayer)||void 0===d?void 0:d.getBitrateInfoListFor("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort((function(e,t){return t.height-e.height})))}return o};function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function We(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ze(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ze(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Ke=function(t,r,a,l){var d,s,u,c,v,m,p,f,h,w,g,y,b,T,O=r.res,E=void 0===O?null:O,I=r.sres,k=void 0===I?null:I,P=(null===(d=window)||void 0===d||null===(s=d.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,S=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==P&&"NOT_CONNECTED"!==P?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==E||null===(m=E.video)||void 0===m||null===(p=m.gist)||void 0===p?void 0:p.videoImageUrl,D=(null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.isDvrEnabled)||!1,j=function(e){var t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&(t={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-6,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==B()&&(t=ce(ce({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),t}(a),x=(null==E||null===(w=E.video)||void 0===w||null===(g=w.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,R=We(We({controls:!0,playsinline:!0,fluid:!0},"carousel"==a.skin&&{muted:!0}),{},(T={autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,pictureInPictureToggle:(a.skin,!1)},liveui:D},e(T,"autoplay",null==a?void 0:a.autoplay),e(T,"html5",We(We(We({vhs:{limitRenditionByPlayerDimensions:!1}},0==(null==a||null===(y=a.customData)||void 0===y?void 0:y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(b=a.customData)||void 0===b?void 0:b.nativeVideoTracks)&&{nativeVideoTracks:!1}),{},{nativeTextTracks:!1})),e(T,"poster",C),e(T,"techOrder",S),e(T,"chromecast",{requestCustomDataFn:function(e){var n=ne(t);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var o,i,r,a,l,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var h=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var w=null==e||null===(r=e.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.runtime;m.duration=w;var g=null==e||null===(l=e.video)||void 0===l||null===(d=l.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(E,e,o)}}),e(T,"plugins",j),T)),A=i(t,R,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,p,f,h,w,g,y,b,T,O,I,P,S,C,j,H,F,N;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x&&l.resolve(We({status:!0,msg:"Player Initialised"},k?{seriesResponse:k,response:E}:{response:E})),window.initialise(A),window.firstFrame(A),"white"!==window.controlsColor&&Fe(window.controlsColor,A),/Android|iPhone/i.test(navigator.userAgent)&&(i.options.hls.overrideNative=!0),O=null==E||null===(n=E.video)||void 0===n?void 0:n.drmEnabled,I=(null==E||null===(r=E.ads)||void 0===r||null===(d=r.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(u=s.web)||void 0===u?void 0:u.active)&&(null==E||null===(c=E.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(p=m.web)||void 0===p?void 0:p.url),P=null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.startOverTime,!O){e.next=16;break}if("Safari"!==B()){e.next=14;break}return e.next=12,ge();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ge(),we()]);case 16:D&&ve(t,P),I&&initialiseAdvertisement(t,I),(S=L(E,t))?le(t,S):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:E}),_(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==E||null===(w=E.video)||void 0===w||null===(g=w.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null==E||null===(b=E.video)||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(N=(null==E||null===(j=E.video)||void 0===j||null===(H=j.contentDetails)||void 0===H?void 0:H.closedCaptions)||(null==E||null===(F=E.video)||void 0===F?void 0:F.closedCaptions),C=N.filter((function(e){return"VTT"===e.format})),Q(t,C)),null!=a&&a.disableControls?se():_e(t,We(We(We({},a),R),{},{liveVideo:x,isDvrEnabled:D,res:E,sres:k})),He(t,We(We(We({},a),R),{},{liveVideo:x}),l,{res:E,sres:k});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};exports.VLPlayerCore=function(){return{loadVideoInstantly:ie,onTimeUpdate:ke,getVideoDuration:Se,onVideoEnded:Pe,init:function(e){return new Promise((function(n,o){var i,r,a,l,d;if(!te(null==e?void 0:e.playerId)){var s=null==e?void 0:e.videoId,u=(null==e?void 0:e.series)||!1;window.videoId=s;var c=null==e?void 0:e.token;Ne=JSON.parse(atob(c.split(".")[1])),e.isAnonymousUser=!(null===(i=Ne)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=Ne)||void 0===r?void 0:r.site)||null,e.userId=(null===(a=Ne)||void 0===a?void 0:a.userId)||null,window.sessionStorage.setItem("uid",null===(l=Ne)||void 0===l?void 0:l.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",c);var v,p=null==e?void 0:e.playerId,f=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,h=null==e?void 0:e.airplay,w=null==e?void 0:e.apiBaseUrl,g=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,y=null==e?void 0:e.errors;y&&(window.customErrors=y),window.customData=null==e?void 0:e.customData,w&&(window.playerEntitlementUrl=w),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(v=e.skin)||"carousel"===v||"V2"===v||"defaultV2"===v)||(e.skin="default"),null!=e&&e.enableAdvertisements&&Promise.resolve().then((function(){return ye})).then((function(e){e.importIMA()})),!f||null!=e&&e.series||Promise.resolve().then((function(){return ye})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return ye})).then((function(e){e.importAirplay()})),g&&me("https://www.googletagmanager.com/gtag/js?id=".concat(g)).then((function(){return e=g,window.dataLayer=window.dataLayer||[],m("js",new Date),void m("config",e);var e})).catch((function(e){})),u?function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),a=r&&r.countryCode;return t({url:A(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web",countryCode:a,episodeData:!0},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})}(s,c).then((function(t){var i=t.data.series,r=t.data.series.seasons[0].episodes[0].id;I(r,c).then((function(t){var r,a,l;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(a=r.video)||void 0===a||null===(l=a.gist)||void 0===l?void 0:l.contentType,W(t.data),Ke(p,{res:null==t?void 0:t.data,sres:i},e,{resolve:n,reject:o})})).catch((function(e){de(e,p,o)}))})).catch((function(e){de(e,p,o)})):I(s,c).then((function(t){var i,r,a,l;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,W(null==t?void 0:t.data);var d=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(l=e.watchHistory)&&void 0!==l&&l.enable?k(s,c).then((function(t){var i,r,a,l,s;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(s=t.data)||void 0===s?void 0:s.watchedTime)||null,Ke(p,{res:d},e,{resolve:n,reject:o})})).catch((function(t){var i,r,a,l;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(t)),Ke(p,{res:d},e,{resolve:n,reject:o})})):Ke(p,{res:d},e,{resolve:n,reject:o})})).catch((function(e){de(e,p,o)}))}}))},getRenditions:Ue,skip:Z,getPlayer:ne,play:X,pause:Y,detectBrowser:B,rewind:ee,loadVideo:le,seekToTimeStamp:Ee,isPlayerInitialised:te,load:oe,dispose:re,enableCaptions:G,disableCaptions:J,getCaptions:$,playSelectedResolution:Le,getSource:L,setVolume:xe,getVolume:Re,disableControls:se,setPlaybackSpeed:Ie}},exports.createIconMarkup=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},exports.detectBrowser=B,exports.getCurrentVideo=K,exports.getPlayer=ne,exports.getRenditions=Ue,exports.getSeriesWatchHistory=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:S(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:P(i),headers:{Authorization:e.token}})},exports.load=oe,exports.pause=Y,exports.play=X,exports.resolution=qe,exports.rewind=ee,exports.setCurrentVideo=W,exports.skip=Z;
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./index-
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./index-a8eea6fa.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),module.exports=e.VLPlayerCore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-a8eea6fa.js");exports.initialiseKeyboardEvents=function(r,t){var i,u,l=e.getPlayer(r),n=null==l||null===(i=l.controlBar)||void 0===i||null===(u=i.playToggle)||void 0===u?void 0:u.el_,o=document.getElementsByTagName("video")[0];o&&o.addEventListener("keydown",(function(i){switch(i.key){case" ":return i.preventDefault(),o&&o.focus(),void(n&&n.click());case"m":case"M":return i.preventDefault(),o&&o.focus(),void(l.muted()?l.muted(!1):l.muted(!0));case"f":i.preventDefault(),o&&o.focus();var u=document.querySelector(".vjs-fullscreen-control");return void(u&&u.click());case"F":i.preventDefault();var c=document.querySelector(".vjs-fullscreen-control");return void(c&&c.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.rewind(r,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return i.preventDefault(),o&&o.focus(),void e.skip(r,10);default:return}}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),l=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),s=require("video.js"),u=require("./loader-393b838a.js"),a=require("./index-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),l=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),s=require("video.js"),u=require("./loader-393b838a.js"),a=require("./index-a8eea6fa.js");function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,l=r(e);if(t){var o=r(this).constructor;i=Reflect.construct(l,arguments,o)}else i=l.apply(this,arguments);return n(this,i)}}require("video.js/dist/video-js.min.css"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray");var d=s.getComponent("Component"),v=function(n){l(v,d);var r=c(v);function v(t){var l,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),l=r.call(this,t,n),o(i(l),"multicamCssPositioning",(function(e,t){var n,r,o,s,u,a,c,d,v=window.getComputedStyle(document.getElementById(t),null),m=v.getPropertyValue("height"),f=v.getPropertyValue("width"),h=m.slice(0,-2);f.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(n=i(l))||void 0===n||null===(r=n.config)||void 0===r||!r.liveui)&&(null===(o=i(l))||void 0===o||null===(s=o.config)||void 0===s||!s.liveVideo)||null!==(u=i(l))&&void 0!==u&&null!==(a=u.config)&&void 0!==a&&a.liveui&&null!==(c=i(l))&&void 0!==c&&null!==(d=c.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(h-135,"px"),e.style.height="".concat(h-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(h-105,"px"))})),l.playerId=n.playerId,l.streams=null==n?void 0:n.streams,l.config=null==n?void 0:n.config,l.createUI(null==n?void 0:n.streams),l}return t(v,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,n,r,o,s=this,u=this.el();null!=this&&null!==(t=this.config)&&void 0!==t&&t.liveui&&null!=this&&null!==(i=this.config)&&void 0!==i&&i.liveVideo||0==(null==this||null===(l=this.config)||void 0===l?void 0:l.liveui)&&0==(null==this||null===(n=this.config)||void 0===n?void 0:n.liveVideo)?null==u||null===(r=u.classList)||void 0===r||r.add("".concat(this.config.skin)):null==u||null===(o=u.classList)||void 0===o||o.add("default"),this.loadCSS();for(var a=0;a<e.length;a++)this.createTile(e[a],a);this.multicamCssPositioning(u,this.playerId),window.onresize=function(){s.multicamCssPositioning(u,s.playerId)}}},{key:"getOffset",value:function(e){var t=e.getBoundingClientRect();return{left:t.left+window.scrollX,top:t.top+window.scrollY}}},{key:"createTile",value:function(e,t){var i=this,l=this.el(),n=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,n);var r=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){u.showLoader(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),a.load(i.playerId,e.id,r).then((function(e){a.play(i.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicam-a41fe4a6.js")})).then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),v}();exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),o=require("./icons-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),o=require("./icons-13fe8cd2.js"),i=require("./index-a8eea6fa.js");function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=s(e);if(t){var o=s(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return n(this,r)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized");var c=a.getComponent("Component"),d=function(n){r(d,c);var s=l(d);function d(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=s.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(d,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-6821b7ba.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"stream-container hidden"});a.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),document.getElementById(this.playerId).style.overflow="hidden",a.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=a.dom.createEl("div",{className:"stream-selector-head"}),s=a.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});s.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var l=a.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=a.dom.createEl("div",{className:"stream-selector-content"}),d=a.dom.createEl("div",{className:"stream-tray"}),u=function(e){var r=a.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});r.onclick=function(){for(var n=a.dom.$$(".stream"),s=0;s<n.length;s++)n[s].style.border="none",n[s].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid red",i.load(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")"),a.dom.appendContent(d,r),a.dom.appendContent(c,d)},m=0;m<this.streams.length;m++)u(m);a.dom.appendContent(n,s),a.dom.appendContent(n,l),a.dom.appendContent(e,n),a.dom.appendContent(e,c),i.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),d}();exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./loader-393b838a.js"),i=require("./index-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./loader-393b838a.js"),i=require("./index-a8eea6fa.js");function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=n(e);if(t){var s=n(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return l(this,r)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized");var c=o.getComponent("Component"),d=function(l){r(d,c);var n=a(d);function d(t){var r,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=n.call(this,t,l)).playerId=l.playerId,r.config=l.config,r.createUI(null==l?void 0:l.config.streams),r}return t(d,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,r,l,n,s,i,a,c,d=this.el(),u=1==(null==this||null===(t=this.config)||void 0===t?void 0:t.liveui)&&1==(null==this||null===(r=this.config)||void 0===r?void 0:r.liveVideo)||!(null!=this&&null!==(l=this.config)&&void 0!==l&&l.liveui)&&!(null!=this&&null!==(n=this.config)&&void 0!==n&&n.liveVideo)||!1;u?null==d||null===(s=d.classList)||void 0===s||s.add("dvr"):null==d||null===(i=d.classList)||void 0===i||i.add("nondvr");var v=o.dom.createEl("div",{className:"broadcast"});v.innerHTML="Broadcasts";var m=o.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==m||null===(a=m.classList)||void 0===a||a.add("dvr"):null==m||null===(c=m.classList)||void 0===c||c.add("nondvr"),m.style.width="".concat(window.innerWidth-50,"px");var h=o.dom.createEl("div",{className:"tilecontainer-potrait"});o.dom.appendContent(d,v),o.dom.appendContent(d,m),o.dom.appendContent(m,h),v.addEventListener("click",(function(){null!=m&&m.classList.contains("hideMWebTray")?(m.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==m||m.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var p=0;p<e.length;p++)this.createTile(e[p],p)}},{key:"createTile",value:function(e,t){var r=this,l=this.el(),n=o.dom.createEl("div",{className:"tile-potrait-mweb ".concat(t)});0==t&&(n.style.border="2px solid red"),n.style.backgroundImage="url(".concat(e.img,")");var a=o.dom.$(".tilecontainer-potrait",this.contentEl());o.dom.appendContent(a,n);var c=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){s.showLoader(r.playerId),r.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),i.load(r.playerId,e.id,c).then((function(e){i.play(r.playerId)}))})),l}},{key:"removeSelectedTile",value:function(){for(var e=document.getElementsByClassName("tile-potrait-mweb"),t=0;t<e.length;t++)e[t].style.border=0}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./mwebPotrait-3c11d7cf.js")})).then((function(e){var t=document.createElement("style");t.className="mweb",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleProgressControls",value:function(e){var t=document.querySelector(".vjs-progress-control.vjs-control"),r=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),l=document.querySelector(".vjs-remaining-time.vjs-time-control.vjs-control"),n=document.querySelector(".vjs-seek-to-live-control.vjs-control");e?(null==t||t.classList.add("hide-controls"),null==r||r.classList.add("hide-controls"),null==l||l.classList.add("hide-controls"),null==n||n.classList.add("hide-controls")):(null!=t&&t.classList.contains("hide-controls")&&(null==t||t.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")),null!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),d}();exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-13fe8cd2.js"),a=require("./index-a8eea6fa.js");function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=i(e);if(t){var s=i(this).constructor;n=Reflect.construct(o,arguments,s)}else n=o.apply(this,arguments);return r(this,n)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized");var d=o.getComponent("Component"),u=function(r){n(a,d);var i=l(a);function a(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),(n=i.call(this,t,r)).playerId=r.playerId,n.seriesData=r.sres,n.currentVideoData=r.res,n.initialiseStructure(),n.loadCSS(),n}return t(a,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),t=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(s.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./nextEpisodeButton-b6e6586f.js")})).then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),s=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,s),o.dom.appendContent(t,n),o.dom.appendContent(t,r),this.toggleContentOnHover(e,t),o.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){o.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){o.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){o.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){o.dom.addClass(t,"nextepisode-hidden")}))}}]),a}(),c=function(e,t){for(var n=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===t){n=r;break}return n},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,r=t-1>=0?t-1:n-1,i=(t+1)%n,o=n>1?e.episodes[r]:null,s=n>1?e.episodes[i]:null;return r===i&&(0===r?s=null:o=null),{prevEp:o,nextEp:s,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,r){e.gist.id===t&&(n=r)})),n):null},v=function(e){o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var t=sessionStorage.getItem("token");a.load("my-player",e.gist.id,t).then((function(e){a.setCurrentVideo(e.response)}))},o.dom.$(".next-eps-image").innerHTML="<img src=".concat(e.gist.videoImageUrl,"/>"),o.dom.$(".next-eps-description").innerHTML="<div class='next-eps-title'>".concat(e.title,"</div>\n <div class='next-eps-description-details'>").concat(e.gist.description,"</div>")};exports.default=u,exports.initaliseFunctionality=function(e,t){var n=c(e,t.video.gist.id),r=m(e[n],t.video.gist.id),i=p(e[n],r);v(i.nextEp)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),a=require("./icons-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),a=require("./icons-13fe8cd2.js"),r=require("./index-a8eea6fa.js");function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return l(this,n)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/assertThisInitialized");var c=o.getComponent("Component"),u=function(l){i(u,c);var s=d(u);function u(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),(n=s.call(this,e,i)).playerId=i.playerId,n.seriesData=i.sres,n.videos=i.videos,n.currentVideoData=i.res,n.initialiseStructure(),n.loadCSS(),n}return n(u,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-7f13a76f.js")})).then((function(e){var t=document.createElement("style");t.id="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),o.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,i=this.el(),l=o.dom.createEl("div",{className:"playlist-selector-head"}),s=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});s.onclick=function(){t.classList.add("hidden"),i.classList.remove("open"),t.style.right="-350px"};for(var d=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist Title Goes Here"}),c=o.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var i,l,s=o.dom.createEl("div",{className:"playlist-container"}),a=o.dom.createEl("div",{className:"playlist-section",index:t}),d=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat(null===(i=n.videos[t])||void 0===i?void 0:i.title)}),u=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(a,d),o.dom.appendContent(a,u),o.dom.appendContent(s,a),o.dom.appendContent(c,s);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat(null===(l=n.videos[t])||void 0===l?void 0:l.description)}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(s,p),o.dom.appendContent(c,s),p.onclick=function(e){e.stopPropagation(),r.load(n.playerId,n.videos[t].id,sessionStorage.getItem("token"))},a.onclick=function(t){var n,i,l,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,a=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=a&&null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(console.log(s.style),s.style.backgroundColor="#0000007d",null==a||null===(i=a.classList)||void 0===i||i.remove("hidden")):(null==a||null===(l=a.classList)||void 0===l||l.add("hidden"),s.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);o.dom.appendContent(l,s),o.dom.appendContent(l,d),o.dom.appendContent(t,l),o.dom.appendContent(t,c),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),u}();exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),c=require("@babel/runtime/regenerator"),l=require("video.js"),d=require("./index-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),c=require("@babel/runtime/regenerator"),l=require("video.js"),d=require("./index-a8eea6fa.js"),u=require("./loader-393b838a.js"),p=require("./icons-13fe8cd2.js");function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=a(e);if(t){var s=a(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}require("video.js/dist/video-js.min.css"),require("axios"),require("@babel/runtime/helpers/toConsumableArray");var h,f=l.getComponent("Component"),m=function(e){s(a,f);var r=v(a);function a(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,a),i=r.call(this,e,s),o(n(i),"seriesData",[]),i.seriesData=s.seriesData,h=s.playerId;var c=i.el();return y(c,i.seriesData),i}return i(a,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}}]),a}();function g(){return(g=e(c.mark((function e(t,i,n,s){var r;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=sessionStorage.getItem("token"),d.pause(h),u.showLoader(h),d.load(h,i,r).then((function(e){d.setCurrentVideo(e.response),d.play(h)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e,t){e.innerHTML='<div class="hover-div"></div>\n '.concat(p.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>')}exports.customSeasonList=y,exports.handleSeasonChange=function(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;var o=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");a.innerHTML=o,function(e){d.getSeriesWatchHistory(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),l=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),p=document.querySelector("#episodes-back-btn"),v=e.id,h=e.episodes;p.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var f=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,l[t],l)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return g.apply(this,arguments)}(t,h[t].id,i,l)})),e.episodes[t].id==v&&l[t].classList.add("highlight-active-eps")},m=0;m<c.length;m++)f(m)},exports.seriesModule=m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./icons-
|
|
1
|
+
"use strict";var e=require("./icons-13fe8cd2.js"),i=require("./index-a8eea6fa.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),exports.initialiseSkin=function(r,l){Promise.resolve().then((function(){return require("./skin-76d9af94.js")})).then((function(e){var i=document.createElement("style");i.id="default_v2",i.append("".concat(e.default)),document.head.appendChild(i)})),function(r){i.getPlayer(r).one("loadedmetadata",(function(){e.addResolutionModule(r,"defaultV2",e.SettingsSvgV2())}))}(r),function(r,l){var t=i.getPlayer(r);t.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(e.MinimizeSvg(window.controlsColor))),t.controlBar.getChild("FullscreenToggle").el().appendChild(i.createIconMarkup(e.MaximizeSvg(window.controlsColor)));var n=t.controlBar.getChild("SubsCapsButton").el();document.getElementById(r).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(i.createIconMarkup(e.CaptionsSvgV2()));var o=document.createElement("div");o.classList.add("caption-header"),n.querySelector(".vjs-menu-content").insertBefore(o,n.querySelector(".vjs-menu-item"));var a=document.getElementsByClassName("vjs-time-control");l.liveVideo&&(a[0].style.display="none")}(r,l),function(i,r){var l,t,n;0==r.liveVideo&&0==r.liveui&&e.addSkipButton(i,"defaultV2",e.SkipSvgV2());(0==r.liveVideo&&0==r.liveui||1==r.liveui)&&e.addRewindButton(i,"defaultV2",e.RewindSvgV2());r.liveVideo||e.addSlowMotion(i);(null==r||null===(l=r.relatedVideos)||void 0===l?void 0:l.length)>0&&e.addVideoSelector(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector(i,null==r?void 0:r.streams);(null==r||null===(n=r.playlist)||void 0===n?void 0:n.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist)}(r,l)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./icons-
|
|
1
|
+
"use strict";var e=require("./icons-13fe8cd2.js"),r=require("./keyboardShortcuts-08766e33.js"),t=require("./index-a8eea6fa.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),exports.initialiseSkin=function(i,n){r.initialiseKeyboardEvents(i,n),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,t){0==t.liveVideo&&0==t.liveui&&e.addSkipButton(r,"default",e.SkipSvg());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&e.addRewindButton(r,"default",e.RewindSvg())}(i,n),function(r,i){var n=t.getPlayer(r),s=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e.addResolutionModule(r,"default",e.SettingsSvg()),s&&Promise.resolve().then((function(){return require("./nextEpisodeButton-9fdf3008.js")})).then((function(e){e.initaliseFunctionality(i.sres.seasons,t.getCurrentVideo())}))})),n.one("loadedmetadata",(function(){var t;s&&(e.addSeriesModule(r,null==i||null===(t=i.sres)||void 0===t?void 0:t.seasons,i),e.addNextEpisodeButton(i.sres,i.res,r))}))}(i,n),function(r,i){var n=t.getPlayer(r),s=document.getElementsByClassName("vjs-current-time")[0],l=document.getElementsByClassName("vjs-duration")[0],o=document.getElementsByClassName("vjs-time-divider")[0];i.liveVideo&&(s&&(s.style.display="none"),l&&(l.style.display="none"),o&&(o.style.display="none"));n.controlBar.getChild("FullscreenToggle").el().appendChild(t.createIconMarkup(e.MinimizeSvg(window.controlsColor))),n.controlBar.getChild("FullscreenToggle").el().appendChild(t.createIconMarkup(e.MaximizeSvg(window.controlsColor)));var a=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(r).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(t.createIconMarkup(e.NewCaptionsSvg()));var u=document.createElement("div");u.classList.add("caption-header"),a.querySelector(".vjs-menu-content").insertBefore(u,a.querySelector(".vjs-menu-item"))}(i,n)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-a8eea6fa.js");require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(i){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),r(),function(r){var i=document.getElementById("".concat(r)),t=e.getPlayer(r);i&&i.addEventListener("touchstart",(function(){t.paused()?e.play(r):e.pause(r)}))}(i)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t=require("./icons-
|
|
1
|
+
"use strict";var e,t=require("./icons-13fe8cd2.js"),n=require("./index-a8eea6fa.js"),r=require("@babel/runtime/helpers/defineProperty"),s=require("./keyboardShortcuts-08766e33.js");function o(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 i(e,s){var i=n.getPlayer(e);i.one("play",(function(){null!=s&&s.streams&&t.addMulticamView(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s)),null!=s&&s.airplay&&"Safari"==n.detectBrowser()&&i.addChild("airPlayButton"),null!=s&&s.chromecastReceiverId&&i.addChild("chromecastButton"),i.addChild("FullscreenToggle"),i.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MinimizeSvg(window.controlsColor))),i.getChild("FullscreenToggle").el().appendChild(n.createIconMarkup(t.MaximizeSvg(window.controlsColor))),l(e)})),i.on("loadedmetadata",(function(){window.endFirstFrame(i),"Safari"!==n.detectBrowser()&&t.addResolutionModule(e,"live",t.SettingsSvg())})),i.one("loadedmetadata",(function(){var n;null!=s&&s.streams&&(null==s||null===(n=s.streams)||void 0===n?void 0:n.length)>=2&&t.addMwebPotraitTrayModule(e,s)}))}function l(t){var r=n.getPlayer(t);u(),r.on("pause",(function(){clearTimeout(e),a()})),r.on("play",(function(){u()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){a(),r.paused()||u()})),s.addEventListener("touchstart",(function(){a(),u()})),s.addEventListener("mousemove",(function(){a(),r.paused()||u()}))}function a(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function u(){var t=document.getElementsByClassName("vjs-chromecast-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0],r=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(e),e=setTimeout((function(){null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols"),null==r||r.classList.add("hideoutsidecontrols")}),2200)}require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("video.js/dist/video-js.min.css"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),exports.hideControls=l,exports.initialiseSkin=function(e,r){var o;s.initialiseKeyboardEvents(e,r),(null==(o=r)||!o.liveui)&&(null==o||!o.liveVideo)||null!=o&&o.liveui&&null!=o&&o.liveVideo?Promise.resolve().then((function(){return require("./dvr_skin-f7f770ae.js")})).then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):Promise.resolve().then((function(){return require("./nondvr_skin-ef2cb3b2.js")})).then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,n){t.addSlowMotion(e)}(e),function(e,r){var s=n.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(t.NewCaptionsSvg()));var i=document.createElement("div");i.classList.add("caption-header"),o.querySelector(".vjs-menu-content").insertBefore(i,o.querySelector(".vjs-menu-item"));var l=document.createElement("div");if(l.innerText="Captions",l.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(l),"Safari"==n.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=r&&r.liveui||null==r||!r.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,r),i(e,r)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./icons-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./icons-13fe8cd2.js"),l=require("./index-a8eea6fa.js");function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized");var c=i.getComponent("Component"),d=function(o){n(d,c);var r=s(d);function d(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(n=r.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.videos=o.videos,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(d,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-192a53df.js")})).then((function(e){var t=document.createElement("style");t.id="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=i.dom.createEl("div",{className:"selection-container hidden"});i.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),i.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=i.dom.createEl("div",{className:"video-selector-head"}),r=i.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});r.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var s=i.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),c=i.dom.createEl("div",{className:"video-selector-content"}),d=i.dom.createEl("div",{className:"video-container"}),u=function(e){var n=i.dom.createEl("div",{className:"video -".concat(e)}),o=i.dom.createEl("div",{className:"recommended -".concat(e)});o.onclick=function(){var n=i.dom.$$(".recommended");console.log(n);for(var r=0;r<n.length;r++)n[r].style.border="none";o.style.border="2px solid white",l.load(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){console.log("Recommended->Video Loaded",e)})).catch((function(e){console.log("Recommended->Video Failed",e)}))},o.style.backgroundImage="url(".concat(t.videos[e].img,")");var r=i.dom.createEl("div",{className:"info -".concat(e),innerHTML:"VIDEO ".concat(e+1)});i.dom.appendContent(n,o),i.dom.appendContent(n,r),i.dom.appendContent(d,n),i.dom.appendContent(c,d)},m=0;m<this.videos.length;m++)u(m);i.dom.appendContent(o,r),i.dom.appendContent(o,s),i.dom.appendContent(e,o),i.dom.appendContent(e,c),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}}]),d}();exports.default=d;
|
package/esm/bundle.css
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
10
13
|
.video-js .vjs-season-list:hover .player-season-list-container {
|
|
11
14
|
visibility: visible;
|
|
12
15
|
/* display: block; */
|
|
@@ -307,9 +310,6 @@
|
|
|
307
310
|
}
|
|
308
311
|
|
|
309
312
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
313
|
.widget-selection{
|
|
314
314
|
display: flex;
|
|
315
315
|
align-items: center;
|
|
@@ -476,7 +476,9 @@
|
|
|
476
476
|
.video-js .vjs-chromecast-button.vjs-chromecast-casting-state:hover .vjs-icon-placeholder {
|
|
477
477
|
background-image: url('../assets/chromecast/ic_cast_connected_white_24dp.png');
|
|
478
478
|
}
|
|
479
|
-
|
|
479
|
+
.video-js .vjs-chromecast-button >.vjs-chromecast-button-label{
|
|
480
|
+
display: none !important;
|
|
481
|
+
}
|
|
480
482
|
|
|
481
483
|
.video-js .vjs-tech-chromecast {
|
|
482
484
|
display: flex;
|