@viewlift/player-backup 1.0.25-backup → 1.0.26-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-0391ca16.js → autoNextVideo-1bc5151b.js} +1 -1
- package/cjs/{caption-settings-790c5505.js → caption-settings-3ac346d5.js} +1 -1
- package/cjs/{features-143d5d8d.js → features-f9595ee3.js} +1 -1
- package/cjs/{generic-5cde86d8.js → generic-05343c4d.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-3e674abb.js → keyboardShortcuts-d09370d2.js} +1 -1
- package/cjs/{multicam-985c9f1e.js → multicam-890ff54b.js} +1 -1
- package/cjs/{multicamv2-598b4079.js → multicamv2-f5852c90.js} +1 -1
- package/cjs/{mwebPotraitTray-2bf99c12.js → mwebPotraitTray-929daa84.js} +1 -1
- package/cjs/{nextEpisodeButton-0a6cd649.js → nextEpisodeButton-01dc596e.js} +1 -1
- package/cjs/{playlist-05dee72b.js → playlist-d1dffc8b.js} +1 -1
- package/cjs/{renditions-69efcbb2.js → renditions-26d2d63b.js} +1 -1
- package/cjs/{resolution-abcb1b96.js → resolution-e303df24.js} +1 -1
- package/cjs/{series-47323cd6.js → series-8cb0fbcc.js} +1 -1
- package/cjs/{series-v2-dcd69f79.js → series-v2-b403701a.js} +1 -1
- package/cjs/{settings-icon-53be5c15.js → settings-icon-cfc84629.js} +1 -1
- package/cjs/{skin-9520e97e.js → skin-02820c58.js} +1 -1
- package/cjs/{skin-0c6772c5.js → skin-3b34ed08.js} +1 -1
- package/cjs/{skin-e31758e1.js → skin-addb2069.js} +1 -1
- package/cjs/{skin-42afe6d0.js → skin-d5a30cd0.js} +1 -1
- package/cjs/{skin-a90dbf29.js → skin-f1cef0f8.js} +1 -1
- package/cjs/{util-9ad1a9bb.js → util-0dbc1940.js} +1 -1
- package/cjs/{videoSelector-aac7941a.js → videoSelector-a64fbe11.js} +1 -1
- package/esm/{autoNextVideo-e8b992ff.js → autoNextVideo-81f976b3.js} +1 -1
- package/esm/{caption-settings-18fae2ff.js → caption-settings-9e96a1a6.js} +1 -1
- package/esm/{features-4975f7a2.js → features-31f521e5.js} +1 -1
- package/esm/{generic-d24e9c07.js → generic-f3b08872.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-df0cf83c.js → keyboardShortcuts-5bc2bd8b.js} +1 -1
- package/esm/{multicam-a7322f6b.js → multicam-b7433592.js} +1 -1
- package/esm/{multicamv2-bd8d55a7.js → multicamv2-d8980e3c.js} +1 -1
- package/esm/{mwebPotraitTray-d86fc56e.js → mwebPotraitTray-b635b5ff.js} +1 -1
- package/esm/{nextEpisodeButton-24a5c5eb.js → nextEpisodeButton-a6a1aac9.js} +1 -1
- package/esm/{playlist-28135a8e.js → playlist-e0263f3b.js} +1 -1
- package/esm/{renditions-1b245ba9.js → renditions-5db592e1.js} +1 -1
- package/esm/{resolution-51d96c30.js → resolution-a5f9717d.js} +1 -1
- package/esm/{series-258538df.js → series-81766318.js} +1 -1
- package/esm/{series-v2-ecf220e8.js → series-v2-fddbb3a7.js} +1 -1
- package/esm/{settings-icon-9e809949.js → settings-icon-430546b1.js} +1 -1
- package/esm/{skin-e12b9f83.js → skin-1ee7df35.js} +1 -1
- package/esm/{skin-b501d8e8.js → skin-7d0d3fcd.js} +1 -1
- package/esm/{skin-3f2b82a1.js → skin-81e3dbbe.js} +1 -1
- package/esm/{skin-d13e4caa.js → skin-a08cb600.js} +1 -1
- package/esm/{skin-fd5d2710.js → skin-c3d19023.js} +1 -1
- package/esm/{util-4027a8dd.js → util-3fbdea6d.js} +1 -1
- package/esm/{videoSelector-9f3f304b.js → videoSelector-5bc9473c.js} +1 -1
- package/package.json +1 -1
package/esm/index.js
CHANGED
|
@@ -1 +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{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as k,u as I,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _}from"./generic-d24e9c07.js";import{o as x,g as H,a as N,s as L,b as V}from"./util-4027a8dd.js";import{g as U}from"./renditions-1b245ba9.js";import{playSelectedResolution as W}from"./resolution-51d96c30.js";import{i as q,a as z}from"./skin-793f68b7.js";import"js-cookie";import"ua-parser-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 G(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function J(e,t){G("event",e,t)}function K(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 Q(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?K(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function Z(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=Y(),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());J(r?"FAILED_TO_START":"DROPPED_STREAM",Q({pfm:window.platform,uid:X(),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)}),100),J("PLAY",Q({pfm:window.platform,uid:X(),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)}),100))})))},window.handleBufferTimer=function(e,t){var n,o;if(t.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(o=n.className)&&void 0!==o&&o.includes("vjs-waiting"))J("BUFFERING",Q({pfm:window.platform,uid:X(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,J("FIRST_FRAME",Q({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),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,l;J("AD_REQUEST",Q({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},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,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),J("AD_IMPRESSION",Q({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if($(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var $=function(e,t,n){return e>=t&&e<=n};function ee(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 te(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r,l,a,s,d,u,c,v=[Q(Q(Q({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:X(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:Z(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).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 ne,oe,ie=function(e,t){var n=l(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,r,l,a,s=this.el(),d=i.dom.getPointerPosition(s,t).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function re(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 le=[],ae=0,se=null;function de(t,n,o){var i,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==oe?m={videoId:ne,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==oe&&(m=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?re(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({videoId:ne,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},se&&{seriesId:se})),a(m,n.token,oe).then((function(e){})).catch((function(e){})),ae=u+o}var ue=function(e,t,n){var o=l(e);if(o)if(t>=0&&t<=100){o.muted()&&o.muted(!1);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,"'")})},ce=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function ve(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 me=function(t,n,o,i){var r,a,m=i.res,f=i.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&o.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var i;(null==w||!w.muted())&&ue(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ve(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&function(e,t,n){var o,i;null!=t&&t.series&&(se=null==t||null===(o=t.series)||void 0===o?void 0:o.id),le=[],ae=0,ne=n;var r=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());le.includes(ae)||(e==ae?(le.push(e),de(a,t,r)):e>ae&&(ae=e+r))})),a.on("ended",(function(){de(a,t,r,!0)})))}(t,n,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),p&&(window.onfocus=function(){try{var e;null==w||null===(e=w.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}}),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var n,o,i,r,l,a,s,d,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===(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 w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,n;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==w||null===(n=w.error())||void 0===n?void 0:n.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,r=null===(t=u())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.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-b501d8e8.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-e12b9f83.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-d13e4caa.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-fd5d2710.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-3f2b82a1.js").then((function(n){n.initialiseSkin(e,t)}))},we=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,o.onload=function(){t()},o.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(o)}}))},pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},he=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)};var ge,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-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=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)}}(),Te=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){we("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),we("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:ye,loadEMELibrary:be});function Oe(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 Pe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ke=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C,_,x,H,N,L,V,U=a.res,W=void 0===U?null:U,q=a.sres,G=void 0===q?null:q,J=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,K=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==J&&"NOT_CONNECTED"!==J?["html5","chromecast"]:["chromecast","html5"]:["html5"],Q=z(null==W||null===(p=W.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.videoImageUrl)||z(null==W||null===(g=W.video)||void 0===g||null===(y=g.gist)||void 0===y||null===(T=y.imageGist)||void 0===T?void 0:T.r16x9),Y=(null==W||null===(O=W.video)||void 0===O||null===(P=O.liveDetails)||void 0===P?void 0:P.isDvrEnabled)||!1,X=function(e){var t,n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(n=te(te({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),n}(s),Z=(null==W||null===(k=W.video)||void 0===k||null===(I=k.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,$=(null==s?void 0:s.drmLibrary)||!1,ee=(null==W||null===(j=W.ads)||void 0===j||null===(D=j.preRoll)||void 0===D||null===(A=D.adTags)||void 0===A||null===(R=A.web)||void 0===R?void 0:R.active)&&(null==W||null===(F=W.ads)||void 0===F||null===(C=F.preRoll)||void 0===C||null===(_=C.adTags)||void 0===_||null===(x=_.web)||void 0===x?void 0:x.url),ne=(V={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:Y},e(V,"autoplay",null==s?void 0:s.autoplay),e(V,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ee),e(V,"loop",(null==s?void 0:s.loop)||!1),e(V,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(V,"html5",Pe(Pe({dash:Pe(Pe({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Pe(Pe({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(H=s.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(N=s.customData)||void 0===N?void 0:N.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(L=s.customData)||void 0===L?void 0:L.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(V,"poster",Q),e(V,"techOrder",K),e(V,"chromecast",{requestCustomDataFn:function(e){var n=l(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,l,a,s,d,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 w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=p;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 g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.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}(W,e,o)}}),e(V,"plugins",X),V),oe=i(t,ne,function(){var e=n(o.mark((function e(){var n,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Z&&u.resolve(Pe({status:!0,msg:"Player Initialised"},G?{seriesResponse:G,response:W}:{response:W})),window.initialise(oe),window.firstFrame(oe),"white"!==window.controlsColor&&he(window.controlsColor,oe),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),h=null==W||null===(n=W.video)||void 0===n?void 0:n.drmEnabled,g=null==W||null===(l=W.video)||void 0===l||null===(a=l.liveDetails)||void 0===a?void 0:a.startOverTime,!h&&!$){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,be();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([be(),ye()]);case 15:Y&&ie(t,g),!ee||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||B(t,ee,W),(y=E(Pe(Pe({},W),{},{audioAssetSource:null==s?void 0:s.audioAssetSource}),t))?b(t,y):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:W}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==W||null===(v=W.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==W||null===(w=W.video)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0)&&(I=(null==W||null===(O=W.video)||void 0===O||null===(P=O.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==W||null===(k=W.video)||void 0===k?void 0:k.closedCaptions),T=I.filter((function(e){return"VTT"===e.format})),M(t,T)),null!=s&&s.disableControls?S(t):fe(t,Pe(Pe(Pe({},s),ne),{},{liveVideo:Z,isDvrEnabled:Y,res:W,sres:G})),me(t,Pe(Pe(Pe({},s),ne),{},{liveVideo:Z}),u,{res:W,sres:G});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ie(){return{loadVideoInstantly:w,onTimeUpdate:x,getVideoDuration:H,onVideoEnded:N,init:function(e){return new Promise((function(t,n){var o,i,l,a,s,d,u,v,w;if(!T(null==e?void 0:e.playerId)){var p=null==e?void 0:e.videoId,h=(null==e||null===(o=e.series)||void 0===o?void 0:o.enable)||!1;window.videoId=p;var g=null==e?void 0:e.token;if(g&&!D(g)){ge=JSON.parse(atob(g.split(".")[1])),window.siteId=null===(i=ge)||void 0===i?void 0:i.siteId,window.siteName=null===(l=ge)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=ge)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=ge)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=ge)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(u=ge)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",g);var y=null==e?void 0:e.playerId,b=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,P=null==e?void 0:e.apiBaseUrl,k=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,I=null==e?void 0:e.errors;I&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,P&&(window.playerEntitlementUrl=P),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!q(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Te})).then((function(e){e.importIMA()})),!b||null!=e&&e.series||Promise.resolve().then((function(){return Te})).then((function(e){e.importChromecast()})),O&&"Safari"==r()&&Promise.resolve().then((function(){return Te})).then((function(e){e.importAirplay()})),k&&we("https://www.googletagmanager.com/gtag/js?id=".concat(k)).then((function(){return e=k,window.dataLayer=window.dataLayer||[],G("js",new Date),void G("config",e);var e})).catch((function(e){}));var j=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(y));if(j&&j.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var E,S=null==e||null===(E=e.series)||void 0===E?void 0:E.id;A(S,g).then((function(o){var i,r,l,a=o.data,s=o.data.seasons;_(s);var d=p||(null==s||null===(i=s[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(n)})).catch((function(e){return console.log(e)}))}(S,g),R(d,g).then((function(o){var i,r,l;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(o.data),ke(y,{res:null==o?void 0:o.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))})).catch((function(e){F(e,y,n)}))}else R(p,g).then((function(o){var i,r,l,a;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==o?void 0:o.data);var s=null==o?void 0:o.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?C(p,g).then((function(o){var i,r,l,a,d,u;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==o?void 0:o.data)),e.watchHistoryResumeTime=(null==o||null===(d=o.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==o||null===(u=o.data)||void 0===u?void 0:u.watchedPercentage)||null,ke(y,{res:s},e,{resolve:t,reject:n})})).catch((function(o){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(o)),ke(y,{res:s},e,{resolve:t,reject:n})})):ke(y,{res:s},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))}else n({status:!1,msg:"".concat(g?"Token is expired !":"Missing Authorization Token"),response:{token:g}})}}))},getRenditions:U,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:L,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:W,getSource:E,setVolume:ue,getVolume:ce,disableControls:S,setPlaybackSpeed:V}}export{Ie as default};
|
|
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{d as r,g as l,s as a,c as s,h as d,a as u,b as c,e as v,f as m,i as f,l as w,j as p,p as h,k as g,r as y,m as b,n as T,o as O,q as P,t as k,u as I,v as j,w as E,x as S,y as D,z as A,A as R,B as F,C,D as B,E as M,F as _}from"./generic-f3b08872.js";import{o as x,g as H,a as N,s as L,b as V}from"./util-3fbdea6d.js";import{g as U}from"./renditions-5db592e1.js";import{playSelectedResolution as W}from"./resolution-a5f9717d.js";import{i as q,a as z}from"./skin-793f68b7.js";import"js-cookie";import"ua-parser-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 G(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function J(e,t){G("event",e,t)}function K(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 Q(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?K(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function Y(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function X(){var e=window.sessionStorage.getItem("uid");return e||(e=Y(),window.sessionStorage.setItem("uid",e),e)}function Z(){var e=sessionStorage.getItem("token"),t=JSON.parse(atob(e.split(".")[1]));return null!=t&&t.anonymousId?"guest-user":null==t?void 0:t.userId}window.initialise=function(e){window.sid=Y(),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());J(r?"FAILED_TO_START":"DROPPED_STREAM",Q({pfm:window.platform,uid:X(),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)}),100),J("PLAY",Q({pfm:window.platform,uid:X(),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)}),100))})))},window.handleBufferTimer=function(e,t){var n,o;if(t.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(o=n.className)&&void 0!==o&&o.includes("vjs-waiting"))J("BUFFERING",Q({pfm:window.platform,uid:X(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,J("FIRST_FRAME",Q({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),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,l;J("AD_REQUEST",Q({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},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,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),J("AD_IMPRESSION",Q({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:X(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if($(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}}))()};var $=function(e,t,n){return e>=t&&e<=n};function ee(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 te(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ee(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r,l,a,s,d,u,c,v=[Q(Q(Q({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:X(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:e.videoPosition,environment:window.environment,dp1:e.dp1||null,dp2:e.dp2||null,dp3:e.dp3||null,dp4:e.dp4||null,dp5:e.dp5||null,apos:!0===e.isAdEvent?e.videoPosition:null,apod:!0===e.isAdEvent?(c=e.adPosition,c?String(c):""):null,profid:Z(),player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:null,ttfirstframe:e.ttFirstFrame,bitrate:e.bitrate,connectionspeed:null,resolutionheight:e.resHeight,resolutionwidth:e.resWidth,bufferhealth:e.bufferHealth},(null==e?void 0:e.duration)&&{duration:e.duration}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(a=l.beacon)||void 0===a?void 0:a.params)];t({url:(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:sessionStorage.getItem("token")},contentType:"application/x-www-form-urlencoded",dataType:"text",data:v}).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 ne,oe,ie=function(e,t){var n=l(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,r,l,a,s=this.el(),d=i.dom.getPointerPosition(s,t).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*d,v.seek()}}))};function re(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 le=[],ae=0,se=null;function de(t,n,o){var i,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var d=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==oe?m={videoId:ne,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:v}:"v2"==oe&&(m=function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?re(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):re(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({videoId:ne,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},se&&{seriesId:se})),a(m,n.token,oe).then((function(e){})).catch((function(e){})),ae=u+o}var ue=function(e,t,n){var o=l(e);if(o)if(t>=0&&t<=100){o.muted()&&o.muted(!1);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,"'")})},ce=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function ve(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 me=function(t,n,o,i){var r,a,m=i.res,f=i.sres,w=l(t),p=(null==m||null===(r=m.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;c(m),w.on("loadstart",(function(){p&&o.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var i;(null==w||!w.muted())&&ue(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ve(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ve(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&function(e,t,n){var o,i;null!=t&&t.series&&(se=null==t||null===(o=t.series)||void 0===o?void 0:o.id),le=[],ae=0,ne=n;var r=(null==t||null===(i=t.watchHistory)||void 0===i?void 0:i.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());le.includes(ae)||(e==ae?(le.push(e),de(a,t,r)):e>ae&&(ae=e+r))})),a.on("ended",(function(){de(a,t,r,!0)})))}(t,n,null==d||null===(r=d.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),p&&(window.onfocus=function(){try{var e;null==w||null===(e=w.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}}),w.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];w.trigger("subtitlechanged",t)})),w.on("subtitlechanged",(function(e,t){var n,o,i,r,l,a,s,d,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===(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 w,p=f.getMediaSession(),h=p.media.tracks.filter((function(e){return"TEXT"==e.type}));w=t?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),p.editTracksInfo(w)}})),w.on("loadedmetadata",(function(){window.endFirstFrame(w)})),w.one("error",(function(){var e,n;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==w||null===(n=w.error())||void 0===n?void 0:n.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,r=null===(t=u())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,l=v().get(r)||{t:0,p:0},a=l.t,s=l.p;a&&s<95&&setTimeout((function(){w.currentTime(a)}),0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==n?void 0:n.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.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-7d0d3fcd.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-1ee7df35.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-a08cb600.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n?import("./skin-c3d19023.js").then((function(n){n.initialiseSkin(e,t)})):"multiplayer"==n&&import("./skin-81e3dbbe.js").then((function(n){n.initialiseSkin(e,t)}))},we=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,o.onload=function(){t()},o.onerror=function(t){n("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(o)}}))},pe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},he=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)};var ge,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-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=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)}}(),Te=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){we("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),we("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:ye,loadEMELibrary:be});function Oe(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 Pe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Oe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ke=function(t,a,s,u){var c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C,_,x,H,N,L,V,U=a.res,W=void 0===U?null:U,q=a.sres,G=void 0===q?null:q,J=(null===(c=window)||void 0===c||null===(v=c.cast)||void 0===v||null===(m=v.framework)||void 0===m||null===(f=m.CastContext)||void 0===f||null===(w=f.getInstance())||void 0===w?void 0:w.S)||void 0,K=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==J&&"NOT_CONNECTED"!==J?["html5","chromecast"]:["chromecast","html5"]:["html5"],Q=z(null==W||null===(p=W.video)||void 0===p||null===(h=p.gist)||void 0===h?void 0:h.videoImageUrl)||z(null==W||null===(g=W.video)||void 0===g||null===(y=g.gist)||void 0===y||null===(T=y.imageGist)||void 0===T?void 0:T.r16x9),Y=(null==W||null===(O=W.video)||void 0===O||null===(P=O.liveDetails)||void 0===P?void 0:P.isDvrEnabled)||!1,X=function(e){var t,n={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(n={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==r()&&(n=te(te({},n),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),n}(s),Z=(null==W||null===(k=W.video)||void 0===k||null===(I=k.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,$=(null==s?void 0:s.drmLibrary)||!1,ee=(null==W||null===(j=W.ads)||void 0===j||null===(D=j.preRoll)||void 0===D||null===(A=D.adTags)||void 0===A||null===(R=A.web)||void 0===R?void 0:R.active)&&(null==W||null===(F=W.ads)||void 0===F||null===(C=F.preRoll)||void 0===C||null===(_=C.adTags)||void 0===_||null===(x=_.web)||void 0===x?void 0:x.url),ne=(V={controls:0!=(null==s?void 0:s.controls),playsinline:!0,fluid:!0,muted:(null==s?void 0:s.muted)||!1,autoplay:(null==s?void 0:s.autoplay)||!1,controlBar:{volumePanel:("default"==s.skin||"defaultV2"==s.skin||"live"==(null==s?void 0:s.skin))&&{inline:!1},fullscreenToggle:"default"==s.skin||"defaultV2"==s.skin,audioTrackButton:!1,pictureInPictureToggle:(s.skin,!1)},muteToggle:"multiplayer"==s.skin,liveui:Y},e(V,"autoplay",null==s?void 0:s.autoplay),e(V,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!ee),e(V,"loop",(null==s?void 0:s.loop)||!1),e(V,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(V,"html5",Pe(Pe({dash:Pe(Pe({},!i.browser.IS_SAFARI&&{useTTML:!0}),{},{updateSettings:{streaming:{delay:{liveDelay:localStorage.getItem("LATENCY")||3},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}}}}}),vhs:Pe(Pe({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(H=s.customData)||void 0===H?void 0:H.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(N=s.customData)||void 0===N?void 0:N.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(L=s.customData)||void 0===L?void 0:L.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(V,"poster",Q),e(V,"techOrder",K),e(V,"chromecast",{requestCustomDataFn:function(e){var n=l(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,l,a,s,d,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 w=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=w}var p=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=p;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 g=null==e||null===(a=e.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=g;var y=null==e||null===(d=e.video)||void 0===d||null===(u=d.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}(W,e,o)}}),e(V,"plugins",X),V),oe=i(t,ne,function(){var e=n(o.mark((function e(){var n,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Z&&u.resolve(Pe({status:!0,msg:"Player Initialised"},G?{seriesResponse:G,response:W}:{response:W})),window.initialise(oe),window.firstFrame(oe),"white"!==window.controlsColor&&he(window.controlsColor,oe),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),h=null==W||null===(n=W.video)||void 0===n?void 0:n.drmEnabled,g=null==W||null===(l=W.video)||void 0===l||null===(a=l.liveDetails)||void 0===a?void 0:a.startOverTime,!h&&!$){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,be();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([be(),ye()]);case 15:Y&&ie(t,g),!ee||null!=s&&null!==(c=s.customData)&&void 0!==c&&c.disableAds||B(t,ee,W),(y=E(Pe(Pe({},W),{},{audioAssetSource:null==s?void 0:s.audioAssetSource}),t))?b(t,y):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:W}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==W||null===(v=W.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(f=m.closedCaptions)||void 0===f?void 0:f.length)>0||(null==W||null===(w=W.video)||void 0===w||null===(p=w.closedCaptions)||void 0===p?void 0:p.length)>0)&&(I=(null==W||null===(O=W.video)||void 0===O||null===(P=O.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==W||null===(k=W.video)||void 0===k?void 0:k.closedCaptions),T=I.filter((function(e){return"VTT"===e.format})),M(t,T)),null!=s&&s.disableControls?S(t):fe(t,Pe(Pe(Pe({},s),ne),{},{liveVideo:Z,isDvrEnabled:Y,res:W,sres:G})),me(t,Pe(Pe(Pe({},s),ne),{},{liveVideo:Z}),u,{res:W,sres:G});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Ie(){return{loadVideoInstantly:w,onTimeUpdate:x,getVideoDuration:H,onVideoEnded:N,init:function(e){return new Promise((function(t,n){var o,i,l,a,s,d,u,v,w;if(!T(null==e?void 0:e.playerId)){var p=null==e?void 0:e.videoId,h=(null==e||null===(o=e.series)||void 0===o?void 0:o.enable)||!1;window.videoId=p;var g=null==e?void 0:e.token;if(g&&!D(g)){ge=JSON.parse(atob(g.split(".")[1])),window.siteId=null===(i=ge)||void 0===i?void 0:i.siteId,window.siteName=null===(l=ge)||void 0===l?void 0:l.site,e.isAnonymousUser=!(null===(a=ge)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=ge)||void 0===s?void 0:s.site)||null,e.userId=(null===(d=ge)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(u=ge)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",g);var y=null==e?void 0:e.playerId,b=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,O=null==e?void 0:e.airplay,P=null==e?void 0:e.apiBaseUrl,k=(null==e||null===(v=e.analytics)||void 0===v?void 0:v.gaId)||null,I=null==e?void 0:e.errors;I&&(window.customErrors=I),window.customData=null==e?void 0:e.customData,P&&(window.playerEntitlementUrl=P),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!q(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Te})).then((function(e){e.importIMA()})),!b||null!=e&&e.series||Promise.resolve().then((function(){return Te})).then((function(e){e.importChromecast()})),O&&"Safari"==r()&&Promise.resolve().then((function(){return Te})).then((function(e){e.importAirplay()})),k&&we("https://www.googletagmanager.com/gtag/js?id=".concat(k)).then((function(){return e=k,window.dataLayer=window.dataLayer||[],G("js",new Date),void G("config",e);var e})).catch((function(e){}));var j=null===(w=document)||void 0===w?void 0:w.getElementById("".concat(y));if(j&&j.addEventListener("contextmenu",(function(e){return e.preventDefault()})),h){var E,S=null==e||null===(E=e.series)||void 0===E?void 0:E.id;A(S,g).then((function(o){var i,r,l,a=o.data,s=o.data.seasons;_(s);var d=p||(null==s||null===(i=s[0])||void 0===i||null===(r=i.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var n=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(n)})).catch((function(e){return console.log(e)}))}(S,g),R(d,g).then((function(o){var i,r,l;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(o.data),ke(y,{res:null==o?void 0:o.data,sres:a},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))})).catch((function(e){F(e,y,n)}))}else R(p,g).then((function(o){var i,r,l,a;window.contentType=null==o||null===(i=o.data)||void 0===i||null===(r=i.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==o?void 0:o.data);var s=null==o?void 0:o.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?C(p,g).then((function(o){var i,r,l,a,d,u;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==o?void 0:o.data)),e.watchHistoryResumeTime=(null==o||null===(d=o.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==o||null===(u=o.data)||void 0===u?void 0:u.watchedPercentage)||null,ke(y,{res:s},e,{resolve:t,reject:n})})).catch((function(o){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(o)),ke(y,{res:s},e,{resolve:t,reject:n})})):ke(y,{res:s},e,{resolve:t,reject:n})})).catch((function(e){F(e,y,n,p)}))}else n({status:!1,msg:"".concat(g?"Token is expired !":"Missing Authorization Token"),response:{token:g}})}}))},getRenditions:U,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:L,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:W,getSource:E,setVolume:ue,getVolume:ce,disableControls:S,setPlaybackSpeed:V}}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,j as r,r as t}from"./generic-
|
|
1
|
+
import{g as e,j as r,r as t}from"./generic-f3b08872.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 +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{o as c,p as u}from"./generic-
|
|
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{o as c,p as u}from"./generic-f3b08872.js";import"axios";import"js-cookie";import"ua-parser-js";function d(e){var t=m();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)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=s.getComponent("Component"),v=function(o){l(m,p);var n=d(m);function m(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,m),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),p=m.getPropertyValue("height"),v=m.getPropertyValue("width"),f=p.slice(0,-2);v.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(f-135,"px"),e.style.height="".concat(f-85,"px")):(e.style.bottom="3rem",e.style.height="".concat(f-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(m,[{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)}))}}]),m}();export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-c2efba97.js";import{g as c,o as d,p as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as s,e as l,h as i}from"./icons-c2efba97.js";import{g as c,o as d,p as m}from"./generic-f3b08872.js";import{d as p}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function u(e){var t=h();return function(){var a,r=o(e);if(t){var s=o(this).constructor;a=Reflect.construct(r,arguments,s)}else a=r.apply(this,arguments);return n(this,a)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=r.getComponent("Component"),f=function(n){a(h,v);var o=u(h);function h(t){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(a=o.call(this,t,n)).playerId=n.playerId,a.seriesData=n.sres,a.streams=n.streams,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.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=r.dom.createEl("div",{className:"stream-container hidden"});r.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(p(),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 a=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),document.getElementById(this.playerId).style.overflow="hidden",r.dom.appendContent(e,t),this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),n=r.dom.createEl("div",{className:"stream-selector-head"}),o=r.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),p=r.dom.createEl("div",{className:"stream-selector-content"}),u=r.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,n=r.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(n.classList.add("selected"),n.style.border="4px solid #D2393B"),n.onclick=function(){for(var a=r.dom.$$(".stream"),o=0;o<a.length;o++)a[o].style.border="none",a[o].classList.remove("selected");n.classList.add("selected"),n.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id,sessionStorage.getItem("token")).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},n.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),o.alt="No Thumbnail Available",n.append(o),r.dom.appendContent(u,n),r.dom.appendContent(p,u)},v=0;v<this.streams.length;v++)h(v);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,p),c(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),h}();export{f as default};
|
|
@@ -1 +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{o as i,p as a}from"./generic-
|
|
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{o as i,p as a}from"./generic-f3b08872.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";function c(e){var t=d();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)}}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}var u=r.getComponent("Component"),m=function(o){l(d,u);var n=c(d);function d(t){var l,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,d),(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(d,[{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")))}}]),d}();export{m as default};
|
|
@@ -1 +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 l}from"./icons-c2efba97.js";import{o as s,b as a}from"./generic-
|
|
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 l}from"./icons-c2efba97.js";import{o as s,b as a}from"./generic-f3b08872.js";import{b as d}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function p(e){var t=u();return function(){var n,r=i(e);if(t){var l=i(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var c=r.getComponent("Component"),m=function(o){n(s,c);var i=p(s);function s(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(s,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(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"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),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")}))}}]),s}(),v=function(e,t){var n=f(e,t.video.gist.id),o=x(e[n],t.video.gist.id),i=h(e[n],o);g(i.nextEp)},f=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},h=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,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},x=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},g=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t,n=sessionStorage.getItem("token");s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id,n).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{m as default,v as initaliseFunctionality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-c2efba97.js";import{g as d,o as c,J as p}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-c2efba97.js";import{g as d,o as c,J as p}from"./generic-f3b08872.js";import{a as m}from"./autoNextVideo-81f976b3.js";import{d as u}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"./util-3fbdea6d.js";function v(e){var t=y();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var h=a.getComponent("Component"),f=function(o){l(y,h);var i=v(y);function y(e){var n,l,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&m({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{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-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=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")?(u(),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,l=this.el(),o=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"),l.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),m=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,o,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===(l=n.videos[t])||void 0===l?void 0:l.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(m,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(m,i),u.onclick=function(e){e.stopPropagation(),p(t+1),c(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,l,o,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")?(i.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(o,i),a.dom.appendContent(o,s),a.dom.appendContent(t,o),a.dom.appendContent(t,m),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")}))}}]),y}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./generic-
|
|
1
|
+
import{g as l}from"./generic-f3b08872.js";var i=function(i){var n,o=l(i),t=[];if((null==o||null===(n=o.tech_)||void 0===n?void 0:n.vhs)||!1){var e,d,v=null==o||null===(e=o.tech_)||void 0===e||null===(d=e.vhs)||void 0===d?void 0:d.representations();(null==v?void 0:v.length)>0&&(t=null==v?void 0:v.sort((function(l,i){return(null==l?void 0:l.height)==(null==i?void 0:i.height)?(null==i?void 0:i.bandwidth)-(null==l?void 0:l.bandwidth):(null==i?void 0:i.height)-(null==l?void 0:l.height)})))}else{var u,h,r=null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h?void 0:h.getBitrateInfoListFor("video");(null==r?void 0:r.length)>0&&(t=null==r?void 0:r.sort((function(l,i){return i.height-l.height})))}return t};export{i as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{g as s,d as c}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import d from"@babel/runtime/helpers/getPrototypeOf";import l from"@babel/runtime/helpers/defineProperty";import r from"video.js";import{g as s,d as c}from"./generic-f3b08872.js";import{p as u}from"./skin-793f68b7.js";import"axios";import"js-cookie";import"ua-parser-js";function h(e){var t=m();return function(){var n,i=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var p=r.getComponent("Component"),v=function(a){o(s,p);var d=h(s);function s(n){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,s),o=d.call(this,n,a),l(i(o),"masterRenditions",[]),l(i(o),"addCustomFont",(function(e){var t=r.dom.createEl("div",{className:"font hideCustomFonts"}),n=r.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});r.dom.appendContent(t,n);var i=r.dom.createEl("div",{className:"font-options"});i.style.fontSize="12px",o.fontSizeOptions.map((function(e,t){var n=r.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;o.changeFontSize(t)})),r.dom.appendContent(i,n)})),r.dom.appendContent(t,i),r.dom.appendContent(e,t)})),l(i(o),"resetRenditions",(function(){e(document.getElementsByClassName("rendition")).map((function(e){r.dom.removeClass(e,"selected")}))})),o.playerId=null==a?void 0:a.playerId,o.skin=null==a?void 0:a.skin,o.icon=null==a?void 0:a.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(a.renditions),window.height=null,o}return n(s,[{key:"toggleContentOnHover",value:function(e,t){var n=r.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=r.dom.$(".renditions",this.contentEl()),n=r.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=r.dom.$(".setting-icon",this.el()),o=u(this.icon);if(i.append(o),"live"===this.skin){var a=document.createTextNode(" Settings");i.appendChild(a)}var d=r.dom.createEl("div",{className:"content hidden"}),l=r.dom.createEl("div",{innerHTML:"Quality",className:"title"}),s=r.dom.createEl("div",{className:"resolution"});r.dom.appendContent(s,l),this.toggleContentOnHover(n,d);var h=r.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var i,o,a=r.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(i=e.playlist)||void 0===i?void 0:i.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes.BANDWIDTH))/1048576).toFixed(1),l="".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>":"");l="".concat(e.height,"p @ ").concat(d,"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=r.dom.createEl("p",{innerHTML:l,className:"rendition",res:e.height,bandwidth:e.bandwidth});r.dom.appendContent(a,s),r.dom.appendContent(h,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,g(t.playerId,e.target),r.dom.addClass(s,"selected"))}))})),this.addAutoRendition("nondrm",h),"Safari"!=c()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var i=r.dom.createEl("div",{className:"relative"}),o=(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(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 d=r.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});r.dom.appendContent(i,d),r.dom.appendContent(h,i),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,g(t.playerId,e.target),r.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",h)),r.dom.appendContent(s,h),r.dom.appendContent(d,s),r.dom.appendContent(n,d)}},{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,n,o=e.activeCues[0];if(console.log((null==o||null===(t=o.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),o&&document.querySelector(".auto.selected")){var a,d,l,r,s,c,u,h;if(null!=o&&null!==(a=o.value)&&void 0!==a&&null!==(d=a.resolution)&&void 0!==d&&d.height&&i!==(null==o||null===(l=o.value)||void 0===l||null===(r=l.resolution)||void 0===r?void 0:r.height))document.querySelector(".auto.selected").textContent="Auto ".concat(null==o||null===(u=o.value)||void 0===u||null===(h=u.resolution)||void 0===h?void 0:h.height,"p");i=null==o||null===(s=o.value)||void 0===s||null===(c=s.resolution)||void 0===c?void 0:c.height}}))}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"container"}),t=r.dom.createEl("div",{className:"setting-icon"});return r.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var i,o,a,d,l=null===(i=this.player_)||void 0===i||null===(o=i.tech_)||void 0===o?void 0:o.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(d=a.tech_)||void 0===d?void 0:d.vhs.selectPlaylist().attributes.BANDWIDTH,c=r.dom.createEl("div",{className:"relative"}),u=r.dom.createEl("p",{innerHTML:"Auto ".concat(l,"p"),className:"rendition auto selected",bandwidth:s,res:l});u.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),r.dom.addClass(u,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,g(n.playerId,null,!0))})),r.dom.appendContent(c,u),r.dom.appendContent(t,c)}else{var h=r.dom.createEl("div",{className:"relative"}),m=r.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),r.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,g(n.playerId,null,!0)})),r.dom.appendContent(h,m),r.dom.appendContent(t,h)}}}]),s}(),g=function(e,t,n){var i,o=s(e),a=null==t?void 0:t.bandwidth;if((null==o||null===(i=o.tech_)||void 0===i?void 0:i.vhs)||!1){o.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),o.handleTechPlaying_();var d=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(d)}),100);var l=r.dom.$(".content");l&&r.dom.addClass(l,"hidden")}else{var c=null==t?void 0:t.qualityIndex;if(n){var u,h;null==o||null===(u=o.dash)||void 0===u||null===(h=u.mediaPlayer)||void 0===h||h.resetSettings()}else{var m,p,v,g;null==o||null===(m=o.dash)||void 0===m||null===(p=m.mediaPlayer)||void 0===p||p.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==o||null===(v=o.dash)||void 0===v||null===(g=v.mediaPlayer)||void 0===g||g.setQualityFor("video",c,!0);var f=o.currentTime();o.currentTime(0),setTimeout((function(){o.currentTime(f)}),100);var w=r.dom.$(".content");w&&r.dom.addClass(w,"hidden")}}};export{v as default,g as playSelectedResolution};
|
|
@@ -1 +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 l from"@babel/runtime/regenerator";import c from"video.js";import{f as d,k as p,o as u,b as v,p as m}from"./generic-
|
|
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 l from"@babel/runtime/regenerator";import c from"video.js";import{f as d,k as p,o as u,b as v,p as m}from"./generic-f3b08872.js";import{s as f}from"./loader-580278fe.js";import{E as h}from"./icons-c2efba97.js";import{b as g}from"./skin-793f68b7.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(e){var t=y();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)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var C,w=c.getComponent("Component"),L=function(e){s(o,w);var r=b(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,C=s.playerId,S(i.el(),i.seriesData),i.loadCSS(),i}return i(o,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),o}();function k(){return(k=e(l.mark((function e(t,i,n,s){var r;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=sessionStorage.getItem("token"),p(C),f(C),u(C,i,r).then((function(e){v(e.response),m(C)}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(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("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=g(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!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 c=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){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,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return k.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)h(b)}function S(e,t){for(var i='<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>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=g(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{S as customSeasonList,E as handleSeasonChange,L as seriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-c2efba97.js";import{e as u,K as m,L as p,g as v,G as h,o as f}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-c2efba97.js";import{e as u,K as m,L as p,g as v,G as h,o as f}from"./generic-f3b08872.js";import{d as C,p as g}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import{a as y}from"./autoNextVideo-81f976b3.js";import"js-cookie";import"ua-parser-js";import"./util-3fbdea6d.js";function b(e){var t=N();return function(){var n,s=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(s,arguments,o)}else n=s.apply(this,arguments);return i(this,n)}}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(i){o(N,E);var l=b(N);function N(n){var o,i,a,r,d,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,N),(c=l.call(this,n,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(a=v.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=u(),null!==(r=s(c))&&void 0!==r&&r.autoPlayNext&&null!=v&&null!==(d=v.series)&&void 0!==d&&d.enable){var h,f,C,g,b=null==v||null===(h=v.sres)||void 0===h?void 0:h.seasons,E=[];b.map((function(t){E.push.apply(E,e(t.episodes))})),m(E),p(null===(f=c.options_)||void 0===f||null===(C=f.res)||void 0===C||null===(g=C.video)||void 0===g?void 0:g.id),y({playerId:c.playerId,content:E,cb:c.cb,series:null==v?void 0:v.sres})}return c}return n(N,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-0727ee8c.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(s,"px"),a.dom.appendContent(t,n),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(n)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});o.onclick=function(){if("series-selector-cross-icon"===o.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===o.className){var s=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),o.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(s,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var l=g(d());o.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(s,o),a.dom.appendContent(s,i),a.dom.appendContent(e,s),a.dom.appendContent(e,l),v(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createSeasonLister",value:function(){var e=this;v(this.playerId);for(var t=h(),n=a.dom.createEl("div",{className:"season-container"}),s=function(s){var o,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(o=t[s])||void 0===o?void 0:o.title;var r=a.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==s&&(r.checked=!0),r.onclick=function(t){e.showSeasonDetails(s)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(n,i)},o=0;o<t.length;o++)s(o);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,o,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(o=n.imageGist)||void 0===o?void 0:o.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var o=function(o){var i,l,r,d,c,u,m,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:o}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,g),a.dom.appendContent(v,h),a.dom.appendContent(n,v);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[o])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[o])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(m=t[o])||void 0===m?void 0:m.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(v,y),a.dom.appendContent(n,v),y.onclick=function(e){var n;e.stopPropagation(),p(null===(n=t[o])||void 0===n?void 0:n.id),f(s.playerId,t[o].id,sessionStorage.getItem("token")).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(n=l.classList)&&void 0!==n&&n.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=h()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=a.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=g(c());s.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),N}();export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a 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{f as l,e as s}from"./icons-c2efba97.js";import{g as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import a 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{f as l,e as s}from"./icons-c2efba97.js";import{g as d}from"./generic-f3b08872.js";import{g as c}from"./renditions-5db592e1.js";import{playSelectedResolution as u}from"./resolution-a5f9717d.js";import{d as m,b as p}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function h(e){var t=v();return function(){var n,a=i(e);if(t){var r=i(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var g=r.getComponent("Component"),f=function(o){a(v,g);var i=h(v);function v(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,v),(n=i.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(v,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-0125bffd.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(m(),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"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),o=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(s())});o.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:"Settings"}),l=r.dom.createEl("div",{className:"settings-selector-content"}),c=r.dom.createEl("div",{className:"settings-container"}),u=this.createVideoQualityContainer();r.dom.appendContent(c,u);var m=this.createAudioQualityContainer();r.dom.appendContent(c,m),r.dom.appendContent(a,o),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,l),r.dom.appendContent(l,c),d(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}},{key:"createAudioQualityContainer",value:function(){var e=d(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=r.dom.createEl("div",{className:"audio-language-container"}),a=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:"Audio Language"});r.dom.appendContent(n,a);for(var o=function(e){var a,o=document.createElement("label");o.className="audio-language-holder",o.setAttribute("for","language-radio-".concat(e));var i=document.createElement("div");i.className="audio - ".concat(e),i.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(n){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(o,l),r.dom.appendContent(o,i),r.dom.appendContent(n,o)},i=0;i<t.length;i++)o(i);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=r.dom.createEl("div",{className:"video-quality-container"}),a=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:"Video Quality"});r.dom.appendContent(n,a);var o=[].concat(e(c(this.playerId)),[{height:"Auto"}]);u(this.playerId,"raw",!0);for(var i=function(e){var a,i,l,s=document.createElement("label");s.className="video-quality-holder",s.setAttribute("for","quality".concat(e));var d=document.createElement("div");d.className="video-quality - ".concat(e);var c=(null==o||null===(a=o[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==o||null===(i=o[e])||void 0===i?void 0:i.height)?"":"p"),m=document.createTextNode(c);if(d.appendChild(m),(null==o||null===(l=o[e])||void 0===l?void 0:l.height)>=720)for(var h=p("<span class='hd-rendition'> HD </span>");null!=h&&h.firstChild;)d.appendChild(h.firstChild);var v=r.dom.createEl("input",{className:"radio - ".concat(e),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(o[e]),checked:"".concat(e==o.length-1)});v.setAttribute("type","radio"),v.onchange=function(n){var a=o[e];"true"=="".concat("Auto"==o[e].height)?u(t.playerId,a,!0):u(t.playerId,a)},r.dom.appendContent(s,v),r.dom.appendContent(s,d),r.dom.appendContent(n,s)},l=0;l<o.length;l++)i(l);return n}}]),v}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,e as t,f as s,g as o,h as n}from"./features-
|
|
1
|
+
import{b as e,e as t,f as s,g as o,h as n}from"./features-31f521e5.js";import{i}from"./keyboardShortcuts-5bc2bd8b.js";import{S as r,M as a,a as l,N as d,b as m,R as u}from"./icons-c2efba97.js";import{g as p,a as c}from"./generic-f3b08872.js";import{c as f}from"./skin-793f68b7.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-5db592e1.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function v(v,b){i(v,b),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&&o(e,"default",m());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",u())}(v,b),function(o,n){var i=p(o),a=(null==n?void 0:n.sres)||null;i.on("loadeddata",(function(){e(o,"default",r()),a&&import("./nextEpisodeButton-a6a1aac9.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,c())}))})),i.one("loadedmetadata",(function(){var e;a&&(t(o,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),s(n.sres,n.res,o))}))}(v,b),function(e,t){var s=p(e),o=document.getElementsByClassName("vjs-current-time")[0],n=document.getElementsByClassName("vjs-duration")[0],i=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(o&&(o.style.display="none"),n&&(n.style.display="none"),i&&(i.style.display="none"));s.controlBar.getChild("FullscreenToggle").el().appendChild(f(a(window.controlsColor))),s.controlBar.getChild("FullscreenToggle").el().appendChild(f(l(window.controlsColor)));var r=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(f(d()));var m=document.createElement("div");m.classList.add("caption-header"),r.querySelector(".vjs-menu-content").insertBefore(m,r.querySelector(".vjs-menu-item"))}(v,b)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as n,d as s}from"./features-
|
|
1
|
+
import{a as e,b as t,c as n,d as s}from"./features-31f521e5.js";import{M as o,a as r,S as l,N as a}from"./icons-c2efba97.js";import{g as i,d as c}from"./generic-f3b08872.js";import{c as u}from"./skin-793f68b7.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-5bc2bd8b.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"./renditions-5db592e1.js";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";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(s,a){var m=i(s);m.one("play",(function(){null!=a&&a.streams&&e(s,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(o(window.controlsColor))),m.getChild("FullscreenToggle").el().appendChild(u(r(window.controlsColor))),b(s)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&t(s,"live",l())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&n(s,a)}))}function f(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){s(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 b(e){var t=i(e);j(),t.on("pause",(function(){clearTimeout(h),y()})),t.on("play",(function(){j()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||j()})),n.addEventListener("touchstart",(function(){y(),j()})),n.addEventListener("mousemove",(function(){y(),t.paused()||j()}))}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 j(){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{b as hideControls,f as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./generic-
|
|
1
|
+
import{g as e}from"./generic-f3b08872.js";import{g as r}from"./renditions-5db592e1.js";import{i as t}from"./features-31f521e5.js";import"@babel/runtime/helpers/defineProperty";import"video.js";import"axios";import"js-cookie";import"ua-parser-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"./skin-793f68b7.js";import"@babel/runtime/helpers/toConsumableArray";function i(i,o){import("./skin-d5510f70.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(i,o){e(i).on("loadeddata",(function(){var e;(null===(e=r(i))||void 0===e?void 0:e.length)>0&&t(i,o)}))}(i,o)}export{i as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,p as t,k as n}from"./generic-
|
|
1
|
+
import{g as e,p as t,k as n}from"./generic-f3b08872.js";import"@babel/runtime/helpers/defineProperty";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";function o(o){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)})),i(),function(o){var i=document.getElementById("".concat(o)),a=e(o);i&&i.addEventListener("touchstart",(function(){a.paused()?t(o):n(o)}))}(o)}var i=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,j as l,k as t,g as n,h as i,d as o,l as a,m as s,n as r,o as d}from"./features-
|
|
1
|
+
import{i as e,j as l,k as t,g as n,h as i,d as o,l as a,m as s,n as r,o as d}from"./features-31f521e5.js";import{M as u,a as v,c as m,d as c}from"./icons-c2efba97.js";import{G as p,g as f,H as g,v as h,d as y}from"./generic-f3b08872.js";import{c as b}from"./skin-793f68b7.js";import{g as C}from"./renditions-5db592e1.js";import x from"@babel/runtime/helpers/toConsumableArray";import{s as j}from"./autoNextVideo-81f976b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"axios";import"js-cookie";import"ua-parser-js";import"./util-3fbdea6d.js";var E=p(),N=[];null==E||E.map((function(e){return N.push.apply(N,x(e.episodes))}));var w=function(e,l){var t;null==l||null===(t=l.series)||void 0===t||t.cb;var n=f(e);n.on("timeupdate",(function(){var e,l=Math.floor(n.currentTime()),t=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];t-l<=10&&g()<=(null==N?void 0:N.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=N.filter((function(e,l){return l==g()}));if((null==o?void 0:o.length)>0)if(null!==(i=document.getElementsByClassName("next-ep-preview"))&&void 0!==i&&i[0]){var a,s,r,d,u,v,m,c,p,h,y;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(s=document.getElementsByClassName("next-ep-title"))||void 0===s?void 0:s[0],C=null===(r=document.getElementsByClassName("next-ep-img"))||void 0===r?void 0:r[0],x=null===(d=document.getElementsByClassName("next-ep-content"))||void 0===d?void 0:d[0],j=null===(u=o[0])||void 0===u?void 0:u.title;(null===(v=j)||void 0===v?void 0:v.length)>60&&(j=j.substr(0,60)+"..."),b.textContent="".concat(j),C.src=(null===(m=o[0])||void 0===m||null===(c=m.gist)||void 0===c||null===(p=c.imageGist)||void 0===p?void 0:p.r16x9)||(null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.fallbackImage),x.onclick=function(){return B(e)}}else{var E,w,k,V,I,M,P,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var L=document.createElement("div");L.className="next-ep-header",L.textContent="Next up";var T=null===(E=o[0])||void 0===E?void 0:E.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(w=o[0])||void 0===w||null===(k=w.gist)||void 0===k||null===(V=k.imageGist)||void 0===V?void 0:V.r16x9)||(null===(I=window)||void 0===I||null===(M=I.customData)||void 0===M?void 0:M.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(P=T)||void 0===P?void 0:P.length)>60&&(T=T.substr(0,60)+"..."),G.textContent="".concat(T);var O=document.createElement("div");O.className="next-ep-content",O.append(F),O.append(G),O.onclick=function(){return B(e)},D.append(L),D.append(O)}},B=function(e,l){var t=f(e),n=Math.floor(t.currentTime());if(Math.floor(t.duration())!=n){t.pause(e);var i=g();j(i,e,N,sessionStorage.getItem("token"))}};function k(n,i){var o=f(n);o.on("loadeddata",(function(){var t,a,s;(null===(t=C(n))||void 0===t?void 0:t.length)>0&&e(n,i),(null===(a=h(n))||void 0===a?void 0:a.length)>0&&l(n,i),null!=i&&null!==(s=i.series)&&void 0!==s&&s.enable&&w(n,i),function(e,l){var t,n=Math.floor(e/60),i=null===(t=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===t?void 0:t[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var e,l,i,o;null!==(e=window)&&void 0!==e&&null!==(l=e.customData)&&void 0!==l&&l.iframeOverlayUrl&&t(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}function V(e,l){!function(){"Chrome"==y()&&import("./chromett-a3cbb2e1.js").then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));import("./skin-3470b8fa.js").then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),k(e,l),function(e,l){var t=f(e);t.controlBar.getChild("FullscreenToggle").el().appendChild(b(u(window.controlsColor))),t.controlBar.getChild("FullscreenToggle").el().appendChild(b(v(window.controlsColor)));var n=document.getElementsByClassName("vjs-time-control");l.liveVideo&&(n[0].style.display="none")}(e,l),function(e,l){var t,u,v,p,f,g;0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&n(e,"defaultV2",m());(0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&i(e,"defaultV2",c());l.liveVideo||o(e);(null==l||null===(t=l.relatedVideos)||void 0===t||null===(u=t.content)||void 0===u?void 0:u.length)>0&&a(e,null==l?void 0:l.relatedVideos);(null==l||null===(v=l.streams)||void 0===v?void 0:v.length)>1&&s(e,null==l?void 0:l.streams);(null==l||null===(p=l.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&r(e,null==l?void 0:l.playlist);null!=l&&null!==(g=l.series)&&void 0!==g&&g.enable&&d(e,l)}(e,l),function(e,l){var t=f(e),n=null==l?void 0:l.tvProviderLogoUrl;if(!n)return;var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",i.append(o),t.el().appendChild(i),t.on("useractive",(function(){i.classList.remove("vjs-fade")})),t.on("userinactive",(function(){t.paused()||i.classList.add("vjs-fade")})),t.on("fullscreenchange",(function(){t.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,l)}export{V as initialiseSkin};
|