@viewlift/player-backup 0.0.3 → 0.0.4

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.
Files changed (66) hide show
  1. package/cjs/bundle.css +162 -162
  2. package/cjs/{icons-d6df3c5b.js → icons-31107288.js} +1 -1
  3. package/cjs/index-bff7e44d.js +1 -0
  4. package/cjs/index.js +1 -1
  5. package/cjs/{keyboardShortcuts-414ee823.js → keyboardShortcuts-442ced01.js} +1 -1
  6. package/cjs/loader-393b838a.js +1 -0
  7. package/cjs/multicam-641c8936.js +1 -0
  8. package/cjs/multicamv2-1785d103.js +1 -0
  9. package/cjs/mwebPotraitTray-5e40f387.js +1 -0
  10. package/cjs/nextEpisodeButton-cf0fba6c.js +1 -0
  11. package/cjs/playlist-f4194c77.js +1 -0
  12. package/cjs/series-19ca0b31.js +1 -0
  13. package/cjs/skin-33c99681.js +1 -0
  14. package/cjs/skin-3b924699.js +1 -0
  15. package/cjs/skin-5c528eb9.js +1 -0
  16. package/cjs/skin-76d9af94.js +1 -0
  17. package/cjs/skin-d273a67c.js +1 -0
  18. package/cjs/videoSelector-94aef4c4.js +1 -0
  19. package/esm/bundle.css +162 -162
  20. package/esm/icons-1b3dc9b8.js +1 -0
  21. package/esm/index-4b461f6b.js +1 -0
  22. package/esm/index.js +1 -1
  23. package/esm/{keyboardShortcuts-816e64fd.js → keyboardShortcuts-2c4aedf3.js} +1 -1
  24. package/esm/loader-580278fe.js +1 -0
  25. package/esm/multicam-368a139e.js +1 -0
  26. package/esm/multicamv2-bf02fe29.js +1 -0
  27. package/esm/mwebPotraitTray-8da1133d.js +1 -0
  28. package/esm/nextEpisodeButton-c1ed4d6a.js +1 -0
  29. package/esm/playlist-10f6c1b7.js +1 -0
  30. package/esm/series-1a29aba5.js +1 -0
  31. package/esm/skin-02363047.js +1 -0
  32. package/esm/skin-494bdada.js +1 -0
  33. package/esm/skin-a1d7a42d.js +1 -0
  34. package/esm/skin-be5e0051.js +1 -0
  35. package/esm/skin-e200e100.js +1 -0
  36. package/esm/videoSelector-e34ce32a.js +1 -0
  37. package/package.json +2 -2
  38. package/cjs/index-72867b95.js +0 -1
  39. package/cjs/multicam-9b9e548b.js +0 -1
  40. package/cjs/multicamv2-760e35ee.js +0 -1
  41. package/cjs/mwebPotraitTray-cf1d721b.js +0 -1
  42. package/cjs/nextEpisodeButton-4371b730.js +0 -1
  43. package/cjs/playlist-757c8b33.js +0 -1
  44. package/cjs/resolution-ea9941fb.js +0 -1
  45. package/cjs/series-37b00582.js +0 -1
  46. package/cjs/skin-16ed5561.js +0 -1
  47. package/cjs/skin-1e5f8223.js +0 -1
  48. package/cjs/skin-96b17059.js +0 -1
  49. package/cjs/skin-c0815fac.js +0 -1
  50. package/cjs/skin-ee4432b3.js +0 -1
  51. package/cjs/videoSelector-127fb39e.js +0 -1
  52. package/esm/icons-4414005a.js +0 -1
  53. package/esm/index-eedc656b.js +0 -1
  54. package/esm/multicam-6cf1dfc2.js +0 -1
  55. package/esm/multicamv2-20aa5cd0.js +0 -1
  56. package/esm/mwebPotraitTray-15967d56.js +0 -1
  57. package/esm/nextEpisodeButton-0b26769a.js +0 -1
  58. package/esm/playlist-7bc75e87.js +0 -1
  59. package/esm/resolution-837c8db9.js +0 -1
  60. package/esm/series-db328db8.js +0 -1
  61. package/esm/skin-14347b74.js +0 -1
  62. package/esm/skin-1d7966e9.js +0 -1
  63. package/esm/skin-78fe05c3.js +0 -1
  64. package/esm/skin-9fac79ee.js +0 -1
  65. package/esm/skin-caa09360.js +0 -1
  66. package/esm/videoSelector-555a66d2.js +0 -1
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import i from"video.js";import r from"@babel/runtime/helpers/toConsumableArray";import a from"@babel/runtime/helpers/classCallCheck";import l from"@babel/runtime/helpers/createClass";import d from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import c from"@babel/runtime/helpers/getPrototypeOf";var 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 f(e,t){m("event",e,t)}function p(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?p(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):p(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());f(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),f("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)f("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,f("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;f("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}),f("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:x(),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:D(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:j(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}})}},S=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:C(),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}})},P=function(e){return _()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(e)},C=function(){return _()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV1)},D=function(e){return _()+"".concat(null==v?void 0:v.getVideoInfoV1,"/").concat(e)},j=function(e,t){return _()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(t,"/").concat(e)},R=function(){return _()+"".concat(null==v?void 0:v.saveWatchHistoryV1)},A=function(){return _()+"".concat(null==v?void 0:v.saveWatchHistoryV2)},x=function(){return _()+"".concat(null==v?void 0:v.getVideoDetails)},H=function(e,t){return _()+"".concat(null==v?void 0:v.getSeriesDetails)},_=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==v?void 0:v.apiBaseUrl)},F=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var 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)}},B=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var N=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 M(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 V(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?M(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):M(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var L,U=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 f=W(c,t);return m&&(f=V(V({},f),{},{src:q(V(V({},e.video),{},{src:"".concat(f.src)}))})),f}if(v){var p=z(c);return m&&(p=V(V({},p),{},{src:q(V(V({},e.video),{},{src:"".concat(p.src)}))})),p}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},z=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},W=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=N(),l=oe(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 K=function(e){L=e},G=function(){return L},J=function(e,t){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},$=function(e,t){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},Q=function(e){var t,n=oe(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},X=function(e,t){var n=oe(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})}))},Y=function(e){i(e).play()},Z=function(e){i(e).pause()},ee=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},te=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},ne=function(e){return!!i.getPlayer("".concat(e))},oe=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},ie=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;K(t.data);var s=U(l,e);if(s){var u,c,v,m,f,p,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=oe(e);if(O.pause(e),O.poster(T),de(e,s),O.on("loadstart",(function(){d&&o({status:!0,msg:"Video Loaded",response:l})})),O.on("loadeddata",(function(){B(),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===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==l||null===(p=l.video)||void 0===p||null===(h=p.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})),X(e,w);else!function(e){var t=oe(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else F(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){se(t,e,i)}))}))},re=function(e,t){var n=oe(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},ae=function(e){var t=oe(e);if(le(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},le=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()},de=function(e,t){oe(e).src(t)},se=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);ne(t)||i(t,{fluid:!0}),F(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)})},ue=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 ce(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 ve(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ce(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var me=function(e,t){var n=oe(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()}}))},fe=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 he,we,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-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=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)}}(),be=Object.freeze({__proto__:null,importChromecast:function(){fe("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"),fe("https://imasdk.googleapis.com/js/sdkloader/ima3.js")},loadDashLibrary:ge,loadEMELibrary:ye}),Te=[],Oe=0;function Ee(e,n,o){var i;Te=[],Oe=0,he=o;var r=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());Te.includes(Oe)||(e==Oe?(Te.push(e),function(e,n,o){var i,r,a;we=(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"==we?c={videoId:he,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:u}:"v2"==we&&(c={videoId:he,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:R(),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:A(),method:"POST",headers:{Authorization:n},data:r})}})(c,n.token,we).then((function(e){})).catch((function(e){})),Oe=d+o}(a,n,r)):e>Oe&&(Oe=e+r))}))}var Ie=function(e,t,n){var o=oe(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,"'"))},ke=function(e,t){var n=oe(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)}},Se=function(e,t){var n=oe(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},Pe=function(e,t){var n=oe(e);n?n.one("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},Ce=function(e){var t=oe(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")},De=0,je=-1,Re=function e(t,n,o,i,r){t>o.length-1||ie(n,o[t].id,i).then((function(e){r&&r(e)})).catch((function(t){setTimeout((function(){je++,e(je,n,o,i,r)}),3e3)}))},Ae=function(e,t,n){var o=oe(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,"'")})},xe=function(e){var t=oe(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function He(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 _e=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=oe(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;K(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;Ae(t,sessionStorage.getItem("volume")||"100");var r,a,s=G();(B(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?He(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):He(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)&&Ee(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"),je++,clearTimeout(De);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;je>o.length-1||Pe(r,(function(){ie(r,o[je].id,a).then((function(e){K(e.response),i&&i(e)})).catch((function(e){je++,De=setTimeout((function(){Re(je,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,f=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 p,h=f.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));p=t?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(p)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;F(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)}))},Fe=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-be5e0051.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-e200e100.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-a1d7a42d.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&import("./skin-494bdada.js").then((function(n){n.initialiseSkin(e,t)}))},Be=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 Ne(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 Me,Ve=i.getComponent("Component"),Le=function(t){s(o,Ve);var n=Ne(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?"&nbsp 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,Ue(t.playerId,e.target),i.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=N()&&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,Ue(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,Ue(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,Ue(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),Ue=function(e,t,n){var o,r=oe(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,f,p;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===(f=r.dash)||void 0===f||null===(p=f.mediaPlayer)||void 0===p||p.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:Ue,default:Le}),ze=function(e){var t,n=oe(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},We=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]};function Ke(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 Ge(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ke(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var Je=function(t,r,a,l){var d,s,u,c,v,m,f,p,h,w,g,y,b,T,O=r.res,E=void 0===O?null:O,I=r.sres,k=void 0===I?null:I,S=(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,P=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==S&&"NOT_CONNECTED"!==S?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==E||null===(m=E.video)||void 0===m||null===(f=m.gist)||void 0===f?void 0:f.videoImageUrl,D=(null==E||null===(p=E.video)||void 0===p||null===(h=p.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"==N()&&(t=ve(ve({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),t}(a),R=(null==E||null===(w=E.video)||void 0===w||null===(g=w.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,A=(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",Ge(Ge(Ge({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",P),e(T,"chromecast",{requestCustomDataFn:function(e){var n=oe(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 f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=p}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),x=i(t,A,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,f,p,h,w,g,y,b,T,O,I,S,P,C,j,H,_,B;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R&&l.resolve(Ge({status:!0,msg:"Player Initialised"},k?{seriesResponse:k,response:E}:{response:E})),window.initialise(x),window.firstFrame(x),"white"!==window.controlsColor&&Be(window.controlsColor,x),/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===(f=m.web)||void 0===f?void 0:f.url),S=null==E||null===(p=E.video)||void 0===p||null===(h=p.liveDetails)||void 0===h?void 0:h.startOverTime,!O){e.next=16;break}if("Safari"!==N()){e.next=14;break}return e.next=12,ye();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ye(),ge()]);case 16:D&&me(t,S),I&&initialiseAdvertisement(t,I),(P=U(E,t))?de(t,P):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:E}),F(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)&&(B=(null==E||null===(j=E.video)||void 0===j||null===(H=j.contentDetails)||void 0===H?void 0:H.closedCaptions)||(null==E||null===(_=E.video)||void 0===_?void 0:_.closedCaptions),C=B.filter((function(e){return"VTT"===e.format})),X(t,C)),null!=a&&a.disableControls?ue():Fe(t,Ge(Ge(Ge({},a),A),{},{liveVideo:R,isDvrEnabled:D,res:E,sres:k})),_e(t,Ge(Ge(Ge({},a),A),{},{liveVideo:R}),l,{res:E,sres:k});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function $e(){return{loadVideoInstantly:re,onTimeUpdate:Se,getVideoDuration:Ce,onVideoEnded:Pe,init:function(e){return new Promise((function(n,o){var i,r,a,l,d;if(!ne(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;Me=JSON.parse(atob(c.split(".")[1])),e.isAnonymousUser=!(null===(i=Me)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=Me)||void 0===r?void 0:r.site)||null,e.userId=(null===(a=Me)||void 0===a?void 0:a.userId)||null,window.sessionStorage.setItem("uid",null===(l=Me)||void 0===l?void 0:l.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",c);var v,f=null==e?void 0:e.playerId,p=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 be})).then((function(e){e.importIMA()})),!p||null!=e&&e.series||Promise.resolve().then((function(){return be})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return be})).then((function(e){e.importAirplay()})),g&&fe("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:H(),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,K(t.data),Je(f,{res:null==t?void 0:t.data,sres:i},e,{resolve:n,reject:o})})).catch((function(e){se(e,f,o)}))})).catch((function(e){se(e,f,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,K(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,Je(f,{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)),Je(f,{res:d},e,{resolve:n,reject:o})})):Je(f,{res:d},e,{resolve:n,reject:o})})).catch((function(e){se(e,f,o)}))}}))},getRenditions:ze,skip:ee,getPlayer:oe,play:Y,pause:Z,detectBrowser:N,rewind:te,loadVideo:de,seekToTimeStamp:Ie,isPlayerInitialised:ne,load:ie,dispose:ae,enableCaptions:J,disableCaptions:$,getCaptions:Q,playSelectedResolution:Ue,getSource:U,setVolume:Ae,getVolume:xe,disableControls:ue,setPlaybackSpeed:ke}}export{$e as V,ze as a,G as b,We as c,N as d,Z as e,K as f,oe as g,S as h,qe as i,ie as l,Y as p,te as r,ee as s};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";export{V as default}from"./index-eedc656b.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"video.js";import"axios";
1
+ import"video.js/dist/video-js.min.css";export{V as default}from"./index-4b461f6b.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"video.js";import"axios";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
@@ -1 +1 @@
1
- import{g as e,s as r,r as t}from"./index-eedc656b.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
1
+ import{g as e,s as r,r as t}from"./index-4b461f6b.js";function o(o,u){var l,i,n=e(o),c=null==n||null===(l=n.controlBar)||void 0===l||null===(i=l.playToggle)||void 0===i?void 0:i.el_,a=document.getElementsByTagName("video")[0];a&&a.addEventListener("keydown",(function(e){switch(e.key){case" ":return e.preventDefault(),a&&a.focus(),void(c&&c.click());case"m":case"M":return e.preventDefault(),a&&a.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":e.preventDefault(),a&&a.focus();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"F":e.preventDefault();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"ArrowLeft":if((1==u.liveVideo||1==u.liveui)&&0==u.liveui)break;return e.preventDefault(),a&&a.focus(),void t(o,10);case"ArrowRight":if(1==u.liveVideo||1==u.liveui)break;return e.preventDefault(),a&&a.focus(),void r(o,10);default:return}}))}export{o as i};
@@ -0,0 +1 @@
1
+ var t=function(t){document.getElementById("".concat(t)).classList.add("vjs-waiting")};export{t as s};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/helpers/defineProperty";import s from"video.js";import{s as a}from"./loader-580278fe.js";import{l as c,p as u}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";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 i,l=n(e);if(t){var r=n(this).constructor;i=Reflect.construct(l,arguments,r)}else i=l.apply(this,arguments);return o(this,i)}}var m=s.getComponent("Component"),f=function(o){l(f,m);var n=d(f);function f(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,f),l=n.call(this,t,o),r(i(l),"multicamCssPositioning",(function(e,t){var o,n,r,s,a,c,u,d,m=window.getComputedStyle(document.getElementById(t),null),f=m.getPropertyValue("height"),p=m.getPropertyValue("width"),v=f.slice(0,-2);p.slice(0,-2)-135<=135?(e.style.bottom="290px",e.style.height="352px"):"live"==l.config.skin&&(null===(o=i(l))||void 0===o||null===(n=o.config)||void 0===n||!n.liveui)&&(null===(r=i(l))||void 0===r||null===(s=r.config)||void 0===s||!s.liveVideo)||null!==(a=i(l))&&void 0!==a&&null!==(c=a.config)&&void 0!==c&&c.liveui&&null!==(u=i(l))&&void 0!==u&&null!==(d=u.config)&&void 0!==d&&d.liveVideo?(e.style.bottom="".concat(v-135,"px"),e.style.height="".concat(v-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(v-105,"px"))})),l.playerId=o.playerId,l.streams=null==o?void 0:o.streams,l.config=null==o?void 0:o.config,l.createUI(null==o?void 0:o.streams),l}return t(f,[{key:"createEl",value:function(){return s.dom.createEl("div",{className:"multicamera-parent"})}},{key:"createUI",value:function(e){var t,i,l,o,n,r,s=this,a=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===(o=this.config)||void 0===o?void 0:o.liveVideo)?null==a||null===(n=a.classList)||void 0===n||n.add("".concat(this.config.skin)):null==a||null===(r=a.classList)||void 0===r||r.add("default"),this.loadCSS();for(var c=0;c<e.length;c++)this.createTile(e[c],c);this.multicamCssPositioning(a,this.playerId),window.onresize=function(){s.multicamCssPositioning(a,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(),o=s.dom.createEl("div",{className:"tile ".concat(t)});0==t&&(o.style.border="2px solid red"),o.style.backgroundImage="url(".concat(e.img,")"),s.dom.appendContent(l,o);var n=sessionStorage.getItem("token");return o.addEventListener("click",(function(t){a(i.playerId),i.removeSelectedTile();var l=document.getElementsByClassName("".concat(t.srcElement.className))[0];l&&(l.style.border="2px solid red"),c(i.playerId,e.id,n).then((function(e){u(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(){import("./multicam-de741974.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),f}();export{f as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{B as a,q as i,r as l}from"./icons-1b3dc9b8.js";import{g as c,l as d}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function m(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,s=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(s,arguments,a)}else r=s.apply(this,arguments);return n(this,r)}}var u=s.getComponent("Component"),p=function(n){r(p,u);var o=m(p);function p(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(r=o.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(p,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(a())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-bd40c17a.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(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",s.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),o=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var a=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),m=s.dom.createEl("div",{className:"stream-selector-content"}),u=s.dom.createEl("div",{className:"stream-tray"}),p=function(e){var r=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});r.onclick=function(){for(var n=s.dom.$$(".stream"),o=0;o<n.length;o++)n[o].style.border="none",n[o].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid red",d(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,")"),s.dom.appendContent(u,r),s.dom.appendContent(m,u)},h=0;h<this.streams.length;h++)p(h);s.dom.appendContent(n,o),s.dom.appendContent(n,a),s.dom.appendContent(e,n),s.dom.appendContent(e,m),c(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")}))}}]),p}();export{p as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{s}from"./loader-580278fe.js";import{l as i,p as a}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";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 l,r=n(e);if(t){var s=n(this).constructor;l=Reflect.construct(r,arguments,s)}else l=r.apply(this,arguments);return o(this,l)}}var d=r.getComponent("Component"),u=function(o){l(u,d);var n=c(u);function u(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(l=n.call(this,t,o)).playerId=o.playerId,l.config=o.config,l.createUI(null==o?void 0:o.config.streams),l}return t(u,[{key:"createEl",value:function(){return r.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,o,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===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(o=this.config)&&void 0!==o&&o.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 m=r.dom.createEl("div",{className:"broadcast"});m.innerHTML="Broadcasts";var v=r.dom.createEl("div",{className:"potraittray hideMWebTray"});u?null==v||null===(a=v.classList)||void 0===a||a.add("dvr"):null==v||null===(c=v.classList)||void 0===c||c.add("nondvr"),v.style.width="".concat(window.innerWidth-50,"px");var p=r.dom.createEl("div",{className:"tilecontainer-potrait"});r.dom.appendContent(d,m),r.dom.appendContent(d,v),r.dom.appendContent(v,p),m.addEventListener("click",(function(){null!=v&&v.classList.contains("hideMWebTray")?(v.classList.remove("hideMWebTray"),d.style.background="darkgray"):(null==v||v.classList.add("hideMWebTray"),d.style.background="gray")})),this.loadCSS();for(var h=0;h<e.length;h++)this.createTile(e[h],h)}},{key:"createTile",value:function(e,t){var l=this,o=this.el(),n=r.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 c=r.dom.$(".tilecontainer-potrait",this.contentEl());r.dom.appendContent(c,n);var d=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){s(l.playerId),l.removeSelectedTile();var o=document.getElementsByClassName("".concat(t.srcElement.className))[0];o&&(o.style.border="2px solid red"),i(l.playerId,e.id,d).then((function(e){a(l.playerId)}))})),o}},{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(){import("./mwebPotrait-3c1805d8.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"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),o=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==l||l.classList.add("hide-controls"),null==o||o.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!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=o&&o.classList.contains("hide-controls")&&(null==o||o.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),u}();export{u as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as s}from"./icons-1b3dc9b8.js";import{l as a,f as l}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";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,r=i(e);if(t){var s=i(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return o(this,n)}}var p=r.getComponent("Component"),c=function(o){n(a,p);var i=d(a);function a(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,a),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(a,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(s(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.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=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),s=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,s),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),a}(),u=function(e,t){var n=m(e,t.video.gist.id),o=f(e[n],t.video.gist.id),i=v(e[n],o);h(i.nextEp)},m=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},v=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,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,s=n>1?e.episodes[i]:null;return o===i&&(0===o?s=null:r=null),{prevEp:r,nextEp:s,prevEpIdx:o,nextEpIdx:i}},f=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,o){e.gist.id===t&&(n=o)})),n):null},h=function(e){r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t=sessionStorage.getItem("token");a("my-player",e.gist.id,t).then((function(e){l(e.response)}))},r.dom.$(".next-eps-image").innerHTML="<img src=".concat(e.gist.videoImageUrl,"/>"),r.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>")};export{c as default,u as initaliseFunctionality};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,q as r}from"./icons-1b3dc9b8.js";import{g as d,l as c}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/assertThisInitialized";function p(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 a=i(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return l(this,n)}}var m=a.getComponent("Component"),u=function(l){o(u,m);var i=p(u);function u(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),(n=i.call(this,e,o)).playerId=o.playerId,n.seriesData=o.sres,n.videos=o.videos,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return n(u,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-820be653.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=a.dom.createEl("div",{className:"selection-container hidden"});a.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"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist Title Goes Here"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat(null===(o=n.videos[t])||void 0===o?void 0:o.title)}),d=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,d),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var m=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),u=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat(null===(l=n.videos[t])||void 0===l?void 0:l.description)}),v=a.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(m,v),a.dom.appendContent(m,u),a.dom.appendContent(i,m),a.dom.appendContent(p,i),m.onclick=function(e){e.stopPropagation(),c(n.playerId,n.videos[t].id,sessionStorage.getItem("token"))},s.onclick=function(t){var n,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(console.log(i.style),i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},u=0;u<this.videos.length;u++)m(u);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),d(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}();export{u as default};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import c from"@babel/runtime/regenerator";import l from"video.js";import{h as d,e as p,l as u,f as v,p as m}from"./index-4b461f6b.js";import{s as f}from"./loader-580278fe.js";import{E as h}from"./icons-1b3dc9b8.js";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/toConsumableArray";function g(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=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}var b,y=l.getComponent("Component"),L=function(e){s(o,y);var r=g(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,b=s.playerId;var c=i.el();return x(c,i.seriesData),i}return i(o,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}}]),o}();function w(){return(w=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"),p(b),f(b),u(b,i,r).then((function(e){v(e.response),m(b)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;var a=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(""),c=a;o.innerHTML=c,function(e){d(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 l=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var h=function(t){l[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,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return w.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},g=0;g<l.length;g++)h(g)}function x(e,t){e.innerHTML='<div class="hover-div"></div>\n '.concat(h(),'\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>')}export{x as customSeasonList,k as handleSeasonChange,L as seriesModule};
@@ -0,0 +1 @@
1
+ var n=".vjs-button>.vjs-icon-placeholder:before {\n font-size: 2.2em;\n line-height: 2.6;\n}\n.vjs-control-bar{\n z-index: 0 !important;\n height: 6em !important;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, #000 100%) !important;\n}\n\n.video-js .vjs-progress-control {\n left: -6px;\n position: absolute;\n width: 100%;\n height: 0.5em;\n top: -0.5em;\n transition: height .1s,top .1s;\n}\n\n.video-js .vjs-custom-control-spacer {\n display: block;\n flex: 1 1 auto;\n}\n\n.vjs-remaining-time.vjs-time-control.vjs-control {\n position: absolute;\n right: 0;\n bottom: 18px;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 41px 0 14px;\n}\n.vjs-remaining-time.vjs-time-control.vjs-control{\n display: none;\n}\n\nbutton.vjs-control.vjs-button.vjs-slowmo-button {\n font-size: 14px;\n font-weight: 500;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder{\n height: 6px !important;\n}\n\n.video-js .vjs-play-progress:before {\n font-size: 1.9em;\n}\n\n.video-js .vjs-current-time { display: block; }\n\n.video-js .vjs-current-time {\n display: block;\n position: absolute;\n right: 0em;\n bottom: 1.8em;\n font-size: 12px;\n font-weight: 600;\n}\n\n.video-js .vjs-button{\n width: 6em;\n}\n\nbutton.vjs-control.vjs-button.vjs-slowmo-button{\n align-self: center;\n height: min-content;\n padding: 5px 2px;\n border-radius: 8px;\n}\n\n\n.vjs-fullscreen .icon-minimize,\n.icon-maximize {\n display: block;\n height: 32px;\n}\n\n.vjs-fullscreen .icon-maximize,\n.icon-minimize {\n display: none;\n height: 32px;\n}\n\nbutton.vjs-play-control.vjs-control.vjs-button{\n outline: none !important;\n}\n\n.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,\n.vjs-icon-fullscreen-enter:before {\n content: '' !important;\n}\n\n.video-js button.vjs-fullscreen-control.vjs-control.vjs-button {\n display: flex;\n justify-content: center;\n align-items: center;\n transform: rotate(90deg);\n}\n\n.video-js .vjs-subs-caps-button .vjs-icon-placeholder:before{\n display: none;\n}\n.video-js .vjs-volume-panel .vjs-volume-control{\n margin-left: -10px;\n}\n\n.skipbtn:hover{\n cursor: pointer;\n}\n\n.rewindbtn:hover{\n cursor: pointer;\n}\n\n.vjs-live-control{\n position: absolute !important;\n right: 0em !important;\n background-color: none;\n bottom: 1.8em !important;\n font-weight: 700 !important;\n font-size: 11px !important;\n}\n\n.vjs-seek-to-live-control.vjs-control{\n position: absolute !important;\n right: 0em !important;\n background-color: none;\n bottom: 3.2em !important;\n}\n\n.vjs-seek-to-live-control.vjs-control >span.vjs-icon-placeholder{\n display:none;\n}\n\n.video-js.vjs-paused .vjs-big-play-button {\n width: 90px;\n height: 90px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n margin: auto;\n font-size: 6em;\n line-height: 1.3em;\n}\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{\n font-weight: bold;\n}\n\n.vjs-menu > ul.vjs-menu-content{\n bottom: 3.5em !important;\n right: -1em;\n}\n\n.video-js .vjs-chromecast-button .vjs-icon-placeholder {\n width: 17px !important;\n height: 17px !important;\n}\n\n.vjs-subs-caps-button.vjs-menu-button.vjs-menu-button-popup.vjs-control.vjs-button{\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\nbutton.vjs-subs-caps-button.vjs-menu-button.vjs-menu-button-popup.vjs-button{\n height: min-content;\n width: min-content;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical{\n width: 6em;\n}\n\n.video-js .content{\n bottom: 3.4rem !important;\n right: -4rem !important; \n}\n\n.setting-icon > svg{\n height:18px !important;\n}\n\n\n@media(max-width:600px){\n .vjs-live-control{\n right: -1em !important;\n }\n button.vjs-slowmo-button{\n display: none;\n }\n button.vjs-rewind-button{\n display: none;\n }\n button.vjs-rewind-button>svg{\n height: 18px;\n }\n .video-js .vjs-button{\n width: 4.8em;\n }\n .video-js .widget-selection{\n display: none;\n }\n .video-js .container{\n display: none !important;\n }\n .video-js .vjs-control-bar{\n height: 4em !important;\n }\n .video-js .vjs-button>.vjs-icon-placeholder:before{\n font-size: 2.2em;\n line-height: 1.7;\n }\n .video-js .vjs-play-progress:before {\n font-size: 1.2em;\n position: absolute;\n right: -0.5em;\n /* top: -0.3333333333em; */\n z-index: 1;\n}\nbutton.vjs-skip-button>svg{\n height: 18px;\n}\nbutton.vjs-big-play-button {\n width: 50px !important;\n height: 50px !important;\n font-size: 2.1rem !important;\n}\n}";export{n as default};
@@ -0,0 +1 @@
1
+ import{c as e,k as t,h as l,i,e as o,l as n,m as r,n as s,M as a,b as d,C as u,o as m,p}from"./icons-1b3dc9b8.js";import{g as c,c as v}from"./index-4b461f6b.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function b(b,h){import("./skin-02363047.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)})),function(l){c(l).one("loadedmetadata",(function(){e(l,"defaultV2",t())}))}(b),function(e,t){var l=c(e);l.controlBar.getChild("FullscreenToggle").el().appendChild(v(a(window.controlsColor))),l.controlBar.getChild("FullscreenToggle").el().appendChild(v(d(window.controlsColor)));var i=l.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(v(u()));var o=document.createElement("div");o.classList.add("caption-header"),i.querySelector(".vjs-menu-content").insertBefore(o,i.querySelector(".vjs-menu-item"));var n=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(n[0].style.display="none")}(b,h),function(e,t){var a,d,u;0==t.liveVideo&&0==t.liveui&&l(e,"defaultV2",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"defaultV2",p());t.liveVideo||o(e);(null==t||null===(a=t.relatedVideos)||void 0===a?void 0:a.length)>0&&n(e,null==t?void 0:t.relatedVideos);(null==t||null===(d=t.streams)||void 0===d?void 0:d.length)>1&&r(e,null==t?void 0:t.streams);(null==t||null===(u=t.playlist)||void 0===u?void 0:u.length)>0&&s(e,null==t?void 0:t.playlist)}(b,h)}export{b as initialiseSkin};
@@ -0,0 +1 @@
1
+ import{g as e,p as t,e as r}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function i(i){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),function(t){var r=e(t);r.muted(!0)}(i),n(),function(i){var n=document.getElementById("".concat(i)),o=e(i);n&&n.addEventListener("touchstart",(function(){o.paused()?t(i):r(i)}))}(i)}var n=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};export{i as initaliseSkin};
@@ -0,0 +1 @@
1
+ import{a as e,M as t,b as n,c as s,d as o,S as r,e as l,N as a}from"./icons-1b3dc9b8.js";import{g as i,d as c,c as u}from"./index-4b461f6b.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-2c4aedf3.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function v(l,a){var m=i(l);m.one("play",(function(){null!=a&&a.streams&&e(l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a)),null!=a&&a.airplay&&"Safari"==c()&&m.addChild("airPlayButton"),null!=a&&a.chromecastReceiverId&&m.addChild("chromecastButton"),m.addChild("FullscreenToggle"),m.getChild("FullscreenToggle").el().appendChild(u(t(window.controlsColor))),m.getChild("FullscreenToggle").el().appendChild(u(n(window.controlsColor))),f(l)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&s(l,"live",r())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&o(l,a)}))}function b(e,t){var n;m(e,t),(null==(n=t)||!n.liveui)&&(null==n||!n.liveVideo)||null!=n&&n.liveui&&null!=n&&n.liveVideo?import("./dvr_skin-9cc1b144.js").then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):import("./nondvr_skin-64be70e5.js").then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){l(e)}(e),function(e,t){var n=i(e),s=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var o=document.createElement("div");o.classList.add("caption-header"),s.querySelector(".vjs-menu-content").insertBefore(o,s.querySelector(".vjs-menu-item"));var r=document.createElement("div");if(r.innerText="Captions",r.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(r),"Safari"==c()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,t),v(e,t)}var h;function f(e){var t=i(e);g(),t.on("pause",(function(){clearTimeout(h),y()})),t.on("play",(function(){g()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||g()})),n.addEventListener("touchstart",(function(){y(),g()})),n.addEventListener("mousemove",(function(){y(),t.paused()||g()}))}function y(){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 g(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-fullscreen-control")[0],n=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(h),h=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{f as hideControls,b as initialiseSkin};
@@ -0,0 +1 @@
1
+ import{c as e,f as t,g as s,S as i,h as n,i as o,M as r,b as l,N as a,j as d,R as m}from"./icons-1b3dc9b8.js";import{i as u}from"./keyboardShortcuts-2c4aedf3.js";import{g as p,b as c,c as b}from"./index-4b461f6b.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function v(v,h){u(v,h),import("./skin-cd537931.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&n(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&o(e,"default",m())}(v,h),function(n,o){var r=p(n),l=(null==o?void 0:o.sres)||null;r.on("loadeddata",(function(){e(n,"default",i()),l&&import("./nextEpisodeButton-c1ed4d6a.js").then((function(e){e.initaliseFunctionality(o.sres.seasons,c())}))})),r.one("loadedmetadata",(function(){var e;l&&(t(n,null==o||null===(e=o.sres)||void 0===e?void 0:e.seasons,o),s(o.sres,o.res,n))}))}(v,h),function(e,t){var s=p(e),i=document.getElementsByClassName("vjs-current-time")[0],n=document.getElementsByClassName("vjs-duration")[0],o=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(i&&(i.style.display="none"),n&&(n.style.display="none"),o&&(o.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(b(r(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(b(l(window.controlsColor)));var d=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(a()));var m=document.createElement("div");m.classList.add("caption-header"),d.querySelector(".vjs-menu-content").insertBefore(m,d.querySelector(".vjs-menu-item"))}(v,h)}export{v as initialiseSkin};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as a,q as l}from"./icons-1b3dc9b8.js";import{g as s,l as c}from"./index-4b461f6b.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";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 o,r=i(e);if(t){var a=i(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return n(this,o)}}var m=r.getComponent("Component"),p=function(n){o(p,m);var i=d(p);function p(t){var o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(o=i.call(this,t,n)).playerId=n.playerId,o.seriesData=n.sres,o.videos=n.videos,o.currentVideoData=n.res,o.initialiseStructure(),o.loadCSS(),o}return t(p,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-6cb68e90.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=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.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 o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.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,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),d=r.dom.createEl("div",{className:"video-selector-content"}),m=r.dom.createEl("div",{className:"video-container"}),p=function(e){var o=r.dom.createEl("div",{className:"video -".concat(e)}),n=r.dom.createEl("div",{className:"recommended -".concat(e)});n.onclick=function(){var o=r.dom.$$(".recommended");console.log(o);for(var i=0;i<o.length;i++)o[i].style.border="none";n.style.border="2px solid white",c(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)}))},n.style.backgroundImage="url(".concat(t.videos[e].img,")");var i=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"VIDEO ".concat(e+1)});r.dom.appendContent(o,n),r.dom.appendContent(o,i),r.dom.appendContent(m,o),r.dom.appendContent(d,m)},u=0;u<this.videos.length;u++)p(u);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,d),s(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),p}();export{p as default};
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "amdName": "_playerCore",
6
6
  "dependencies": {
7
7
  "@silvermine/videojs-airplay": "^1.2.0",
8
8
  "@silvermine/videojs-chromecast": "^1.4.1",
9
9
  "axios": "^1.2.3",
10
- "video.js": "^8.3.0",
10
+ "video.js": "^7.20.3",
11
11
  "videojs-contrib-ads": "^6.9.0",
12
12
  "videojs-contrib-dash": "^5.1.1",
13
13
  "videojs-contrib-eme": "^3.11.0",
@@ -1 +0,0 @@
1
- "use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),n=require("axios"),t=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r={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 l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var s=3e4;function d(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function u(e){return e?String(e):""}window.initialise=function(e){var n,t,o;window.sid=d();var i=function(e){switch(e){case"prod":default:return r["beacon-prod"];case"msndev":return r["beacon-msn-dev"];case"msnqa":return r["beacon-msn-qa"];case"msnuat":return r["beacon-msn-uat"];case"msnprod":return r["beacon-msn-prod"]}}((null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.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 n=Math.floor(e.currentTime());e.on("error",(function(){var t=Math.floor(e.currentTime());fireEvent({eventName:n===t?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),s),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)}),s))})))},window.handleBufferTimer=function(e,n){if(n.el_){var t=e+30;return Math.round(t,2)%5==0&&fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1}),t}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,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(){fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),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 n=[];e.on("timeupdate",(function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(n.push(t),fireEvent({eventName:"PING",videoPosition:t,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 n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(c(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}}))()};var c=function(e,n,t){return e>=n&&e<=t};function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function m(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?v(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window.fireEvent=function(e){var t,o,i,r,l=[a(a({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:(r=window.sessionStorage.getItem("uid"),r||(r=d(),window.sessionStorage.setItem("uid",r),r)),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:u(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?u(e.videoPosition):"",apod:!0===e.isAdEvent?u(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:u(e.ttFirstFrame),bitrate:u(e.bitrate),connectionspeed:"",resolutionheight:u(e.resHeight),resolutionwidth:u(e.resWidth),bufferhealth:u(e.bufferHealth)})];n({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:l}).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 f=function(e,t){var o,i;return n({url:O(),params:m({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:t},withCredentials:!0})},p=function(e,t){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 l,a,s=JSON.parse(atob(t.split(".")[1])),d=(null==s?void 0:s.site)||null;return n({method:"GET",url:y(e),params:{site:d},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return n({method:"GET",url:g(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},w=function(e){return P()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV2,"/").concat(e)},h=function(){return P()+"".concat(null==r?void 0:r.getSeriesWatchHistoryV1)},y=function(e){return P()+"".concat(null==r?void 0:r.getVideoInfoV1,"/").concat(e)},g=function(e,n){return P()+"".concat(null==r?void 0:r.getVideoInfoV2,"/").concat(n,"/").concat(e)},b=function(){return P()+"".concat(null==r?void 0:r.saveWatchHistoryV1)},T=function(){return P()+"".concat(null==r?void 0:r.saveWatchHistoryV2)},O=function(){return P()+"".concat(null==r?void 0:r.getVideoDetails)},k=function(e,n){return P()+"".concat(null==r?void 0:r.getSeriesDetails)},P=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==r?void 0:r.apiBaseUrl)},I=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},E=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var S=function(e,n,t){var o=ne(e);o?n>=0&&n<=o.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),o.currentTime(n)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(e,"'"))},j=function(e,n,t){var o=ne(e);if(o)if(n>=0&&n<=100){var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},C=function(e){var n=ne(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},D=function(e,n){var t=ne(e);if(!t)return"Cannot find player with id: '".concat(e,"'");try{return t.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}},x=function(e,n){var t=ne(e);t?t.on("timeupdate",(function(){return n(t.currentTime())})):n("Cannot find player with id: '".concat(e,"'"))},A=function(e,n){var t=ne(e);t?t.one("ended",(function(){return n(!0)})):n("Cannot find player with id: '".concat(e,"'"))},B=function(e){var n=ne(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},R=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var n=document.getElementsByClassName("vjs-big-play-button")[0];n&&(n.style.display="none");var t=document.getElementsByClassName("vjs-fullscreen-control")[0];t&&(t.style.display="none")},V=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 _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function F(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var H,M=function(e,n){var t,o,i,r,l,a,s,d,u=null==e||null===(t=e.video)||void 0===t?void 0:t.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===(l=r.streamingInfo)||void 0===l||null===(a=l.videoAssets)||void 0===a?void 0:a.hls)||!1,m=(null==e||null===(s=e.video)||void 0===s||null===(d=s.liveDetails)||void 0===d?void 0:d.isDvrEnabled)||!1;if(u){var f=q(c,n);return m&&(f=F(F({},f),{},{src:N(F(F({},e.video),{},{src:"".concat(f.src)}))})),f}if(v){var p=L(c);return m&&(p=F(F({},p),{},{src:N(F(F({},e.video),{},{src:"".concat(p.src)}))})),p}if(null!=c&&c.mpeg){var w=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(c);return w}return null},N=function(e){var n=e.src;if(e.liveDetails.startOverTime){var t=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,l=0,a=r.getTime();l=a-o<1e3*t?a-o:1e3*t;var s=null;i<=a&&null!=i&&(s=new Date(i)),r.setMilliseconds(r.getMilliseconds()-l),n=n.includes("?")?i?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(s.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(s.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return n},L=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},q=function(e,n){var t=e.fairPlay,o=e.widevine,r=e.playReady,l=V(),a=ne(n);if("Safari"===l){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);try{a.eme()}catch(e){}return s}if("Chrome"===l||"Firefox"===l){var d={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken}}}),d}if("IE"===l){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 U=function(e){H=e},W=function(){return H},z=function(e){i(e).play()},G=function(e){i(e).pause()},J=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},K=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},X=function(e){return!!i.getPlayer("".concat(e))},Q=function(e,n){for(var t=ne(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"===i.kind&&i.id==n&&(i.mode="showing")}},$=function(e,n){for(var t=ne(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"===i.kind&&i.id===n&&(i.mode="hidden")}},Y=function(e){var n,t=ne(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},Z=function(e){var n,t=ne(e),o=[];if((null==t||null===(n=t.tech_)||void 0===n?void 0:n.vhs)||!1){var i,r,l=null==t||null===(i=t.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==l?void 0:l.length)>0&&(o=null==l?void 0:l.sort((function(e,n){return(null==e?void 0:e.height)==(null==n?void 0:n.height)?(null==n?void 0:n.bandwidth)-(null==e?void 0:e.bandwidth):(null==n?void 0:n.height)-(null==e?void 0:e.height)})))}else{var a,s,d=null==t||null===(a=t.dash)||void 0===a||null===(s=a.mediaPlayer)||void 0===s?void 0:s.getBitrateInfoListFor("video");(null==d?void 0:d.length)>0&&(o=null==d?void 0:d.sort((function(e,n){return n.height-e.height})))}return o},ee=function(e,n){var t=ne(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},ne=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},te=function(e,n,t){var o,i,r,l=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&&p(n,t).then((function(e){var n,t,o,i,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){f(n,t).then((function(n){var t,r,a=null==n?void 0:n.data,s=(null==a||null===(t=a.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;U(n.data);var d=M(a,e);if(d){var u,c,v,m,f,p,w,h,y,g,b,T=null==a||null===(u=a.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,d),O.on("loadstart",(function(){s&&o({status:!0,msg:"Video Loaded",response:a})})),O.on("loadeddata",(function(){E(),o({status:!0,msg:"Video Loaded",response:a})})),O.one("play",(function(){l&&O.currentTime(l)})),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==a||null===(v=a.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==a||null===(p=a.video)||void 0===p||null===(w=p.closedCaptions)||void 0===w?void 0:w.length)>0)h=((null==a||null===(y=a.video)||void 0===y||null===(g=y.contentDetails)||void 0===g?void 0:g.closedCaptions)||(null==a||null===(b=a.video)||void 0===b?void 0:b.closedCaptions)).filter((function(e){return"VTT"===e.format})),ee(e,h);else!function(e){var n=ne(e);n.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else I(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){ae(n,e,i)}))}))},oe=function(e,n){var t=ne(e);return t.src(n),new Promise((function(e,n){t.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},ie=function(e){var n=ne(e);if(re(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},re=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,n){ne(e).src(n)},ae=function(e,n,t){var o,r,l,a,s,d,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===(l=e.response)||void 0===l||null===(a=l.data)||void 0===a?void 0:a.errorMessage)||(null==e?void 0:e.message);X(n)||i(n,{fluid:!0}),I(n,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),t&&t({response:null==e||null===(u=e.response)||void 0===u?void 0:u.data,messsage:"".concat(v)})};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function de(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var ue=function(e,n){n.controlBar.el_.style.color=e,n.controlBar.el_.querySelector(".vjs-play-progress")&&(n.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),n.controlBar.el_.querySelector(".vjs-volume-level")&&(n.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)},ce=function(e,n,t){var o,i=ne(e),r=null==n?void 0:n.bandwidth;if((null==i||null===(o=i.tech_)||void 0===o?void 0:o.vhs)||!1){i.tech_.vhs.representations().forEach((function(e){t||e.bandwidth===r?(i.tech_.vhs.playlists.media(i.tech_.vhs.playlists.master.playlists),e.enabled(!0)):e.enabled(!1)})),i.handleTechPlaying_();var l=i.currentTime();i.currentTime(0),setTimeout((function(){i.currentTime(l),i.play()}),100);var a=videojs.dom.$(".content");a&&videojs.dom.addClass(a,"hidden")}else{var s=null==n?void 0:n.qualityIndex;if(t){var d,u;null==i||null===(d=i.dash)||void 0===d||null===(u=d.mediaPlayer)||void 0===u||u.resetSettings()}else{var c,v,m,f;null==i||null===(c=i.dash)||void 0===c||null===(v=c.mediaPlayer)||void 0===v||v.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==i||null===(m=i.dash)||void 0===m||null===(f=m.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var p=i.currentTime();i.currentTime(0),setTimeout((function(){i.currentTime(p),i.play()}),100);var w=videojs.dom.$(".content");w&&videojs.dom.addClass(w,"hidden")}}},ve=function(e,n){var t=ne(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,r,l,a=this.el(),s=videojs.dom.getPointerPosition(a,n).x;videojs.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,u=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(d),d&&"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*s,c.seek()}}))},me=function(e){return new Promise((function(n,t){if(fe(e))t("Alread initialised");else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),n()}}))},fe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};var pe,we,he=function(){var e=t(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)}}(),ye=function(){var e=t(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)}}(),ge=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:he,loadEMELibrary:ye}),be=[],Te=0;function Oe(e,t,o){var i;be=[],Te=0,pe=o;var r=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.interval)||30,l=ne(e);l&&l.on("timeupdate",(function(){var e=Math.floor(l.currentTime());be.includes(Te)||(e==Te?(be.push(e),function(e,t,o){var i,r,l;we=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var a=null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.profileId,s=Math.floor(e.currentTime()),d=Math.floor(e.duration()),u=null==t||null===(l=t.watchHistory)||void 0===l?void 0:l.xapiKey,c={};"v1"==we?c={videoId:pe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(s/d*100),siteOwner:t.siteOwner,userId:t.userId,xApiKey:u}:"v2"==we&&(c={videoId:pe,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(s/d*100),doneWatching:s>=d-5,profileId:a});(function(e,t,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 n({url:b(),method:"POST",headers:{Authorization:t,"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 n({url:T(),method:"POST",headers:{Authorization:t},data:r})}})(c,t.token,we).then((function(e){})).catch((function(e){})),Te=s+o}(l,t,r)):e>Te&&(Te=e+r))}))}var ke=0,Pe=-1,Ie=function e(n,t,o,i,r){n>o.length-1||te(t,o[n].id,i).then((function(e){r&&r(e)})).catch((function(n){setTimeout((function(){Pe++,e(Pe,t,o,i,r)}),3e3)}))};function Ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var Se,je=function(n,t,o,i){var r,l,a=i.res,s=i.sres,d=ne(n),u=(null==a||null===(r=a.video)||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;U(a),d.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:a})})),d.on("loadeddata",(function(){var i;j(n,sessionStorage.getItem("volume")||"100");var r,l,d=W();(E(),o.resolve(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ee(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a})),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&!t.isAnonymousUser)&&Oe(n,t,null==d||null===(r=d.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.id);null!=t&&t.nextVideos&&function(e){var n,t;console.log(e,"HERRE"),Pe++,clearTimeout(ke);var o=null==e||null===(n=e.nextVideos)||void 0===n?void 0:n.content,i=null==e||null===(t=e.nextVideos)||void 0===t?void 0:t.cb,r=e.playerId,l=e.token;Pe>o.length-1||A(r,(function(){te(r,o[Pe].id,l).then((function(e){U(e.response),i&&i(e)})).catch((function(e){Pe++,ke=setTimeout((function(){Ie(Pe,r,o,l,i)}),3e3)}))}))}(t)})),d.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];d.trigger("subtitlechanged",n)})),d.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(d=s.framework)||void 0===d||null===(u=d.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var p,w=f.getMediaSession(),h=w.media.tracks.filter((function(e){return"TEXT"==e.type}));p=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),w.editTracksInfo(p)}})),d.on("loadedmetadata",(function(){window.endFirstFrame(d)})),d.one("error",(function(){var e,t;I(n,(null==d||null===(e=d.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==d||null===(t=d.error())||void 0===t?void 0:t.message)||"Some error occured"})})),d.one("play",(function(){null!=t&&t.watchHistoryResumeTime&&d.currentTime(null==t?void 0:t.watchHistoryResumeTime)})),d.on("volumechange",(function(){var e=100*d.volume().toFixed(2);d.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},Ce=function(e,n){var t=null==n?void 0:n.skin;"live"==t?Promise.resolve().then((function(){return require("./skin-1e5f8223.js")})).then((function(t){t.initialiseSkin(e,n)})):"default"==t?Promise.resolve().then((function(){return require("./skin-ee4432b3.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-16ed5561.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t&&Promise.resolve().then((function(){return require("./skin-c0815fac.js")})).then((function(t){t.initialiseSkin(e,n)}))};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ae=function(n,r,l,a){var s,d,u,c,v,m,f,p,w,h,y,g,b,T,O=r.res,k=void 0===O?null:O,P=r.sres,E=void 0===P?null:P,S=(null===(s=window)||void 0===s||null===(d=s.cast)||void 0===d||null===(u=d.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,j=null!=l&&l.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==S&&"NOT_CONNECTED"!==S?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==k||null===(m=k.video)||void 0===m||null===(f=m.gist)||void 0===f?void 0:f.videoImageUrl,D=(null==k||null===(p=k.video)||void 0===p||null===(w=p.liveDetails)||void 0===w?void 0:w.isDvrEnabled)||!1,x=function(e){var n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-6,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==V()&&(n=de(de({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),n}(l),A=(null==k||null===(h=k.video)||void 0===h||null===(y=h.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,B=(T={controls:!0,playsinline:!0,fluid:!0,autoplay:(null==l?void 0:l.autoplay)||!1,controlBar:{volumePanel:("default"==l.skin||"defaultV2"==l.skin||"live"==(null==l?void 0:l.skin))&&{inline:!1},fullscreenToggle:"default"==l.skin||"defaultV2"==l.skin,pictureInPictureToggle:(l.skin,!1)},liveui:D},e(T,"autoplay",null==l?void 0:l.autoplay),e(T,"html5",xe(xe(xe({vhs:{limitRenditionByPlayerDimensions:!1}},0==(null==l||null===(g=l.customData)||void 0===g?void 0:g.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==l||null===(b=l.customData)||void 0===b?void 0:b.nativeVideoTracks)&&{nativeVideoTracks:!1}),{},{nativeTextTracks:!1})),e(T,"poster",C),e(T,"techOrder",j),e(T,"chromecast",{requestCustomDataFn:function(e){var t=ne(n);console.log(t.textTracksJson_);var o=t.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,n,t){var o,i,r,l,a,s,d,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var p=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=p}var w=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=w;var h=null==e||null===(r=e.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=h;var y=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=y;var g=null==e||null===(d=e.video)||void 0===d||null===(u=d.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=g,m.subTitles=t,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}(k,e,o)}}),e(T,"plugins",x),T),_=i(n,B,function(){var e=t(o.mark((function e(){var t,r,s,d,u,c,v,m,f,p,w,h,y,g,b,T,O,P,S,j,C,x,F,H,N;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A&&a.resolve(xe({status:!0,msg:"Player Initialised"},E?{seriesResponse:E,response:k}:{response:k})),window.initialise(_),window.firstFrame(_),"white"!==window.controlsColor&&ue(window.controlsColor,_),/Android|iPhone/i.test(navigator.userAgent)&&(i.options.hls.overrideNative=!0),O=null==k||null===(t=k.video)||void 0===t?void 0:t.drmEnabled,P=(null==k||null===(r=k.ads)||void 0===r||null===(s=r.preRoll)||void 0===s||null===(d=s.adTags)||void 0===d||null===(u=d.web)||void 0===u?void 0:u.active)&&(null==k||null===(c=k.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(f=m.web)||void 0===f?void 0:f.url),S=null==k||null===(p=k.video)||void 0===p||null===(w=p.liveDetails)||void 0===w?void 0:w.startOverTime,!O){e.next=16;break}if("Safari"!==V()){e.next=14;break}return e.next=12,ye();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ye(),he()]);case 16:D&&ve(n,S),P&&initialiseAdvertisement(n,P),(j=M(k,n))?le(n,j):(a.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:k}),I(n,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==k||null===(h=k.video)||void 0===h||null===(y=h.contentDetails)||void 0===y||null===(g=y.closedCaptions)||void 0===g?void 0:g.length)>0||(null==k||null===(b=k.video)||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(N=(null==k||null===(x=k.video)||void 0===x||null===(F=x.contentDetails)||void 0===F?void 0:F.closedCaptions)||(null==k||null===(H=k.video)||void 0===H?void 0:H.closedCaptions),C=N.filter((function(e){return"VTT"===e.format})),ee(n,C)),null!=l&&l.disableControls?R():Ce(n,xe(xe(xe({},l),B),{},{liveVideo:A,isDvrEnabled:D,res:k,sres:E})),je(n,xe(xe(xe({},l),B),{},{liveVideo:A}),a,{res:k,sres:E});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};exports.VLPlayerCore=function(){var t;return t={loadVideoInstantly:oe,onTimeUpdate:x,getVideoDuration:B,onVideoEnded:A,init:function(e){return new Promise((function(t,o){var i,r,l,a;if(!X(null==e?void 0:e.playerId)){var s=null==e?void 0:e.videoId,d=(null==e?void 0:e.series)||!1;window.videoId=s;var u=null==e?void 0:e.token;Se=JSON.parse(atob(u.split(".")[1])),e.isAnonymousUser=!(null===(i=Se)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=Se)||void 0===r?void 0:r.site)||null,e.userId=(null===(l=Se)||void 0===l?void 0:l.userId)||null,window.sessionStorage.setItem("uid",null===(a=Se)||void 0===a?void 0:a.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",u);var c,v=null==e?void 0:e.playerId,w=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,h=null==e?void 0:e.airplay,y=null==e?void 0:e.apiBaseUrl,g=null==e?void 0:e.errors;g&&(window.customErrors=g),window.customData=null==e?void 0:e.customData,y&&(window.playerEntitlementUrl=y),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(c=e.skin)||"carousel"===c||"V2"===c||"defaultV2"===c)||(e.skin="default"),null!=e&&e.enableAdvertisements&&Promise.resolve().then((function(){return ge})).then((function(e){e.importIMA()})),!w||null!=e&&e.series||Promise.resolve().then((function(){return ge})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return ge})).then((function(e){e.importAirplay()})),d?function(e,t){var o,i,r=JSON.parse(atob(t.split(".")[1])),l=r&&r.countryCode;return n({url:k(),params:m({id:e,deviceType:"web_browser",contentConsumption:"web",countryCode:l,episodeData:!0},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:t},withCredentials:!0})}(s,u).then((function(n){var i=n.data.series,r=n.data.series.seasons[0].episodes[0].id;f(r,u).then((function(n){var r,l,a;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,U(n.data),Ae(v,{res:null==n?void 0:n.data,sres:i},e,{resolve:t,reject:o})})).catch((function(e){ae(e,v,o)}))})).catch((function(e){ae(e,v,o)})):f(s,u).then((function(n){var i,r,l,a;window.contentType=null==n||null===(i=n.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,U(null==n?void 0:n.data);var d=null==n?void 0:n.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?p(s,u).then((function(n){var i,r,l,a,s;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==n?void 0:n.data)),e.watchHistoryResumeTime=(null==n||null===(s=n.data)||void 0===s?void 0:s.watchedTime)||null,Ae(v,{res:d},e,{resolve:t,reject:o})})).catch((function(n){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(n)),Ae(v,{res:d},e,{resolve:t,reject:o})})):Ae(v,{res:d},e,{resolve:t,reject:o})})).catch((function(e){ae(e,v,o)}))}}))},getRenditions:Z,skip:J,getPlayer:ne,play:z,pause:G,detectBrowser:V,rewind:K},e(t,"skip",J),e(t,"loadVideo",le),e(t,"seekToTimeStamp",S),e(t,"isPlayerInitialised",X),e(t,"load",te),e(t,"dispose",ie),e(t,"enableCaptions",Q),e(t,"disableCaptions",$),e(t,"getCaptions",Y),e(t,"playSelectedResolution",ce),e(t,"getSource",M),e(t,"setVolume",j),e(t,"getVolume",C),e(t,"disableControls",R),e(t,"setPlaybackSpeed",D),t},exports.createIconMarkup=function(e){var n=document.createElement("div");return n.innerHTML=e,n.children[0]},exports.detectBrowser=V,exports.getCurrentVideo=W,exports.getPlayer=ne,exports.getRenditions=Z,exports.getSeriesWatchHistory=function(e){var t,o;if("v1"==((null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return n({method:"GET",url:h(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return n({method:"GET",url:w(i),headers:{Authorization:e.token}})},exports.load=te,exports.pause=G,exports.play=z,exports.rewind=K,exports.setCurrentVideo=U,exports.showLoader=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")},exports.skip=J;
@@ -1 +0,0 @@
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("./index-72867b95.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 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");var c=s.getComponent("Component"),d=function(n){l(d,c);var r=a(d);function d(t){var l,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),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(d,[{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"),u.load(i.playerId,e.id,r).then((function(e){u.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)}))}}]),d}();exports.default=d;
@@ -1 +0,0 @@
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"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),a=require("./icons-d6df3c5b.js"),i=require("./index-72867b95.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,s=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(s,arguments,a)}else r=s.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");var c=s.getComponent("Component"),d=function(n){r(d,c);var o=l(d);function d(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(r=o.call(this,t,n)).playerId=n.playerId,r.seriesData=n.sres,r.streams=n.streams,r.currentVideoData=n.res,r.initialiseStructure(),r.loadCSS(),r}return t(d,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(a.BroadcastIcon())});return s.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=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(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",s.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),n=s.dom.createEl("div",{className:"stream-selector-head"}),o=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var l=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=s.dom.createEl("div",{className:"stream-selector-content"}),d=s.dom.createEl("div",{className:"stream-tray"}),u=function(e){var r=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(a.SelectedStream())});r.onclick=function(){var n=s.dom.$$(".stream");console.log(n);for(var o=0;o<n.length;o++)n[o].style.border="none",n[o].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),console.log(n)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")"),s.dom.appendContent(d,r),s.dom.appendContent(c,d)},m=0;m<this.streams.length;m++)u(m);s.dom.appendContent(n,o),s.dom.appendContent(n,l),s.dom.appendContent(e,n),s.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 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./index-72867b95.js");function i(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 l,o=n(e);if(t){var s=n(this).constructor;l=Reflect.construct(o,arguments,s)}else l=o.apply(this,arguments);return r(this,l)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator");var a=o.getComponent("Component"),c=function(r){l(c,a);var n=i(c);function c(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(l=n.call(this,t,r)).playerId=r.playerId,l.config=r.config,l.createUI(null==r?void 0:r.config.streams),l}return t(c,[{key:"createEl",value:function(){return o.dom.createEl("div",{className:"mweb-potrait-parent"})}},{key:"createUI",value:function(e){var t,l,r,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===(l=this.config)||void 0===l?void 0:l.liveVideo)||!(null!=this&&null!==(r=this.config)&&void 0!==r&&r.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 l=this,r=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 i=o.dom.$(".tilecontainer-potrait",this.contentEl());o.dom.appendContent(i,n);var a=sessionStorage.getItem("token");return n.addEventListener("click",(function(t){s.showLoader(l.playerId),l.removeSelectedTile();var r=document.getElementsByClassName("".concat(t.srcElement.className))[0];r&&(r.style.border="2px solid red"),s.load(l.playerId,e.id,a).then((function(e){s.play(l.playerId)}))})),r}},{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"),l=document.querySelector(".vjs-play-control.vjs-control.vjs-button"),r=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==l||l.classList.add("hide-controls"),null==r||r.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!=l&&l.classList.contains("hide-controls")&&(null==l||l.classList.remove("hide-controls")),null!=r&&r.classList.contains("hide-controls")&&(null==r||r.classList.remove("hide-controls")),null!=n&&n.classList.contains("hide-controls")&&(null==n||n.classList.remove("hide-controls")))}}]),c}();exports.default=c;
@@ -1 +0,0 @@
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-d6df3c5b.js"),a=require("./index-72867b95.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,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");var l=o.getComponent("Component"),u=function(r){n(a,l);var i=d(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 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),a=require("./icons-d6df3c5b.js"),r=require("./index-72867b95.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,l=o(e);if(t){var s=o(this).constructor;n=Reflect.construct(l,arguments,s)}else n=l.apply(this,arguments);return i(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");var c=s.getComponent("Component"),u=function(i){l(u,c);var o=d(u);function u(e){var n,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,u),(n=o.call(this,e,l)).playerId=l.playerId,n.seriesData=l.sres,n.videos=l.videos,n.currentVideoData=l.res,n.initialiseStructure(),n.loadCSS(),n}return n(u,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return s.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=s.dom.createEl("div",{className:"selection-container hidden"});s.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"),s.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=s.dom.createEl("div",{className:"playlist-selector-head"}),o=s.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var d=s.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist Title Goes Here"}),c=s.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,o=s.dom.createEl("div",{className:"playlist-container"}),a=s.dom.createEl("div",{className:"playlist-section",index:t}),d=s.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat(null===(l=n.videos[t])||void 0===l?void 0:l.title)}),u=s.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});s.dom.appendContent(a,d),s.dom.appendContent(a,u),s.dom.appendContent(o,a),s.dom.appendContent(c,o);var p=s.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=s.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat(null===(i=n.videos[t])||void 0===i?void 0:i.description)}),v=s.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),s.dom.appendContent(p,v),s.dom.appendContent(p,m),s.dom.appendContent(o,p),s.dom.appendContent(c,o),p.onclick=function(e){e.stopPropagation(),r.load(n.playerId,n.videos[t].id,sessionStorage.getItem("token"))},a.onclick=function(t){var n,l,i,s=document.getElementsByClassName("playlist-selector-content")[0].childNodes,a=(s=e(s))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=a&&null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(console.log(o.style),o.style.backgroundColor="#0000007d",null==a||null===(l=a.classList)||void 0===l||l.remove("hidden")):(null==a||null===(i=a.classList)||void 0===i||i.add("hidden"),o.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);s.dom.appendContent(i,o),s.dom.appendContent(i,d),s.dom.appendContent(t,i),s.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 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),d=require("@babel/runtime/helpers/getPrototypeOf"),r=require("@babel/runtime/helpers/defineProperty"),l=require("video.js"),s=require("./index-72867b95.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 n,i=d(e);if(t){var a=d(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}}require("video.js/dist/video-js.min.css"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator");var u=l.getComponent("Component"),h=function(o){a(h,u);var d=c(h);function h(n){var a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),a=d.call(this,n,o),r(i(a),"masterRenditions",[]),r(i(a),"addCustomFont",(function(e){var t=l.dom.createEl("div",{className:"font hideCustomFonts"}),n=l.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});l.dom.appendContent(t,n);var i=l.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",a.fontSizeOptions.map((function(e,t){var n=l.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;a.changeFontSize(t)})),l.dom.appendContent(i,n)})),l.dom.appendContent(t,i),l.dom.appendContent(e,t)})),r(i(a),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){l.dom.removeClass(e,"selected")}))})),a.playerId=null==o?void 0:o.playerId,a.skin=null==o?void 0:o.skin,a.icon=null==o?void 0:o.icon,a.masterRenditions=[],a.fontSizeOptions=[10,12,14],a.createRenditions(o.renditions),window.height=null,a}return n(h,[{key:"toggleContentOnHover",value:function(e,t){var n=l.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){l.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){l.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){l.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){l.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=l.dom.$(".renditions",this.contentEl()),n=l.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();l.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"&nbsp Settings":""," ");var i=l.dom.createEl("div",{className:"content hidden"}),a=l.dom.createEl("div",{innerHTML:"Quality",className:"title"}),o=l.dom.createEl("div",{className:"resolution"});l.dom.appendContent(o,a),this.toggleContentOnHover(n,i);var d=l.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,a=l.dom.createEl("div",{className:"relative"}),o=((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])/1048576).toFixed(1),r="".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>":"");r="".concat(e.height,"p @ ").concat(o,"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=l.dom.createEl("p",{innerHTML:r,className:"rendition",res:e.height,bandwidth:e.bandwidth});l.dom.appendContent(a,s),l.dom.appendContent(d,a),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,m(t.playerId,e.target),l.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",d),"Safari"!=s.detectBrowser()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=l.dom.createEl("div",{className:"relative"}),a=(e.bitrate/1e6).toFixed(1),o="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(o="".concat(e.height,"p @ ").concat(a,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var r=l.dom.createEl("p",{innerHTML:o,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});l.dom.appendContent(i,r),l.dom.appendContent(d,i),r.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,m(t.playerId,e.target),l.dom.addClass(r,"selected"))}))})),this.addAutoRendition("drm",d)),l.dom.appendContent(o,d),l.dom.appendContent(i,o),l.dom.appendContent(n,i)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var i=null;e&&e.on("cuechange",(function(){var t=e.activeCues[0];if(t&&document.querySelector(".auto.selected")){var n,a,o,d,r,l,s,c;if(null!=t&&null!==(n=t.value)&&void 0!==n&&null!==(a=n.resolution)&&void 0!==a&&a.height&&i!==(null==t||null===(o=t.value)||void 0===o||null===(d=o.resolution)||void 0===d?void 0:d.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==t||null===(s=t.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height,"p");i=null==t||null===(r=t.value)||void 0===r||null===(l=r.resolution)||void 0===l?void 0:l.height}}))}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"container"}),t=l.dom.createEl("div",{className:"setting-icon"});return l.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,a,o,d,r=null===(i=this.player_)||void 0===i||null===(a=i.tech_)||void 0===a?void 0:a.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(o=this.player_)||void 0===o||null===(d=o.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=l.dom.createEl("div",{className:"relative"}),u=l.dom.createEl("p",{innerHTML:"Auto ".concat(r,"p"),className:"rendition auto selected",bandwidth:s,res:r});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),l.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,m(n.playerId,null,!0))})),l.dom.appendContent(c,u),l.dom.appendContent(t,c)}else{var h=l.dom.createEl("div",{className:"relative"}),v=l.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});v.addEventListener("click",(function(e){n.resetRenditions(),l.dom.addClass(v,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,m(n.playerId,null,!0)})),l.dom.appendContent(h,v),l.dom.appendContent(t,h)}}}]),h}(),m=function(e,t,n){var i,a=s.getPlayer(e),o=null==t?void 0:t.bandwidth;if((null==a||null===(i=a.tech_)||void 0===i?void 0:i.vhs)||!1){a.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===o?e.enabled(!0):e.enabled(!1)})),a.handleTechPlaying_();var d=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(d),a.play()}),100);var r=l.dom.$(".content");r&&l.dom.addClass(r,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==a||null===(u=a.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,v,p,g;null==a||null===(m=a.dash)||void 0===m||null===(v=m.mediaPlayer)||void 0===v||v.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==a||null===(p=a.dash)||void 0===p||null===(g=p.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=a.currentTime();a.currentTime(0),setTimeout((function(){a.currentTime(f),a.play()}),100);var y=l.dom.$(".content");y&&l.dom.addClass(y,"hidden")}}};exports.default=h,exports.playSelectedResolution=m;
@@ -1 +0,0 @@
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-72867b95.js"),u=require("./icons-d6df3c5b.js");function p(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");var v,h=l.getComponent("Component"),f=function(e){s(a,h);var r=p(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,v=s.playerId;var c=i.el();return g(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 m(){return(m=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(v),d.showLoader(v),d.load(v,i,r).then((function(e){d.setCurrentVideo(e.response),d.play(v)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t){e.innerHTML='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,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=g,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 m.apply(this,arguments)}(t,h[t].id,i,l)})),e.episodes[t].id==v&&l[t].classList.add("highlight-active-eps")},g=0;g<c.length;g++)f(g)},exports.seriesModule=f;
@@ -1 +0,0 @@
1
- "use strict";var e=require("./index-72867b95.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");var r=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};exports.initaliseSkin=function(t){Promise.resolve().then((function(){return require("./skin-225252ff.js")})).then((function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r){var t=e.getPlayer(r);t.muted(!0)}(t),r(),function(r){var t=document.getElementById("".concat(r)),n=e.getPlayer(r);t&&t.addEventListener("touchstart",(function(){n.paused()?e.play(r):e.pause(r)}))}(t)};
@@ -1 +0,0 @@
1
- "use strict";var e,t=require("./icons-d6df3c5b.js"),n=require("./keyboardShortcuts-414ee823.js"),r=require("./index-72867b95.js"),s=require("@babel/runtime/helpers/defineProperty");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,n){var i=r.getPlayer(e);i.one("play",(function(){null!=n&&n.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){s(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}({},n)),null!=n&&n.airplay&&"Safari"==r.detectBrowser()&&i.addChild("airPlayButton"),null!=n&&n.chromecastReceiverId&&i.addChild("chromecastButton"),i.addChild("FullscreenToggle"),i.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(t.MinimizeSvg(window.controlsColor))),i.getChild("FullscreenToggle").el().appendChild(r.createIconMarkup(t.MaximizeSvg(window.controlsColor))),l(e)})),i.on("loadedmetadata",(function(){window.endFirstFrame(i),"Safari"!==r.detectBrowser()&&t.addResolutionModule(e,"live",t.SettingsSvg())})),i.one("loadedmetadata",(function(){var r;null!=n&&n.streams&&(null==n||null===(r=n.streams)||void 0===r?void 0:r.length)>=2&&t.addMwebPotraitTrayModule(e,n)}))}function l(t){var n=r.getPlayer(t);u(),n.on("pause",(function(){clearTimeout(e),a()})),n.on("play",(function(){u()}));var s=document.getElementById("".concat(t));s.addEventListener("mouseenter",(function(){a(),n.paused()||u()})),s.addEventListener("touchstart",(function(){a(),u()})),s.addEventListener("mousemove",(function(){a(),n.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"),exports.hideControls=l,exports.initialiseSkin=function(e,s){var o;n.initialiseKeyboardEvents(e,s),(null==(o=s)||!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,n){var s=r.getPlayer(e),o=s.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.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"==r.detectBrowser()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=n&&n.liveui||null==n||!n.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,s),i(e,s)};