@viewlift/player-backup 1.0.32-backup → 1.0.33-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-41442369.js → autoNextVideo-ce48f6e6.js} +1 -1
- package/cjs/{caption-settings-542265aa.js → caption-settings-37bde8d8.js} +1 -1
- package/cjs/{features-5f183b20.js → features-6e277bd5.js} +1 -1
- package/cjs/{generic-33f3034e.js → generic-2c080522.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-367df548.js → keyboardShortcuts-a99a514a.js} +1 -1
- package/cjs/{multicam-6e6fba47.js → multicam-635d8fa2.js} +1 -1
- package/cjs/{multicamv2-0659adcc.js → multicamv2-02fd5e4d.js} +1 -1
- package/cjs/{mwebPotraitTray-2408f011.js → mwebPotraitTray-46b06c30.js} +1 -1
- package/cjs/{nextEpisodeButton-36c16d35.js → nextEpisodeButton-179c0102.js} +1 -1
- package/cjs/{playlist-6b2f0584.js → playlist-68f94a4c.js} +1 -1
- package/cjs/{renditions-71a7872f.js → renditions-cc42b12b.js} +1 -1
- package/cjs/{resolution-6994d29b.js → resolution-0a37aa2e.js} +1 -1
- package/cjs/{series-4d441409.js → series-416f96a1.js} +1 -1
- package/cjs/{series-v2-c4eca4eb.js → series-v2-6adcb222.js} +1 -1
- package/cjs/{settings-icon-081dfd95.js → settings-icon-5d770e43.js} +1 -1
- package/cjs/{skin-76904400.js → skin-2db9dadc.js} +1 -1
- package/cjs/{skin-58f73b11.js → skin-4f35adb1.js} +1 -1
- package/cjs/{skin-fc60b839.js → skin-57b3b0e5.js} +1 -1
- package/cjs/{skin-cfd11faf.js → skin-dc798f77.js} +1 -1
- package/cjs/{skin-6c6ef965.js → skin-e855d74e.js} +1 -1
- package/cjs/{util-b52b44e1.js → util-a56b669b.js} +1 -1
- package/cjs/{videoSelector-1cf1f638.js → videoSelector-0738ec4e.js} +1 -1
- package/esm/{autoNextVideo-64a5e9de.js → autoNextVideo-e8d50068.js} +1 -1
- package/esm/{caption-settings-17087ebe.js → caption-settings-722ed23c.js} +1 -1
- package/esm/{features-97d6ec37.js → features-1957fcde.js} +1 -1
- package/esm/{generic-b8c4777e.js → generic-98bbc611.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-4e937151.js → keyboardShortcuts-cba2c2c6.js} +1 -1
- package/esm/{multicam-dce39e98.js → multicam-4e53f48d.js} +1 -1
- package/esm/{multicamv2-64338e29.js → multicamv2-7db23989.js} +1 -1
- package/esm/{mwebPotraitTray-1bf17b68.js → mwebPotraitTray-4fe88e2e.js} +1 -1
- package/esm/{nextEpisodeButton-6ef285c2.js → nextEpisodeButton-5b058e76.js} +1 -1
- package/esm/{playlist-f31503e9.js → playlist-cfd52499.js} +1 -1
- package/esm/{renditions-7cca1606.js → renditions-aded7a26.js} +1 -1
- package/esm/{resolution-ccdedf9e.js → resolution-0244e1fd.js} +1 -1
- package/esm/{series-9c32b6f5.js → series-07f73f01.js} +1 -1
- package/esm/{series-v2-3908201f.js → series-v2-a56e97f7.js} +1 -1
- package/esm/{settings-icon-c55c6653.js → settings-icon-6198894a.js} +1 -1
- package/esm/{skin-55d85903.js → skin-023a8344.js} +1 -1
- package/esm/{skin-03423c6a.js → skin-1ae04b73.js} +1 -1
- package/esm/{skin-836913c6.js → skin-59e20a87.js} +1 -1
- package/esm/{skin-34b05d63.js → skin-8f732e35.js} +1 -1
- package/esm/{skin-9fff1dd0.js → skin-e9e57fdc.js} +1 -1
- package/esm/{util-ee6ff224.js → util-139ea861.js} +1 -1
- package/esm/{videoSelector-1038a165.js → videoSelector-4cfb3a84.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 o from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import n 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 _,G as x}from"./generic-b8c4777e.js";import{o as H,g as N,a as L,s as V,b as U}from"./util-ee6ff224.js";import{g as W}from"./renditions-7cca1606.js";import{playSelectedResolution as q}from"./resolution-ccdedf9e.js";import{i as z,a as G}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 J(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function K(e,t){J("event",e,t)}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function Y(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Q(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function X(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Z(){var e=window.sessionStorage.getItem("uid");return e||(e=X(),window.sessionStorage.setItem("uid",e),e)}function $(){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=X(),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 o,i,n,r=Math.floor(e.currentTime());K(r?"FAILED_TO_START":"DROPPED_STREAM",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.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,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),K("PLAY",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.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 o,i;if(t.el_){var n,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(o=t.el_)&&void 0!==o&&null!==(i=o.className)&&void 0!==i&&i.includes("vjs-waiting"))K("BUFFERING",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(r=n.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,o,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,K("FIRST_FRAME",Y({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,o,i,n,r,l;K("AD_REQUEST",Y({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),K("AD_IMPRESSION",Y({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(n=window)||void 0===n||null===(r=n.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 o=Math.floor(e.currentTime());o>=30&&o%30==0&&!t.includes(o)&&(t.push(o),fireEvent({eventName:"PING",videoPosition:o,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(),o=e.duration(),i=e.buffered(),n=0;n<i.length;n++){var r=i.start(n),l=i.end(n);if(ee(t,r,l)){var a=Math.round(o-l);if(isFinite(a))return a}}}))()};var ee=function(e,t,o){return e>=t&&e<=o};function te(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function oe(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?te(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var o,i,n,r,l,a,s,d,u,c,v=[Y(Y(Y({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params),{},{uid:Z(),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:$(),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 ie,ne,re=function(e,t){var o=l(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(t){var o,i,r,l,a,s=this.el(),d=n.dom.getPointerPosition(s,t).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(r=i.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 le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var ae=[],se=0,de=null;function ue(t,o,i){var n,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==o||null===(n=o.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1";var d=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:o.siteOwner,userId:o.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?le(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,o.token,ne).then((function(e){})).catch((function(e){})),se=u+i}var ce=function(e,t,o){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var n=parseFloat(t)/100;i.volume(n),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var fe=function(t,o,i,n){var r,a,m=n.res,f=n.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&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var n;(null==w||!w.muted())&&ce(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?me(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=o&&o.watchHistory&&null!=o&&null!==(n=o.watchHistory)&&void 0!==n&&n.enable&&!o.isAnonymousUser)&&function(e,t,o){var i,n;null!=t&&t.series&&(de=null==t||null===(i=t.series)||void 0===i?void 0:i.id),ae=[],se=0,ie=o;var r=(null==t||null===(n=t.watchHistory)||void 0===n?void 0:n.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,t,r)):e>se&&(se=e+r))})),a.on("ended",(function(){ue(a,t,r,!0)})))}(t,o,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 o,i,n,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(n=i.framework)||void 0===n||null===(r=n.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,o;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(o=w.error())||void 0===o?void 0:o.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable){var t,i,n,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.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!=o&&o.watchHistoryResumeTime&&(null==o?void 0:o.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==o?void 0:o.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},we=function(e,t){var o=null==t?void 0:t.skin;"live"==o?import("./skin-34b05d63.js").then((function(o){o.initialiseSkin(e,t)})):"default"==o?import("./skin-9fff1dd0.js").then((function(o){o.initialiseSkin(e,t)})):"carousel"==o?import("./skin-03423c6a.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==o?import("./skin-55d85903.js").then((function(o){o.initialiseSkin(e,t)})):"multiplayer"==o&&import("./skin-836913c6.js").then((function(o){o.initialiseSkin(e,t)}))},pe=function(e){return new Promise((function(t,o){if(he(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){o("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ge=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 ye,be=function(){var e=o(i.mark((function e(){return i.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)}}(),Te=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(n)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(n)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:be,loadEMELibrary:Te});function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function ke(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Pe(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ie=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,B,x,H,N,L,V,U,W,q,z,J,K,Q=a.res,Y=void 0===Q?null:Q,X=a.sres,Z=void 0===X?null:X,$=(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,ee=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],te=G(null===(p=Y)||void 0===p||null===(h=p.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.videoImageUrl)||G(null===(y=Y)||void 0===y||null===(T=y.video)||void 0===T||null===(O=T.gist)||void 0===O||null===(P=O.imageGist)||void 0===P?void 0:P.r16x9),ie=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,ne=function(e){var t,o={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(o={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()&&(o=oe(oe({},o),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),o}(s),le=(null===(D=Y)||void 0===D||null===(A=D.video)||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,ae=(null==s?void 0:s.drmLibrary)||!1,se=(null===(F=Y)||void 0===F||null===(C=F.ads)||void 0===C||null===(B=C.preRoll)||void 0===B||null===(x=B.adTags)||void 0===x||null===(H=x.web)||void 0===H?void 0:H.active)&&(null===(N=Y)||void 0===N||null===(L=N.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(U=V.adTags)||void 0===U||null===(W=U.web)||void 0===W?void 0:W.url);Y=ke(ke({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var de=(K={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:ie},e(K,"autoplay",null==s?void 0:s.autoplay),e(K,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!se),e(K,"loop",(null==s?void 0:s.loop)||!1),e(K,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(K,"html5",ke(ke({dash:ke(ke({},!n.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:ke(ke({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(q=s.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(z=s.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",te),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var o=l(t);console.log(o.textTracksJson_);var i=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,o){var i,n,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===(i=e.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.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=o,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}(Y,e,i)}}),e(K,"plugins",ne),K),ue=n(t,de,function(){var e=o(i.mark((function e(){var o,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(le&&u.resolve(ke({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ue),window.firstFrame(ue),"white"!==window.controlsColor&&ge(window.controlsColor,ue),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),O=null===(o=Y)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.drmEnabled,P=null===(a=Y)||void 0===a||null===(c=a.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!O&&!ae){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,Te();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([Te(),be()]);case 15:ie&&re(t,P),!se||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||M(t,se,Y),(k=E(Y,t))?b(t,k):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(y=g.video)||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(C=(null===(j=Y)||void 0===j||null===(D=j.video)||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=Y)||void 0===R||null===(F=R.video)||void 0===F?void 0:F.closedCaptions),I=C.filter((function(e){return"VTT"===e.format})),_(t,I)),null!=s&&s.disableControls?S(t):we(t,ke(ke(ke({},s),de),{},{liveVideo:le,isDvrEnabled:ie,res:Y,sres:Z})),fe(t,ke(ke(ke({},s),de),{},{liveVideo:le}),u,{res:Y,sres:Z});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function je(){return{loadVideoInstantly:w,onTimeUpdate:H,getVideoDuration:N,onVideoEnded:L,init:function(e){return new Promise((function(t,o){var i,n,l,a,s,d,u,v,w,p;if(!T(null==e?void 0:e.playerId)){var h=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(b&&!D(b)){ye=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=ye)||void 0===l?void 0:l.siteId,window.siteName=null===(a=ye)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=ye)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=ye)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=ye)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=ye)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",b);var O=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,j=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Oe})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return Oe})).then((function(e){e.importChromecast()})),k&&"Safari"==r()&&Promise.resolve().then((function(){return Oe})).then((function(e){e.importAirplay()})),j&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then((function(){return e=j,window.dataLayer=window.dataLayer||[],J("js",new Date),void J("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(O));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var M,_=null==e||null===(M=e.series)||void 0===M?void 0:M.id;A(_,b).then((function(i){var n,r,l,a=i.data,s=i.data.seasons;x(s);var d=g||(null==s||null===(n=s[0])||void 0===n||null===(r=n.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var o=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(o)})).catch((function(e){return console.log(e)}))}(_,b),R(d,b).then((function(i){var n,r,l;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Ie(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))})).catch((function(e){F(e,O,o)}))}else if(h){var H=null==e?void 0:e.epg;C(H,b).then((function(i){var n=null==i?void 0:i.data;n.contentType="linearchannel",Ie(O,{res:n},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else R(g,b).then((function(i){var n,r,l,a;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?B(g,b).then((function(i){var n,r,l,a,d,u;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(i){var n,r,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Ie(O,{res:s},e,{resolve:t,reject:o})})):Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:W,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:V,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:q,getSource:E,setVolume:ce,getVolume:ve,disableControls:S,setPlaybackSpeed:U}}export{je as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import o from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/regenerator";import n 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 _,G as x}from"./generic-98bbc611.js";import{o as H,g as N,a as L,s as V,b as U}from"./util-139ea861.js";import{g as W}from"./renditions-aded7a26.js";import{playSelectedResolution as q}from"./resolution-0244e1fd.js";import{i as z,a as G}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 J(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function K(e,t){J("event",e,t)}function Q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function Y(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Q(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function X(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Z(){var e=window.sessionStorage.getItem("uid");return e||(e=X(),window.sessionStorage.setItem("uid",e),e)}function $(){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=X(),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 o,i,n,r=Math.floor(e.currentTime());K(r?"FAILED_TO_START":"DROPPED_STREAM",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.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,o,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),K("PLAY",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.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 o,i;if(t.el_){var n,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(o=t.el_)&&void 0!==o&&null!==(i=o.className)&&void 0!==i&&i.includes("vjs-waiting"))K("BUFFERING",Y({pfm:window.platform,uid:Z(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(r=n.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,o,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,K("FIRST_FRAME",Y({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,o,i,n,r,l;K("AD_REQUEST",Y({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),vid:window.videoId,resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),K("AD_IMPRESSION",Y({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:window.videoId},null===(n=window)||void 0===n||null===(r=n.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 o=Math.floor(e.currentTime());o>=30&&o%30==0&&!t.includes(o)&&(t.push(o),fireEvent({eventName:"PING",videoPosition:o,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(),o=e.duration(),i=e.buffered(),n=0;n<i.length;n++){var r=i.start(n),l=i.end(n);if(ee(t,r,l)){var a=Math.round(o-l);if(isFinite(a))return a}}}))()};var ee=function(e,t,o){return e>=t&&e<=o};function te(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function oe(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?te(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window.fireEvent=function(e){var o,i,n,r,l,a,s,d,u,c,v=[Y(Y(Y({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(n=i.beacon)||void 0===n?void 0:n.params),{},{uid:Z(),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:$(),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 ie,ne,re=function(e,t){var o=l(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(t){var o,i,r,l,a,s=this.el(),d=n.dom.getPointerPosition(s,t).x;n.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(r=i.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 le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var ae=[],se=0,de=null;function ue(t,o,i){var n,r,l,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];ne=(null==o||null===(n=o.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1";var d=null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.profileId,u=Math.floor(t.currentTime()),c=Math.floor(t.duration()),v=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.xapiKey,m={};"v1"==ne?m={videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:Math.floor(u/c*100),siteOwner:o.siteOwner,userId:o.userId,xApiKey:v}:"v2"==ne&&(m=function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?le(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({videoId:ie,watchedTime:Math.floor(t.currentTime()),watchedPercentage:s?100:Math.floor(u/c*100),doneWatching:s,profileId:d},de&&{seriesId:de})),a(m,o.token,ne).then((function(e){})).catch((function(e){})),se=u+i}var ce=function(e,t,o){var i=l(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var n=parseFloat(t)/100;i.volume(n),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ve=function(e){var t=l(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function me(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var fe=function(t,o,i,n){var r,a,m=n.res,f=n.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&&i.resolve({status:!0,msg:"Video Loaded",response:m})})),w.on("loadeddata",(function(){var n;(null==w||!w.muted())&&ce(t,sessionStorage.getItem("volume")||"100");var r,a,d=u();(s(),i.resolve(function(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?me(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:m}:{response:m})),null!=o&&o.watchHistory&&null!=o&&null!==(n=o.watchHistory)&&void 0!==n&&n.enable&&!o.isAnonymousUser)&&function(e,t,o){var i,n;null!=t&&t.series&&(de=null==t||null===(i=t.series)||void 0===i?void 0:i.id),ae=[],se=0,ie=o;var r=(null==t||null===(n=t.watchHistory)||void 0===n?void 0:n.interval)||30,a=l(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ae.includes(se)||(e==se?(ae.push(e),ue(a,t,r)):e>se&&(se=e+r))})),a.on("ended",(function(){ue(a,t,r,!0)})))}(t,o,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 o,i,n,r,l,a,s,d,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(o=window)||void 0===o||null===(i=o.cast)||void 0===i||null===(n=i.framework)||void 0===n||null===(r=n.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,o;d(t,(null==w||null===(e=w.error())||void 0===e?void 0:e.message)||"Some error occured"),i.reject({status:!1,msg:(null==w||null===(o=w.error())||void 0===o?void 0:o.message)||"Some error occured"})})),w.one("play",(function(){var e;if(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable){var t,i,n,r=null===(t=u())||void 0===t||null===(i=t.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.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!=o&&o.watchHistoryResumeTime&&(null==o?void 0:o.watchedPercentage)<95&&setTimeout((function(){w.currentTime(null==o?void 0:o.watchHistoryResumeTime)}),0)})),w.on("volumechange",(function(){var e=100*w.volume().toFixed(2);w.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},we=function(e,t){var o=null==t?void 0:t.skin;"live"==o?import("./skin-8f732e35.js").then((function(o){o.initialiseSkin(e,t)})):"default"==o?import("./skin-e9e57fdc.js").then((function(o){o.initialiseSkin(e,t)})):"carousel"==o?import("./skin-1ae04b73.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==o?import("./skin-023a8344.js").then((function(o){o.initialiseSkin(e,t)})):"multiplayer"==o&&import("./skin-59e20a87.js").then((function(o){o.initialiseSkin(e,t)}))},pe=function(e){return new Promise((function(t,o){if(he(e))o("".concat(e," is alread initialised"));else{var i=document.createElement("script");i.async=!1,i.src=e,i.onload=function(){t()},i.onerror=function(t){o("Error while loading script ".concat(e," : ").concat(t))},document.head.appendChild(i)}}))},he=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},ge=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 ye,be=function(){var e=o(i.mark((function e(){return i.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)}}(),Te=function(){var e=o(i.mark((function e(){return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(n)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(n)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))},loadDashLibrary:be,loadEMELibrary:Te});function Pe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function ke(t){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?Pe(Object(i),!0).forEach((function(o){e(t,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var Ie=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,B,x,H,N,L,V,U,W,q,z,J,K,Q=a.res,Y=void 0===Q?null:Q,X=a.sres,Z=void 0===X?null:X,$=(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,ee=null!=s&&s.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==$&&"NOT_CONNECTED"!==$?["html5","chromecast"]:["chromecast","html5"]:["html5"],te=G(null===(p=Y)||void 0===p||null===(h=p.video)||void 0===h||null===(g=h.gist)||void 0===g?void 0:g.videoImageUrl)||G(null===(y=Y)||void 0===y||null===(T=y.video)||void 0===T||null===(O=T.gist)||void 0===O||null===(P=O.imageGist)||void 0===P?void 0:P.r16x9),ie=(null===(k=Y)||void 0===k||null===(I=k.video)||void 0===I||null===(j=I.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,ne=function(e){var t,o={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&null!==(t=window)&&void 0!==t&&t.cast&&(o={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()&&(o=oe(oe({},o),{},{airPlay:{addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-5}})),o}(s),le=(null===(D=Y)||void 0===D||null===(A=D.video)||void 0===A||null===(R=A.streamingInfo)||void 0===R?void 0:R.isLiveStream)||!1,ae=(null==s?void 0:s.drmLibrary)||!1,se=(null===(F=Y)||void 0===F||null===(C=F.ads)||void 0===C||null===(B=C.preRoll)||void 0===B||null===(x=B.adTags)||void 0===x||null===(H=x.web)||void 0===H?void 0:H.active)&&(null===(N=Y)||void 0===N||null===(L=N.ads)||void 0===L||null===(V=L.preRoll)||void 0===V||null===(U=V.adTags)||void 0===U||null===(W=U.web)||void 0===W?void 0:W.url);Y=ke(ke({},Y),{},{audioAssetSource:null==s?void 0:s.audioAssetSource});var de=(K={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:ie},e(K,"autoplay",null==s?void 0:s.autoplay),e(K,"normalizeAutoplay",(null==s?void 0:s.autoplay)&&!se),e(K,"loop",(null==s?void 0:s.loop)||!1),e(K,"audioPosterMode",null==s?void 0:s.audioPosterMode),e(K,"html5",ke(ke({dash:ke(ke({},!n.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:ke(ke({experimentalLLHLS:(null==s?void 0:s.lowLatency)||!1,limitRenditionByPlayerDimensions:!0,useDevicePixelRatio:!0,useNetworkInformationApi:!0},(null==s||null===(q=s.customData)||void 0===q?void 0:q.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:(null==s?void 0:s.enableLowInitialPlaylist)||!1,experimentalBufferBasedABR:(null==s?void 0:s.experimentalBufferBasedABR)||!1})},0==(null==s||null===(z=s.customData)||void 0===z?void 0:z.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==s||null===(J=s.customData)||void 0===J?void 0:J.nativeVideoTracks)&&{nativeVideoTracks:!1})),e(K,"poster",te),e(K,"techOrder",ee),e(K,"chromecast",{requestCustomDataFn:function(e){var o=l(t);console.log(o.textTracksJson_);var i=o.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,o){var i,n,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===(i=e.video)||void 0===i||null===(n=i.gist)||void 0===n?void 0:n.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=o,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}(Y,e,i)}}),e(K,"plugins",ne),K),ue=n(t,de,function(){var e=o(i.mark((function e(){var o,l,a,c,v,m,f,w,p,h,g,y,T,O,P,k,I,j,D,A,R,F,C;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(le&&u.resolve(ke({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),window.initialise(ue),window.firstFrame(ue),"white"!==window.controlsColor&&ge(window.controlsColor,ue),/Android/i.test(navigator.userAgent)&&(n.options.vhs.overrideNative=!0),O=null===(o=Y)||void 0===o||null===(l=o.video)||void 0===l?void 0:l.drmEnabled,P=null===(a=Y)||void 0===a||null===(c=a.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.startOverTime,!O&&!ae){e.next=15;break}if("Safari"!==r()){e.next=13;break}return e.next=11,Te();case 11:e.next=15;break;case 13:return e.next=15,Promise.all([Te(),be()]);case 15:ie&&re(t,P),!se||null!=s&&null!==(m=s.customData)&&void 0!==m&&m.disableAds||M(t,se,Y),(k=E(Y,t))?b(t,k):(u.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),d(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(f=Y)||void 0===f||null===(w=f.video)||void 0===w||null===(p=w.contentDetails)||void 0===p||null===(h=p.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(y=g.video)||void 0===y||null===(T=y.closedCaptions)||void 0===T?void 0:T.length)>0)&&(C=(null===(j=Y)||void 0===j||null===(D=j.video)||void 0===D||null===(A=D.contentDetails)||void 0===A?void 0:A.closedCaptions)||(null===(R=Y)||void 0===R||null===(F=R.video)||void 0===F?void 0:F.closedCaptions),I=C.filter((function(e){return"VTT"===e.format})),_(t,I)),null!=s&&s.disableControls?S(t):we(t,ke(ke(ke({},s),de),{},{liveVideo:le,isDvrEnabled:ie,res:Y,sres:Z})),fe(t,ke(ke(ke({},s),de),{},{liveVideo:le}),u,{res:Y,sres:Z});case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function je(){return{loadVideoInstantly:w,onTimeUpdate:H,getVideoDuration:N,onVideoEnded:L,init:function(e){return new Promise((function(t,o){var i,n,l,a,s,d,u,v,w,p;if(!T(null==e?void 0:e.playerId)){var h=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,g=null==e?void 0:e.videoId,y=(null==e||null===(n=e.series)||void 0===n?void 0:n.enable)||!1;window.videoId=g;var b=null==e?void 0:e.token;if(b&&!D(b)){ye=JSON.parse(atob(b.split(".")[1])),window.siteId=null===(l=ye)||void 0===l?void 0:l.siteId,window.siteName=null===(a=ye)||void 0===a?void 0:a.site,e.isAnonymousUser=!(null===(s=ye)||void 0===s||!s.anonymousId),e.siteOwner=(null===(d=ye)||void 0===d?void 0:d.site)||null,e.userId=(null===(u=ye)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(v=ye)||void 0===v?void 0:v.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",b);var O=null==e?void 0:e.playerId,P=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,k=null==e?void 0:e.airplay,I=null==e?void 0:e.apiBaseUrl,j=(null==e||null===(w=e.analytics)||void 0===w?void 0:w.gaId)||null,E=null==e?void 0:e.errors;E&&(window.customErrors=E),window.customData=null==e?void 0:e.customData,I&&(window.playerEntitlementUrl=I),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&!z(e.skin)||(e.skin="defaultV2"),Promise.resolve().then((function(){return Oe})).then((function(e){e.importIMA()})),!P||null!=e&&e.series||Promise.resolve().then((function(){return Oe})).then((function(e){e.importChromecast()})),k&&"Safari"==r()&&Promise.resolve().then((function(){return Oe})).then((function(e){e.importAirplay()})),j&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then((function(){return e=j,window.dataLayer=window.dataLayer||[],J("js",new Date),void J("config",e);var e})).catch((function(e){}));var S=null===(p=document)||void 0===p?void 0:p.getElementById("".concat(O));if(S&&S.addEventListener("contextmenu",(function(e){return e.preventDefault()})),y){var M,_=null==e||null===(M=e.series)||void 0===M?void 0:M.id;A(_,b).then((function(i){var n,r,l,a=i.data,s=i.data.seasons;x(s);var d=g||(null==s||null===(n=s[0])||void 0===n||null===(r=n.episodes)||void 0===r||null===(l=r[0])||void 0===l?void 0:l.id);!function(e,t){var o=new Map;m({videoId:e,token:t}).then((function(e){e.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),f(o)})).catch((function(e){return console.log(e)}))}(_,b),R(d,b).then((function(i){var n,r,l;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(i.data),Ie(O,{res:null==i?void 0:i.data,sres:a},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))})).catch((function(e){F(e,O,o)}))}else if(h){var H=null==e?void 0:e.epg;C(H,b).then((function(i){var n=null==i?void 0:i.data;n.contentType="linearchannel",Ie(O,{res:n},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else R(g,b).then((function(i){var n,r,l,a;window.contentType=null==i||null===(n=i.data)||void 0===n||null===(r=n.video)||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.contentType,c(null==i?void 0:i.data);var s=null==i?void 0:i.data;null!=e&&e.watchHistory&&null!=e&&null!==(a=e.watchHistory)&&void 0!==a&&a.enable?B(g,b).then((function(i){var n,r,l,a,d,u;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==i?void 0:i.data)),e.watchHistoryResumeTime=(null==i||null===(d=i.data)||void 0===d?void 0:d.watchedTime)||null,e.watchedPercentage=(null==i||null===(u=i.data)||void 0===u?void 0:u.watchedPercentage)||null,s.contentType="video",Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(i){var n,r,l,a;null!==(n=window)&&void 0!==n&&null!==(r=n.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(i)),Ie(O,{res:s},e,{resolve:t,reject:o})})):Ie(O,{res:s},e,{resolve:t,reject:o})})).catch((function(e){F(e,O,o,g)}))}else o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}})}}))},getRenditions:W,skip:p,getPlayer:l,play:h,pause:g,detectBrowser:r,rewind:y,loadVideo:b,seekToTimeStamp:V,isPlayerInitialised:T,load:O,dispose:P,enableCaptions:k,disableCaptions:I,getCaptions:j,playSelectedResolution:q,getSource:E,setVolume:ce,getVolume:ve,disableControls:S,setPlaybackSpeed:U}}export{je 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-98bbc611.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-98bbc611.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(){l(n,p);var o=d(n);function n(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,n),l=o.call(this,t,s),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=s.playerId,l.streams=null==s?void 0:s.streams,l.config=null==s?void 0:s.config,l.createUI(null==s?void 0:s.streams),l}return t(n,[{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)}))}}]),n}();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-98bbc611.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(){a(o,v);var n=u(o);function o(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,o),(a=n.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.streams=r.streams,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a}return t(o,[{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")}))}}]),o}();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-98bbc611.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(){l(n,u);var o=c(n);function n(t){var l,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,n),(l=o.call(this,t,r)).playerId=r.playerId,l.config=r.config,l.createUI(null==r?void 0:r.config.streams),l}return t(n,[{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")))}}]),n}();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-98bbc611.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(){n(i,c);var o=p(i);function i(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,i),(n=o.call(this,t,r)).playerId=r.playerId,n.seriesData=r.sres,n.currentVideoData=r.res,n.initialiseStructure(),n.loadCSS(),n}return t(i,[{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")}))}}]),i}(),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,K 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,K as p}from"./generic-98bbc611.js";import{a as m}from"./autoNextVideo-e8d50068.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-139ea861.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(){l(i,h);var o=v(i);function i(e){var n,l,a,s,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,i),(s=o.call(this,e,r)).playerId=r.playerId,s.seriesData=r.sres,s.videos=null==r||null===(n=r.playlist)||void 0===n?void 0:n.content,s.cb=(null==r||null===(l=r.playlist)||void 0===l?void 0:l.cb)||null,s.autoNext=(null==r||null===(a=r.playlist)||void 0===a?void 0:a.autoNext)||!1,s.currentVideoData=r.res,s.initialiseStructure(),s.loadCSS(),s.autoNext&&m({playerId:s.playerId,content:s.videos,cb:s.cb}),s}return n(i,[{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")}))}}]),i}();export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./generic-
|
|
1
|
+
import{g as l}from"./generic-98bbc611.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-98bbc611.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(){o(d,p);var a=h(d);function d(n){var o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),o=a.call(this,n,s),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==s?void 0:s.playerId,o.skin=null==s?void 0:s.skin,o.icon=null==s?void 0:s.icon,o.masterRenditions=[],o.fontSizeOptions=[10,12,14],o.createRenditions(s.renditions),window.height=null,o}return n(d,[{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)}}}]),d}(),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-98bbc611.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(){s(r,w);var e=b(r);function r(i){var s,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,r),s=e.call(this,i,o),a(n(s),"seriesData",[]),s.seriesData=o.seriesData,C=o.playerId,S(s.el(),s.seriesData),s.loadCSS(),s}return i(r,[{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)}))}}]),r}();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,L as m,M as p,g as v,H 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,L as m,M as p,g as v,H as h,o as f}from"./generic-98bbc611.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-e8d50068.js";import"js-cookie";import"ua-parser-js";import"./util-139ea861.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(){o(l,E);var i=b(l);function l(n){var o,a,r,d,c,v,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,l),(v=i.call(this,n,h)).playerId=h.playerId,v.seriesData=h.sres,v.videos=null==h||null===(o=h.sres)||void 0===o?void 0:o.seasons,v.currentVideoData=h.res,v.initialiseStructure(),v.loadCSS(),v.selectedSeason=0,v.cb=null==h||null===(a=h.series)||void 0===a?void 0:a.cb,v.autoPlayNext=(null==h||null===(r=h.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),v.watchMap=u(),null!==(d=s(v))&&void 0!==d&&d.autoPlayNext&&null!=h&&null!==(c=h.series)&&void 0!==c&&c.enable){var f,C,g,b,N=null==h||null===(f=h.sres)||void 0===f?void 0:f.seasons,E=[];N.map((function(t){E.push.apply(E,e(t.episodes))})),m(E),p(null===(C=v.options_)||void 0===C||null===(g=C.res)||void 0===g||null===(b=g.video)||void 0===b?void 0:b.id),y({playerId:v.playerId,content:E,cb:v.cb,series:null==h?void 0:h.sres})}return v}return n(l,[{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)}}]),l}();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-98bbc611.js";import{g as c}from"./renditions-aded7a26.js";import{playSelectedResolution as u}from"./resolution-0244e1fd.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(){a(i,g);var o=h(i);function i(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,i),(n=o.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n}return n(i,[{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}}]),i}();export{f as default};
|
|
@@ -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-1957fcde.js";import{M as u,a as v,c as m,d as c}from"./icons-c2efba97.js";import{H as p,g as f,I as g,v as h,d as y}from"./generic-98bbc611.js";import{c as b}from"./skin-793f68b7.js";import{g as C}from"./renditions-aded7a26.js";import x from"@babel/runtime/helpers/toConsumableArray";import{s as j}from"./autoNextVideo-e8d50068.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-139ea861.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 O=document.createElement("div");O.className="next-ep-title",(null===(P=T)||void 0===P?void 0:P.length)>60&&(T=T.substr(0,60)+"..."),O.textContent="".concat(T);var R=document.createElement("div");R.className="next-ep-content",R.append(F),R.append(O),R.onclick=function(){return B(e)},D.append(L),D.append(R)}},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};
|
|
@@ -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-98bbc611.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{g as e}from"./generic-
|
|
1
|
+
import{g as e}from"./generic-98bbc611.js";import{g as r}from"./renditions-aded7a26.js";import{i as t}from"./features-1957fcde.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{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-1957fcde.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-98bbc611.js";import{c as u}from"./skin-793f68b7.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-cba2c2c6.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-aded7a26.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){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{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-1957fcde.js";import{i}from"./keyboardShortcuts-cba2c2c6.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-98bbc611.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-aded7a26.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-5b058e76.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};
|