@viewlift/player-backup 1.0.134 → 1.0.135-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-3efc246d.js → autoNextVideo-fa233aa3.js} +1 -1
- package/cjs/bundle.css +4 -4
- package/cjs/{caption-settings-6605430f.js → caption-settings-760c6c49.js} +1 -1
- package/cjs/{captions-f50846c6.js → captions-558c1111.js} +1 -1
- package/cjs/{features-8d590358.js → features-0cea696d.js} +1 -1
- package/cjs/{generic-4eba4a31.js → generic-f08586d9.js} +1 -1
- package/cjs/{index-622101c4.js → index-6e12372d.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-936b1194.js → multicamv2-c95138be.js} +1 -1
- package/cjs/multicamv2-d5327e00.js +1 -0
- package/cjs/multicamv2-e7a024e5.js +1 -0
- package/cjs/{nextEpisodeButton-325b1640.js → nextEpisodeButton-d3724aba.js} +1 -1
- package/cjs/{playlist-04b3ad33.js → playlist-cbc3c027.js} +1 -1
- package/cjs/{renditions-27f5d906.js → renditions-a4139d09.js} +1 -1
- package/cjs/{resolution-1e41ad17.js → resolution-c929e43e.js} +1 -1
- package/cjs/{series-43f79675.js → series-79ca9ea1.js} +1 -1
- package/cjs/series-v2-232bef33.js +1 -0
- package/cjs/series-v2-35ecce90.js +1 -0
- package/cjs/{series-v2-7acf8915.js → series-v2-4d902a6d.js} +1 -1
- package/cjs/{settings-icon-2bf31785.js → settings-icon-1896d831.js} +1 -1
- package/cjs/{skin-065c75e4.js → skin-285010cb.js} +1 -1
- package/cjs/{skin-b09d6a81.js → skin-5b09500b.js} +1 -1
- package/cjs/{skin-be253f81.js → skin-692c0752.js} +1 -1
- package/cjs/{skin-6d195664.js → skin-7ea538fd.js} +1 -1
- package/cjs/{skin-c3281e90.js → skin-98aacc3b.js} +1 -1
- package/cjs/{skin-e7838975.js → skin-de9b1b89.js} +1 -1
- package/cjs/{skin-dd80cfad.js → skin-e3b765fa.js} +1 -1
- package/cjs/{util-084cac02.js → util-555fcd75.js} +1 -1
- package/cjs/videoSelector-45b638bf.js +1 -0
- package/cjs/{videoSelector-d7a17527.js → videoSelector-b3cd8b38.js} +1 -1
- package/cjs/{videoSelector-87226e1a.js → videoSelector-c9f9afac.js} +1 -1
- package/esm/{autoNextVideo-d7c46772.js → autoNextVideo-2c052473.js} +1 -1
- package/esm/bundle.css +4 -4
- package/esm/{caption-settings-5ebd5cbd.js → caption-settings-e9117a4a.js} +1 -1
- package/esm/{captions-982fd43a.js → captions-2d8c00f4.js} +1 -1
- package/esm/{features-6d5f0fec.js → features-865d0bf5.js} +1 -1
- package/esm/{generic-049d56fa.js → generic-814f35ca.js} +1 -1
- package/esm/{index-5fc0568d.js → index-2ce0e138.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-bac89661.js → multicamv2-36f16d7b.js} +1 -1
- package/esm/multicamv2-746727dd.js +1 -0
- package/esm/multicamv2-92ab3e07.js +1 -0
- package/esm/{nextEpisodeButton-7c7831c5.js → nextEpisodeButton-e1b88214.js} +1 -1
- package/esm/{playlist-14cf070b.js → playlist-66a56d6e.js} +1 -1
- package/esm/{renditions-cb2afda4.js → renditions-75ce606c.js} +1 -1
- package/esm/{resolution-6fec5ed5.js → resolution-00934cd2.js} +1 -1
- package/esm/{series-f098d6cd.js → series-e70edccd.js} +1 -1
- package/esm/series-v2-1cbb5dc9.js +1 -0
- package/esm/series-v2-2a8fc04b.js +1 -0
- package/esm/{series-v2-b518cb7d.js → series-v2-707690ce.js} +1 -1
- package/esm/{settings-icon-100e86a0.js → settings-icon-8e4f1712.js} +1 -1
- package/esm/{skin-45c88d89.js → skin-5625f223.js} +1 -1
- package/esm/{skin-ec935b20.js → skin-56b35647.js} +1 -1
- package/esm/{skin-0ae3e88e.js → skin-7707020e.js} +1 -1
- package/esm/{skin-01c05d03.js → skin-8babe1f2.js} +1 -1
- package/esm/{skin-9d926508.js → skin-b25d0df9.js} +1 -1
- package/esm/{skin-6795867c.js → skin-b40e8ae3.js} +1 -1
- package/esm/{skin-d06a64ec.js → skin-d9035123.js} +1 -1
- package/esm/{util-28f2c034.js → util-045fb3fd.js} +1 -1
- package/esm/videoSelector-538a2e27.js +1 -0
- package/esm/{videoSelector-5107870d.js → videoSelector-bd72db99.js} +1 -1
- package/esm/{videoSelector-bf7baf9e.js → videoSelector-eeffc7e2.js} +1 -1
- package/package.json +1 -1
- package/cjs/multicamv2-313ba2ab.js +0 -1
- package/cjs/multicamv2-e8dbe6c8.js +0 -1
- package/cjs/series-v2-3d777f0f.js +0 -1
- package/cjs/series-v2-4c74cdd0.js +0 -1
- package/cjs/videoSelector-612abe48.js +0 -1
- package/esm/multicamv2-93c81b27.js +0 -1
- package/esm/multicamv2-cf808998.js +0 -1
- package/esm/series-v2-30c8b544.js +0 -1
- package/esm/series-v2-656ffb9f.js +0 -1
- package/esm/videoSelector-83093f46.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./skin-
|
|
1
|
+
import{g as t}from"./skin-56b35647.js";var e=function(e,n){var a,s,r;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(s=a[0])||void 0===s||null===(r=s.style)||void 0===r||r.setProperty("display","flex"));for(var i=t(e).textTracks(),l=0;l<i.length;l++){var o=i[l];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!=n||(o.mode="showing")}},n=function(e,n){for(var a=t(e).textTracks(),s=0;s<a.length;s++){var r=a[s];"subtitles"!==r.kind&&"captions"!==r.kind||r.id!==n||(r.mode="hidden")}},a=function(e){var n,a=t(e);return(null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter((function(t){return"subtitles"==t.kind||"captions"===t.kind})))||[]},s=function(e){var n=t(e);n.remoteTextTracks().tracks_.map((function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)}))},r=function(e,n){var a=t(e);a.remoteTextTracks().tracks_.map((function(t){a.removeRemoteTextTrack(t)})),n.map((function(t){a.addRemoteTextTrack({src:t.url,srcLang:t.language,label:t.language})}))};export{r as a,n as d,e,a as g,s as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,j as s}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,j as s}from"./generic-814f35ca.js";import{g as c}from"./renditions-75ce606c.js";import{g as d,p as u}from"./skin-56b35647.js";import{g as p}from"./localisation-0bf399a1.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.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=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=p("slowMoText")||"Slow Mo",r}return n(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=u(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-00934cd2.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-e1b88214.js").then((function(r){var o=r.default,l=d(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},j=function(e,t,n){import("./series-e70edccd.js").then((function(r){var o=r.seriesModule,l=d(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},c=0;c<a.length;c++)s(c)}))},k=function(e,t){import("./videoSelector-bd72db99.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},S=function(e,t){import("./caption-settings-e9117a4a.js").then((function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},E=function(e,t){import("./settings-icon-8e4f1712.js").then((function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},O=function(e,t){import("./playlist-66a56d6e.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},I=function(e,t){import("./series-v2-2a8fc04b.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},w=function(e,t){import("./multicamv2-746727dd.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},M=function(e,t){var n=d(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=d(e).el(),n=0,r=d(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e})),window._multiplayer_dbTapHandler=o},L=function(e,t){import("./videoSelector-eeffc7e2.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},N=function(e,t){import("./series-v2-707690ce.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},_=function(e,t){import("./multicamv2-36f16d7b.js").then((function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))};export{B as a,j as b,b as c,y as d,C as e,E as f,S as g,M as h,g as i,L as j,_ as k,O as l,N as m,P as n,k as o,I as p,w as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-ec935b20.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import s from"ua-parser-js";import{a as c,r as v}from"./captions-982fd43a.js";var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function f(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function p(e){window.dataLayer=window.dataLayer||[],f("js",new Date),f("config",e)}function w(e,t){f("event",e,t)}var I=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},g=null;function E(){return{set:function(e){e&&(g=e)},get:function(){return g}}}var T,h,y,b,_,D,O=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E().get(),i=getBaseUrl(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),F=null,L=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!I(t)){e.next=6;break}return F||(F=O().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&E().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){F=null}))),e.abrupt("return",F);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},S=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},R=function(e){h=e},V=function(){return h},A=function(e){T=e},W=function(){return T},C=function(){return y},N=function(e){y=e},B=function(e){_=e},j=function(){return _},M=function(e){b=new Map,e.map((function(e,t){b.set(e.id,t)}))},U=function(e){if(b){var t=b.get(e);N(t+1)}},k=(D=0,{set:function(e){e>=0&&(D=e)},get:function(){return D}});function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=function(){var e,t,n,i,o,r,a,l=V();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Y(){var e=window.sessionStorage.getItem("uid");return e||(e=z(),window.sessionStorage.setItem("uid",e),e)}function q(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());w(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),w("PLAY",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"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(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))w("BUFFERING",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,w("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:G()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;w("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:G(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),w("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:G()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};function X(e){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t),window.firstFrame(t),t.on("loadedmetadata",(function(){window.endFirstFrame(t)}))}}window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f,p,w,I;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return m=e.sent,f=S(m),p=null==f?void 0:f.site,w=null==f?void 0:f.siteId,e.t0=H,e.t1=H,e.t2=H({aid:p,cid:w,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=Y(),e.t5=G(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,q();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),I=[e.t31],o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:m},contentType:"application/x-www-form-urlencoded",dataType:"text",data:I}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var $={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=$.version;var ee,te=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":le.get()+"".concat(null==m?void 0:m.getVideoDetails),params:Z({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":$.version},withCredentials:!0})},ne=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:le.get()+m.getLinearChannelDetails,params:Z(Z(Z(Z(Z({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},ie=function(e,t){var n,i,r=S(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:le.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},oe=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getToken();case 2:return i=e.sent,e.abrupt("return",o({url:le.get()+"".concat(null==m?void 0:m.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:Z({},t),params:Z({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:le.get()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},ae=function(e){var t=e.videoId;return o({method:"GET",url:le.get()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},le=(ee=null==m?void 0:m.apiBaseUrl,{set:function(e){e&&(ee=e)},get:function(){return ee}}),de=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},ue=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},se=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ve(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=s(navigator.userAgent);var me=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},fe=function(e){var t=pe(e,"video.tags",[]),n=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},pe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},we=function(){var e,t,n,i,o,a,l,d,s,c,v,m,f,p,w,I,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,b=r(E);if(!g.includes("VIEWLIFT_"))return g;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:pe(T,"video.gist.id",""),L=ve(ve({},Ee(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:me(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(l=b.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:fe(T),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+pe(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:pe(null===(m=window)||void 0===m||null===(f=m.app_data)||void 0===f||null===(p=f.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:pe(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:pe(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ge(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:fe(T)},null===(w=window)||void 0===w||null===(I=w.customData)||void 0===I?void 0:I.macros);for(var P in L){var S=new RegExp(P,"g");g=g.replace(S,L[P])}return g},Ie=function(){var e=k.get();return e>=0?e+1:1},ge=function(){var e,t,n,i=W(),o=V(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=k.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},Ee=function(e){var t,n,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=l()?ve(ve({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ve(ve({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=l()?ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},Te=function(e,t){var n,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ye(E);if(I){var y=be(g,t);return y.src=we(y.src,t,e),y}if("Safari"!==d()&&h)return he(g);if(T){var b=ye(g);return b.src=we(b.src,t,e),b}if(null!=g&&g.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return _.src=we(_.src,t,e),_}return null},he=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ye=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},be=function(e,t){var n=e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(t),"Safari"===l){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",o),i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return _e(t),u}var s={src:o.url,type:"application/dash+xml"};return _e(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var _e=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Oe=!1,Fe=function(e,t,n){var i=we(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r(e);if(null!==a.el_){Oe=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Oe&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Pe=function(e){i(e).play()},Se=function(e){i(e).pause()},Re=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ve=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ae=function(e){return!!i.getPlayer("".concat(e))},We=function(e){return i(e).paused()},Ce=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,L();case 3:return a=e.sent,l=r(t),e.abrupt("return",new Promise((function(e,n){ne(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=z(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,t);R(r),a&&o?(Ue(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ne=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,u,s,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return u=e.sent,(W()||null)&&U(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&re(i,u).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){te(i,u).then((function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;R(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Fe(t,h,E);var y=Te(E,t);if(y){var b,_,D,O,F,L,P,S,V,A,W,C,N,B,j=(null==E||null===(b=E.video)||void 0===b||null===(_=b.gist)||void 0===_?void 0:_.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),M=r(t);if(M.poster(j),Ue(t,y),M.on("loadstart",(function(){T&&e({status:!0,msg:"Video Loaded",response:E})})),M.on("loadeddata",(function(){se(),e({status:!0,msg:"Video Loaded",response:E})})),M.one("play",(function(){s&&m<95&&setTimeout((function(){M.currentTime(s)}),0)})),M.one("error",(function(){var e;n({status:!1,msg:(null==M||null===(e=M.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==E||null===(L=E.video)||void 0===L||null===(P=L.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==E||null===(V=E.video)||void 0===V||null===(A=V.closedCaptions)||void 0===A?void 0:A.length)>0)W=((null==E||null===(C=E.video)||void 0===C||null===(N=C.contentDetails)||void 0===N?void 0:N.closedCaptions)||(null==E||null===(B=E.video)||void 0===B?void 0:B.closedCaptions)).filter((function(e){return"VTT"===e.format})),c(t,W);else v(t)}else ue(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ke(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Be=function(e,t,n){var i=r(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},je=function(e){var t=r(e);if(Me(),a(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},Me=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Ue=function(e,t){var n=r(e);n&&n.src(t)},ke=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ae(n)&&ue(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},xe=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{E as A,I as B,Fe as C,De as D,X as E,p as F,ie as G,ne as H,k as I,A as J,C as K,W as L,We as M,N,M as O,U as P,Te as a,R as b,se as c,j as d,ae as e,B as f,V as g,ue as h,Be as i,Re as j,Se as k,Ue as l,Ae as m,Ne as n,Ce as o,Pe as p,je as q,Ve as r,oe as s,xe as t,de as u,te as v,re as w,ke as x,le as y,P as z};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-56b35647.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import s from"ua-parser-js";import{a as c,r as v}from"./captions-2d8c00f4.js";var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function f(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function p(e){window.dataLayer=window.dataLayer||[],f("js",new Date),f("config",e)}function w(e,t){f("event",e,t)}var I=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},g=null;function E(){return{set:function(e){e&&(g=e)},get:function(){return g}}}var T,h,y,b,_,D,O=function(){var e=t(n.mark((function e(){var t,i,o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=E().get(),i=getBaseUrl(),e.prev=2,e.next=5,axios({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return o=e.sent,e.abrupt("return",o);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),F=null,L=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!I(t)){e.next=6;break}return F||(F=O().then((function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&E().set(r),o||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){F=null}))),e.abrupt("return",F);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},S=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},R=function(e){h=e},V=function(){return h},A=function(e){T=e},W=function(){return T},C=function(){return y},N=function(e){y=e},B=function(e){_=e},j=function(){return _},M=function(e){b=new Map,e.map((function(e,t){b.set(e.id,t)}))},U=function(e){if(b){var t=b.get(e);N(t+1)}},k=(D=0,{set:function(e){e>=0&&(D=e)},get:function(){return D}});function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var G=function(){var e,t,n,i,o,r,a,l=V();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find((function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)})))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)};function z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Y(){var e=window.sessionStorage.getItem("uid");return e||(e=z(),window.sessionStorage.setItem("uid",e),e)}function q(){return J.apply(this,arguments)}function J(){return(J=t(n.mark((function e(){var t,i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.initialise=function(e){window.sid=z(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,i,o,r=Math.floor(e.currentTime());w(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),100),w("PLAY",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"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(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),100))})))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting"))w("BUFFERING",H({pfm:window.platform,uid:Y(),vid:G(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,w("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:G()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,i,o,r,a;w("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),vid:G(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),w("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:G()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(K(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var K=function(e,t,n){return e>=t&&e<=n};function X(e){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t),window.firstFrame(t),t.on("loadedmetadata",(function(){window.endFirstFrame(t)}))}}window.fireEvent=function(){var e=t(n.mark((function e(t){var i,r,a,l,d,u,s,c,v,m,f,p,w,I;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return m=e.sent,f=S(m),p=null==f?void 0:f.site,w=null==f?void 0:f.siteId,e.t0=H,e.t1=H,e.t2=H({aid:p,cid:w,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=Y(),e.t5=G(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=t.videoPosition,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:"",e.t17=!0===t.isAdEvent?(n=t.adPosition)?String(n):"":"",e.next=26,q();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=t.ttFirstFrame,e.t23=t.bitrate,e.t24=t.resHeight,e.t25=t.resWidth,e.t26=t.bufferHealth,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:"",resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(l=window)||void 0===l||null===(d=l.customData)||void 0===d||null===(u=d.beacon)||void 0===u?void 0:u.params,e.t31=(0,e.t0)(e.t29,e.t30),I=[e.t31],o({url:(null===(s=window)||void 0===s||null===(c=s.customData)||void 0===c||null===(v=c.beacon)||void 0===v?void 0:v.url)||"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",method:"post",headers:{Authorization:m},contentType:"application/x-www-form-urlencoded",dataType:"text",data:I}).catch((function(e){console.error(e)}));case 42:case"end":return e.stop()}var n}),e)})));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Q(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var $={name:"@viewlift/player8",version:"1.0.110",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"^8.21.1","videojs-contrib-ads":"^7.5.2","videojs-contrib-eme":"^5.5.1","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=$.version;var ee,te=function(e,t){var n,i,r,a,l,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":le.get()+"".concat(null==m?void 0:m.getVideoDetails),params:Z({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":$.version},withCredentials:!0})},ne=function(e,t){var n,i,r,a;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})})):o({url:le.get()+m.getLinearChannelDetails,params:Z(Z(Z(Z(Z({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:t}})},ie=function(e,t){var n,i,r=S(t),a=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise((function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})})):o({url:le.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:t}})},oe=function(){var e=t(n.mark((function e(t){var i;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getToken();case 2:return i=e.sent,e.abrupt("return",o({url:le.get()+"".concat(null==m?void 0:m.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:Z({},t),params:Z({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:le.get()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},ae=function(e){var t=e.videoId;return o({method:"GET",url:le.get()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},le=(ee=null==m?void 0:m.apiBaseUrl,{set:function(e){e&&(ee=e)},get:function(){return ee}}),de=function(e,t,n){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web"},method:"GET",headers:{Authorization:t},withCredentials:!0})},ue=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},se=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ve(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ce(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}window._deviceInfo=s(navigator.userAgent);var me=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},fe=function(e){var t=pe(e,"video.tags",[]),n=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},pe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},we=function(){var e,t,n,i,o,a,l,d,s,c,v,m,f,p,w,I,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",E=arguments.length>1?arguments[1]:void 0,T=arguments.length>2?arguments[2]:void 0,h=(null==T?void 0:T.contentType)||"video",y=null==T||null===(e=T[h])||void 0===e?void 0:e.metadata,b=r(E);if(!g.includes("VIEWLIFT_"))return g;var _=window.getComputedStyle(document.getElementById(E),null),D=Math.trunc(_.getPropertyValue("height").slice(0,-2)),O=Math.trunc(_.getPropertyValue("width").slice(0,-2)),F="linearchannel"===h?null==T||null===(t=T.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(i=n.find((function(e){return(null==e?void 0:e.id)===(null==T?void 0:T.channelId)})))||void 0===i||null===(o=i.content)||void 0===o?void 0:o.id:pe(T,"video.gist.id",""),L=ve(ve({},Ee(y)),{},{VIEWLIFT_WIDTH:O,VIEWLIFT_HEIGHT:D,VIEWLIFT_SIZE:me(O,D),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(a=window)||void 0===a?void 0:a.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(T,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==b||null===(l=b.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==b||null===(d=b.options_)||void 0===d?void 0:d.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"WEB_BROWSER",VIEWLIFT_KEYWORDS:fe(T),VIEWLIFT_MEDIA_ID:F,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:F,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+pe(T,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(s=window)||void 0===s||null===(c=s.app_data)||void 0===c||null===(v=c.site)||void 0===v?void 0:v.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:pe(null===(m=window)||void 0===m||null===(f=m.app_data)||void 0===f||null===(p=f.site)||void 0===p?void 0:p.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(T,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:F,VIEWLIFT_CONTENT_TITLE:pe(T,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:pe(T,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(T,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ge(),VIEWLIFT_SEASON_NUMBER:Ie(),VIEWLIFT_CONTENT_TAGS:fe(T)},null===(w=window)||void 0===w||null===(I=w.customData)||void 0===I?void 0:I.macros);for(var P in L){var S=new RegExp(P,"g");g=g.replace(S,L[P])}return g},Ie=function(){var e=k.get();return e>=0?e+1:1},ge=function(){var e,t,n,i=W(),o=V(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=k.get(),l=null==i||null===(t=i[a])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex((function(e){return(null==e?void 0:e.id)===r}));return l>=0?l+1:1},Ee=function(e){var t,n,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var s=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):c&&(d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),d=l()?ve(ve({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ve(ve({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=ve(ve({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),d=l()?ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ve(ve({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d},Te=function(e,t){var n,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ye(E);if(I){var y=be(g,t);return y.src=we(y.src,t,e),y}if("Safari"!==d()&&h)return he(g);if(T){var b=ye(g);return b.src=we(b.src,t,e),b}if(null!=g&&g.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(g);return _.src=we(_.src,t,e),_}return null},he=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ye=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},be=function(e,t){var n=e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(t),"Safari"===l){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};console.log("🔐 Requesting FairPlay Certificate...",o),i.xhr(o,(function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))}))},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return _e(t),u}var s={src:o.url,type:"application/dash+xml"};return _e(t),s.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}},s};var _e=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Oe=!1,Fe=function(e,t,n){var i=we(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,a=r(e);if(null!==a.el_){Oe=!0;var l={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Oe&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout((function(){a.ima.setContentWithAdTag(null,t,!0),a.ima.requestAds()}),1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,(function(){s&&a.ima.initializeAdDisplayContainer()}));var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",(function(){c&&c({status:"STARTED",msg:"Advertisement Started"})})),a.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}))})),a.on("adserror",(function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})}))}}(e,i)}};function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}var Pe=function(e){i(e).play()},Se=function(e){i(e).pause()},Re=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ve=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},Ae=function(e){return!!i.getPlayer("".concat(e))},We=function(e){return i(e).paused()},Ce=function(){var e=t(n.mark((function e(t,i){var o,a,l,d=arguments;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,L();case 3:return a=e.sent,l=r(t),e.abrupt("return",new Promise((function(e,n){ne(i,a).then((function(n){var r=null==n?void 0:n.data;window.sid=z(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,t);R(r),a&&o?(Ue(t,a),l.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})}))):e({status:!0,msg:"Feed authenticated",response:r})})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Ne=function(){var e=t(n.mark((function e(t,i,o){var a,l,d,u,s,m;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L();case 2:return u=e.sent,(W()||null)&&U(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&re(i,u).then((function(e){var t,n,i,o,r,a;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))})),e.abrupt("return",new Promise((function(e,n){te(i,u).then((function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;R(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Fe(t,h,E);var y=Te(E,t);if(y){var b,_,D,O,F,L,P,S,V,A,W,C,N,B,j=(null==E||null===(b=E.video)||void 0===b||null===(_=b.gist)||void 0===_?void 0:_.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),M=r(t);if(M.poster(j),Ue(t,y),M.on("loadstart",(function(){T&&e({status:!0,msg:"Video Loaded",response:E})})),M.on("loadeddata",(function(){se(),e({status:!0,msg:"Video Loaded",response:E})})),M.one("play",(function(){s&&m<95&&setTimeout((function(){M.currentTime(s)}),0)})),M.one("error",(function(){var e;n({status:!1,msg:(null==M||null===(e=M.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==E||null===(L=E.video)||void 0===L||null===(P=L.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==E||null===(V=E.video)||void 0===V||null===(A=V.closedCaptions)||void 0===A?void 0:A.length)>0)W=((null==E||null===(C=E.video)||void 0===C||null===(N=C.contentDetails)||void 0===N?void 0:N.closedCaptions)||(null==E||null===(B=E.video)||void 0===B?void 0:B.closedCaptions)).filter((function(e){return"VTT"===e.format})),c(t,W);else v(t)}else ue(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){ke(e,t,n,i)}))})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),Be=function(e,t,n){var i=r(e);return i.src(t),new Promise((function(e,t){var o=0;i.one("loadedmetadata",(function(){clearTimeout(o),e({status:!0,msg:"video loaded"})})),i.one("loadstart",(function(e){o=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},je=function(e){var t=r(e);if(Me(),a(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},Me=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Ue=function(e,t){var n=r(e);n&&n.src(t)},ke=function(t,n,i,o){var r,a,l,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==t||null===(l=t.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);Ae(n)&&ue(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Le(Object(i),!0).forEach((function(n){e(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Le(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},xe=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{E as A,I as B,Fe as C,De as D,X as E,p as F,ie as G,ne as H,k as I,A as J,C as K,W as L,We as M,N,M as O,U as P,Te as a,R as b,se as c,j as d,ae as e,B as f,V as g,ue as h,Be as i,Re as j,Se as k,Ue as l,Ae as m,Ne as n,Ce as o,Pe as p,je as q,Ve as r,oe as s,xe as t,de as u,te as v,re as w,ke as x,le as y,P as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./skin-ec935b20.js";import{K as n,L as r,g as i}from"./generic-049d56fa.js";import{s as o}from"./autoNextVideo-d7c46772.js";import a from"@babel/runtime/helpers/typeof";import l from"video.js";import u from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import c from"@babel/runtime/helpers/defineProperty";import d from"@babel/runtime/helpers/slicedToArray";var p,m,f,v,h=[],g=function(i,o){var a;if(null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable){var l;h=[];var u=r();null==u||u.map((function(t){var n;return(n=h).push.apply(n,e(t.episodes))})),null==o||null===(l=o.series)||void 0===l||l.cb}else{var s,c;h=null==o||null===(s=o.relatedVideos)||void 0===s?void 0:s.content,null==o||null===(c=o.relatedVideos)||void 0===c||c.cb}var d=t(i);d.on("timeupdate",(function(){var e,t,r=Math.floor(d.currentTime()),i=d.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=h)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var p,m=h.filter((function(e,t){return t==n()}));if((null==m?void 0:m.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var f,v,g,y,b,w,E,C,N,k,T,A;(null===(f=document.getElementsByClassName("next-ep-preview"))||void 0===f?void 0:f[0]).style.visibility="hidden";var B=null===(v=document.getElementsByClassName("next-ep-title"))||void 0===v?void 0:v[0],I=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],L=null===(y=document.getElementsByClassName("next-ep-content"))||void 0===y?void 0:y[0],M=null===(b=m[0])||void 0===b?void 0:b.title;(null===(w=M)||void 0===w?void 0:w.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),I.src=(null===(E=m[0])||void 0===E||null===(C=E.gist)||void 0===C||null===(N=C.imageGist)||void 0===N?void 0:N.r16x9)||(null==m||null===(k=m[0])||void 0===k?void 0:k.img)||(null===(T=window)||void 0===T||null===(A=T.customData)||void 0===A?void 0:A.fallbackImage),L.onclick=function(){return x(i)}}else{var P,O,j,S,X,R,F,D,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(i).append(U);var G=document.createElement("div");G.className="next-ep-header",G.textContent="Next up";var V=null===(P=m[0])||void 0===P?void 0:P.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=m[0])||void 0===O||null===(j=O.gist)||void 0===j||null===(S=j.imageGist)||void 0===S?void 0:S.r16x9)||(null==m||null===(X=m[0])||void 0===X?void 0:X.img)||(null===(R=window)||void 0===R||null===(F=R.customData)||void 0===F?void 0:F.fallbackImage);var $=document.createElement("div");$.className="next-ep-title",(null===(D=V)||void 0===D?void 0:D.length)>60&&(V=V.substr(0,60)+"..."),$.textContent="".concat(V);var H=document.createElement("div");H.className="next-ep-content",H.append(W),H.append($),H.onclick=function(){return x(i)},U.append(G),U.append(H)}},x=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,h)}};function y(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function b(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=d(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return C.apply(this,arguments)}function C(){return(C=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",y(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function N(e){return k.apply(this,arguments)}function k(){return(k=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return b(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},c(n,"left","-60px"),c(n,"border","1px solid transparent"),c(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}p={0:{src:"example-thumbnail.png"}},m=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===a(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},f=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===f(t)("position")?e(t.offsetParent):t},l.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;n=m({},p,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",m(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,h,g,x;for(l in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((x=v(o.el()).getBoundingClientRect()).width||x.right)+g,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=v(o.el()).getBoundingClientRect().left+g,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&m(r.style,c.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=f(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+h-p:s<h&&(s=h),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var T=function(){var e=u(s.mark((function e(t,n){var r,i,o,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function A(e){return B.apply(this,arguments)}function B(){return(B=u(s.mark((function e(t){var n,r,o,a,l,u,c,d,p,m,f,v,h,g,x,y,b,w,E,C,N,k;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return a=e.sent,e.next=7,a.text();case 7:l=e.sent,u=new DOMParser,c=u.parseFromString(l,"application/xml"),d=null===(r=i())||void 0===r||null===(o=r.video)||void 0===o?void 0:o.runtime,p=c.getElementsByTagName("AdaptationSet"),m=0;case 13:if(!(m<p.length)){e.next=34;break}if("image"!==(f=p[m]).getAttribute("contentType")||"image/png"!==f.getAttribute("mimeType")){e.next=31;break}if(v=f.getElementsByTagName("SegmentTemplate")[0],h=f.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],x=g.getAttribute("value"),!v){e.next=31;break}for(v.getAttribute("media"),y=v.getAttribute("duration"),b=v.getAttribute("timescale"),w=y/b,E=Math.round(d/w),C=Math.ceil(E/9),N=v.getAttribute("media"),k=[],m=0;m<C;m++)k.push({duration:w,layout:x,uri:n+"/"+N.replace("$Number$",m)});return e.abrupt("return",k);case 31:m++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function I(e){return L.apply(this,arguments)}function L(){return(L=u(s.mark((function e(n){var r,i,o,a,l,u,c,d,p,m,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t(n),i=r.currentSource(),null==(o=i.src)||!o.includes("m3u8")){e.next=18;break}return e.next=5,E(o);case 5:if(!((null==(a=e.sent)?void 0:a.length)>0)){e.next=16;break}return l=(null==a?void 0:a[0])||null,u=l.uri,c=o.substring(0,o.lastIndexOf("/"))+"/",e.next=11,T(c,u);case 11:return d=e.sent,e.next=14,N(d);case 14:p=e.sent,r.thumbnails(p);case 16:e.next=27;break;case 18:if(null==o||!o.includes("mpd")){e.next=27;break}return e.next=21,A(o);case 21:if(!((null==(m=e.sent)?void 0:m.length)>0)){e.next=27;break}return e.next=25,N(m);case 25:f=e.sent,r.thumbnails(f);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{g as a,M as b,I as i};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./skin-56b35647.js";import{K as n,L as r,g as i}from"./generic-814f35ca.js";import{s as o}from"./autoNextVideo-2c052473.js";import a from"@babel/runtime/helpers/typeof";import l from"video.js";import u from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import c from"@babel/runtime/helpers/defineProperty";import d from"@babel/runtime/helpers/slicedToArray";var p,m,f,v,h=[],g=function(i,o){var a;if(null!=o&&null!==(a=o.series)&&void 0!==a&&a.enable){var l;h=[];var u=r();null==u||u.map((function(t){var n;return(n=h).push.apply(n,e(t.episodes))})),null==o||null===(l=o.series)||void 0===l||l.cb}else{var s,c;h=null==o||null===(s=o.relatedVideos)||void 0===s?void 0:s.content,null==o||null===(c=o.relatedVideos)||void 0===c||c.cb}var d=t(i);d.on("timeupdate",(function(){var e,t,r=Math.floor(d.currentTime()),i=d.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=h)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var p,m=h.filter((function(e,t){return t==n()}));if((null==m?void 0:m.length)>0)if(null!==(p=document.getElementsByClassName("next-ep-preview"))&&void 0!==p&&p[0]){var f,v,g,y,b,w,E,C,N,k,T,A;(null===(f=document.getElementsByClassName("next-ep-preview"))||void 0===f?void 0:f[0]).style.visibility="hidden";var B=null===(v=document.getElementsByClassName("next-ep-title"))||void 0===v?void 0:v[0],I=null===(g=document.getElementsByClassName("next-ep-img"))||void 0===g?void 0:g[0],L=null===(y=document.getElementsByClassName("next-ep-content"))||void 0===y?void 0:y[0],M=null===(b=m[0])||void 0===b?void 0:b.title;(null===(w=M)||void 0===w?void 0:w.length)>60&&(M=M.substr(0,60)+"..."),B.textContent="".concat(M),I.src=(null===(E=m[0])||void 0===E||null===(C=E.gist)||void 0===C||null===(N=C.imageGist)||void 0===N?void 0:N.r16x9)||(null==m||null===(k=m[0])||void 0===k?void 0:k.img)||(null===(T=window)||void 0===T||null===(A=T.customData)||void 0===A?void 0:A.fallbackImage),L.onclick=function(){return x(i)}}else{var P,O,j,S,X,R,F,D,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(i).append(U);var G=document.createElement("div");G.className="next-ep-header",G.textContent="Next up";var V=null===(P=m[0])||void 0===P?void 0:P.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=m[0])||void 0===O||null===(j=O.gist)||void 0===j||null===(S=j.imageGist)||void 0===S?void 0:S.r16x9)||(null==m||null===(X=m[0])||void 0===X?void 0:X.img)||(null===(R=window)||void 0===R||null===(F=R.customData)||void 0===F?void 0:F.fallbackImage);var $=document.createElement("div");$.className="next-ep-title",(null===(D=V)||void 0===D?void 0:D.length)>60&&(V=V.substr(0,60)+"..."),$.textContent="".concat(V);var H=document.createElement("div");H.className="next-ep-content",H.append(W),H.append($),H.onclick=function(){return x(i)},U.append(G),U.append(H)}},x=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,h)}};function y(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function b(e){return w.apply(this,arguments)}function w(){return(w=u(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var n=new Image;n.src=t.uri,n.crossOrigin="Anonymous";var r=[],i=t.layout.split("x"),o=d(i,2),a=o[0],l=o[1];n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0,i.width,i.height);for(var o=i.width/l,u=i.height/a,s=0;s<a;s++)for(var c=0;c<l;c++){var d=document.createElement("canvas");d.width=o,d.height=u,d.getContext("2d").drawImage(i,c*o,s*u,o,u,0,0,o,u);var p=d.toDataURL("image/png");r.push({uri:p,duration:t.duration})}e(r)}})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return C.apply(this,arguments)}function C(){return(C=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.text();case 6:return r=e.sent,e.abrupt("return",y(r));case 10:e.prev=10,e.t0=e.catch(0),console.error("Error fetching the M3U8 manifest:",e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function N(e){return k.apply(this,arguments)}function k(){return(k=u(s.mark((function e(t){var n,r;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return b(e)})));case 2:return n=e.sent.flat(),r={},n.map((function(e,t){var n,i=e.duration;r[i*t]={src:e.uri,style:(n={left:"-60px",height:"85px",width:"130px"},c(n,"left","-60px"),c(n,"border","1px solid transparent"),c(n,"borderRadius","4px"),n)}})),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}p={0:{src:"example-thumbnail.png"}},m=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===a(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},f=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===f(t)("position")?e(t.offsetParent):t},l.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;n=m({},p,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",m(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,h,g,x;for(l in u=0,g=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((x=v(o.el()).getBoundingClientRect()).width||x.right)+g,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=v(o.el()).getBoundingClientRect().left+g,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&m(r.style,c.style),s+(h=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=f(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+h-p:s<h&&(s=h),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var T=function(){var e=u(s.mark((function e(t,n){var r,i,o,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:return i=e.sent,o=i.split("\n"),a=[],o.forEach((function(e,n){e=e.trim();var r={resolution:null,duration:null,uri:null,layout:null};n>0&&o[n-1].includes("#EXT-X-TILES")&&(o[n-1]=o[n-1].split(","),r.uri=t+e,o[n-1].forEach((function(e){(e.includes(":")?e.split(":")[1]:e).split(",").forEach((function(e){var t=e.split("="),n=d(t,2),i=n[0],o=n[1];i=i.toLowerCase(),r[i]=o}))})),a.push(r))})),e.abrupt("return",a);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function A(e){return B.apply(this,arguments)}function B(){return(B=u(s.mark((function e(t){var n,r,o,a,l,u,c,d,p,m,f,v,h,g,x,y,b,w,E,C,N,k;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.split("/").slice(0,t.split("/").indexOf("dash")+1).join("/")||t,e.prev=1,e.next=4,fetch(t);case 4:return a=e.sent,e.next=7,a.text();case 7:l=e.sent,u=new DOMParser,c=u.parseFromString(l,"application/xml"),d=null===(r=i())||void 0===r||null===(o=r.video)||void 0===o?void 0:o.runtime,p=c.getElementsByTagName("AdaptationSet"),m=0;case 13:if(!(m<p.length)){e.next=34;break}if("image"!==(f=p[m]).getAttribute("contentType")||"image/png"!==f.getAttribute("mimeType")){e.next=31;break}if(v=f.getElementsByTagName("SegmentTemplate")[0],h=f.getElementsByTagName("Representation")[0],g=h.getElementsByTagName("EssentialProperty")[0],x=g.getAttribute("value"),!v){e.next=31;break}for(v.getAttribute("media"),y=v.getAttribute("duration"),b=v.getAttribute("timescale"),w=y/b,E=Math.round(d/w),C=Math.ceil(E/9),N=v.getAttribute("media"),k=[],m=0;m<C;m++)k.push({duration:w,layout:x,uri:n+"/"+N.replace("$Number$",m)});return e.abrupt("return",k);case 31:m++,e.next=13;break;case 34:return console.log("No trickplay segment found."),e.abrupt("return",null);case 38:e.prev=38,e.t0=e.catch(1),console.error("Error fetching or parsing MPD:",e.t0);case 41:case"end":return e.stop()}}),e,null,[[1,38]])})))).apply(this,arguments)}function I(e){return L.apply(this,arguments)}function L(){return(L=u(s.mark((function e(n){var r,i,o,a,l,u,c,d,p,m,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t(n),i=r.currentSource(),null==(o=i.src)||!o.includes("m3u8")){e.next=18;break}return e.next=5,E(o);case 5:if(!((null==(a=e.sent)?void 0:a.length)>0)){e.next=16;break}return l=(null==a?void 0:a[0])||null,u=l.uri,c=o.substring(0,o.lastIndexOf("/"))+"/",e.next=11,T(c,u);case 11:return d=e.sent,e.next=14,N(d);case 14:p=e.sent,r.thumbnails(p);case 16:e.next=27;break;case 18:if(null==o||!o.includes("mpd")){e.next=27;break}return e.next=21,A(o);case 21:if(!((null==(m=e.sent)?void 0:m.length)>0)){e.next=27;break}return e.next=25,N(m);case 25:f=e.sent,r.thumbnails(f);case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{g as a,M as b,I as i};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{s as e,g as n,a as t,l as o,b as i,c as r,h as l,d as a,e as s,f as u,i as c,j as d,p as v,k as m,r as p,m as f,n as h,o as g,q as w,t as y,u as b,v as k,w as O,x as j,y as T,z as I,A as P,B as S,C as D,D as C,E as x,F as R,G as E,H as A,I as V,J as H}from"./generic-049d56fa.js";import B from"@babel/runtime/helpers/asyncToGenerator";import L from"@babel/runtime/helpers/defineProperty";import _ from"@babel/runtime/regenerator";import N from"video.js";import{g as M,i as U,a as q}from"./skin-ec935b20.js";import{d as z}from"./browser-d4613b36.js";import F from"@babel/runtime/helpers/typeof";import{o as J,g as G,a as X,s as K,b as Q}from"./util-28f2c034.js";import{e as W,d as Y,g as Z,a as $}from"./captions-982fd43a.js";import{g as ee}from"./renditions-cb2afda4.js";import{playSelectedResolution as ne}from"./resolution-6fec5ed5.js";import{s as te}from"./localisation-0bf399a1.js";import"axios";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";var oe,ie=function(e){return new Promise((function(n,t){if(re(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},re=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var e=B(_.mark((function e(n){var t,o,i,r;return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=M(null==n?void 0:n.playerId),console.log(n),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=5,import("@silvermine/videojs-chromecast");case 5:return r=e.sent,e.prev=6,e.next=9,ie("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:return e.prev=14,r.default(N),e.finish(14);case 17:null!==(i=window)&&void 0!==i&&i.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==z()?null==o||o.airPlay({addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[6,11,14,17]])})));return function(n){return e.apply(this,arguments)}}(),ae=function(e,n){var t=M(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,r,l,a=this.el(),s=N.dom.getPointerPosition(a,n).x;N.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}}))};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce=[],de=0,ve=null;function me(t,o,i){var r,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(r=o.watchHistory)||void 0===r||r.apiVersion;var d=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),m=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var p=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,f=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,h=Math.floor(t.currentTime()),g=c?100:Math.floor(v/m*100),w={};f?function(e,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),r=pe(i),l=(new Date).getTime(),a=n(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return ue(ue({},e),{},L({},n,s[n]))}),{}),c=r.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===oe}));c<0?r.push(ue(ue({content:u},e),{},{addedDate:l,updateDate:l})):r[c]=ue(ue(ue({},r[c]),e),{},{updateDate:l});localStorage.setItem("".concat(i),JSON.stringify(r))}(w={completed:c,watchedTime:h,watchedPercentage:g},d,o.siteOwner):(w=ue(ue({videoId:oe,watchedTime:h,watchedPercentage:g,doneWatching:c,profileId:d},ve&&{seriesId:ve}),p&&{originalObjectId:p}),e(w).then((function(e){})).catch((function(e){}))),de=v+i}function pe(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function fe(e,n,t){var o=pe(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}var he=function(e,n,t){var o=M(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=M(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},we=!1,ye=function(e,n){var i,r,l=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(i=e[l])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!we){var a=be(e,"videoAssets","secondaryVideoAssets"),s=t(a,n);return s&&o(n,s),we=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function be(e,n,t){if(Array.isArray(e))return e.map((function(e){return be(e,n,t)}));if(null!==e&&"object"===F(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=be(e[i],n,t)})),o}return e}function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var je=function(e,t,o,s){var u,c,d=s.res,v=s.sres,m=M(e),p=(null==d?void 0:d.contentType)||"video",f=(null==d||null===(u=d[p])||void 0===u||null===(c=u.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;i(d),m&&(m.on("loadstart",(function(){f?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(Oe({status:!0,msg:"Player Initialised"},v?{seriesResponse:v,response:d}:{response:d}))})),m.on("loadeddata",(function(){var o,i;(null==m||!m.muted())&&he(e,sessionStorage.getItem("volume")||"100");var l=n();if(r(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var a,s,u=Oe(Oe({},t),d);!function(e,n,t){var o,i,r;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(ve=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ce=[],de=0,oe=t;var l=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,a=M(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ce.includes(de)||(e==de?(ce.push(e),me(a,n,l)):e>de&&(de=e+l))})),a.one("ended",(function(){me(a,n,l,!0)})))}(e,u,null==l||null===(a=l.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.id)}})),m.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];m.trigger("subtitlechanged",n)})),m.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),g=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),m.tech_.on("retryplaylist",(function(){f&&ye(d,e)})),m.on("error",(function(){var n,t;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&f)?ye(d,e):(l(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured",response:d}))})),m.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var o,i,r,l=null===(o=n())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,s=a(),u=(null==s?void 0:s.get(l))||{t:0,p:0},c=u.t,d=u.p;c&&d<95&&setTimeout((function(){m.currentTime(c)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),m.on("volumechange",(function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),m.on("chromecastDisconnected",(function(){if(f){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}})))},Te=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-01c05d03.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-0ae3e88e.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-6795867c.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-d06a64ec.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-9d926508.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&import("./skin-45c88d89.js").then((function(t){t.initialiseSkin(e,n)}))};var Ie,Pe=function(){var e=B(_.mark((function e(){return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ie("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=B(_.mark((function e(){return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){N.getPlugin("eme")||N.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),De=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){ie("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)}))},loadAdsLibrary:Pe,loadEMELibrary:Se}),Ce=function(e,n){var t=new Map;s({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))};function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ee=function(e,n,i,r){var a,s,u,c,d,v,m,p,f,h,g,w,b,k,O,j,T,I,P,S,R,E,A,V,H,U,z,F,J,G,X,K,Q,W=n.res,Y=void 0===W?null:W,Z=n.sres,ee=void 0===Z?null:Z;null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d||d.S;var ne=null!=i&&i.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=Y)||void 0===v?void 0:v.contentType)||"video",oe=q(null===(m=Y)||void 0===m||null===(p=m[te])||void 0===p||null===(f=p.gist)||void 0===f?void 0:f.videoImageUrl)||q(null===(h=Y)||void 0===h||null===(g=h[te])||void 0===g||null===(w=g.gist)||void 0===w||null===(b=w.imageGist)||void 0===b?void 0:b.r16x9),ie=(null===(k=Y)||void 0===k||null===(O=k[te])||void 0===O||null===(j=O.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,re=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(P=I.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,se=(null===(S=Y)||void 0===S||null===(R=S.ads)||void 0===R||null===(E=R.preRoll)||void 0===E||null===(A=E.adTags)||void 0===A||null===(V=A.web)||void 0===V?void 0:V.active)&&(null===(H=Y)||void 0===H||null===(U=H.ads)||void 0===U||null===(z=U.preRoll)||void 0===z||null===(F=z.adTags)||void 0===F||null===(J=F.web)||void 0===J?void 0:J.url);Y=Re(Re({},Y),{},{audioAssetSource:null==i?void 0:i.audioAssetSource});var ue=(Q={controls:0!=(null==i?void 0:i.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==i?void 0:i.muted)||!1,autoplay:(null==i?void 0:i.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==i.skin,liveui:ie},L(Q,"autoplay",null==i?void 0:i.autoplay),L(Q,"normalizeAutoplay",(null==i?void 0:i.autoplay)&&!se),L(Q,"loop",(null==i?void 0:i.loop)||!1),L(Q,"audioPosterMode",null==i?void 0:i.audioPosterMode),L(Q,"html5",Re(Re({vhs:Re(Re({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==i?void 0:i.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==i||null===(G=i.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==i||null===(X=i.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==i||null===(K=i.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),L(Q,"poster",oe),L(Q,"techOrder",ne),L(Q,"chromecast",{requestCustomDataFn:function(n){var t=M(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,r,l,a,s,u,c,d,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var h=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.licenseToken=h}var g=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=g;var w=null==e||null===(r=e[m])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;p.duration=w;var y=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=y;var b=null==e||null===(u=e[m])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(d=e[m])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)}}),Q);if(!N.getPlayers()[e])var ce=N(e,ue,function(){var n=B(_.mark((function n(){var a,s,u,c,d,v,m,p,f,h,g,w,b,k,O,j,T,I,P,S,R,E,A;return _.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ce),console.log(N.VERSION),console.log(N.getPlugins()),n.next=5,le(i);case 5:if(re&&r.resolve(Re({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),x(e),/Android/i.test(navigator.userAgent)&&(N.options.vhs.overrideNative=!0),k=null===(a=Y)||void 0===a||null===(s=a[te])||void 0===s?void 0:s.drmEnabled,O=null===(u=Y)||void 0===u||null===(c=u[te])||void 0===c||null===(d=c.liveDetails)||void 0===d?void 0:d.startOverTime,!k){n.next=13;break}return n.next=13,Se();case 13:ie&&ae(e,O),!se||null!=i&&null!==(v=i.customData)&&void 0!==v&&v.disableAds||D(e,se,Y),j=t(Y,e),console.log(j),null!=i&&i.nearestClusterUrl&&(j=C(j,i.nearestClusterUrl)),j?o(e,j):(r.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),l(e,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Y)||void 0===m||null===(p=m[te])||void 0===p||null===(f=p.contentDetails)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(w=g[te])||void 0===w||null===(b=w.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(I=Y)||void 0===I||null===(P=I[te])||void 0===P||null===(S=P.contentDetails)||void 0===S?void 0:S.closedCaptions)||(null===(R=Y)||void 0===R||null===(E=R[te])||void 0===E?void 0:E.closedCaptions),T=A.filter((function(e){return"VTT"===e.format})),$(e,T)),null!=i&&i.disableControls?y(e):Te(e,Re(Re(Re({},i),ue),{},{liveVideo:re,isDvrEnabled:ie,res:Y,sres:ee})),je(e,Re(Re(Re({},i),ue),{},{liveVideo:re}),r,{res:Y,sres:ee});case 22:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Ae(){return{loadVideoInstantly:c,onTimeUpdate:J,getVideoDuration:G,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=B(_.mark((function n(t,o){var r,l,a,s,u,c,d,v,m,p,h,g,w,y,b,D,C,x,B,L,N,M,q,F,J,G;return _.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!f(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,h=null==e?void 0:e.asat,g=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,w=null==e?void 0:e.videoId,y=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,window.videoId=w,b=null==e?void 0:e.token,!I(e)){n.next=15;break}if(P().set(null==e?void 0:e.refreshToken),b&&!S(b)){n.next=14;break}return o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}}),n.abrupt("return");case 14:Ie=JSON.parse(atob(b.split(".")[1]));case 15:return e.isAnonymousUser=!(null===(a=Ie)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=Ie)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=Ie)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=Ie)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",b),D=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,C=null==e?void 0:e.airplay,x=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(B=null==e?void 0:e.errors)&&(window.customErrors=B),window.customData=null==e?void 0:e.customData,te(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),T.set(e.apiBaseUrl),null!=e&&e.skin&&!U(e.skin)||(e.skin="VL_ONE"),n.next=33,Pe();case 33:C&&"Safari"==z()&&Promise.resolve().then((function(){return De})).then((function(e){e.importAirplay()})),x&&ie("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then((function(){return R(x)})).catch((function(e){})),(L=null===(m=document)||void 0===m?void 0:m.getElementById("".concat(D)))&&L.addEventListener("contextmenu",(function(e){return e.preventDefault()})),p?(M={directPlaybackUrl:p,id:N="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},h?k(N,b).then((function(n){Ee(D,{res:Re(Re({},n),M)},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,N)})):Ee(D,{res:M},e,{resolve:t,reject:o})):y?(F=sessionStorage.getItem("season-idx")||0,V.set(parseInt(F)),J=null==e||null===(q=e.series)||void 0===q?void 0:q.id,E(J,b).then((function(n){var r,l,a,s=n.data,u=n.data.seasons;H(u);var c=w||(null==u||null===(r=u[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);Ce(J,b),k(c,b).then((function(n){var r,l,a;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,i(n.data),Ee(D,{res:null==n?void 0:n.data,sres:s},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}))})).catch((function(e){j(e,D,o)}))):g?(G=null==e?void 0:e.epg,A(G,b).then((function(n){var i=null==n?void 0:n.data;i.contentType="linearchannel",i.channelId=null==G?void 0:G.channelId,Ee(D,{res:i},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}))):k(w,b).then((function(n){var r,l,a,s;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,i(null==n?void 0:n.data);var u,c=null==n?void 0:n.data;if(null!=e&&e.watchHistory&&null!=e&&null!==(s=e.watchHistory)&&void 0!==s&&s.enable)if((null===(u=e.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var d,v,m,p=fe((null===(d=e.watchHistory)||void 0===d?void 0:d.profileId)||"",w,null==e?void 0:e.siteOwner);if(p&&p.length)e.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,e.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;c.contentType="video",Ee(D,{res:c},e,{resolve:t,reject:o})}else O(w,b).then((function(n){var i,r,l,a,s,u;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==n?void 0:n.data)),e.watchHistoryResumeTime=(null==n||null===(s=n.data)||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null==n||null===(u=n.data)||void 0===u?void 0:u.watchedPercentage)||null,c.contentType="video",Ee(D,{res:c},e,{resolve:t,reject:o})})).catch((function(n){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(n)),Ee(D,{res:c},e,{resolve:t,reject:o})}));else Ee(D,{res:c},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}));case 38:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ee,skip:d,getPlayer:M,play:v,pause:m,detectBrowser:z,rewind:p,loadVideo:o,seekToTimeStamp:K,isPlayerInitialised:f,load:h,authenticateLC:g,dispose:w,enableCaptions:W,disableCaptions:Y,getCaptions:Z,playSelectedResolution:ne,getSource:t,setVolume:he,getVolume:ge,disableControls:y,setPlaybackSpeed:Q,getEntitlementData:b}}export{Ae as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{s as e,g as n,a as t,l as o,b as i,c as r,h as l,d as a,e as s,f as u,i as c,j as d,p as v,k as m,r as p,m as f,n as h,o as g,q as w,t as y,u as b,v as k,w as O,x as j,y as T,z as I,A as P,B as S,C as D,D as C,E as x,F as R,G as E,H as A,I as V,J as H}from"./generic-814f35ca.js";import B from"@babel/runtime/helpers/asyncToGenerator";import L from"@babel/runtime/helpers/defineProperty";import _ from"@babel/runtime/regenerator";import N from"video.js";import{g as M,i as U,a as q}from"./skin-56b35647.js";import{d as z}from"./browser-d4613b36.js";import F from"@babel/runtime/helpers/typeof";import{o as J,g as G,a as X,s as K,b as Q}from"./util-045fb3fd.js";import{e as W,d as Y,g as Z,a as $}from"./captions-2d8c00f4.js";import{g as ee}from"./renditions-75ce606c.js";import{playSelectedResolution as ne}from"./resolution-00934cd2.js";import{s as te}from"./localisation-0bf399a1.js";import"axios";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";var oe,ie=function(e){return new Promise((function(n,t){if(re(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}}))},re=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},le=function(){var e=B(_.mark((function e(n){var t,o,i,r;return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=M(null==n?void 0:n.playerId),console.log(n),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=21;break}return e.next=5,import("@silvermine/videojs-chromecast");case 5:return r=e.sent,e.prev=6,e.next=9,ie("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),console.log("Error",e.t0);case 14:return e.prev=14,r.default(N),e.finish(14);case 17:null!==(i=window)&&void 0!==i&&i.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=n&&n.airplay&&"Safari"==z()?null==o||o.airPlay({addButtonToControlBar:"new"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return e.stop()}}),e,null,[[6,11,14,17]])})));return function(n){return e.apply(this,arguments)}}(),ae=function(e,n){var t=M(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,r,l,a=this.el(),s=N.dom.getPointerPosition(a,n).x;N.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}}))};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ue(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?se(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):se(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce=[],de=0,ve=null;function me(t,o,i){var r,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==o||null===(r=o.watchHistory)||void 0===r||r.apiVersion;var d=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(t.currentTime()),m=Math.floor(t.duration());null==o||null===(a=o.watchHistory)||void 0===a||a.xapiKey;var p=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,f=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,h=Math.floor(t.currentTime()),g=c?100:Math.floor(v/m*100),w={};f?function(e,t,o){var i=t?"watchhistory-data-".concat(t):"watchhistory-data-guest-".concat(o),r=pe(i),l=(new Date).getTime(),a=n(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return ue(ue({},e),{},L({},n,s[n]))}),{}),c=r.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===oe}));c<0?r.push(ue(ue({content:u},e),{},{addedDate:l,updateDate:l})):r[c]=ue(ue(ue({},r[c]),e),{},{updateDate:l});localStorage.setItem("".concat(i),JSON.stringify(r))}(w={completed:c,watchedTime:h,watchedPercentage:g},d,o.siteOwner):(w=ue(ue({videoId:oe,watchedTime:h,watchedPercentage:g,doneWatching:c,profileId:d},ve&&{seriesId:ve}),p&&{originalObjectId:p}),e(w).then((function(e){})).catch((function(e){}))),de=v+i}function pe(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function fe(e,n,t){var o=pe(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter((function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n}))),i}var he=function(e,n,t){var o=M(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=M(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},we=!1,ye=function(e,n){var i,r,l=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(i=e[l])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.secondaryVideoAssets)||null)&&!we){var a=be(e,"videoAssets","secondaryVideoAssets"),s=t(a,n);return s&&o(n,s),we=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function be(e,n,t){if(Array.isArray(e))return e.map((function(e){return be(e,n,t)}));if(null!==e&&"object"===F(e)){var o={};return Object.keys(e).forEach((function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=be(e[i],n,t)})),o}return e}function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Oe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ke(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var je=function(e,t,o,s){var u,c,d=s.res,v=s.sres,m=M(e),p=(null==d?void 0:d.contentType)||"video",f=(null==d||null===(u=d[p])||void 0===u||null===(c=u.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;i(d),m&&(m.on("loadstart",(function(){f?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(Oe({status:!0,msg:"Player Initialised"},v?{seriesResponse:v,response:d}:{response:d}))})),m.on("loadeddata",(function(){var o,i;(null==m||!m.muted())&&he(e,sessionStorage.getItem("volume")||"100");var l=n();if(r(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var a,s,u=Oe(Oe({},t),d);!function(e,n,t){var o,i,r;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(ve=null==n||null===(i=n.series)||void 0===i?void 0:i.id),ce=[],de=0,oe=t;var l=(null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.interval)||30,a=M(e);a&&(a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());ce.includes(de)||(e==de?(ce.push(e),me(a,n,l)):e>de&&(de=e+l))})),a.one("ended",(function(){me(a,n,l,!0)})))}(e,u,null==l||null===(a=l.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.id)}})),m.textTracks().on("change",(function(e){var n=this.tracks_.filter((function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0}))[0];m.trigger("subtitlechanged",n)})),m.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(l=r.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),g=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([g[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),m.tech_.on("retryplaylist",(function(){f&&ye(d,e)})),m.on("error",(function(){var n,t;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&f)?ye(d,e):(l(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),o.reject({status:!1,msg:(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured",response:d}))})),m.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var o,i,r,l=null===(o=n())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,s=a(),u=(null==s?void 0:s.get(l))||{t:0,p:0},c=u.t,d=u.p;c&&d<95&&setTimeout((function(){m.currentTime(c)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){m.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),m.on("volumechange",(function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),m.on("chromecastDisconnected",(function(){if(f){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}})))},Te=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-8babe1f2.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-7707020e.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-b40e8ae3.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-d9035123.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-b25d0df9.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&import("./skin-5625f223.js").then((function(t){t.initialiseSkin(e,n)}))};var Ie,Pe=function(){var e=B(_.mark((function e(){return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),ie("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=B(_.mark((function e(){return _.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){N.getPlugin("eme")||N.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),De=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){ie("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)}))},loadAdsLibrary:Pe,loadEMELibrary:Se}),Ce=function(e,n){var t=new Map;s({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),u(t)})).catch((function(e){return console.log(e)}))};function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Re(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xe(Object(t),!0).forEach((function(n){L(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xe(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Ee=function(e,n,i,r){var a,s,u,c,d,v,m,p,f,h,g,w,b,k,O,j,T,I,P,S,R,E,A,V,H,U,z,F,J,G,X,K,Q,W=n.res,Y=void 0===W?null:W,Z=n.sres,ee=void 0===Z?null:Z;null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d||d.S;var ne=null!=i&&i.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(v=Y)||void 0===v?void 0:v.contentType)||"video",oe=q(null===(m=Y)||void 0===m||null===(p=m[te])||void 0===p||null===(f=p.gist)||void 0===f?void 0:f.videoImageUrl)||q(null===(h=Y)||void 0===h||null===(g=h[te])||void 0===g||null===(w=g.gist)||void 0===w||null===(b=w.imageGist)||void 0===b?void 0:b.r16x9),ie=(null===(k=Y)||void 0===k||null===(O=k[te])||void 0===O||null===(j=O.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,re=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(P=I.streamingInfo)||void 0===P?void 0:P.isLiveStream)||!1,se=(null===(S=Y)||void 0===S||null===(R=S.ads)||void 0===R||null===(E=R.preRoll)||void 0===E||null===(A=E.adTags)||void 0===A||null===(V=A.web)||void 0===V?void 0:V.active)&&(null===(H=Y)||void 0===H||null===(U=H.ads)||void 0===U||null===(z=U.preRoll)||void 0===z||null===(F=z.adTags)||void 0===F||null===(J=F.web)||void 0===J?void 0:J.url);Y=Re(Re({},Y),{},{audioAssetSource:null==i?void 0:i.audioAssetSource});var ue=(Q={controls:0!=(null==i?void 0:i.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==i?void 0:i.muted)||!1,autoplay:(null==i?void 0:i.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==i.skin,liveui:ie},L(Q,"autoplay",null==i?void 0:i.autoplay),L(Q,"normalizeAutoplay",(null==i?void 0:i.autoplay)&&!se),L(Q,"loop",(null==i?void 0:i.loop)||!1),L(Q,"audioPosterMode",null==i?void 0:i.audioPosterMode),L(Q,"html5",Re(Re({vhs:Re(Re({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==i?void 0:i.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==i||null===(G=i.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==i||null===(X=i.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==i||null===(K=i.customData)||void 0===K?void 0:K.nativeVideoTracks)&&{nativeVideoTracks:!1})),L(Q,"poster",oe),L(Q,"techOrder",ne),L(Q,"chromecast",{requestCustomDataFn:function(n){var t=M(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,r,l,a,s,u,c,d,v,m=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[m]&&null!=e&&e[m].drmEnabled){p.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;p.licenseUrl=f;var h=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];p.licenseToken=h}var g=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=g;var w=null==e||null===(r=e[m])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;p.duration=w;var y=null==e||null===(a=e[m])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=y;var b=null==e||null===(u=e[m])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(d=e[m])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)}}),Q);if(!N.getPlayers()[e])var ce=N(e,ue,function(){var n=B(_.mark((function n(){var a,s,u,c,d,v,m,p,f,h,g,w,b,k,O,j,T,I,P,S,R,E,A;return _.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ce),console.log(N.VERSION),console.log(N.getPlugins()),n.next=5,le(i);case 5:if(re&&r.resolve(Re({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Y}:{response:Y})),x(e),/Android/i.test(navigator.userAgent)&&(N.options.vhs.overrideNative=!0),k=null===(a=Y)||void 0===a||null===(s=a[te])||void 0===s?void 0:s.drmEnabled,O=null===(u=Y)||void 0===u||null===(c=u[te])||void 0===c||null===(d=c.liveDetails)||void 0===d?void 0:d.startOverTime,!k){n.next=13;break}return n.next=13,Se();case 13:ie&&ae(e,O),!se||null!=i&&null!==(v=i.customData)&&void 0!==v&&v.disableAds||D(e,se,Y),j=t(Y,e),console.log(j),null!=i&&i.nearestClusterUrl&&(j=C(j,i.nearestClusterUrl)),j?o(e,j):(r.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Y}),l(e,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Y)||void 0===m||null===(p=m[te])||void 0===p||null===(f=p.contentDetails)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0||(null===(g=Y)||void 0===g||null===(w=g[te])||void 0===w||null===(b=w.closedCaptions)||void 0===b?void 0:b.length)>0)&&(A=(null===(I=Y)||void 0===I||null===(P=I[te])||void 0===P||null===(S=P.contentDetails)||void 0===S?void 0:S.closedCaptions)||(null===(R=Y)||void 0===R||null===(E=R[te])||void 0===E?void 0:E.closedCaptions),T=A.filter((function(e){return"VTT"===e.format})),$(e,T)),null!=i&&i.disableControls?y(e):Te(e,Re(Re(Re({},i),ue),{},{liveVideo:re,isDvrEnabled:ie,res:Y,sres:ee})),je(e,Re(Re(Re({},i),ue),{},{liveVideo:re}),r,{res:Y,sres:ee});case 22:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Ae(){return{loadVideoInstantly:c,onTimeUpdate:J,getVideoDuration:G,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=B(_.mark((function n(t,o){var r,l,a,s,u,c,d,v,m,p,h,g,w,y,b,D,C,x,B,L,N,M,q,F,J,G;return _.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!f(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,h=null==e?void 0:e.asat,g=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,w=null==e?void 0:e.videoId,y=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,window.videoId=w,b=null==e?void 0:e.token,!I(e)){n.next=15;break}if(P().set(null==e?void 0:e.refreshToken),b&&!S(b)){n.next=14;break}return o({status:!1,msg:"".concat(b?"Token is expired !":"Missing Authorization Token"),response:{token:b}}),n.abrupt("return");case 14:Ie=JSON.parse(atob(b.split(".")[1]));case 15:return e.isAnonymousUser=!(null===(a=Ie)||void 0===a||!a.anonymousId),e.siteOwner=(null===(s=Ie)||void 0===s?void 0:s.site)||null,e.userId=(null===(u=Ie)||void 0===u?void 0:u.userId)||null,window.sessionStorage.setItem("uid",null===(c=Ie)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("vlp_token",b),D=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,C=null==e?void 0:e.airplay,x=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(B=null==e?void 0:e.errors)&&(window.customErrors=B),window.customData=null==e?void 0:e.customData,te(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),T.set(e.apiBaseUrl),null!=e&&e.skin&&!U(e.skin)||(e.skin="VL_ONE"),n.next=33,Pe();case 33:C&&"Safari"==z()&&Promise.resolve().then((function(){return De})).then((function(e){e.importAirplay()})),x&&ie("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then((function(){return R(x)})).catch((function(e){})),(L=null===(m=document)||void 0===m?void 0:m.getElementById("".concat(D)))&&L.addEventListener("contextmenu",(function(e){return e.preventDefault()})),p?(M={directPlaybackUrl:p,id:N="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},h?k(N,b).then((function(n){Ee(D,{res:Re(Re({},n),M)},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,N)})):Ee(D,{res:M},e,{resolve:t,reject:o})):y?(F=sessionStorage.getItem("season-idx")||0,V.set(parseInt(F)),J=null==e||null===(q=e.series)||void 0===q?void 0:q.id,E(J,b).then((function(n){var r,l,a,s=n.data,u=n.data.seasons;H(u);var c=w||(null==u||null===(r=u[0])||void 0===r||null===(l=r.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);Ce(J,b),k(c,b).then((function(n){var r,l,a;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,i(n.data),Ee(D,{res:null==n?void 0:n.data,sres:s},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}))})).catch((function(e){j(e,D,o)}))):g?(G=null==e?void 0:e.epg,A(G,b).then((function(n){var i=null==n?void 0:n.data;i.contentType="linearchannel",i.channelId=null==G?void 0:G.channelId,Ee(D,{res:i},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}))):k(w,b).then((function(n){var r,l,a,s;window.contentType=null==n||null===(r=n.data)||void 0===r||null===(l=r.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,i(null==n?void 0:n.data);var u,c=null==n?void 0:n.data;if(null!=e&&e.watchHistory&&null!=e&&null!==(s=e.watchHistory)&&void 0!==s&&s.enable)if((null===(u=e.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var d,v,m,p=fe((null===(d=e.watchHistory)||void 0===d?void 0:d.profileId)||"",w,null==e?void 0:e.siteOwner);if(p&&p.length)e.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,e.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;c.contentType="video",Ee(D,{res:c},e,{resolve:t,reject:o})}else O(w,b).then((function(n){var i,r,l,a,s,u;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==n?void 0:n.data)),e.watchHistoryResumeTime=(null==n||null===(s=n.data)||void 0===s?void 0:s.watchedTime)||null,e.watchedPercentage=(null==n||null===(u=n.data)||void 0===u?void 0:u.watchedPercentage)||null,c.contentType="video",Ee(D,{res:c},e,{resolve:t,reject:o})})).catch((function(n){var i,r,l,a;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(n)),Ee(D,{res:c},e,{resolve:t,reject:o})}));else Ee(D,{res:c},e,{resolve:t,reject:o})})).catch((function(e){j(e,D,o,w)}));case 38:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ee,skip:d,getPlayer:M,play:v,pause:m,detectBrowser:z,rewind:p,loadVideo:o,seekToTimeStamp:K,isPlayerInitialised:f,load:h,authenticateLC:g,dispose:w,enableCaptions:W,disableCaptions:Y,getCaptions:Z,playSelectedResolution:ne,getSource:t,setVolume:he,getVolume:ge,disableControls:y,setPlaybackSpeed:Q,getEntitlementData:b}}export{Ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{h as s,f as i,i as l}from"./icons-79ad4d7d.js";import{n as c,p as m}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{h as s,f as i,i as l}from"./icons-79ad4d7d.js";import{n as c,p as m}from"./generic-814f35ca.js";import{e as d,g as p}from"./skin-56b35647.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-2d8c00f4.js";import"@babel/runtime/helpers/toConsumableArray";function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var h=n.getComponent("Component"),v=function(){r(b,h);var v,f,y=(v=b,f=u(),function(){var e,t=o(v);if(f){var r=o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function b(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(r=y.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(b,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.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=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var a=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),r.style.overflow="hidden",n.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=n.dom.createEl("div",{className:"stream-selector-head"}),o=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),u=n.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,a=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=n.dom.$$(".stream"),o=0;o<r.length;o++)r[o].style.border="none",r[o].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var o=document.createElement("img");o.className="stream-thumbnail-image",o.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),o.alt="No Thumbnail Available",a.append(o),n.dom.appendContent(u,a),n.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);n.dom.appendContent(a,o),n.dom.appendContent(a,s),n.dom.appendContent(e,a),n.dom.appendContent(e,d),p(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),b}();export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import s from"video.js";import{h as n,f as i,i as l}from"./icons-79ad4d7d.js";import{n as c,p as m}from"./generic-814f35ca.js";import{e as d,s as p,j as u}from"./skin-56b35647.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-2d8c00f4.js";import"@babel/runtime/helpers/toConsumableArray";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var h=s.getComponent("Component"),f=function(){a(g,h);var f,y,b=(f=g,y=v(),function(){var e,t=o(f);if(y){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return r(this,e)});function g(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,g),(a=b.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(g,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(n())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-92ab3e07.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,t=this.el(),a=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=a.classList)&&void 0!==r&&r.contains("hidden")?(d(),a.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"))};var r=document.getElementById(this.playerId);if(r){var o=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);a.style.height="".concat(o,"px"),r.style.overflow="hidden",s.dom.appendContent(t,a),this.addFunctionality(a)}}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=s.dom.createEl("div",{className:"stream-selector-head"}),o=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),a.classList.remove("open")};for(var n=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=s.dom.createEl("div",{className:"stream-selector-content"}),p=s.dom.createEl("div",{className:"stream-tray"}),v=function(e){var a,r,o,n=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(n.classList.add("selected"),n.style.border="2px solid #D2393B"),n.onclick=function(){for(var a=s.dom.$$(".stream"),r=0;r<a.length;r++)a[r].style.border="none",a[r].classList.remove("selected");n.classList.add("selected"),n.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).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 i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img)||(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.fallbackImage)),n.append(i),s.dom.appendContent(p,n),s.dom.appendContent(d,p)},h=0;h<this.streams.length;h++)v(h);s.dom.appendContent(r,o),s.dom.appendContent(r,n),s.dom.appendContent(e,r),s.dom.appendContent(e,d),u(this.playerId,e)}}]),g}();export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=".video-js .stream-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.video-js .stream-selection .stream-container.hidden{\n right: -250px;\n}\n\n.video-js .stream-selection .stream-selector-icon {\n cursor: pointer;\n}\n\n.video-js .stream-selection .stream-container {\n position: absolute;\n width: 250px;\n right: 0px;\n bottom: 0px;\n background: #000000cf !important;\n z-index: 1;\n transition: right 300ms ease-out;\n}\n\n\n.video-js .stream-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.video-js .stream-selection .stream-container .stream-tray{\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n}\n\n.video-js .stream-selection .stream-container .stream-selector-head{\n display: flex;\n align-items: center;\n margin-bottom: 20px;\n}\n\n.video-js .stream-selection .stream-container .stream-selector-head .stream-selector-title {\n text-align: left;\n background: #000;\n border-bottom: 1px solid #484848;\n width: 100%;\n padding: 0 3px 0 18px;\n font-size: 13px;\n line-height: 38px;\n}\n\n.video-js .stream-selection .stream-container .stream-selector-head .stream-selector-cross-icon {\n cursor: pointer;\n position: absolute;\n right: 10px;\n}\n\n.video-js .stream-selection .stream-container .stream-selector-content {\n height: 90%;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n scrollbar-color: #666 #444;\n width: 100%;\n overflow: hidden auto;\n}\n\n.video-js .stream-selection .stream-container .stream-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.video-js .stream-selection .stream-container .stream-selector-content {\n /* -ms-overflow-style: none; */\n /* IE and Edge */\n /* scrollbar-width: none; */\n /* Firefox */\n}\n\n/* .stream-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n} */\n\n.video-js .stream-selection .stream-container .stream-tray .stream{\n position: relative;\n height: 130px;\n width: 215px;\n background-repeat: no-repeat;\n background-size: contain;\n margin-bottom: 10px;\n}\n\n.video-js .stream-selection .stream-container .stream-tray .stream>svg{\n display: none;\n}\n\n\n.video-js .stream-selection .stream-container .stream-tray .stream.selected >svg{\n display: block;\n position: absolute;\n right: 0;\n top: -1px;\n}\n\n/* .parent { */\n /* margin: 21px 52px 23px 34px; */\n/* } */\n\n.video-js .stream-selection .stream-container .stream-tray .stream:hover {\n cursor: pointer;\n}\n\n.video-js .stream-selection .stream-container .stream-tray .stream .stream-thumbnail-image{\n width: 100%;\n height: 100%;\n}\n\n\n@media (max-width:600px){\n .video-js .stream-selection .stream-container .stream-selector-head{\n margin-bottom: 10px !important;\n }\n .video-js .stream-selection .stream-container .stream-selector-head .stream-selector-cross-icon > svg{\n height: 12px;\n }\n .video-js .stream-selection .stream-container .stream-selector-head .stream-selector-title{\n font-size: 14px;\n }\n .video-js .stream-selection .stream-container .stream-selector-content{\n height: 75%;\n }\n .video-js .stream-selection .stream-container {\n width: 200px !important;\n }\n .video-js .stream-selection .stream-container .stream-tray .stream{\n height: 89px !important;\n width: 167px !important;\n }\n .selected-stream{\n height: 18px;\n width: 20px;\n }\n}\n";export{e 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-79ad4d7d.js";import{n 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-79ad4d7d.js";import{n as s,b as a}from"./generic-814f35ca.js";import{d}from"./skin-56b35647.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-2d8c00f4.js";import"@babel/runtime/helpers/toConsumableArray";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var u=r.getComponent("Component"),c=function(){n(c,u);var s,a,d=(s=c,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function c(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,c),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(c,[{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")}))}}]),c}(),m=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=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},f=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}},h=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},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).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{c as default,m 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 o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,f as r}from"./icons-79ad4d7d.js";import{n as c,N 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 o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,f as r}from"./icons-79ad4d7d.js";import{n as c,N as d}from"./generic-814f35ca.js";import{a as p}from"./autoNextVideo-2c052473.js";import{e as m,g as u}from"./skin-56b35647.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"js-cookie";import"ua-parser-js";import"./captions-2d8c00f4.js";import"./util-045fb3fd.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){o(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var n,o,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(n=a.playlist)||void 0===n?void 0:n.content,i.cb=(null==a||null===(o=a.playlist)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return n(g,[{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")?(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=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),m=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,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.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(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(n.playerId,n.videos[t].id).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,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var o=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px")}}))}}]),g}();export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./skin-
|
|
1
|
+
import{g as l}from"./skin-56b35647.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 d,v,e=null==o||null===(d=o.tech_)||void 0===d||null===(v=d.vhs)||void 0===v?void 0:v.representations();(null==e?void 0:e.length)>0&&(t=null==e?void 0:e.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};
|