@viewlift/player-backup 1.0.128-backup → 1.0.130-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/bundle.css +8 -2
- package/cjs/features-6572482d.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/multicamv2-6a90540f.js +1 -0
- package/cjs/multicamv2-76d8530b.js +1 -0
- package/cjs/{playlist-9e6e42a9.js → playlist-549b3b50.js} +1 -1
- package/cjs/{series-b9ff6f6e.js → series-de6875c5.js} +1 -1
- package/cjs/series-v2-3fc7104f.js +1 -0
- package/cjs/series-v2-fd7485a5.js +1 -0
- package/cjs/{skin-2839ab53.js → skin-737b99ce.js} +1 -1
- package/cjs/{skin-f1c386aa.js → skin-b71fc9f4.js} +1 -1
- package/cjs/{skin-58829249.js → skin-bca424d1.js} +1 -1
- package/cjs/{skin-6b59b752.js → skin-df960279.js} +1 -1
- package/cjs/videoSelector-b3c204d8.js +1 -0
- package/cjs/videoSelector-fcdf11eb.js +1 -0
- package/esm/bundle.css +8 -2
- package/esm/features-8d37589f.js +1 -0
- package/esm/index.js +1 -1
- package/esm/multicamv2-540e4a9e.js +1 -0
- package/esm/multicamv2-d006cffa.js +1 -0
- package/esm/series-v2-4cdbf9b1.js +1 -0
- package/esm/series-v2-b0e9deee.js +1 -0
- package/esm/{series-v2-1bcf61b1.js → series-v2-dbd5d5ec.js} +1 -1
- package/esm/{settings-icon-d476eb7c.js → settings-icon-4b9689a4.js} +1 -1
- package/esm/skin-3d7d2afb.js +1 -0
- package/esm/{skin-2b40be0d.js → skin-8b598f71.js} +1 -1
- package/esm/{skin-2f09c77e.js → skin-93f9a9a0.js} +1 -1
- package/esm/{skin-2d9f6387.js → skin-ac467e80.js} +1 -1
- package/esm/{skin-705779f4.js → skin-ae708803.js} +1 -1
- package/esm/videoSelector-8e258d45.js +1 -0
- package/esm/videoSelector-dd04ee8b.js +1 -0
- package/package.json +1 -1
- package/cjs/features-eb660010.js +0 -1
- package/esm/features-ef70c938.js +0 -1
- package/esm/skin-b9042825.js +0 -1
package/cjs/bundle.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
8
7
|
height: 0.7em;
|
|
9
8
|
position: absolute;
|
|
@@ -39,6 +38,9 @@
|
|
|
39
38
|
.vjs-button>.vjs-icon-placeholder:before {
|
|
40
39
|
position: relative !important;
|
|
41
40
|
}
|
|
41
|
+
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
42
44
|
|
|
43
45
|
.vjs-button>.vjs-icon-placeholder:before {
|
|
44
46
|
font-size: 2em !important;
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
|
|
119
|
+
|
|
117
120
|
.video-js.vjs-quality-menu {
|
|
118
121
|
display: block;
|
|
119
122
|
}
|
|
@@ -212,6 +215,9 @@
|
|
|
212
215
|
|
|
213
216
|
|
|
214
217
|
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
215
221
|
.video-js .multicamera-parent.default{
|
|
216
222
|
height: 345px;
|
|
217
223
|
position: absolute;
|
|
@@ -423,7 +429,7 @@
|
|
|
423
429
|
margin: auto;
|
|
424
430
|
font-size: 6em;
|
|
425
431
|
line-height: 1.3em;
|
|
426
|
-
|
|
432
|
+
transform: none !important;
|
|
427
433
|
}
|
|
428
434
|
|
|
429
435
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./beacon-ca6bdec3.js"),s=require("./renditions-d4a3642f.js"),d=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(e){var t=p();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-6205c237.js")})).then((function(r){var n,o,l,s,d=r.default,c=a.getPlayer(e);i.registerComponent("captionSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-685f96f0.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-6a90540f.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-19833648.js")})).then((function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-549b3b50.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-4eae5e79.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),d=s.getRenditions(e);(null==d?void 0:d.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:d},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=h(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var d=a.parseSvgString(l);return o.append(d),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-de6875c5.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),d=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},c=0;c<s.length;c++)d(c)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-8b6f8385.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",u({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-3fc7104f.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",u({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-7099e038.js")})).then((function(r){var n,o,l,s,d=r.default,c=a.getPlayer(e);i.registerComponent("settingsSelector",d),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=h(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var d=a.parseSvgString(l);return o.append(d),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=h(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-186cabf3.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-b3c204d8.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
package/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("./beacon-ca6bdec3.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),i=require("video.js");require("videojs-contrib-quality-menu");var r=require("@babel/runtime/helpers/typeof"),l=require("./util-06c5f98b.js"),a=require("./renditions-d4a3642f.js"),s=require("./resolution-4eae5e79.js"),u=require("./localisation-56e0a999.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var d,c,v=function(e){return new Promise((function(n,t){if(p(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)}}))},p=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},m=function(){var t=n(o.mark((function n(t){var r,l,a,s;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(l=e.getPlayer(null==t?void 0:t.playerId),console.log(t),null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=5,import("@silvermine/videojs-chromecast");case 5:return s=n.sent,n.prev=6,n.next=9,v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(6),console.log("Error",n.t0);case 14:return n.prev=14,s.default(i),n.finish(14);case 17:null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}}),n,null,[[6,11,14,17]])})));return function(e){return t.apply(this,arguments)}}(),f=function(n,t){var o=e.getPlayer(n);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(e){var t,o,r,l,a,s=this.el(),u=i.dom.getPointerPosition(s,e).x;i.getPlayer(n).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function g(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 h(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?g(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var y=[],w=0,b=null;function k(n,o,i){var r,l,a,s,u,v=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c=(null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var p=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,m=Math.floor(n.currentTime()),f=Math.floor(n.duration()),g=null==o||null===(a=o.watchHistory)||void 0===a?void 0:a.xapiKey,y=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,k=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,O=Math.floor(n.currentTime()),I=v?100:Math.floor(m/f*100),T={};k?function(n,o,i){var r=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return h(h({},e),{},t({},n,u[n]))}),{}),v=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===d}));v<0?l.push(h(h({content:c},n),{},{addedDate:a,updateDate:a})):l[v]=h(h(h({},l[v]),n),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(T={completed:v,watchedTime:O,watchedPercentage:I},p,o.siteOwner):("v1"==c?T={videoId:d,watchedTime:O,watchedPercentage:I,siteOwner:o.siteOwner,userId:o.userId,xApiKey:g}:"v2"==c&&(T=h(h({videoId:d,watchedTime:O,watchedPercentage:I,doneWatching:v,profileId:p},b&&{seriesId:b}),y&&{originalObjectId:y})),e.saveWatchHistory(T,c).then((function(e){})).catch((function(e){}))),w=m+i}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function O(e,n,t){var o=P(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 I=function(n,t,o){var i=e.getPlayer(n);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var r=parseFloat(t)/100;i.volume(r),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(n,"'")})},T=function(n){var t=e.getPlayer(n);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(n,"'")},j=!1,S=function(n,t){var o,i,r=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[r])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!j){var l=C(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),j=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function C(e,n,t){if(Array.isArray(e))return e.map((function(e){return C(e,n,t)}));if(null!==e&&"object"===r(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]=C(e[i],n,t)})),o}return e}function D(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 x(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?D(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var E=function(n,t,o,i){var r,l,a=i.res,s=i.sres,u=e.getPlayer(n),c=(null==a?void 0:a.contentType)||"video",v=(null==a||null===(r=a[c])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;e.setCurrentVideo(a),u&&(u.on("loadstart",(function(){v?o.resolve({status:!0,msg:"Video Loaded",response:a}):o.resolve(x({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a}))})),u.on("loadeddata",(function(){var o,i;(null==u||!u.muted())&&I(n,sessionStorage.getItem("volume")||"100");var r=e.getCurrentVideo();if(e.clearError(),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 l,s,c=x(x({},t),a);!function(n,t,o){var i,r,l;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(b=null==t||null===(r=t.series)||void 0===r?void 0:r.id),y=[],w=0,d=o;var a=(null==t||null===(l=t.watchHistory)||void 0===l?void 0:l.interval)||30,s=e.getPlayer(n);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());y.includes(w)||(e==w?(y.push(e),k(s,t,a)):e>w&&(w=e+a))})),s.one("ended",(function(){k(s,t,a,!0)})))}(n,c,null==r||null===(l=r.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.id)}})),u.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];u.trigger("subtitlechanged",n)})),u.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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,m=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var f,g=m.getMediaSession(),h=g.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(f)}})),u.tech_.on("retryplaylist",(function(){v&&S(a,n)})),u.on("error",(function(){var t,i;(console.log("ERROR",u.error(),u.error().code),4===u.error().code&&v)?S(a,n):(e.handleError(n,(null==u||null===(t=u.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured",response:a}))})),u.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o,i,r,l=null===(o=e.getCurrentVideo())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap(),s=(null==a?void 0:a.get(l))||{t:0,p:0},d=s.t,c=s.p;d&&c<95&&setTimeout((function(){u.currentTime(d)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(v){u.currentSource();for(var e=u.textTracks(),n=e.length-1;n>=0;n--)u.removeRemoteTextTrack(e[n])}})))},V=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-58829249.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-76e6c431.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-6b59b752.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-f1c386aa.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-a13cedfc.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-2839ab53.js")})).then((function(t){t.initialiseSkin(e,n)}))};var R,q=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),v("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then((function(){})).catch((function(e){return console.log(e)}))]);case 2:console.log(undefined);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:q,loadEMELibrary:A}),B=function(n,t){var o=new Map;e.getSeriesWatchHistory({videoId:n,token:t}).then((function(n){n.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),e.setSeriesWatchMap(o)})).catch((function(e){return console.log(e)}))};function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?L(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var M=function(r,l,a,s){var u,d,c,v,p,g,h,y,w,b,k,P,O,I,T,j,S,C,D,x,R,q,H,B,L,M,N,U,z,F,J,W,G,K=l.res,X=void 0===K?null:K,Q=l.sres,Y=void 0===Q?null:Q;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(p=v.getInstance())||void 0===p||p.S;var Z=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],$=(null===(g=X)||void 0===g?void 0:g.contentType)||"video",ee=e.impolicy16x9(null===(h=X)||void 0===h||null===(y=h[$])||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||e.impolicy16x9(null===(b=X)||void 0===b||null===(k=b[$])||void 0===k||null===(P=k.gist)||void 0===P||null===(O=P.imageGist)||void 0===O?void 0:O.r16x9),ne=(null===(I=X)||void 0===I||null===(T=I[$])||void 0===T||null===(j=T.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,te=(null===(S=X)||void 0===S||null===(C=S[$])||void 0===C||null===(D=C.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!0,oe=(null===(x=X)||void 0===x||null===(R=x.ads)||void 0===R||null===(q=R.preRoll)||void 0===q||null===(H=q.adTags)||void 0===H||null===(B=H.web)||void 0===B?void 0:B.active)&&(null===(L=X)||void 0===L||null===(M=L.ads)||void 0===M||null===(N=M.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(z=U.web)||void 0===z?void 0:z.url);X=_(_({},X),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ie=(G={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==a.skin,liveui:ne},t(G,"autoplay",null==a?void 0:a.autoplay),t(G,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!oe),t(G,"loop",(null==a?void 0:a.loop)||!1),t(G,"audioPosterMode",null==a?void 0:a.audioPosterMode),t(G,"html5",_(_({vhs:_(_({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),t(G,"poster",ee),t(G,"techOrder",Z),t(G,"chromecast",{requestCustomDataFn:function(n){var t=e.getPlayer(r),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,d,c,v,p=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){m.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var g=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=g}var h=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var y=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=y;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=b,m.subTitles=t,m.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(X,n,o)}}),G);if(!i.getPlayers()[r])var re=i(r,ie,function(){var t=n(o.mark((function n(){var t,l,u,d,c,v,p,g,h,y,w,b,k,P,O,I,T,j,S,C,D,x,R;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(re),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,m(a);case 5:if(te&&s.resolve(_({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:X}:{response:X})),e.inititateBeacon(r),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),P=null===(t=X)||void 0===t||null===(l=t[$])||void 0===l?void 0:l.drmEnabled,O=null===(u=X)||void 0===u||null===(d=u[$])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!P){n.next=13;break}return n.next=13,A();case 13:ne&&f(r,O),!oe||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,oe,X),I=e.getSource(X,r),console.log(I),null!=a&&a.nearestClusterUrl&&(I=e.getUpdatedClusterSource(I,a.nearestClusterUrl)),I?e.loadVideo(r,I):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),e.handleError(r,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=X)||void 0===p||null===(g=p[$])||void 0===g||null===(h=g.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(w=X)||void 0===w||null===(b=w[$])||void 0===b||null===(k=b.closedCaptions)||void 0===k?void 0:k.length)>0)&&(R=(null===(j=X)||void 0===j||null===(S=j[$])||void 0===S||null===(C=S.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(D=X)||void 0===D||null===(x=D[$])||void 0===x?void 0:x.closedCaptions),T=R.filter((function(e){return"VTT"===e.format})),e.addCaptions(r,T)),null!=a&&a.disableControls?e.disableControls(r):V(r,_(_(_({},a),ie),{},{liveVideo:te,isDvrEnabled:ne,res:X,sres:Y})),E(r,_(_(_({},a),ie),{},{liveVideo:te}),s,{res:X,sres:Y});case 22:case"end":return n.stop()}}),n)})));return function(){return t.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(t){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=n(o.mark((function n(i,r){var l,a,s,d,c,p,m,f,g,h,y,w,b,k,P,I,T,j,S,C,D,x,E,V,A,L,N,U,z,F;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(w=(null==t?void 0:t.videoSourceUrl)||!1,b=null==t?void 0:t.asat,k=(null==t||null===(l=t.epg)||void 0===l?void 0:l.enable)||!1,P=null==t?void 0:t.videoId,I=(null==t||null===(a=t.series)||void 0===a?void 0:a.enable)||!1,window.videoId=P,T=null==t?void 0:t.token,!e.token_authentication_enabled(t)){n.next=15;break}if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),T&&!e.isTokenExpired(T)){n.next=14;break}return r({status:!1,msg:"".concat(T?"Token is expired !":"Missing Authorization Token"),response:{token:T}}),n.abrupt("return");case 14:R=JSON.parse(atob(T.split(".")[1]));case 15:return window.siteId=null===(s=R)||void 0===s?void 0:s.siteId,window.siteName=null===(d=R)||void 0===d?void 0:d.site,t.isAnonymousUser=!(null===(c=R)||void 0===c||!c.anonymousId),t.siteOwner=(null===(p=R)||void 0===p?void 0:p.site)||null,t.userId=(null===(m=R)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(f=R)||void 0===f?void 0:f.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",T),j=null==t?void 0:t.playerId,S=t.chromecastReceiverId=null!=t&&t.series?null:null==t?void 0:t.chromecastReceiverId,t.chromecastReceiverId=S,C=null==t?void 0:t.airplay,D=null==t?void 0:t.apiBaseUrl,x=(null==t||null===(g=t.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==t?void 0:t.errors)&&(window.customErrors=E),window.customData=null==t?void 0:t.customData,u.setLocalisation(null==t||null===(h=t.customData)||void 0===h?void 0:h.localisation),D&&(window.playerEntitlementUrl=D),null!=t&&t.skin&&!e.isNotAValidSkin(t.skin)||(t.skin="VL_ONE"),n.next=37,q();case 37:C&&"Safari"==e.detectBrowser()&&Promise.resolve().then((function(){return H})).then((function(e){e.importAirplay()})),x&&v("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then((function(){return e.runGtag(x)})).catch((function(e){})),(V=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(j)))&&V.addEventListener("contextmenu",(function(e){return e.preventDefault()})),w?(L={directPlaybackUrl:w,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?e.getVideoDetails(A,T).then((function(e){M(j,{res:_(_({},e),L)},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,A)})):M(j,{res:L},t,{resolve:i,reject:r})):I?(U=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(U)),z=null==t||null===(N=t.series)||void 0===N?void 0:N.id,e.getSeriesDetails(z,T).then((function(n){var o,l,a,s=n.data,u=n.data.seasons;e.setCurrentSeries(u);var d=P||(null==u||null===(o=u[0])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);B(z,T),e.getVideoDetails(d,T).then((function(n){var o,l,a;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(n.data),M(j,{res:null==n?void 0:n.data,sres:s},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}))})).catch((function(n){e.initiateErrorHandling(n,j,r)}))):k?(F=null==t?void 0:t.epg,e.getLinearChannelDetails(F,T).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==F?void 0:F.channelId,M(j,{res:n},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}))):e.getVideoDetails(P,T).then((function(n){var o,l,a,s;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(null==n?void 0:n.data);var u,d=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,m=O((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",P,null==t?void 0:t.siteOwner);if(m&&m.length)t.watchHistoryResumeTime=(null===(v=m[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=m[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",M(j,{res:d},t,{resolve:i,reject:r})}else e.getVideoInfo(P,T).then((function(e){var n,o,l,a,s,u;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",M(j,{res:d},t,{resolve:i,reject:r})})).catch((function(e){var n,o,l,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(e)),M(j,{res:d},t,{resolve:i,reject:r})}));else M(j,{res:d},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}));case 42:case"end":return n.stop()}}),n)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:e.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:e.enableCaptions,disableCaptions:e.disableCaptions,getCaptions:e.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:I,getVolume:T,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
1
|
+
"use strict";require("video.js/dist/video-js.min.css");var e=require("./beacon-ca6bdec3.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/defineProperty"),o=require("@babel/runtime/regenerator"),i=require("video.js");require("videojs-contrib-quality-menu");var r=require("@babel/runtime/helpers/typeof"),l=require("./util-06c5f98b.js"),a=require("./renditions-d4a3642f.js"),s=require("./resolution-4eae5e79.js"),u=require("./localisation-56e0a999.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf");var d,c,v=function(e){return new Promise((function(n,t){if(p(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)}}))},p=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},m=function(){var t=n(o.mark((function n(t){var r,l,a,s;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(l=e.getPlayer(null==t?void 0:t.playerId),console.log(t),null!=t&&null!==(r=t.series)&&void 0!==r&&r.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=5,import("@silvermine/videojs-chromecast");case 5:return s=n.sent,n.prev=6,n.next=9,v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(6),console.log("Error",n.t0);case 14:return n.prev=14,s.default(i),n.finish(14);case 17:null!==(a=window)&&void 0!==a&&a.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e.detectBrowser()?null==l||l.airPlay({addButtonToControlBar:"new"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}}),n,null,[[6,11,14,17]])})));return function(e){return t.apply(this,arguments)}}(),f=function(n,t){var o=e.getPlayer(n);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(e){var t,o,r,l,a,s=this.el(),u=i.dom.getPointerPosition(s,e).x;i.getPlayer(n).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var d=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(l=r.CastContext)||void 0===l||null===(a=l.getInstance())||void 0===a?void 0:a.S;if(console.log(d),d&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),p=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=p*u,v.seek()}}))};function g(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 h(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?g(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):g(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var y=[],w=0,b=null;function k(n,o,i){var r,l,a,s,u,v=arguments.length>3&&void 0!==arguments[3]&&arguments[3];c=(null==o||null===(r=o.watchHistory)||void 0===r?void 0:r.apiVersion)||"v1";var p=null==o||null===(l=o.watchHistory)||void 0===l?void 0:l.profileId,m=Math.floor(n.currentTime()),f=Math.floor(n.duration()),g=null==o||null===(a=o.watchHistory)||void 0===a?void 0:a.xapiKey,y=(null==o||null===(s=o.video)||void 0===s?void 0:s.originalObjectId)||null,k=(null==o||null===(u=o.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,O=Math.floor(n.currentTime()),I=v?100:Math.floor(m/f*100),T={};k?function(n,o,i){var r=o?"watchhistory-data-".concat(o):"watchhistory-data-guest-".concat(i),l=P(r),a=(new Date).getTime(),s=e.getCurrentVideo(),u=(null==s?void 0:s.video)||{},c=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce((function(e,n){return h(h({},e),{},t({},n,u[n]))}),{}),v=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===d}));v<0?l.push(h(h({content:c},n),{},{addedDate:a,updateDate:a})):l[v]=h(h(h({},l[v]),n),{},{updateDate:a});localStorage.setItem("".concat(r),JSON.stringify(l))}(T={completed:v,watchedTime:O,watchedPercentage:I},p,o.siteOwner):("v1"==c?T={videoId:d,watchedTime:O,watchedPercentage:I,siteOwner:o.siteOwner,userId:o.userId,xApiKey:g}:"v2"==c&&(T=h(h({videoId:d,watchedTime:O,watchedPercentage:I,doneWatching:v,profileId:p},b&&{seriesId:b}),y&&{originalObjectId:y})),e.saveWatchHistory(T,c).then((function(e){})).catch((function(e){}))),w=m+i}function P(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function O(e,n,t){var o=P(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 I=function(n,t,o){var i=e.getPlayer(n);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var r=parseFloat(t)/100;i.volume(r),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(n,"'")})},T=function(n){var t=e.getPlayer(n);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(n,"'")},j=!1,S=function(n,t){var o,i,r=(null==n?void 0:n.contentType)||"video";if(((null==n||null===(o=n[r])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)&&!j){var l=C(n,"videoAssets","secondaryVideoAssets"),a=e.getSource(l,t);return a&&e.loadVideo(t,a),j=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function C(e,n,t){if(Array.isArray(e))return e.map((function(e){return C(e,n,t)}));if(null!==e&&"object"===r(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]=C(e[i],n,t)})),o}return e}function D(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 x(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?D(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):D(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var E=function(n,t,o,i){var r,l,a=i.res,s=i.sres,u=e.getPlayer(n),c=(null==a?void 0:a.contentType)||"video",v=(null==a||null===(r=a[c])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;e.setCurrentVideo(a),u&&(u.on("loadstart",(function(){v?o.resolve({status:!0,msg:"Video Loaded",response:a}):o.resolve(x({status:!0,msg:"Player Initialised"},s?{seriesResponse:s,response:a}:{response:a}))})),u.on("loadeddata",(function(){var o,i;(null==u||!u.muted())&&I(n,sessionStorage.getItem("volume")||"100");var r=e.getCurrentVideo();if(e.clearError(),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 l,s,c=x(x({},t),a);!function(n,t,o){var i,r,l;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(b=null==t||null===(r=t.series)||void 0===r?void 0:r.id),y=[],w=0,d=o;var a=(null==t||null===(l=t.watchHistory)||void 0===l?void 0:l.interval)||30,s=e.getPlayer(n);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());y.includes(w)||(e==w?(y.push(e),k(s,t,a)):e>w&&(w=e+a))})),s.one("ended",(function(){k(s,t,a,!0)})))}(n,c,null==r||null===(l=r.video)||void 0===l||null===(s=l.gist)||void 0===s?void 0:s.id)}})),u.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];u.trigger("subtitlechanged",n)})),u.on("subtitlechanged",(function(e,n){var t,o,i,r,l,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=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,m=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var f,g=m.getMediaSession(),h=g.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(f)}})),u.tech_.on("retryplaylist",(function(){v&&S(a,n)})),u.on("error",(function(){var t,i;(console.log("ERROR",u.error(),u.error().code),4===u.error().code&&v)?S(a,n):(e.handleError(n,(null==u||null===(t=u.error())||void 0===t?void 0:t.message)||"Some error occured"),o.reject({status:!1,msg:(null==u||null===(i=u.error())||void 0===i?void 0:i.message)||"Some error occured",response:a}))})),u.one("play",(function(){var n;if(null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o,i,r,l=null===(o=e.getCurrentVideo())||void 0===o||null===(i=o.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id,a=e.getSeriesWatchMap(),s=(null==a?void 0:a.get(l))||{t:0,p:0},d=s.t,c=s.p;d&&c<95&&setTimeout((function(){u.currentTime(d)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){u.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),u.on("volumechange",(function(){var e=100*u.volume().toFixed(2);u.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),u.on("chromecastDisconnected",(function(){if(v){u.currentSource();for(var e=u.textTracks(),n=e.length-1;n>=0;n--)u.removeRemoteTextTrack(e[n])}})))},V=function(e,n){var t=null==n?void 0:n.skin;"default"==t?Promise.resolve().then((function(){return require("./skin-bca424d1.js")})).then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?Promise.resolve().then((function(){return require("./skin-76e6c431.js")})).then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?Promise.resolve().then((function(){return require("./skin-df960279.js")})).then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?Promise.resolve().then((function(){return require("./skin-b71fc9f4.js")})).then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?Promise.resolve().then((function(){return require("./skin-a13cedfc.js")})).then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&Promise.resolve().then((function(){return require("./skin-737b99ce.js")})).then((function(t){t.initialiseSkin(e,n)}))};var R,q=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),v("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)}}(),A=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){i.getPlugin("eme")||i.registerPlugin("eme",e.default)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then((function(e){v("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then((function(){e.default(i)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},loadAdsLibrary:q,loadEMELibrary:A}),B=function(n,t){var o=new Map;e.getSeriesWatchHistory({videoId:n,token:t}).then((function(n){n.data.map((function(e){o.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),e.setSeriesWatchMap(o)})).catch((function(e){return console.log(e)}))};function L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function _(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?L(Object(o),!0).forEach((function(n){t(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var M=function(r,l,a,s){var u,d,c,v,p,g,h,y,w,b,k,P,O,I,T,j,S,C,D,x,R,q,H,B,L,M,N,U,z,F,J,W,G,K=l.res,X=void 0===K?null:K,Q=l.sres,Y=void 0===Q?null:Q;null===(u=window)||void 0===u||null===(d=u.cast)||void 0===d||null===(c=d.framework)||void 0===c||null===(v=c.CastContext)||void 0===v||null===(p=v.getInstance())||void 0===p||p.S;var Z=null!=a&&a.chromecastReceiverId?["chromecast","html5"]:["html5"],$=(null===(g=X)||void 0===g?void 0:g.contentType)||"video",ee=e.impolicy16x9(null===(h=X)||void 0===h||null===(y=h[$])||void 0===y||null===(w=y.gist)||void 0===w?void 0:w.videoImageUrl)||e.impolicy16x9(null===(b=X)||void 0===b||null===(k=b[$])||void 0===k||null===(P=k.gist)||void 0===P||null===(O=P.imageGist)||void 0===O?void 0:O.r16x9),ne=(null===(I=X)||void 0===I||null===(T=I[$])||void 0===T||null===(j=T.liveDetails)||void 0===j?void 0:j.isDvrEnabled)||!1,te=(null===(S=X)||void 0===S||null===(C=S[$])||void 0===C||null===(D=C.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!0,oe=(null===(x=X)||void 0===x||null===(R=x.ads)||void 0===R||null===(q=R.preRoll)||void 0===q||null===(H=q.adTags)||void 0===H||null===(B=H.web)||void 0===B?void 0:B.active)&&(null===(L=X)||void 0===L||null===(M=L.ads)||void 0===M||null===(N=M.preRoll)||void 0===N||null===(U=N.adTags)||void 0===U||null===(z=U.web)||void 0===z?void 0:z.url);X=_(_({},X),{},{audioAssetSource:null==a?void 0:a.audioAssetSource});var ie=(G={controls:0!=(null==a?void 0:a.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==a?void 0:a.muted)||!1,autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==a.skin,liveui:ne},t(G,"autoplay",null==a?void 0:a.autoplay),t(G,"normalizeAutoplay",(null==a?void 0:a.autoplay)&&!oe),t(G,"loop",(null==a?void 0:a.loop)||!1),t(G,"audioPosterMode",null==a?void 0:a.audioPosterMode),t(G,"html5",_(_({vhs:_(_({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==a?void 0:a.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==a||null===(F=a.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==a||null===(J=a.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(W=a.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),t(G,"poster",ee),t(G,"techOrder",Z),t(G,"chromecast",{requestCustomDataFn:function(n){var t=e.getPlayer(r),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,d,c,v,p=(null==e?void 0:e.contentType)||"video",m={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){m.isDrmEnabled=!0;var f=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.serverURL;m.licenseUrl=f;var g=n.keySystemOptions&&n.keySystemOptions[0]&&n.keySystemOptions[0].options&&n.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=g}var h=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var y=null==e||null===(r=e[p])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.runtime;m.duration=y;var w=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;m.mediaTitle=w;var b=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return m.mediaImage=b,m.subTitles=t,m.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(X,n,o)}}),G);if(!i.getPlayers()[r])var re=i(r,ie,function(){var t=n(o.mark((function n(){var t,l,u,d,c,v,p,g,h,y,w,b,k,P,O,I,T,j,S,C,D,x,R;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(re),console.log(i.VERSION),console.log(i.getPlugins()),n.next=5,m(a);case 5:if(te&&s.resolve(_({status:!0,msg:"Player Initialised"},Y?{seriesResponse:Y,response:X}:{response:X})),e.inititateBeacon(r),/Android/i.test(navigator.userAgent)&&(i.options.vhs.overrideNative=!0),P=null===(t=X)||void 0===t||null===(l=t[$])||void 0===l?void 0:l.drmEnabled,O=null===(u=X)||void 0===u||null===(d=u[$])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!P){n.next=13;break}return n.next=13,A();case 13:ne&&f(r,O),!oe||null!=a&&null!==(v=a.customData)&&void 0!==v&&v.disableAds||e.initialiseAdvertisement(r,oe,X),I=e.getSource(X,r),console.log(I),null!=a&&a.nearestClusterUrl&&(I=e.getUpdatedClusterSource(I,a.nearestClusterUrl)),I?e.loadVideo(r,I):(s.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:X}),e.handleError(r,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(p=X)||void 0===p||null===(g=p[$])||void 0===g||null===(h=g.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null===(w=X)||void 0===w||null===(b=w[$])||void 0===b||null===(k=b.closedCaptions)||void 0===k?void 0:k.length)>0)&&(R=(null===(j=X)||void 0===j||null===(S=j[$])||void 0===S||null===(C=S.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(D=X)||void 0===D||null===(x=D[$])||void 0===x?void 0:x.closedCaptions),T=R.filter((function(e){return"VTT"===e.format})),e.addCaptions(r,T)),null!=a&&a.disableControls?e.disableControls(r):V(r,_(_(_({},a),ie),{},{liveVideo:te,isDvrEnabled:ne,res:X,sres:Y})),E(r,_(_(_({},a),ie),{},{liveVideo:te}),s,{res:X,sres:Y});case 22:case"end":return n.stop()}}),n)})));return function(){return t.apply(this,arguments)}}())};module.exports=function(){return{loadVideoInstantly:e.loadVideoInstantly,onTimeUpdate:l.onTimeUpdate,getVideoDuration:l.getVideoDuration,onVideoEnded:l.onVideoEnded,init:function(t){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var i=n(o.mark((function n(i,r){var l,a,s,d,c,p,m,f,g,h,y,w,b,k,P,I,T,j,S,C,D,x,E,V,A,L,N,U,z,F;return o.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.isPlayerInitialised(null==t?void 0:t.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(w=(null==t?void 0:t.videoSourceUrl)||!1,b=null==t?void 0:t.asat,k=(null==t||null===(l=t.epg)||void 0===l?void 0:l.enable)||!1,P=null==t?void 0:t.videoId,I=(null==t||null===(a=t.series)||void 0===a?void 0:a.enable)||!1,window.videoId=P,T=null==t?void 0:t.token,!e.token_authentication_enabled(t)){n.next=15;break}if(e.refreshTokenManager().set(null==t?void 0:t.refreshToken),T&&!e.isTokenExpired(T)){n.next=14;break}return r({status:!1,msg:"".concat(T?"Token is expired !":"Missing Authorization Token"),response:{token:T}}),n.abrupt("return");case 14:R=JSON.parse(atob(T.split(".")[1]));case 15:return window.siteId=null===(s=R)||void 0===s?void 0:s.siteId,window.siteName=null===(d=R)||void 0===d?void 0:d.site,t.isAnonymousUser=!(null===(c=R)||void 0===c||!c.anonymousId),t.siteOwner=(null===(p=R)||void 0===p?void 0:p.site)||null,t.userId=(null===(m=R)||void 0===m?void 0:m.userId)||null,window.sessionStorage.setItem("uid",null===(f=R)||void 0===f?void 0:f.userId),window.watchHistory=t.watchHistory||null,sessionStorage.setItem("vlp_token",T),j=null==t?void 0:t.playerId,S=t.chromecastReceiverId=null!=t&&t.series?null:null==t?void 0:t.chromecastReceiverId,t.chromecastReceiverId=S,C=null==t?void 0:t.airplay,D=null==t?void 0:t.apiBaseUrl,x=(null==t||null===(g=t.analytics)||void 0===g?void 0:g.gaId)||null,(E=null==t?void 0:t.errors)&&(window.customErrors=E),window.customData=null==t?void 0:t.customData,u.setLocalisation(null==t||null===(h=t.customData)||void 0===h?void 0:h.localisation),D&&(window.playerEntitlementUrl=D),null!=t&&t.skin&&!e.isNotAValidSkin(t.skin)||(t.skin="VL_ONE"),n.next=37,q();case 37:C&&"Safari"==e.detectBrowser()&&Promise.resolve().then((function(){return H})).then((function(e){e.importAirplay()})),x&&v("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then((function(){return e.runGtag(x)})).catch((function(e){})),(V=null===(y=document)||void 0===y?void 0:y.getElementById("".concat(j)))&&V.addEventListener("contextmenu",(function(e){return e.preventDefault()})),w?(L={directPlaybackUrl:w,id:A="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},b?e.getVideoDetails(A,T).then((function(e){M(j,{res:_(_({},e),L)},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,A)})):M(j,{res:L},t,{resolve:i,reject:r})):I?(U=sessionStorage.getItem("season-idx")||0,e.seasonIdxManager.set(parseInt(U)),z=null==t||null===(N=t.series)||void 0===N?void 0:N.id,e.getSeriesDetails(z,T).then((function(n){var o,l,a,s=n.data,u=n.data.seasons;e.setCurrentSeries(u);var d=P||(null==u||null===(o=u[0])||void 0===o||null===(l=o.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);B(z,T),e.getVideoDetails(d,T).then((function(n){var o,l,a;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(n.data),M(j,{res:null==n?void 0:n.data,sres:s},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}))})).catch((function(n){e.initiateErrorHandling(n,j,r)}))):k?(F=null==t?void 0:t.epg,e.getLinearChannelDetails(F,T).then((function(e){var n=null==e?void 0:e.data;n.contentType="linearchannel",n.channelId=null==F?void 0:F.channelId,M(j,{res:n},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}))):e.getVideoDetails(P,T).then((function(n){var o,l,a,s;window.contentType=null==n||null===(o=n.data)||void 0===o||null===(l=o.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,e.setCurrentVideo(null==n?void 0:n.data);var u,d=null==n?void 0:n.data;if(null!=t&&t.watchHistory&&null!=t&&null!==(s=t.watchHistory)&&void 0!==s&&s.enable)if((null===(u=t.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,p,m=O((null===(c=t.watchHistory)||void 0===c?void 0:c.profileId)||"",P,null==t?void 0:t.siteOwner);if(m&&m.length)t.watchHistoryResumeTime=(null===(v=m[0])||void 0===v?void 0:v.watchedTime)||null,t.watchedPercentage=(null===(p=m[0])||void 0===p?void 0:p.watchedPercentage)||null;d.contentType="video",M(j,{res:d},t,{resolve:i,reject:r})}else e.getVideoInfo(P,T).then((function(e){var n,o,l,a,s,u;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),t.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,t.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",M(j,{res:d},t,{resolve:i,reject:r})})).catch((function(e){var n,o,l,a;null!==(n=window)&&void 0!==n&&null!==(o=n.watchHistory)&&void 0!==o&&o.cb&&(null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a||a.cb(e)),M(j,{res:d},t,{resolve:i,reject:r})}));else M(j,{res:d},t,{resolve:i,reject:r})})).catch((function(n){e.initiateErrorHandling(n,j,r,P)}));case 42:case"end":return n.stop()}}),n)})));return function(e,n){return i.apply(this,arguments)}}())},getRenditions:a.getRenditions,skip:e.skip,getPlayer:e.getPlayer,play:e.play,pause:e.pause,detectBrowser:e.detectBrowser,rewind:e.rewind,loadVideo:e.loadVideo,seekToTimeStamp:l.seekToTimeStamp,isPlayerInitialised:e.isPlayerInitialised,load:e.load,authenticateLC:e.authenticateLC,dispose:e.dispose,enableCaptions:e.enableCaptions,disableCaptions:e.disableCaptions,getCaptions:e.getCaptions,playSelectedResolution:s.playSelectedResolution,getSource:e.getSource,setVolume:I,getVolume:T,disableControls:e.disableControls,setPlaybackSpeed:l.setPlaybackSpeed,getEntitlementData:e.getEntitlementData}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),s=require("video.js"),o=require("./icons-0ea2e662.js"),l=require("./beacon-ca6bdec3.js");function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var c=s.getComponent("Component"),d=function(){r(p,c);var d,u,m=(d=p,u=i(),function(){var e,t=n(d);if(u){var r=n(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return a(this,e)});function p(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(r=m.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(p,[{key:"createEl",value:function(){var e=s.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=s.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(o.BroadcastIcon())});return s.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./multicamv2-76d8530b.js")})).then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=s.dom.createEl("div",{className:"stream-container hidden"});s.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(l.closeOpenDrawers(),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",s.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=s.dom.createEl("div",{className:"stream-selector-head"}),n=s.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(o.crossIconSvg())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var i=s.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=s.dom.createEl("div",{className:"stream-selector-content"}),d=s.dom.createEl("div",{className:"stream-tray"}),u=function(e){var r,a=s.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(o.SelectedStream())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=s.dom.$$(".stream"),n=0;n<r.length;n++)r[n].style.border="none",r[n].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",l.load(t.playerId,t.streams[e].id).then((function(e){l.play(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),n.alt="No Thumbnail Available",a.append(n),s.dom.appendContent(d,a),s.dom.appendContent(c,d)},m=0;m<this.streams.length;m++)u(m);s.dom.appendContent(a,n),s.dom.appendContent(a,i),s.dom.appendContent(e,a),s.dom.appendContent(e,c),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),p}();exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.default=".stream-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.stream-selector-icon {\n cursor: pointer;\n}\n\n.stream-container {\n position: absolute;\n width: 350px;\n right: -350px;\n bottom: 0px;\n\n background: #00000080 !important;\n z-index: -1;\n transition: right 300ms ease-out;\n}\n\n.stream-container.hidden {\n visibility: hidden;\n}\n\n.stream-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.stream-tray {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n}\n\n.stream-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.stream-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.stream-selector-cross-icon {\n cursor: pointer;\n}\n\n.stream-selector-content {\n height: 74%;\n overflow: scroll;\n /* background: yellowgreen; */\n}\n\n.stream-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.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 /* background: red; */\n}\n\n.stream {\n position: relative;\n height: 175px;\n width: 303px;\n background-repeat: no-repeat;\n background-size: contain;\n margin-bottom: 10px;\n}\n\n.stream>svg {\n display: none;\n}\n\n\n.stream.selected>svg {\n display: block;\n position: absolute;\n right: 0;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n}\n\n.stream:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n.stream-thumbnail-image{\n width: 100%;\n height: 100%;\n}\n\n@media (max-width:600px){\n .stream-selector-head{\n padding-top: 11px !important;\n padding-left: 8px !important;\n margin-bottom: 17px !important;\n }\n .stream-selector-cross-icon>svg{\n height: 12px;\n }\n .stream-selector-title{\n font-size: 14px;\n }\n .stream-selector-content{\n height: 52%;\n }\n .stream-container{\n width: 200px !important;\n }\n .stream{\n height: 89px !important;\n width: 167px !important;\n }\n .info {\n font-size: 9px !important;\n }\n .selected-stream{\n height: 18px;\n width: 20px;\n }\n .stream-selector-title{\n margin-left: 13px;\n }\n}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./beacon-ca6bdec3.js"),c=require("./autoNextVideo-19ac2fbc.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-06c5f98b.js");var u=o.getComponent("Component"),p=function(){l(y,u);var p,m
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./beacon-ca6bdec3.js"),c=require("./autoNextVideo-19ac2fbc.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-06c5f98b.js");var u=o.getComponent("Component"),p=function(){l(y,u);var p,v,m=(p=y,v=d(),function(){var e,t=a(p);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function y(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=m.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./playlist-df87ca90.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=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(r.closeOpenDrawers(),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 l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),d=o.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),u=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,u),o.dom.appendContent(a,s),o.dom.appendContent(d,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),m=o.dom.createEl("div",{className:"playlist-image"});m.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,m),o.dom.appendContent(p,v),o.dom.appendContent(a,p),o.dom.appendContent(d,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(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,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,d),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}}))}}]),y}();exports.default=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./beacon-ca6bdec3.js"),u=require("./icons-0ea2e662.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var p=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var h,f=c.getComponent("Component"),m=function(){s(d,f);var e,l,c=(e=d,l=v(),function(){var i,t=a(e);if(l){var n=a(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,h=s.playerId,
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./beacon-ca6bdec3.js"),u=require("./icons-0ea2e662.js");require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray");var p=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var h,f=c.getComponent("Component"),m=function(){s(d,f);var e,l,c=(e=d,l=v(),function(){var i,t=a(e);if(l){var n=a(this).constructor;i=Reflect.construct(t,arguments,n)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,s),o(n(t),"seriesData",[]),t.seriesData=s.seriesData,h=s.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-9c237975.js")})).then((function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)}))}}]),d}();function g(){return(g=e(l.mark((function e(i,t,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(h),p(h),d.load(h,t).then((function(e){d.setCurrentVideo(e.response),d.play(h)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=d.parseHtmlString(t);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map((function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=d.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then((function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map((function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),p=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),h=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(s,r)}));for(var m=function(i){c[i].addEventListener("click",(function(){return function(e,i,t){var n=i.querySelector(".meta-details");i.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),t.forEach((function(i,n){n!==e&&(t[n].classList.remove("episode-active"),t[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(i,u[i],u)})),p[i].addEventListener("click",(function(){return function(e,i,t,n){return g.apply(this,arguments)}(i,f[i].id,t,u)})),e.episodes[i].id==h&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)m(y)},exports.seriesModule=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./beacon-ca6bdec3.js"),c=require("./autoNextVideo-19ac2fbc.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-06c5f98b.js");var v=l.getComponent("Component"),p=function(){i(g,v);var p,m,h=(p=g,m=u(),function(){var e,t=r(p);if(m){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function g(n){var i,o,r,l,a,u,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,g),(u=h.call(this,n,v)).playerId=v.playerId,u.seriesData=v.sres,u.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,u.currentVideoData=v.res,u.initialiseStructure(),u.loadCSS(),u.selectedSeason=0,u.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,u.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),u.watchMap=d.getSeriesWatchMap(),null!==(l=s(u))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,f,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map((function(t){b.push.apply(b,e(t.episodes))})),d.createIdxMapping(b),d.setVideoIdxById(null===(m=u.options_)||void 0===m||null===(f=m.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),c.autoPlayNext({playerId:u.playerId,content:b,cb:u.cb,series:null==v?void 0:v.sres})}return u}return n(g,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./series-v2-fd7485a5.js")})).then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(d.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=d.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();l.dom.appendContent(r,c),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),d.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;d.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map((function(e){var t,n,i,o,r;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}}));for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then((function(e){null!=s&&s.cb&&s.cb(e)})).catch((function(e){null!=s&&s.cb&&s.cb(e)}))},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=d.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),g}();exports.default=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.default=".series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.series-selector-icon {\n cursor: pointer;\n}\n\n.series-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 200ms ease-out;\n}\n\n.series-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n margin-bottom:4px;\n padding: 8px 12px;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.series-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.series-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.series-selector-cross-icon {\n cursor: pointer;\n}\n\n.series-selector-back-icon {\n cursor: pointer;\n}\n\n.series-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.series-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.series-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.series-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.video {\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n\n\n.series-selector-content{\n padding: 0 18px;\n}\n\n.series-section{\n height: 3rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n width: 100%;\n}\n\n.series-section-expanded{\n width: 100%;\n display: flex;\n transition: 300ms ease-in;\n}\n.series-section-expanded.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.series-title:hover{\n cursor: pointer;\n}\n.series-description{\n pointer-events: none;\n width: 50%;\n padding-left: 10px;\n text-align: start;\n max-height: 90px;\n overflow: hidden;\n}\n.series-image{\n width: 160px;\n height: 90px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n\n.video-js .series-progress-bar {\n max-width: 100px;\n height: 3px;\n background-color: #7777777e;\n display: flex;\n width: 100%;\n}\n.video-js .series-progress-bar-value {\n background-color: white;\n height: 2px;\n margin: 0;\n}\n\n.series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.season-container-title {\n margin-left: 10px;\n font-size: 16px;\n text-align: left;\n font-weight: 600;\n margin-bottom: 10px;\n}\n\n.season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n}\n\n.season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.season-holder:hover {\n cursor: pointer;\n}\n.season {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-left: 4px;\n}\n\n@media (max-width:600px){\n .series-selection{\n display: none;\n }\n}\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6572482d.js"),l=require("./beacon-ca6bdec3.js"),r=require("./index-c5962ac8.js"),i=require("video.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./renditions-d4a3642f.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-19ac2fbc.js"),require("./util-06c5f98b.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray");var a=function(){var e,l,r,a,n,o,u,t,d,s,v,c,p=i.dom.$(".vjs-play-progress"),b=i.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(e=window)||void 0===e||null===(l=e.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.brand)||void 0===a||null===(n=a.cta)||void 0===n||null===(o=n.primary)||void 0===o?void 0:o.backgroundColor)),p&&(p.style.background="".concat(null===(u=window)||void 0===u||null===(t=u.app_data)||void 0===t||null===(d=t.appcmsMain)||void 0===d||null===(s=d.brand)||void 0===s||null===(v=s.cta)||void 0===v||null===(c=v.primary)||void 0===c?void 0:c.backgroundColor))};exports.initialiseSkin=function(i,n){l.getPlayer(i).addClass("skin_vlone"),function(i,a){var n=l.getPlayer(i);n&&(n.on("loadeddata",(function(){var e,o,u,t,d;n.qualityMenu({useResolutionLabels:!0}),!(null!=a&&null!==(e=a.series)&&void 0!==e&&e.enable||null!==(o=window)&&void 0!==o&&null!==(u=o.app_data)&&void 0!==u&&null!==(t=u.appcmsMain)&&void 0!==t&&null!==(d=t.features)&&void 0!==d&&d.auto_play)||null!=a&&a.liveVideo||r.addNextEpPreview(i,a),null!=a&&a.liveVideo||l.isMobile()||r.initiateTrickplay(i)})),n.one("play",(function(){var l,r,a,n;null!==(l=window)&&void 0!==l&&null!==(r=l.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(i,null===(a=window)||void 0===a||null===(n=a.customData)||void 0===n?void 0:n.iframeOverlayUrl)})))}(i,n),function(r,i){var a,n,o,u;(null==i||null===(a=i.relatedVideos)||void 0===a||null===(n=a.content)||void 0===n?void 0:n.length)>0&&e.addVideoSelector(r,null==i?void 0:i.relatedVideos);null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable&&e.addSeriesSelectorV2(r,i);(null==i||null===(u=i.streams)||void 0===u?void 0:u.length)>1&&e.addMulticamSelector(r,null==i?void 0:i.streams);!function(e,r){var i=l.getPlayer(e),a=null==r?void 0:r.tvProviderLogoUrl;if(a){var n=document.createElement("div");n.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(a),o.alt="Provider Image",n.append(o),i.el().appendChild(n),i.on("useractive",(function(){n.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||n.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?n.style.top="3.2rem":n.style.top="1rem"}))}}(r,i)}(i,n),a()};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./beacon-ca6bdec3.js"),r=require("./features-
|
|
1
|
+
"use strict";var e=require("./beacon-ca6bdec3.js"),r=require("./features-6572482d.js"),i=require("./renditions-d4a3642f.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("video.js"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(t,n){Promise.resolve().then((function(){return require("./skin-fc1e7e52.js")})).then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e.getPlayer(t).on("loadeddata",(function(){var u;(null===(u=i.getRenditions(t))||void 0===u?void 0:u.length)>0&&r.addSettingsButtonV2(t,n),null!=n&&n.disableCaptions&&e.removeCaptions(t)}))}(t,n),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(t)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6572482d.js"),r=require("./beacon-ca6bdec3.js"),t=require("./icons-0ea2e662.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./renditions-d4a3642f.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),exports.initialiseSkin=function(n,i){!function(e,t){var n,i,l=r.getPlayer(e),o=null==l||null===(n=l.controlBar)||void 0===n||null===(i=n.playToggle)||void 0===i?void 0:i.el_,u=document.getElementsByTagName("video")[0];u&&u.addEventListener("keydown",(function(n){switch(n.key){case" ":return n.preventDefault(),u&&u.focus(),void(o&&o.click());case"m":case"M":return n.preventDefault(),u&&u.focus(),void(l.muted()?l.muted(!1):l.muted(!0));case"f":n.preventDefault(),u&&u.focus();var i=document.querySelector(".vjs-fullscreen-control");return void(i&&i.click());case"F":n.preventDefault();var s=document.querySelector(".vjs-fullscreen-control");return void(s&&s.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return n.preventDefault(),u&&u.focus(),void r.rewind(e,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return n.preventDefault(),u&&u.focus(),void r.skip(e,10);default:return}}))}(n,i),Promise.resolve().then((function(){return require("./skin-983a2ea7.js")})).then((function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)})),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",t.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",t.RewindSvg())}(n,i),function(n,i){var l=r.getPlayer(n),o=(null==i?void 0:i.sres)||null;l.on("loadeddata",(function(){e.addResolutionModule(n,"default",t.SettingsSvg()),o&&Promise.resolve().then((function(){return require("./nextEpisodeButton-19833648.js")})).then((function(e){e.initaliseFunctionality(i.sres.seasons,r.getCurrentVideo())}))})),l.one("loadedmetadata",(function(){var r;o&&(e.addSeriesModule(n,null==i||null===(r=i.sres)||void 0===r?void 0:r.seasons,i),e.addNextEpisodeButton(i.sres,i.res,n))}))}(n,i),function(e,n){var i,l,o,u,s=r.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];n.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(i=s.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(l=i.el())||void 0===l||l.appendChild(r.createIconMarkup(t.MinimizeSvg(window.controlsColor))),null===(o=s.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(u=o.el())||void 0===u||u.appendChild(r.createIconMarkup(t.MaximizeSvg(window.controlsColor)));var v=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(r.createIconMarkup(t.NewCaptionsSvg()));var m=document.createElement("div");m.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(m,v.querySelector(".vjs-menu-item"))}(n,i)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-6572482d.js"),l=require("./icons-0ea2e662.js"),i=require("./beacon-ca6bdec3.js"),r=require("./renditions-d4a3642f.js"),n=require("./index-c5962ac8.js");function t(l,t){var o=i.getPlayer(l);o&&(o.on("loadeddata",(function(){var a,u;(null===(a=r.getRenditions(l))||void 0===a?void 0:a.length)>0&&e.addSettingsButtonV2(l,t),(null===(u=i.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,t),n.addNextEpPreview(l,t),function(e,l){var i,r=Math.floor(e/60),n=null===(i=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===i?void 0:i[0];n&&(n.style.marginRight=r>60?"56px":"41px");var t=document.getElementsByClassName("vjs-live-control")[0],o=document.getElementsByClassName("vjs-time-control");l&&t.classList.value.includes("vjs-hidden")&&(o[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==t?void 0:t.liveVideo)||!1),null!=t&&t.liveVideo||i.isMobile()||n.initiateTrickplay(l)})),o.one("play",(function(){var i,r,n,t;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-19ac2fbc.js"),require("./util-06c5f98b.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),exports.initialiseSkin=function(r,n){!function(){"Chrome"==i.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));Promise.resolve().then((function(){return require("./skin-c66e9b42.js")})).then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),t(r,n),function(e,r){var n,t,o,a,u,d,s=i.getPlayer(e);null==s||null===(n=s.controlBar)||void 0===n||null===(t=n.getChild("FullscreenToggle"))||void 0===t||null===(o=t.el())||void 0===o||o.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==s||null===(a=s.controlBar)||void 0===a||null===(u=a.getChild("FullscreenToggle"))||void 0===u||null===(d=u.el())||void 0===d||d.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var v=document.getElementsByClassName("vjs-time-control");r.liveVideo&&v[0]&&(v[0].style.display="none")}(r,n),function(i,r){var n,t,o,a,u,d;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());r.liveVideo||e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(t=n.content)||void 0===t?void 0:t.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(o=r.streams)||void 0===o?void 0:o.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(a=r.playlist)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(d=r.series)&&void 0!==d&&d.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(r,n),function(e,l){var r=i.getPlayer(e),n=null==l?void 0:l.tvProviderLogoUrl;if(!n)return;var t=document.createElement("div");t.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",t.append(o),r.el().appendChild(t),r.on("useractive",(function(){t.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||t.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?t.style.top="3.2rem":t.style.top="1rem"}))}(r,n)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-0ea2e662.js"),l=require("./beacon-ca6bdec3.js"),d=require("./autoNextVideo-19ac2fbc.js"),s=require("./localisation-56e0a999.js");function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-06c5f98b.js");var u=r.getComponent("Component"),v=function(){n(h,u);var v,m,p=(v=h,m=c(),function(){var e,t=i(v);if(m){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function h(t){var n,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(i=p.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.videos=r.related.content,i.cb=(null==r||null===(n=r.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==r||null===(o=r.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(l.setVideoIdx(0),d.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-fcdf11eb.js")})).then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(l.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",l.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),r.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),l.detectOrientationChange(this.playerId,n)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var d=r.dom.createEl("div",{className:"video-selector-title",innerHTML:s.getLocalisation("relatedVideoTitle")||"Recommended"}),c=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),v=function(e){var n,o,i,a,d,s=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";l.highlightVideo(e),l.load(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var m=document.createElement("img");m.className="related-thumbnail-image",m.src="".concat((null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),m.alt="No Thumbnail Available",v.append(m);var p=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});r.dom.appendContent(s,v),r.dom.appendContent(s,p),r.dom.appendContent(u,s),r.dom.appendContent(c,u)},m=0;m<this.videos.length;m++)v(m);r.dom.appendContent(o,i),r.dom.appendContent(o,d),r.dom.appendContent(e,o),r.dom.appendContent(e,c),l.handleDrawerResizing(this.playerId,e)}}]),h}();exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.default=".video-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.video-selector-icon {\n cursor: pointer;\n}\n\n.video-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 300ms ease-out;\n}\n\n.video-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n}\n\n.video-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.video-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.video-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.video-selector-cross-icon {\n cursor: pointer;\n}\n\n.video-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.video-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.video-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.video-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n.related-thumbnail-image{\n width: 100%;\n height: 100%;\n}\n.video {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 13px;\n padding: 7px 22px;\n}\n\n@media (max-width:600px){\n .video-selector-cross-icon>svg{\n height: 12px;\n }\n .video-selector-title{\n font-size: 14px;\n }\n .video-selector-content{\n height: 52%;\n }\n .video-selection-container{\n width: 200px;\n }\n .recommended{\n height: 90px !important;\n width: 154px !important;\n }\n .info {\n font-size: 9px !important;\n }\n .video-selector-title{\n margin-left: 13px;\n }\n}";
|
package/esm/bundle.css
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
8
7
|
height: 0.7em;
|
|
9
8
|
position: absolute;
|
|
@@ -39,6 +38,9 @@
|
|
|
39
38
|
.vjs-button>.vjs-icon-placeholder:before {
|
|
40
39
|
position: relative !important;
|
|
41
40
|
}
|
|
41
|
+
.video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
42
44
|
|
|
43
45
|
.vjs-button>.vjs-icon-placeholder:before {
|
|
44
46
|
font-size: 2em !important;
|
|
@@ -114,6 +116,7 @@
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
|
|
119
|
+
|
|
117
120
|
.video-js.vjs-quality-menu {
|
|
118
121
|
display: block;
|
|
119
122
|
}
|
|
@@ -212,6 +215,9 @@
|
|
|
212
215
|
|
|
213
216
|
|
|
214
217
|
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
215
221
|
.video-js .multicamera-parent.default{
|
|
216
222
|
height: 345px;
|
|
217
223
|
position: absolute;
|
|
@@ -423,7 +429,7 @@
|
|
|
423
429
|
margin: auto;
|
|
424
430
|
font-size: 6em;
|
|
425
431
|
line-height: 1.3em;
|
|
426
|
-
|
|
432
|
+
transform: none !important;
|
|
427
433
|
}
|
|
428
434
|
|
|
429
435
|
|
|
@@ -0,0 +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{g as a,R as s,r as c,m as d}from"./beacon-37a5aa2a.js";import{g as u}from"./renditions-5556ca50.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 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-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),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 c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-b1192d49.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},b=function(e,t,n){import("./nextEpisodeButton-e990f8b8.js").then((function(r){var o=r.default,l=a(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-5e8c84d7.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},k=function(e,t){import("./videoSelector-45e8433f.js").then((function(n){var r=n.default,o=a(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-6aa826ce.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},E=function(e,t){import("./settings-icon-4b9689a4.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},O=function(e,t){import("./playlist-a9ce0c79.js").then((function(n){var r=n.default,o=a(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-dbd5d5ec.js").then((function(n){var r=n.default,o=a(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-2d2b4a01.js").then((function(n){var r=n.default,o=a(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=a(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=a(e).el(),n=0,r=a(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-dd04ee8b.js").then((function(n){var r=n.default,o=a(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-b0e9deee.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)}))},R=function(e,t){import("./multicamv2-540e4a9e.js").then((function(n){var r=n.default,o=a(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,R as k,O as l,N as m,P as n,k as o,I as p,w as q};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as h,o as w,q as g,t as y,u as b,v as k,w as O,x as I,y as j,z as T,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,K as B,L,M as N,N as _,O as M,P as U,Q as q}from"./beacon-37a5aa2a.js";import z from"@babel/runtime/helpers/asyncToGenerator";import F from"@babel/runtime/helpers/defineProperty";import J from"@babel/runtime/regenerator";import G from"video.js";import"videojs-contrib-quality-menu";import K from"@babel/runtime/helpers/typeof";import{o as Q,g as X,a as W,s as Y,b as Z}from"./util-3cb40c3d.js";import{g as $}from"./renditions-5556ca50.js";import{playSelectedResolution as ee}from"./resolution-b1192d49.js";import{s as ne}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 te,oe,ie=function(e){return new Promise((function(n,t){if(le(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)}}))},le=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},re=function(){var t=z(J.mark((function t(o){var i,l,r,a;return J.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),console.log(o),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=21;break}return t.next=5,import("@silvermine/videojs-chromecast");case 5:return a=t.sent,t.prev=6,t.next=9,ie("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),console.log("Error",t.t0);case 14:return t.prev=14,a.default(G),t.finish(14);case 17:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return t.stop()}}),t,null,[[6,11,14,17]])})));return function(e){return t.apply(this,arguments)}}(),ae=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=G.dom.getPointerPosition(a,n).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};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){F(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 de=[],ce=0,ve=null;function me(e,n,i){var l,r,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.apiVersion)||"v1";var c=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),m=Math.floor(e.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,f=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,h=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,w=Math.floor(e.currentTime()),g=d?100:Math.floor(v/m*100),y={};h?function(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=pe(i),r=(new Date).getTime(),a=o(),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),{},F({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===te}));d<0?l.push(ue(ue({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=ue(ue(ue({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(y={completed:d,watchedTime:w,watchedPercentage:g},c,n.siteOwner):("v1"==oe?y={videoId:te,watchedTime:w,watchedPercentage:g,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==oe&&(y=ue(ue({videoId:te,watchedTime:w,watchedPercentage:g,doneWatching:d,profileId:c},ve&&{seriesId:ve}),f&&{originalObjectId:f})),t(y,oe).then((function(e){})).catch((function(e){}))),ce=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,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},we=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ge=!1,ye=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ge){var a=be(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),ge=!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"===K(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){F(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 Ie=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",h=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){h?i.resolve({status:!0,msg:"Video Loaded",response:v}):i.resolve(Oe({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v}))})),p.on("loadeddata",(function(){var i,l;(null==p||!p.muted())&&he(e,sessionStorage.getItem("volume")||"100");var r=o();if(a(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.saveOffline)){var s,u,d=Oe(Oe({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ve=null==t||null===(l=t.series)||void 0===l?void 0:l.id),de=[],ce=0,te=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());de.includes(ce)||(e==ce?(de.push(e),me(s,t,a)):e>ce&&(ce=e+a))})),s.one("ended",(function(){me(s,t,a,!0)})))}(e,d,null==r||null===(s=r.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id)}})),p.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];p.trigger("subtitlechanged",n)})),p.on("subtitlechanged",(function(e,n){var t,o,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),p.tech_.on("retryplaylist",(function(){h&&ye(v,e)})),p.on("error",(function(){var n,t;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&h)?ye(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u(),s=(null==a?void 0:a.get(r))||{t:0,p:0},d=s.t,c=s.p;d&&c<95&&setTimeout((function(){p.currentTime(d)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),p.on("volumechange",(function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),p.on("chromecastDisconnected",(function(){if(h){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},je=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-2b40be0d.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-2f09c77e.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-705779f4.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-2d9f6387.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-1eaa2c91.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&import("./skin-b9042825.js").then((function(t){t.initialiseSkin(e,n)}))};var Te,Pe=function(){var e=z(J.mark((function e(){return J.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:console.log(undefined);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=z(J.mark((function e(){return J.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){G.getPlugin("eme")||G.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(G)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(G)}))},loadAdsLibrary:Pe,loadEMELibrary:Se}),Ce=function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(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){F(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,t,o,r){var a,u,d,c,v,m,p,f,h,w,g,y,b,k,O,I,T,P,S,D,C,x,R,E,N,_,M,U,q,K,Q,X,W,Y=t.res,Z=void 0===Y?null:Y,$=t.sres,ee=void 0===$?null:$;null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(d=u.framework)||void 0===d||null===(c=d.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v||v.S;var ne=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(m=Z)||void 0===m?void 0:m.contentType)||"video",oe=A(null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(h=f.gist)||void 0===h?void 0:h.videoImageUrl)||A(null===(w=Z)||void 0===w||null===(g=w[te])||void 0===g||null===(y=g.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ie=(null===(k=Z)||void 0===k||null===(O=k[te])||void 0===O||null===(I=O.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,le=(null===(T=Z)||void 0===T||null===(P=T[te])||void 0===P||null===(S=P.streamingInfo)||void 0===S?void 0:S.isLiveStream)||!0,se=(null===(D=Z)||void 0===D||null===(C=D.ads)||void 0===C||null===(x=C.preRoll)||void 0===x||null===(R=x.adTags)||void 0===R||null===(E=R.web)||void 0===E?void 0:E.active)&&(null===(N=Z)||void 0===N||null===(_=N.ads)||void 0===_||null===(M=_.preRoll)||void 0===M||null===(U=M.adTags)||void 0===U||null===(q=U.web)||void 0===q?void 0:q.url);Z=Re(Re({},Z),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var ue=(W={controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==o.skin,liveui:ie},F(W,"autoplay",null==o?void 0:o.autoplay),F(W,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!se),F(W,"loop",(null==o?void 0:o.loop)||!1),F(W,"audioPosterMode",null==o?void 0:o.audioPosterMode),F(W,"html5",Re(Re({vhs:Re(Re({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==o||null===(K=o.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==o||null===(Q=o.customData)||void 0===Q?void 0:Q.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(X=o.customData)||void 0===X?void 0:X.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(W,"poster",oe),F(W,"techOrder",ne),F(W,"chromecast",{requestCustomDataFn:function(t){var o=n(e),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,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 w=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=w;var g=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=g;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===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,t,i)}}),W);if(!G.getPlayers()[e])var de=G(e,ue,function(){var n=z(J.mark((function n(){var t,a,u,d,c,v,m,p,f,h,w,g,y,b,k,O,I,T,P,S,D,C,x;return J.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(de),console.log(G.VERSION),console.log(G.getPlugins()),n.next=5,re(o);case 5:if(le&&r.resolve(Re({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),L(e),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),b=null===(t=Z)||void 0===t||null===(a=t[te])||void 0===a?void 0:a.drmEnabled,k=null===(u=Z)||void 0===u||null===(d=u[te])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!b){n.next=13;break}return n.next=13,Se();case 13:ie&&ae(e,k),!se||null!=o&&null!==(v=o.customData)&&void 0!==v&&v.disableAds||V(e,se,Z),O=i(Z,e),console.log(O),null!=o&&o.nearestClusterUrl&&(O=H(O,o.nearestClusterUrl)),O?l(e,O):(r.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(e,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Z)||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===(w=Z)||void 0===w||null===(g=w[te])||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0)&&(x=(null===(T=Z)||void 0===T||null===(P=T[te])||void 0===P||null===(S=P.contentDetails)||void 0===S?void 0:S.closedCaptions)||(null===(D=Z)||void 0===D||null===(C=D[te])||void 0===C?void 0:C.closedCaptions),I=x.filter((function(e){return"VTT"===e.format})),B(e,I)),null!=o&&o.disableControls?j(e):je(e,Re(Re(Re({},o),ue),{},{liveVideo:le,isDvrEnabled:ie,res:Z,sres:ee})),Ie(e,Re(Re(Re({},o),ue),{},{liveVideo:le}),r,{res:Z,sres:ee});case 22:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Ae(){return{loadVideoInstantly:v,onTimeUpdate:Q,getVideoDuration:X,onVideoEnded:W,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var t=z(J.mark((function t(o,i){var l,a,s,u,d,c,v,m,p,f,h,g,y,b,k,O,I,j,T,A,V,H,B,L,z,F,G,K,Q,X;return J.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(g=(null==n?void 0:n.videoSourceUrl)||!1,y=null==n?void 0:n.asat,b=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,k=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,window.videoId=k,I=null==n?void 0:n.token,!x(n)){t.next=15;break}if(R().set(null==n?void 0:n.refreshToken),I&&!E(I)){t.next=14;break}return i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),t.abrupt("return");case 14:Te=JSON.parse(atob(I.split(".")[1]));case 15:return window.siteId=null===(s=Te)||void 0===s?void 0:s.siteId,window.siteName=null===(u=Te)||void 0===u?void 0:u.site,n.isAnonymousUser=!(null===(d=Te)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=Te)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Te)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(m=Te)||void 0===m?void 0:m.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",I),j=null==n?void 0:n.playerId,T=n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId,n.chromecastReceiverId=T,A=null==n?void 0:n.airplay,V=null==n?void 0:n.apiBaseUrl,H=(null==n||null===(p=n.analytics)||void 0===p?void 0:p.gaId)||null,(B=null==n?void 0:n.errors)&&(window.customErrors=B),window.customData=null==n?void 0:n.customData,ne(null==n||null===(f=n.customData)||void 0===f?void 0:f.localisation),V&&(window.playerEntitlementUrl=V),null!=n&&n.skin&&!C(n.skin)||(n.skin="VL_ONE"),t.next=37,Pe();case 37:A&&"Safari"==e()&&Promise.resolve().then((function(){return De})).then((function(e){e.importAirplay()})),H&&ie("https://www.googletagmanager.com/gtag/js?id=".concat(H)).then((function(){return N(H)})).catch((function(e){})),(L=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j)))&&L.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g?(F={directPlaybackUrl:g,id:z="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},y?P(z,I).then((function(e){Ee(j,{res:Re(Re({},e),F)},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,z)})):Ee(j,{res:F},n,{resolve:o,reject:i})):O?(K=sessionStorage.getItem("season-idx")||0,U.set(parseInt(K)),Q=null==n||null===(G=n.series)||void 0===G?void 0:G.id,_(Q,I).then((function(e){var t,l,a,s=e.data,u=e.data.seasons;q(u);var d=k||(null==u||null===(t=u[0])||void 0===t||null===(l=t.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);Ce(Q,I),P(d,I).then((function(e){var t,l,a;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(l=t.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),Ee(j,{res:null==e?void 0:e.data,sres:s},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}))})).catch((function(e){D(e,j,i)}))):b?(X=null==n?void 0:n.epg,M(X,I).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==X?void 0:X.channelId,Ee(j,{res:t},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}))):P(k,I).then((function(e){var t,l,a,s;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(l=t.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=fe((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",k,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",Ee(j,{res:d},n,{resolve:o,reject:i})}else S(k,I).then((function(e){var t,l,r,a,s,u;null!==(t=window)&&void 0!==t&&null!==(l=t.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",Ee(j,{res:d},n,{resolve:o,reject:i})})).catch((function(e){var t,l,r,a;null!==(t=window)&&void 0!==t&&null!==(l=t.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),Ee(j,{res:d},n,{resolve:o,reject:i})}));else Ee(j,{res:d},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}));case 42:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},getRenditions:$,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:h,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:w,load:g,authenticateLC:y,dispose:b,enableCaptions:k,disableCaptions:O,getCaptions:I,playSelectedResolution:ee,getSource:i,setVolume:he,getVolume:we,disableControls:j,setPlaybackSpeed:Z,getEntitlementData:T}}export{Ae as default};
|
|
1
|
+
import"video.js/dist/video-js.min.css";import{d as e,g as n,s as t,a as o,b as i,l,c as r,e as a,h as s,f as u,i as d,j as c,k as v,m,p,n as f,r as h,o as w,q as g,t as y,u as b,v as k,w as O,x as I,y as j,z as T,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,K as B,L,M as N,N as _,O as M,P as U,Q as q}from"./beacon-37a5aa2a.js";import z from"@babel/runtime/helpers/asyncToGenerator";import F from"@babel/runtime/helpers/defineProperty";import J from"@babel/runtime/regenerator";import G from"video.js";import"videojs-contrib-quality-menu";import K from"@babel/runtime/helpers/typeof";import{o as Q,g as X,a as W,s as Y,b as Z}from"./util-3cb40c3d.js";import{g as $}from"./renditions-5556ca50.js";import{playSelectedResolution as ee}from"./resolution-b1192d49.js";import{s as ne}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 te,oe,ie=function(e){return new Promise((function(n,t){if(le(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)}}))},le=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},re=function(){var t=z(J.mark((function t(o){var i,l,r,a;return J.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=n(null==o?void 0:o.playerId),console.log(o),null!=o&&null!==(i=o.series)&&void 0!==i&&i.enable||null==o||!o.chromecastReceiverId){t.next=21;break}return t.next=5,import("@silvermine/videojs-chromecast");case 5:return a=t.sent,t.prev=6,t.next=9,ie("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),console.log("Error",t.t0);case 14:return t.prev=14,a.default(G),t.finish(14);case 17:null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==o?void 0:o.chromecastReceiverId,addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},t.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=o&&o.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"new"==o.skin||"defaultV2"==o.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return t.stop()}}),t,null,[[6,11,14,17]])})));return function(e){return t.apply(this,arguments)}}(),ae=function(e,t){var o=n(e);o&&t&&o.controlBar&&o.controlBar.progressControl.seekBar.on("click",(function(n){var t,o,i,l,r,a=this.el(),s=G.dom.getPointerPosition(a,n).x;G.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}}))};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){F(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 de=[],ce=0,ve=null;function me(e,n,i){var l,r,a,s,u,d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];oe=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.apiVersion)||"v1";var c=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,v=Math.floor(e.currentTime()),m=Math.floor(e.duration()),p=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,f=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,h=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,w=Math.floor(e.currentTime()),g=d?100:Math.floor(v/m*100),y={};h?function(e,n,t){var i=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),l=pe(i),r=(new Date).getTime(),a=o(),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),{},F({},n,s[n]))}),{}),d=l.findIndex((function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===te}));d<0?l.push(ue(ue({content:u},e),{},{addedDate:r,updateDate:r})):l[d]=ue(ue(ue({},l[d]),e),{},{updateDate:r});localStorage.setItem("".concat(i),JSON.stringify(l))}(y={completed:d,watchedTime:w,watchedPercentage:g},c,n.siteOwner):("v1"==oe?y={videoId:te,watchedTime:w,watchedPercentage:g,siteOwner:n.siteOwner,userId:n.userId,xApiKey:p}:"v2"==oe&&(y=ue(ue({videoId:te,watchedTime:w,watchedPercentage:g,doneWatching:d,profileId:c},ve&&{seriesId:ve}),f&&{originalObjectId:f})),t(y,oe).then((function(e){})).catch((function(e){}))),ce=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,t,o){var i=n(e);if(i)if(t>=0&&t<=100){i.muted()&&i.muted(!1);var l=parseFloat(t)/100;i.volume(l),o&&o({status:!0,msg:"Volume set to ".concat(t,"%")})}else o&&o({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else o({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},we=function(e){var t=n(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")},ge=!1,ye=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!ge){var a=be(e,"videoAssets","secondaryVideoAssets"),s=i(a,n);return s&&l(n,s),ge=!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"===K(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){F(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 Ie=function(e,t,i,l){var d,c,v=l.res,m=l.sres,p=n(e),f=(null==v?void 0:v.contentType)||"video",h=(null==v||null===(d=v[f])||void 0===d||null===(c=d.streamingInfo)||void 0===c?void 0:c.isLiveStream)||!1;r(v),p&&(p.on("loadstart",(function(){h?i.resolve({status:!0,msg:"Video Loaded",response:v}):i.resolve(Oe({status:!0,msg:"Player Initialised"},m?{seriesResponse:m,response:v}:{response:v}))})),p.on("loadeddata",(function(){var i,l;(null==p||!p.muted())&&he(e,sessionStorage.getItem("volume")||"100");var r=o();if(a(),null!=t&&t.watchHistory&&null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.enable&&(!t.isAnonymousUser||null!=t&&null!==(l=t.watchHistory)&&void 0!==l&&l.saveOffline)){var s,u,d=Oe(Oe({},t),v);!function(e,t,o){var i,l,r;null!=t&&t.series&&null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable&&(ve=null==t||null===(l=t.series)||void 0===l?void 0:l.id),de=[],ce=0,te=o;var a=(null==t||null===(r=t.watchHistory)||void 0===r?void 0:r.interval)||30,s=n(e);s&&(s.on("timeupdate",(function(){var e=Math.floor(s.currentTime());de.includes(ce)||(e==ce?(de.push(e),me(s,t,a)):e>ce&&(ce=e+a))})),s.one("ended",(function(){me(s,t,a,!0)})))}(e,d,null==r||null===(s=r.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.id)}})),p.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];p.trigger("subtitlechanged",n)})),p.on("subtitlechanged",(function(e,n){var t,o,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=n?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),p.tech_.on("retryplaylist",(function(){h&&ye(v,e)})),p.on("error",(function(){var n,t;(console.log("ERROR",p.error(),p.error().code),4===p.error().code&&h)?ye(v,e):(s(e,(null==p||null===(n=p.error())||void 0===n?void 0:n.message)||"Some error occured"),i.reject({status:!1,msg:(null==p||null===(t=p.error())||void 0===t?void 0:t.message)||"Some error occured",response:v}))})),p.one("play",(function(){var e;if(null!=t&&null!==(e=t.series)&&void 0!==e&&e.enable){var n,i,l,r=null===(n=o())||void 0===n||null===(i=n.video)||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.id,a=u(),s=(null==a?void 0:a.get(r))||{t:0,p:0},d=s.t,c=s.p;d&&c<95&&setTimeout((function(){p.currentTime(d)}),0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout((function(){p.currentTime(null==t?void 0:t.watchHistoryResumeTime)}),0)})),p.on("volumechange",(function(){var e=100*p.volume().toFixed(2);p.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)})),p.on("chromecastDisconnected",(function(){if(h){p.currentSource();for(var e=p.textTracks(),n=e.length-1;n>=0;n--)p.removeRemoteTextTrack(e[n])}})))},je=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-8b598f71.js").then((function(t){t.initialiseSkin(e,n)})):"carousel"==t?import("./skin-93f9a9a0.js").then((function(n){n.initaliseSkin(e)})):"defaultV2"==t?import("./skin-ae708803.js").then((function(t){t.initialiseSkin(e,n)})):"multiplayer"==t?import("./skin-ac467e80.js").then((function(t){t.initialiseSkin(e,n)})):"minimalist"==t?import("./skin-1eaa2c91.js").then((function(t){t.initaliseSkin(e,n)})):"VL_ONE"==t&&import("./skin-3d7d2afb.js").then((function(t){t.initialiseSkin(e,n)}))};var Te,Pe=function(){var e=z(J.mark((function e(){return J.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=z(J.mark((function e(){return J.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme").then((function(e){G.getPlugin("eme")||G.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(G)})).catch((function(e){console.log(e)}))}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(G)}))},loadAdsLibrary:Pe,loadEMELibrary:Se}),Ce=function(e,n){var t=new Map;d({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),c(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){F(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,t,o,r){var a,u,d,c,v,m,p,f,h,w,g,y,b,k,O,I,T,P,S,D,C,x,R,E,N,_,M,U,q,K,Q,X,W,Y=t.res,Z=void 0===Y?null:Y,$=t.sres,ee=void 0===$?null:$;null===(a=window)||void 0===a||null===(u=a.cast)||void 0===u||null===(d=u.framework)||void 0===d||null===(c=d.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v||v.S;var ne=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(m=Z)||void 0===m?void 0:m.contentType)||"video",oe=A(null===(p=Z)||void 0===p||null===(f=p[te])||void 0===f||null===(h=f.gist)||void 0===h?void 0:h.videoImageUrl)||A(null===(w=Z)||void 0===w||null===(g=w[te])||void 0===g||null===(y=g.gist)||void 0===y||null===(b=y.imageGist)||void 0===b?void 0:b.r16x9),ie=(null===(k=Z)||void 0===k||null===(O=k[te])||void 0===O||null===(I=O.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,le=(null===(T=Z)||void 0===T||null===(P=T[te])||void 0===P||null===(S=P.streamingInfo)||void 0===S?void 0:S.isLiveStream)||!0,se=(null===(D=Z)||void 0===D||null===(C=D.ads)||void 0===C||null===(x=C.preRoll)||void 0===x||null===(R=x.adTags)||void 0===R||null===(E=R.web)||void 0===E?void 0:E.active)&&(null===(N=Z)||void 0===N||null===(_=N.ads)||void 0===_||null===(M=_.preRoll)||void 0===M||null===(U=M.adTags)||void 0===U||null===(q=U.web)||void 0===q?void 0:q.url);Z=Re(Re({},Z),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var ue=(W={controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!0},muteToggle:"multiplayer"==o.skin,liveui:ie},F(W,"autoplay",null==o?void 0:o.autoplay),F(W,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!se),F(W,"loop",(null==o?void 0:o.loop)||!1),F(W,"audioPosterMode",null==o?void 0:o.audioPosterMode),F(W,"html5",Re(Re({vhs:Re(Re({liveRangeSafeTimeDelta:0,maxPlaylistRetries:3,smoothQualityChange:!0,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!1},(null==o||null===(K=o.customData)||void 0===K?void 0:K.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0,experimentalBufferBasedABR:!0})},0==(null==o||null===(Q=o.customData)||void 0===Q?void 0:Q.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(X=o.customData)||void 0===X?void 0:X.nativeVideoTracks)&&{nativeVideoTracks:!1})),F(W,"poster",oe),F(W,"techOrder",ne),F(W,"chromecast",{requestCustomDataFn:function(t){var o=n(e),i=((null==o?void 0:o.textTracksJson_)||o.textTracks().tracks_).filter((function(e){return"captions"==e.kind||"subtitles"==e.kind}));return function(e,n,t){var o,i,l,r,a,s,u,d,c,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 w=(null==e||null===(o=e[m])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";p.contentType=w;var g=null==e||null===(l=e[m])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;p.duration=g;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===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return p.mediaImage=b,p.subTitles=t,p.DVR=(null==e||null===(c=e[m])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Z,t,i)}}),W);if(!G.getPlayers()[e])var de=G(e,ue,function(){var n=z(J.mark((function n(){var t,a,u,d,c,v,m,p,f,h,w,g,y,b,k,O,I,T,P,S,D,C,x;return J.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(de),console.log(G.VERSION),console.log(G.getPlugins()),n.next=5,re(o);case 5:if(le&&r.resolve(Re({status:!0,msg:"Player Initialised"},ee?{seriesResponse:ee,response:Z}:{response:Z})),L(e),/Android/i.test(navigator.userAgent)&&(G.options.vhs.overrideNative=!0),b=null===(t=Z)||void 0===t||null===(a=t[te])||void 0===a?void 0:a.drmEnabled,k=null===(u=Z)||void 0===u||null===(d=u[te])||void 0===d||null===(c=d.liveDetails)||void 0===c?void 0:c.startOverTime,!b){n.next=13;break}return n.next=13,Se();case 13:ie&&ae(e,k),!se||null!=o&&null!==(v=o.customData)&&void 0!==v&&v.disableAds||V(e,se,Z),O=i(Z,e),console.log(O),null!=o&&o.nearestClusterUrl&&(O=H(O,o.nearestClusterUrl)),O?l(e,O):(r.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:Z}),s(e,"Incompatible Source, only hls,mp4,drm content is allowed")),((null===(m=Z)||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===(w=Z)||void 0===w||null===(g=w[te])||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0)&&(x=(null===(T=Z)||void 0===T||null===(P=T[te])||void 0===P||null===(S=P.contentDetails)||void 0===S?void 0:S.closedCaptions)||(null===(D=Z)||void 0===D||null===(C=D[te])||void 0===C?void 0:C.closedCaptions),I=x.filter((function(e){return"VTT"===e.format})),B(e,I)),null!=o&&o.disableControls?j(e):je(e,Re(Re(Re({},o),ue),{},{liveVideo:le,isDvrEnabled:ie,res:Z,sres:ee})),Ie(e,Re(Re(Re({},o),ue),{},{liveVideo:le}),r,{res:Z,sres:ee});case 22:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}())};function Ae(){return{loadVideoInstantly:v,onTimeUpdate:Q,getVideoDuration:X,onVideoEnded:W,init:function(n){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var t=z(J.mark((function t(o,i){var l,a,s,u,d,c,v,m,p,f,h,g,y,b,k,O,I,j,T,A,V,H,B,L,z,F,G,K,Q,X;return J.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w(null==n?void 0:n.playerId)){t.next=2;break}return t.abrupt("return");case 2:if(g=(null==n?void 0:n.videoSourceUrl)||!1,y=null==n?void 0:n.asat,b=(null==n||null===(l=n.epg)||void 0===l?void 0:l.enable)||!1,k=null==n?void 0:n.videoId,O=(null==n||null===(a=n.series)||void 0===a?void 0:a.enable)||!1,window.videoId=k,I=null==n?void 0:n.token,!x(n)){t.next=15;break}if(R().set(null==n?void 0:n.refreshToken),I&&!E(I)){t.next=14;break}return i({status:!1,msg:"".concat(I?"Token is expired !":"Missing Authorization Token"),response:{token:I}}),t.abrupt("return");case 14:Te=JSON.parse(atob(I.split(".")[1]));case 15:return window.siteId=null===(s=Te)||void 0===s?void 0:s.siteId,window.siteName=null===(u=Te)||void 0===u?void 0:u.site,n.isAnonymousUser=!(null===(d=Te)||void 0===d||!d.anonymousId),n.siteOwner=(null===(c=Te)||void 0===c?void 0:c.site)||null,n.userId=(null===(v=Te)||void 0===v?void 0:v.userId)||null,window.sessionStorage.setItem("uid",null===(m=Te)||void 0===m?void 0:m.userId),window.watchHistory=n.watchHistory||null,sessionStorage.setItem("vlp_token",I),j=null==n?void 0:n.playerId,T=n.chromecastReceiverId=null!=n&&n.series?null:null==n?void 0:n.chromecastReceiverId,n.chromecastReceiverId=T,A=null==n?void 0:n.airplay,V=null==n?void 0:n.apiBaseUrl,H=(null==n||null===(p=n.analytics)||void 0===p?void 0:p.gaId)||null,(B=null==n?void 0:n.errors)&&(window.customErrors=B),window.customData=null==n?void 0:n.customData,ne(null==n||null===(f=n.customData)||void 0===f?void 0:f.localisation),V&&(window.playerEntitlementUrl=V),null!=n&&n.skin&&!C(n.skin)||(n.skin="VL_ONE"),t.next=37,Pe();case 37:A&&"Safari"==e()&&Promise.resolve().then((function(){return De})).then((function(e){e.importAirplay()})),H&&ie("https://www.googletagmanager.com/gtag/js?id=".concat(H)).then((function(){return N(H)})).catch((function(e){})),(L=null===(h=document)||void 0===h?void 0:h.getElementById("".concat(j)))&&L.addEventListener("contextmenu",(function(e){return e.preventDefault()})),g?(F={directPlaybackUrl:g,id:z="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},y?P(z,I).then((function(e){Ee(j,{res:Re(Re({},e),F)},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,z)})):Ee(j,{res:F},n,{resolve:o,reject:i})):O?(K=sessionStorage.getItem("season-idx")||0,U.set(parseInt(K)),Q=null==n||null===(G=n.series)||void 0===G?void 0:G.id,_(Q,I).then((function(e){var t,l,a,s=e.data,u=e.data.seasons;q(u);var d=k||(null==u||null===(t=u[0])||void 0===t||null===(l=t.episodes)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.id);Ce(Q,I),P(d,I).then((function(e){var t,l,a;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(l=t.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(e.data),Ee(j,{res:null==e?void 0:e.data,sres:s},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}))})).catch((function(e){D(e,j,i)}))):b?(X=null==n?void 0:n.epg,M(X,I).then((function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==X?void 0:X.channelId,Ee(j,{res:t},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}))):P(k,I).then((function(e){var t,l,a,s;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(l=t.video)||void 0===l||null===(a=l.gist)||void 0===a?void 0:a.contentType,r(null==e?void 0:e.data);var u,d=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(s=n.watchHistory)&&void 0!==s&&s.enable)if((null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1){var c,v,m,p=fe((null===(c=n.watchHistory)||void 0===c?void 0:c.profileId)||"",k,null==n?void 0:n.siteOwner);if(p&&p.length)n.watchHistoryResumeTime=(null===(v=p[0])||void 0===v?void 0:v.watchedTime)||null,n.watchedPercentage=(null===(m=p[0])||void 0===m?void 0:m.watchedPercentage)||null;d.contentType="video",Ee(j,{res:d},n,{resolve:o,reject:i})}else S(k,I).then((function(e){var t,l,r,a,s,u;null!==(t=window)&&void 0!==t&&null!==(l=t.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(s=e.data)||void 0===s?void 0:s.watchedTime)||null,n.watchedPercentage=(null==e||null===(u=e.data)||void 0===u?void 0:u.watchedPercentage)||null,d.contentType="video",Ee(j,{res:d},n,{resolve:o,reject:i})})).catch((function(e){var t,l,r,a;null!==(t=window)&&void 0!==t&&null!==(l=t.watchHistory)&&void 0!==l&&l.cb&&(null===(r=window)||void 0===r||null===(a=r.watchHistory)||void 0===a||a.cb(e)),Ee(j,{res:d},n,{resolve:o,reject:i})}));else Ee(j,{res:d},n,{resolve:o,reject:i})})).catch((function(e){D(e,j,i,k)}));case 42:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())},getRenditions:$,skip:m,getPlayer:n,play:p,pause:f,detectBrowser:e,rewind:h,loadVideo:l,seekToTimeStamp:Y,isPlayerInitialised:w,load:g,authenticateLC:y,dispose:b,enableCaptions:k,disableCaptions:O,getCaptions:I,playSelectedResolution:ee,getSource:i,setVolume:he,getVolume:we,disableControls:j,setPlaybackSpeed:Z,getEntitlementData:T}}export{Ae 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 n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{h as s,f as l,i}from"./icons-79ad4d7d.js";import{$ as c,g as m,q as d,p}from"./beacon-37a5aa2a.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-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=o.getComponent("Component"),v=function(){a(g,h);var v,f,y=(v=g,f=u(),function(){var e,t=n(v);if(f){var a=n(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=y.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=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-d006cffa.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=t.classList)&&void 0!==a&&a.contains("hidden")?(c(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var r=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(r,"px"),a.style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,a=this.el(),r=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(l())});n.onclick=function(){e.classList.add("hidden"),a.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),c=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var a,r=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(i())});0==e&&(r.classList.add("selected"),r.style.border="4px solid #D2393B"),r.onclick=function(){for(var a=o.dom.$$(".stream"),n=0;n<a.length;n++)a[n].style.border="none",a[n].classList.remove("selected");r.classList.add("selected"),r.style.border="4px solid #D2393B",d(t.playerId,t.streams[e].id).then((function(e){p(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},r.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(a=t.streams[e])||void 0===a?void 0:a.img),n.alt="No Thumbnail Available",r.append(n),o.dom.appendContent(u,r),o.dom.appendContent(c,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(r,n),o.dom.appendContent(r,s),o.dom.appendContent(e,r),o.dom.appendContent(e,c),m(this.playerId).on("fullscreenchange",(function(){var a=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(a,"px")}))}}]),g}();export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=".stream-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.stream-selector-icon {\n cursor: pointer;\n}\n\n.stream-container {\n position: absolute;\n width: 350px;\n right: -350px;\n bottom: 0px;\n\n background: #00000080 !important;\n z-index: -1;\n transition: right 300ms ease-out;\n}\n\n.stream-container.hidden {\n visibility: hidden;\n}\n\n.stream-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.stream-tray {\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n}\n\n.stream-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.stream-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.stream-selector-cross-icon {\n cursor: pointer;\n}\n\n.stream-selector-content {\n height: 74%;\n overflow: scroll;\n /* background: yellowgreen; */\n}\n\n.stream-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.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 /* background: red; */\n}\n\n.stream {\n position: relative;\n height: 175px;\n width: 303px;\n background-repeat: no-repeat;\n background-size: contain;\n margin-bottom: 10px;\n}\n\n.stream>svg {\n display: none;\n}\n\n\n.stream.selected>svg {\n display: block;\n position: absolute;\n right: 0;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n}\n\n.stream:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n.stream-thumbnail-image{\n width: 100%;\n height: 100%;\n}\n\n@media (max-width:600px){\n .stream-selector-head{\n padding-top: 11px !important;\n padding-left: 8px !important;\n margin-bottom: 17px !important;\n }\n .stream-selector-cross-icon>svg{\n height: 12px;\n }\n .stream-selector-title{\n font-size: 14px;\n }\n .stream-selector-content{\n height: 52%;\n }\n .stream-container{\n width: 200px !important;\n }\n .stream{\n height: 89px !important;\n width: 167px !important;\n }\n .info {\n font-size: 9px !important;\n }\n .selected-stream{\n height: 18px;\n width: 20px;\n }\n .stream-selector-title{\n margin-left: 13px;\n }\n}";export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=".series-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.series-selector-icon {\n cursor: pointer;\n}\n\n.series-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 200ms ease-out;\n}\n\n.series-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n margin-bottom:4px;\n padding: 8px 12px;\n}\n\n.series-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.series-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.series-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.series-selector-cross-icon {\n cursor: pointer;\n}\n\n.series-selector-back-icon {\n cursor: pointer;\n}\n\n.series-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.series-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.series-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.series-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n.video {\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 15px;\n padding: 7px;\n}\n\n\n.series-selector-content{\n padding: 0 18px;\n}\n\n.series-section{\n height: 3rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 6px;\n width: 100%;\n}\n\n.series-section-expanded{\n width: 100%;\n display: flex;\n transition: 300ms ease-in;\n}\n.series-section-expanded.hidden{\n visibility: hidden ;\n max-height: 0;\n}\n\n.series-title{\n font-size: 12px;\n font-weight: 800;\n text-align: start;\n pointer-events: none;\n width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.series-title:hover{\n cursor: pointer;\n}\n.series-description{\n pointer-events: none;\n width: 50%;\n padding-left: 10px;\n text-align: start;\n max-height: 90px;\n overflow: hidden;\n}\n.series-image{\n width: 160px;\n height: 90px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n\n\n.video-js .series-progress-bar {\n max-width: 100px;\n height: 3px;\n background-color: #7777777e;\n display: flex;\n width: 100%;\n}\n.video-js .series-progress-bar-value {\n background-color: white;\n height: 2px;\n margin: 0;\n}\n\n.series-section-expanded:hover{\n cursor: pointer;\n}\n\n\n.season-container-title {\n margin-left: 10px;\n font-size: 16px;\n text-align: left;\n font-weight: 600;\n margin-bottom: 10px;\n}\n\n.season-container {\n width: 100%;\n margin-bottom: 30px;\n}\n\n.season-holder {\n display: flex;\n width: 90%;\n height: 2.5rem;\n padding: 10px 10px;\n margin-bottom: 10px;\n margin-left: 6px;\n}\n\n.season-holder>input {\n margin: 1px 4px;\n visibility: hidden;\n}\n\n.season-holder>input[type='radio']:checked {\n background: black;\n}\n\n.season-selected {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.season-holder:hover {\n cursor: pointer;\n}\n.season {\n display: flex;\n align-items: center;\n font-size: 14px;\n margin-left: 4px;\n}\n\n@media (max-width:600px){\n .series-selection{\n display: none;\n }\n}\n";export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,f as d,B as c}from"./icons-79ad4d7d.js";import{f as u,a3 as m,a4 as p,$ as v,R as h,g as f,V as C,P as g,q as y}from"./beacon-37a5aa2a.js";import{a as b}from"./autoNextVideo-355201d8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-3cb40c3d.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){o(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function L(s){var o,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(o=c.sres)||void 0===o?void 0:o.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=n(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,g=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,y=[];g.map((function(t){y.push.apply(y,e(t.episodes))})),m(y),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:y,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-4cdbf9b1.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(v(),e.classList.remove("hidden"),s.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});o.onclick=function(){if("series-selector-cross-icon"===o.className)e.classList.add("hidden"),s.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===o.className){var n=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),o.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(n,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var l=h(d());o.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),f(this.playerId).on("fullscreenchange",(function(){var s=document.getElementById(t.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;f(this.playerId);for(var t=C(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(n));var l=document.createElement("div");l.className="season - ".concat(n),l.textContent=null===(o=t[n])||void 0===o?void 0:o.title;var r=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==n&&(r.checked=!0),r.onclick=function(t){g.set(n),e.showSeasonDetails(n)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(s,i)},o=0;o<t.length;o++)n(o);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map((function(e){var t,s,o,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9,watchedPercentage:(null==n||null===(i=n.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var o=function(o){var i,l,r,d,c,u,m,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:o}),f=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")}),C=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,f),a.dom.appendContent(h,C),a.dom.appendContent(v,h),a.dom.appendContent(s,v);var g=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[o])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[o])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(u=c.customData)||void 0===u?void 0:u.fallbackImage)),E.alt="".concat(null===(m=t[o])||void 0===m?void 0:m.title),a.dom.appendContent(g,E),a.dom.appendContent(g,N),a.dom.appendContent(v,g),a.dom.appendContent(s,v),g.onclick=function(e){var s;e.stopPropagation(),p(null===(s=t[o])||void 0===s?void 0:s.id),y(n.playerId,t[o].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},h.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=C()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=h(c());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as d,B as c}from"./icons-79ad4d7d.js";import{f as u,a3 as m,a4 as
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import o from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{e as r,f as d,B as c}from"./icons-79ad4d7d.js";import{f as u,a3 as m,a4 as v,$ as p,R as h,g as f,V as C,P as y,q as g}from"./beacon-37a5aa2a.js";import{a as b}from"./autoNextVideo-355201d8.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-3cb40c3d.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),S=function(){o(x,E);var S,k,L=(S=x,k=N(),function(){var e,t=l(S);if(k){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function x(s){var o,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,x),(d=L.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(o=c.sres)||void 0===o?void 0:o.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=n(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,C,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,g=[];y.map((function(t){g.push.apply(g,e(t.episodes))})),m(g),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:g,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(x,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-2d6660c6.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(p(),e.classList.remove("hidden"),s.classList.add("open")):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(s)};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});o.onclick=function(){if("series-selector-cross-icon"===o.className)e.classList.add("hidden"),s.classList.remove("open");else if("series-selector-back-icon"===o.className){var n=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),o.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(n,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var l=h(d());o.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),f(this.playerId).on("fullscreenchange",(function(){var s=document.getElementById(t.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;f(this.playerId);for(var t=C(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(n));var l=document.createElement("div");l.className="season - ".concat(n),l.textContent=null===(o=t[n])||void 0===o?void 0:o.title;var r=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==n&&(r.checked=!0),r.onclick=function(t){y.set(n),e.showSeasonDetails(n)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(s,i)},o=0;o<t.length;o++)n(o);return s}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map((function(e){var t,s,o,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(s=e.gist)||void 0===s||null===(o=s.imageGist)||void 0===o?void 0:o.r16x9,watchedPercentage:(null==n||null===(i=n.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var o=function(o){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container"}),m=a.dom.createEl("div",{className:"series-section",index:o}),p=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")}),a.dom.appendContent(m,p),a.dom.appendContent(u,m),a.dom.appendContent(s,u);var h=a.dom.createEl("div",{className:"series-section-expanded hidden"}),f=(null===(l=t[o])||void 0===l?void 0:l.description)||"";(null===(r=f)||void 0===r?void 0:r.length)>170&&(f=f.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(f||"")});var C=a.dom.createEl("img",{className:"series-image"});C.src="".concat(null===(d=t[o])||void 0===d?void 0:d.img),C.alt="".concat(null===(c=t[o])||void 0===c?void 0:c.title),a.dom.appendContent(h,C),a.dom.appendContent(u,h),a.dom.appendContent(s,u),h.onclick=function(e){var s;e.stopPropagation(),v(null===(s=t[o])||void 0===s?void 0:s.id),g(n.playerId,t[o].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},m.onclick=function(t){var s,n,o,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=C()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=h(c());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),x}();export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as l,f as d,T as s}from"./icons-79ad4d7d.js";import{$ as c,a0 as u,a1 as p,a2 as m,g as h,_ as v,R as f}from"./beacon-37a5aa2a.js";import{g}from"./renditions-5556ca50.js";import{playSelectedResolution as y}from"./resolution-b1192d49.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import a from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{g as l,f as d,T as s}from"./icons-79ad4d7d.js";import{$ as c,a0 as u,a1 as p,a2 as m,g as h,_ as v,R as f}from"./beacon-37a5aa2a.js";import{g}from"./renditions-5556ca50.js";import{playSelectedResolution as y}from"./resolution-b1192d49.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/assertThisInitialized";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(I,E);var N,k,B=(N=I,k=C(),function(){var e,t=o(N);if(k){var a=o(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return i(this,e)});function I(e){var a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,I),(a=B.call(this,e,n)).playerId=n.playerId,a.seriesData=n.sres,a.currentVideoData=n.res,a.initialiseStructure(),a.loadCSS(),a.resolutionBitrateMap,a}return a(I,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach((function(e){var a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(a){var n=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(a,n||1/0))}}))}},{key:"isEnhancedBitrate",value:function(e){var t,a=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),n=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!a||!n)&&a>n}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./settings-icon-1fbc99bc.js").then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),a=r.dom.createEl("div",{className:"selection-container hidden"});r.dom.$(".settings-selector-icon",this.el()).onclick=function(){var n;null!==(n=a.classList)&&void 0!==n&&n.contains("hidden")?(c(),a.classList.remove("hidden"),t.classList.add("open"),a.style.right="0px",u(e.playerId,a)):(a.classList.add("hidden"),t.classList.remove("open"),a.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");a.style.height="".concat(i),r.dom.appendContent(t,a),n.style.overflow="hidden",this.addFunctionality(a),p(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),a=r.dom.createEl("div",{className:"settings-selector-head"}),n=r.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=r.dom.createEl("div",{className:"settings-selector-title",innerHTML:b("settingsTitle")||"Settings"}),o=r.dom.createEl("div",{className:"settings-selector-content"}),l=r.dom.createEl("div",{className:"settings-container"}),s=this.createVideoQualityContainer();r.dom.appendContent(l,s);var c=this.createAudioQualityContainer();r.dom.appendContent(l,c),r.dom.appendContent(a,n),r.dom.appendContent(a,i),r.dom.appendContent(e,a),r.dom.appendContent(e,o),r.dom.appendContent(o,l),m(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=h(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var a=r.dom.createEl("div",{className:"audio-language-container"}),n=r.dom.createEl("div",{className:"audio-language-container-title",innerHTML:b("audioLanguageText")||"Audio Language"});r.dom.appendContent(a,n);for(var i=function(e){var n,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(n=t[e])||void 0===n?void 0:n.label;var l=r.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});l.setAttribute("type","radio"),1==t[e].enabled&&(l.checked=!0),l.onchange=function(a){t.map((function(e){e.enabled=!1})),t[e].enabled=!0},r.dom.appendContent(i,l),r.dom.appendContent(i,o),r.dom.appendContent(a,i)},o=0;o<t.length;o++)i(o);return a}}},{key:"createVideoQualityContainer",value:function(){var t=this,a=r.dom.createEl("div",{className:"video-quality-container"}),n=r.dom.createEl("div",{className:"video-quality-container-title",innerHTML:b("videoQualityText")||"Video Quality"});r.dom.appendContent(a,n);var i=[].concat(e(g(this.playerId)),[{height:"Auto"}]).sort((function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)}));this.fillResolutionBitrateMap(i),y(this.playerId,"raw",!0);for(var o=function(e){var n,o,l,d=document.createElement("label"),c=document.createElement("div"),u=document.createElement("div");u.className="video-quality-bitrate-label",c.className="video-quality-holder",d.className="video-quality-label-container",d.setAttribute("for","quality".concat(e));var p=document.createElement("div");p.className="video-quality - ".concat(e);var m=(null==i||null===(n=i[e])||void 0===n?void 0:n.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),h=document.createTextNode(m),g="".concat(t.isEnhancedBitrate(i[e])?b("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(g);if(u.appendChild(C),p.appendChild(h),(null==i||null===(l=i[e])||void 0===l?void 0:l.height)>=720)for(var E=v("<span class='hd-rendition'> HD </span>");null!=E&&E.firstChild;)p.appendChild(E.firstChild);var N=r.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});N.setAttribute("type","radio"),N.onchange=function(a){var n=i[e];"true"=="".concat("Auto"==i[e].height)?y(t.playerId,n,!0):y(t.playerId,n)};var k=document.createElement("span");k.className=g?"check-mark center":"check-mark";var B=f(s());k.appendChild(B),c.appendChild(N),c.appendChild(k),c.appendChild(p),r.dom.appendContent(d,c),d.appendChild(u),r.dom.appendContent(a,d)},l=0;l<i.length;l++)o(l);return a}}]),I}();export{N as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,o,p as l,q as i}from"./features-8d37589f.js";import{g as r,T as n}from"./beacon-37a5aa2a.js";import{a,i as t}from"./index-5d1bfb67.js";import s from"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-5556ca50.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-355201d8.js";import"./util-3cb40c3d.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function u(s,u){r(s).addClass("skin_vlone"),function(o,l){var i=r(o);i&&(i.on("loadeddata",(function(){var e,r,s,u,d;i.qualityMenu({useResolutionLabels:!0}),!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(r=window)&&void 0!==r&&null!==(s=r.app_data)&&void 0!==s&&null!==(u=s.appcmsMain)&&void 0!==u&&null!==(d=u.features)&&void 0!==d&&d.auto_play)||null!=l&&l.liveVideo||a(o,l),null!=l&&l.liveVideo||n()||t(o)})),i.one("play",(function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(o,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)})))}(s,u),function(e,n){var a,t,s,u;(null==n||null===(a=n.relatedVideos)||void 0===a||null===(t=a.content)||void 0===t?void 0:t.length)>0&&o(e,null==n?void 0:n.relatedVideos);null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&l(e,n);(null==n||null===(u=n.streams)||void 0===u?void 0:u.length)>1&&i(e,null==n?void 0:n.streams);!function(e,o){var l=r(e),i=null==o?void 0:o.tvProviderLogoUrl;if(i){var n=document.createElement("div");n.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",n.append(a),l.el().appendChild(n),l.on("useractive",(function(){n.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||n.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?n.style.top="3.2rem":n.style.top="1rem"}))}}(e,n)}(s,u),d()}var d=function(){var e,o,l,i,r,n,a,t,u,d,p,v,m=s.dom.$(".vjs-play-progress"),c=s.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");c&&(c.style.color="".concat(null===(e=window)||void 0===e||null===(o=e.app_data)||void 0===o||null===(l=o.appcmsMain)||void 0===l||null===(i=l.brand)||void 0===i||null===(r=i.cta)||void 0===r||null===(n=r.primary)||void 0===n?void 0:n.backgroundColor)),m&&(m.style.background="".concat(null===(a=window)||void 0===a||null===(t=a.app_data)||void 0===t||null===(u=t.appcmsMain)||void 0===u||null===(d=u.brand)||void 0===d||null===(p=d.cta)||void 0===p||null===(v=p.primary)||void 0===v?void 0:v.backgroundColor))};export{u as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as o,d as r,e as n}from"./features-
|
|
1
|
+
import{a as e,b as t,c as o,d as r,e as n}from"./features-8d37589f.js";import{g as l,m as i,r as s,a,S as u}from"./beacon-37a5aa2a.js";import{S as d,M as c,a as m,N as p,b as v,R as f}from"./icons-79ad4d7d.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-5556ca50.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function b(b,y){!function(e,t){var o,r,n=l(e),a=null==n||null===(o=n.controlBar)||void 0===o||null===(r=o.playToggle)||void 0===r?void 0:r.el_,u=document.getElementsByTagName("video")[0];u&&u.addEventListener("keydown",(function(o){switch(o.key){case" ":return o.preventDefault(),u&&u.focus(),void(a&&a.click());case"m":case"M":return o.preventDefault(),u&&u.focus(),void(n.muted()?n.muted(!1):n.muted(!0));case"f":o.preventDefault(),u&&u.focus();var r=document.querySelector(".vjs-fullscreen-control");return void(r&&r.click());case"F":o.preventDefault();var l=document.querySelector(".vjs-fullscreen-control");return void(l&&l.click());case"ArrowLeft":if((1==t.liveVideo||1==t.liveui)&&0==t.liveui)break;return o.preventDefault(),u&&u.focus(),void s(e,10);case"ArrowRight":if(1==t.liveVideo||1==t.liveui)break;return o.preventDefault(),u&&u.focus(),void i(e,10);default:return}}))}(b,y),import("./skin-cd537931.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&r(e,"default",v());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&n(e,"default",f())}(b,y),function(r,n){var i=l(r),s=(null==n?void 0:n.sres)||null;i.on("loadeddata",(function(){e(r,"default",d()),s&&import("./nextEpisodeButton-e990f8b8.js").then((function(e){e.initaliseFunctionality(n.sres.seasons,a())}))})),i.one("loadedmetadata",(function(){var e;s&&(t(r,null==n||null===(e=n.sres)||void 0===e?void 0:e.seasons,n),o(n.sres,n.res,r))}))}(b,y),function(e,t){var o,r,n,i,s=l(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],v=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),v&&(v.style.display="none"));null===(o=s.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(r=o.el())||void 0===r||r.appendChild(u(c(window.controlsColor))),null===(n=s.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(u(m(window.controlsColor)));var f=s.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(p()));var b=document.createElement("div");b.classList.add("caption-header"),f.querySelector(".vjs-menu-content").insertBefore(b,f.querySelector(".vjs-menu-item"))}(b,y)}export{b as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,p as t,n as
|
|
1
|
+
import{g as e,p as t,n as r}from"./beacon-37a5aa2a.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"video.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),n(),function(o){var n=document.getElementById("".concat(o)),a=e(o);n&&n.addEventListener("touchstart",(function(){a.paused()?t(o):r(o)}))}(o)}var n=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,Z as r}from"./beacon-37a5aa2a.js";import{f as t,n as o}from"./features-
|
|
1
|
+
import{g as e,Z as r}from"./beacon-37a5aa2a.js";import{f as t,n as o}from"./features-8d37589f.js";import{g as i}from"./renditions-5556ca50.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"video.js";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./localisation-0bf399a1.js";function n(n,a){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(o,n){e(o).on("loadeddata",(function(){var e;(null===(e=i(o))||void 0===e?void 0:e.length)>0&&t(o,n),null!=n&&n.disableCaptions&&r(o)}))}(n,a),function(r){var t=e(r);t.controls(!1),o(r)}(n)}export{n as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as l,h as o,d as i,e as t,i as n,j as r,k as a,l as s,m as d}from"./features-
|
|
1
|
+
import{f as e,g as l,h as o,d as i,e as t,i as n,j as r,k as a,l as s,m as d}from"./features-8d37589f.js";import{M as u,a as m,c as v,d as c}from"./icons-79ad4d7d.js";import{g as p,x as h,T as f,S as g,d as b}from"./beacon-37a5aa2a.js";import{g as y}from"./renditions-5556ca50.js";import{a as j,i as C}from"./index-5d1bfb67.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-355201d8.js";import"./util-3cb40c3d.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function V(i,t){var n=p(i);n&&(n.on("loadeddata",(function(){var o,r;(null===(o=y(i))||void 0===o?void 0:o.length)>0&&e(i,t),(null===(r=h(i))||void 0===r?void 0:r.length)>0&&l(i,t),j(i,t),function(e,l){var o,i=Math.floor(e/60),t=null===(o=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===o?void 0:o[0];t&&(t.style.marginRight=i>60?"56px":"41px");var n=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");l&&n.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",t&&(t.style.marginRight="56px"))}(n.duration(),(null==t?void 0:t.liveVideo)||!1),null!=t&&t.liveVideo||f()||C(i)})),n.one("play",(function(){var e,l,t,n;null!==(e=window)&&void 0!==e&&null!==(l=e.customData)&&void 0!==l&&l.iframeOverlayUrl&&o(i,null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n?void 0:n.iframeOverlayUrl)})))}function w(e,l){!function(){"Chrome"==b()&&import("./chromett-a3cbb2e1.js").then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));import("./skin-fbc45594.js").then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),V(e,l),function(e,l){var o,i,t,n,r,a,s=p(e);null==s||null===(o=s.controlBar)||void 0===o||null===(i=o.getChild("FullscreenToggle"))||void 0===i||null===(t=i.el())||void 0===t||t.appendChild(g(u(window.controlsColor))),null==s||null===(n=s.controlBar)||void 0===n||null===(r=n.getChild("FullscreenToggle"))||void 0===r||null===(a=r.el())||void 0===a||a.appendChild(g(m(window.controlsColor)));var d=document.getElementsByClassName("vjs-time-control");l.liveVideo&&d[0]&&(d[0].style.display="none")}(e,l),function(e,l){var o,u,m,p,h,f;0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&i(e,"defaultV2",v());(0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&t(e,"defaultV2",c());l.liveVideo||n(e);(null==l||null===(o=l.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(e,null==l?void 0:l.relatedVideos);(null==l||null===(m=l.streams)||void 0===m?void 0:m.length)>1&&a(e,null==l?void 0:l.streams);(null==l||null===(p=l.playlist)||void 0===p||null===(h=p.content)||void 0===h?void 0:h.length)>0&&s(e,null==l?void 0:l.playlist);null!=l&&null!==(f=l.series)&&void 0!==f&&f.enable&&d(e,l)}(e,l),function(e,l){var o=p(e),i=null==l?void 0:l.tvProviderLogoUrl;if(!i)return;var t=document.createElement("div");t.className="tvProviderImage";var n=document.createElement("img");n.src="".concat(i),n.alt="Provider Image",t.append(n),o.el().appendChild(t),o.on("useractive",(function(){t.classList.remove("vjs-fade")})),o.on("userinactive",(function(){o.paused()||t.classList.add("vjs-fade")})),o.on("fullscreenchange",(function(){o.isFullscreen_?t.style.top="3.2rem":t.style.top="1rem"}))}(e,l)}export{w as initialiseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=".video-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.video-selector-icon {\n cursor: pointer;\n}\n\n.video-selection-container {\n position: absolute;\n width: 350px;\n bottom: 0px;\n right: -350px;\n background: #00000080 !important;\n z-index: -1;\n transition: right 300ms ease-out;\n}\n\n.video-container {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n}\n\n.video-selection.open {\n background: rgba(255, 255, 255, 0.20) !important;\n}\n\n.video-selector-head {\n display: flex;\n align-items: center;\n padding-top: 18px;\n padding-left: 20px;\n margin-bottom: 20px;\n}\n\n.video-selector-title {\n font-size: 18px;\n font-weight: 600;\n margin-left: 25px;\n user-select: none;\n}\n\n.video-selector-cross-icon {\n cursor: pointer;\n}\n\n.video-selector-content {\n height: 74%;\n overflow: scroll;\n}\n\n.video-selector-content::-webkit-scrollbar {\n display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.video-selector-content {\n -ms-overflow-style: none;\n /* IE and Edge */\n scrollbar-width: none;\n /* Firefox */\n}\n\n.video-selector-content-video {\n height: 300px;\n margin-bottom: 30px;\n}\n\n.recommended {\n height: 175px;\n width: 309px;\n background-repeat: no-repeat;\n background-size: contain;\n}\n.related-thumbnail-image{\n width: 100%;\n height: 100%;\n}\n.video {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-bottom: 12px;\n}\n\n.parent {\n margin: 21px 52px 23px 34px;\n\n}\n\n.recommended:hover {\n cursor: pointer;\n}\n\n.info {\n font-size: 13px;\n padding: 7px 22px;\n}\n\n@media (max-width:600px){\n .video-selector-cross-icon>svg{\n height: 12px;\n }\n .video-selector-title{\n font-size: 14px;\n }\n .video-selector-content{\n height: 52%;\n }\n .video-selection-container{\n width: 200px;\n }\n .recommended{\n height: 90px !important;\n width: 154px !important;\n }\n .info {\n font-size: 9px !important;\n }\n .video-selector-title{\n margin-left: 13px;\n }\n}";export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as l,f as r}from"./icons-79ad4d7d.js";import{W as s,$ as d,a0 as c,a1 as m,a2 as u,X as p,q as v}from"./beacon-37a5aa2a.js";import{a as h}from"./autoNextVideo-355201d8.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-3cb40c3d.js";function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y=i.getComponent("Component"),g=function(){o(E,y);var g,C,N=(g=E,C=b(),function(){var e,t=a(g);if(C){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function E(t){var o,n,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,E),(a=N.call(this,t,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=i.related.content,a.cb=(null==i||null===(o=i.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==i||null===(n=i.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(s(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(E,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=i.dom.createEl("div",{className:"video-selection-container hidden"});i.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(d(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",c(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var a=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(a),i.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),m(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=i.dom.createEl("div",{className:"video-selector-head"}),a=i.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(r())});a.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var l=i.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),d=i.dom.createEl("div",{className:"video-selector-content"}),c=i.dom.createEl("div",{className:"video-container"}),m=function(e){var o,n,a,l,r,m=i.dom.createEl("div",{className:"video -".concat(e)}),u=i.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){s(e+1);for(var o=i.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";p(e),v(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l?void 0:l.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=i.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(r=t.videos[e])||void 0===r?void 0:r.title)||"")});i.dom.appendContent(m,u),i.dom.appendContent(m,f),i.dom.appendContent(c,m),i.dom.appendContent(d,c)},h=0;h<this.videos.length;h++)m(h);i.dom.appendContent(n,a),i.dom.appendContent(n,l),i.dom.appendContent(e,n),i.dom.appendContent(e,d),u(this.playerId,e)}}]),E}();export{g as default};
|
package/package.json
CHANGED
package/cjs/features-eb660010.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./beacon-ca6bdec3.js"),s=require("./renditions-d4a3642f.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){var t=p();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-6205c237.js")})).then((function(r){var n,o,l,s,c=r.default,u=a.getPlayer(e);i.registerComponent("captionSelector",c),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=a.getPlayer(e).el(),r=0,n=a.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",(function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e})),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then((function(){return require("./multicamv2-685f96f0.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then((function(){return require("./nextEpisodeButton-19833648.js")})).then((function(n){var o=n.default,l=a.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)}))},exports.addOutputtingOverlay=function(e,t){var r=a.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then((function(){return require("./playlist-9e6e42a9.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},exports.addResolutionModule=function(e,t,r){Promise.resolve().then((function(){return require("./resolution-4eae5e79.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a.getPlayer(e),c=s.getRenditions(e);(null==c?void 0:c.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:c},l.controlBar.children().length-4))}))},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var c=a.parseSvgString(l);return o.append(c),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then((function(){return require("./series-b9ff6f6e.js")})).then((function(n){var o=n.seriesModule,l=a.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)}))},u=0;u<s.length;u++)c(u)}))},exports.addSeriesSelectorV2=function(t,r){Promise.resolve().then((function(){return require("./series-v2-8b6f8385.js")})).then((function(n){var o=n.default,l=a.getPlayer(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({playerId:t},r),l.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-7099e038.js")})).then((function(r){var n,o,l,s,c=r.default,u=a.getPlayer(e);i.registerComponent("settingsSelector",c),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(s=l[0])||void 0===s||s.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)}))},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=d(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var c=a.parseSvgString(l);return o.append(c),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=d(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(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)},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-186cabf3.js")})).then((function(r){var n=r.default,o=a.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))};
|
package/esm/features-ef70c938.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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{g as a,R as s,r as c,m as d}from"./beacon-37a5aa2a.js";import{g as u}from"./renditions-5556ca50.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 f(e){var t=h();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 h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=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)},g=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-rewind-button");var c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){c(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),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 c=s(l);return o.append(c),r}return n(a,[{key:"handleClick",value:function(){d(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},C=function(e,t,n){import("./resolution-b1192d49.js").then((function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=a(e),s=u(e);(null==s?void 0:s.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:s},l.controlBar.children().length-4))}))},B=function(e,t,n){import("./nextEpisodeButton-e990f8b8.js").then((function(r){var o=r.default,l=a(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)}))},b=function(e,t,n){import("./series-5e8c84d7.js").then((function(r){var o=r.seriesModule,l=a(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var s=document.querySelectorAll(".season-title-sdk"),c=function(e){s[e].addEventListener("click",(function(){t[e]&&r.handleSeasonChange(t[e],e,l,n)}))},d=0;d<s.length;d++)c(d)}))},j=function(e,t){import("./videoSelector-45e8433f.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},k=function(e,t){import("./caption-settings-6aa826ce.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("captionSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},E=function(e,t){import("./settings-icon-d476eb7c.js").then((function(n){var r,o,l,s,c=n.default,d=a(e);i.registerComponent("settingsSelector",c),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===(s=l[0])||void 0===s||s.remove(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},O=function(e,t){import("./playlist-a9ce0c79.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)}))},S=function(t,n){import("./series-v2-1bcf61b1.js").then((function(r){var o=r.default,l=a(t);i.registerComponent("seriesV2",o),l.getChild("controlBar").addChild("seriesV2",function(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}({playerId:t},n),l.controlBar.children().length-3)}))},w=function(e,t){import("./multicamv2-2d2b4a01.js").then((function(n){var r=n.default,o=a(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)}))},I=function(e,t){var n=a(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},M=function(e){var t=a(e).el(),n=0,r=a(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};export{C as a,b,B as c,y as d,g as e,E as f,k as g,I as h,v as i,j,w as k,O as l,S as m,M as n};
|
package/esm/skin-b9042825.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,j as o,m as l,k as i}from"./features-ef70c938.js";import{g as r,T as n}from"./beacon-37a5aa2a.js";import{a,i as t}from"./index-5d1bfb67.js";import s from"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-5556ca50.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-355201d8.js";import"./util-3cb40c3d.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";function d(s,d){r(s).addClass("skin_vlone"),function(o,l){var i=r(o);i&&(i.on("loadeddata",(function(){var e,r,s,d,u;i.qualityMenu({useResolutionLabels:!0}),!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(r=window)&&void 0!==r&&null!==(s=r.app_data)&&void 0!==s&&null!==(d=s.appcmsMain)&&void 0!==d&&null!==(u=d.features)&&void 0!==u&&u.auto_play)||null!=l&&l.liveVideo||a(o,l),null!=l&&l.liveVideo||n()||t(o)})),i.one("play",(function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(o,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)})))}(s,d),function(e,n){var a,t,s,d;(null==n||null===(a=n.relatedVideos)||void 0===a||null===(t=a.content)||void 0===t?void 0:t.length)>0&&o(e,null==n?void 0:n.relatedVideos);null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&l(e,n);(null==n||null===(d=n.streams)||void 0===d?void 0:d.length)>1&&i(e,null==n?void 0:n.streams);!function(e,o){var l=r(e),i=null==o?void 0:o.tvProviderLogoUrl;if(i){var n=document.createElement("div");n.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",n.append(a),l.el().appendChild(n),l.on("useractive",(function(){n.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||n.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?n.style.top="3.2rem":n.style.top="1rem"}))}}(e,n)}(s,d),u()}var u=function(){var e,o,l,i,r,n,a,t,d,u,p,m,v=s.dom.$(".vjs-play-progress"),c=s.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");c&&(c.style.color="".concat(null===(e=window)||void 0===e||null===(o=e.app_data)||void 0===o||null===(l=o.appcmsMain)||void 0===l||null===(i=l.brand)||void 0===i||null===(r=i.cta)||void 0===r||null===(n=r.primary)||void 0===n?void 0:n.backgroundColor)),v&&(v.style.background="".concat(null===(a=window)||void 0===a||null===(t=a.app_data)||void 0===t||null===(d=t.appcmsMain)||void 0===d||null===(u=d.brand)||void 0===u||null===(p=u.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor))};export{d as initialiseSkin};
|