@viewlift/player-backup 2.0.362-backup → 2.0.363-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/_commonjsHelpers-81c4d214.js +1 -0
- package/cjs/{autoNextVideo-8111b537.js → autoNextVideo-b57fd94e.js} +1 -1
- package/cjs/bundle.css +1064 -1064
- package/cjs/{features-fd475954.js → features-84532cac.js} +1 -1
- package/cjs/generic-ca18a946.js +1 -0
- package/cjs/{index-f8caea2b.js → index-27a62060.js} +1 -1
- package/cjs/index-62250ea0.js +1 -0
- package/cjs/{index-b66b50e9.js → index-66e473f7.js} +1 -1
- package/cjs/index-91ceac93.js +1 -0
- package/cjs/{index-5f2563a2.js → index-d28c1d04.js} +1 -1
- package/cjs/{index-6be87812.js → index-ee9cb57f.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-0a3c45d5.js → multicamv2-96472b7c.js} +1 -1
- package/cjs/{multicamv2-5a835f15.js → multicamv2-a3b15f57.js} +1 -1
- package/cjs/{nextEpisodeButton-6e185ee3.js → nextEpisodeButton-0e7c699e.js} +1 -1
- package/cjs/{playlist-aab0b8a8.js → playlist-6dbaae47.js} +1 -1
- package/cjs/{series-427b2d48.js → series-3754d0a9.js} +1 -1
- package/cjs/{series-v2-f06d976c.js → series-v2-00ad95c3.js} +1 -1
- package/cjs/{series-v2-49e78a93.js → series-v2-faf6c719.js} +1 -1
- package/cjs/{settings-icon-813fb46e.js → settings-icon-81e0bc78.js} +1 -1
- package/cjs/{skin-47953255.js → skin-0220bbd7.js} +1 -1
- package/cjs/{skin-cd1f686a.js → skin-13c66191.js} +1 -1
- package/cjs/{skin-acc2674a.js → skin-2b08e648.js} +1 -1
- package/cjs/{skin-8143f616.js → skin-5e92eba9.js} +1 -1
- package/cjs/{skin-05f50e97.js → skin-5f049521.js} +1 -1
- package/cjs/{skin-568debb8.js → skin-65a80a93.js} +1 -1
- package/cjs/{skin-78293912.js → skin-8111bf49.js} +1 -1
- package/cjs/{skin-e375a1f5.js → skin-c211c3a9.js} +1 -1
- package/cjs/{skin-d3b6cdb7.js → skin-e3d5c1a7.js} +1 -1
- package/cjs/{skin-13dc9279.js → skin-eecb289d.js} +1 -1
- package/cjs/{videoSelector-e0aef357.js → videoSelector-0bd954a8.js} +1 -1
- package/cjs/{videoSelector-2fc51bd0.js → videoSelector-99835c7d.js} +1 -1
- package/esm/_commonjsHelpers-0307ea52.js +1 -0
- package/esm/{autoNextVideo-30de255c.js → autoNextVideo-ca468d20.js} +1 -1
- package/esm/bundle.css +1064 -1064
- package/esm/{features-bc01ec22.js → features-0d4290a8.js} +1 -1
- package/esm/generic-6c14b09e.js +1 -0
- package/esm/index-23afe568.js +1 -0
- package/esm/{index-082ec9a4.js → index-4be0bb5b.js} +1 -1
- package/esm/{index-5b6be94c.js → index-8b7ad7a7.js} +1 -1
- package/esm/{index-6a666280.js → index-c276e2a6.js} +1 -1
- package/esm/index-c4656b30.js +1 -0
- package/esm/{index-2cd58e79.js → index-e096af23.js} +1 -1
- package/esm/{index-563582e4.js → index-eded6cb0.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-8d15d054.js → multicamv2-63047664.js} +1 -1
- package/esm/{multicamv2-dff8a123.js → multicamv2-7b8465e8.js} +1 -1
- package/esm/{nextEpisodeButton-16c34bc9.js → nextEpisodeButton-a3ed5cde.js} +1 -1
- package/esm/{playlist-540b4259.js → playlist-41378efa.js} +1 -1
- package/esm/remote/airplay/src/js/components/AirPlayButton.d.ts +2 -0
- package/esm/remote/airplay/src/js/enableAirPlay.d.ts +2 -0
- package/esm/remote/airplay/src/js/index.d.ts +2 -0
- package/esm/remote/airplay/src/js/lib/hasAirPlayAPISupport.d.ts +2 -0
- package/esm/remote/chromecast/src/js/chromecast/ChromecastSessionManager.d.ts +168 -0
- package/esm/remote/chromecast/src/js/components/ChromecastButton.d.ts +2 -0
- package/esm/remote/chromecast/src/js/enableChromecast.d.ts +2 -0
- package/esm/remote/chromecast/src/js/index.d.ts +2 -0
- package/esm/remote/chromecast/src/js/preloadWebComponents.d.ts +2 -0
- package/esm/remote/chromecast/src/js/tech/ChromecastTech.d.ts +2 -0
- package/esm/remote/chromecast/src/js/tech/ChromecastTechUI.d.ts +92 -0
- package/esm/{series-882bbe59.js → series-b9736092.js} +1 -1
- package/esm/{series-v2-6a972007.js → series-v2-1d1e574d.js} +1 -1
- package/esm/{series-v2-6b9a2ecb.js → series-v2-768b237e.js} +1 -1
- package/esm/{skin-bfd3210c.js → skin-012028ab.js} +1 -1
- package/esm/{skin-c886fc0c.js → skin-05244e25.js} +1 -1
- package/esm/{skin-aa1267d2.js → skin-30bed6f1.js} +1 -1
- package/esm/{skin-fd52a90d.js → skin-322d12ce.js} +1 -1
- package/esm/{skin-d27184a9.js → skin-35b6305b.js} +1 -1
- package/esm/{skin-2fca8a45.js → skin-5bafce20.js} +1 -1
- package/esm/{skin-3c3761e6.js → skin-5dd350fb.js} +1 -1
- package/esm/{skin-8bbf3d1b.js → skin-62c1d140.js} +1 -1
- package/esm/{skin-d08d9bb8.js → skin-9126d695.js} +1 -1
- package/esm/{skin-c88666c4.js → skin-eb02f212.js} +1 -1
- package/esm/{apis → src/apis}/index.d.ts +4 -4
- package/esm/{helpers → src/helpers}/token.d.ts +1 -1
- package/esm/{index.d.ts → src/index.d.ts} +1 -1
- package/esm/{videoSelector-25628f8a.js → videoSelector-323e9112.js} +1 -1
- package/esm/{videoSelector-4102e800.js → videoSelector-f3f07a76.js} +1 -1
- package/package.json +10 -3
- package/cjs/generic-97f909c9.js +0 -1
- package/esm/generic-4943353c.js +0 -1
- /package/esm/{assets → src/assets}/icons.d.ts +0 -0
- /package/esm/{components → src/components}/advertisement/advertisement.d.ts +0 -0
- /package/esm/{components → src/components}/auto-next-video/autoNextVideo.d.ts +0 -0
- /package/esm/{components → src/components}/big-mute-btn/index.d.ts +0 -0
- /package/esm/{components → src/components}/broadcaster_image/index.d.ts +0 -0
- /package/esm/{components → src/components}/caption-settings/caption-settings.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/bootstrap.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/events.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/index.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/markers.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/offsets.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/store.d.ts +0 -0
- /package/esm/{components → src/components}/chapters/timelineMapper.d.ts +0 -0
- /package/esm/{components → src/components}/dvr-seekbar/index.d.ts +0 -0
- /package/esm/{components → src/components}/multicam/multicam.d.ts +0 -0
- /package/esm/{components → src/components}/multicam-v2/multicamv2.d.ts +0 -0
- /package/esm/{components → src/components}/multicam-v2_TEMP/multicamv2.d.ts +0 -0
- /package/esm/{components → src/components}/next-ep-preview/next-ep-preview.d.ts +0 -0
- /package/esm/{components → src/components}/next-episode/nextEpisodeButton.d.ts +0 -0
- /package/esm/{components → src/components}/playlist-tray/playlist.d.ts +0 -0
- /package/esm/{components → src/components}/quality-selector/index.d.ts +0 -0
- /package/esm/{components → src/components}/resolution/resolution.d.ts +0 -0
- /package/esm/{components → src/components}/series/series.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2/helper.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2/series-v2.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2_TEMP/helper.d.ts +0 -0
- /package/esm/{components → src/components}/series-v2_TEMP/series-v2.d.ts +0 -0
- /package/esm/{components → src/components}/settings-icon/settings-icon.d.ts +0 -0
- /package/esm/{components → src/components}/subs-caps-button/subs-caps-button.d.ts +0 -0
- /package/esm/{components → src/components}/text-track-settings/text-track-settings.d.ts +0 -0
- /package/esm/{components → src/components}/timer/index.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/constants.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/index.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/session.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/transmitAd.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/transmitAdManager.d.ts +0 -0
- /package/esm/{components → src/components}/transmit/utils.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/helper.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/index.d.ts +0 -0
- /package/esm/{components → src/components}/trickplay/videojs.thumbnails.d.ts +0 -0
- /package/esm/{components → src/components}/video-selector/videoSelector.d.ts +0 -0
- /package/esm/{components → src/components}/video-selector_TEMP/videoSelector.d.ts +0 -0
- /package/esm/{components → src/components}/watch-history/handleWatchHistory.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/epg.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/external.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/index.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/series.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/content_types/vod.d.ts +0 -0
- /package/esm/{contentHandler → src/contentHandler}/firePlayer.d.ts +0 -0
- /package/esm/{core → src/core}/captions.d.ts +0 -0
- /package/esm/{core → src/core}/generic.d.ts +0 -0
- /package/esm/{core → src/core}/player_instance.d.ts +0 -0
- /package/esm/{core → src/core}/renditions.d.ts +0 -0
- /package/esm/{core → src/core}/util.d.ts +0 -0
- /package/esm/{core → src/core}/volume.d.ts +0 -0
- /package/esm/{dash → src/dash}/dashHandler.d.ts +0 -0
- /package/esm/{dash → src/dash}/linear_ssai.d.ts +0 -0
- /package/esm/{dash → src/dash}/sgai.d.ts +0 -0
- /package/esm/{features → src/features}/scheduleWindow/index.d.ts +0 -0
- /package/esm/{features.d.ts → src/features.d.ts} +0 -0
- /package/esm/{globalPlayerEvents.d.ts → src/globalPlayerEvents.d.ts} +0 -0
- /package/esm/{helpers → src/helpers}/accessibility.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/apiErrorTracker.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/browser.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/browser.test.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/currentVideoInfo.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/drmErrorDetection.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/errorHandling.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/loader.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/localisation.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/playerControlEvents.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/scriptLoader.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/secondary-switching.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/skin.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/sourceRetriever.d.ts +0 -0
- /package/esm/{helpers → src/helpers}/ssaiEventHandler.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/chromecast.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/comscore_dist/index.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/index.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/library.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/videojs-dash5.es.d.ts +0 -0
- /package/esm/{plugins → src/plugins}/videojs_contrib_dash.d.ts +0 -0
- /package/esm/{skin → src/skin}/carousel/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/cn_news/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/default/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/default/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/defaultV2/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/defaultV2/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/index.d.ts +0 -0
- /package/esm/{skin → src/skin}/mini/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/mini/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/minimalist/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/multiplayer/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/multiplayer/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/news/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/news/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/news_live/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/news_live/skin.d.ts +0 -0
- /package/esm/{skin → src/skin}/vl_one/events.d.ts +0 -0
- /package/esm/{skin → src/skin}/vl_one/skin.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/analytics.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/beacon.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/castCommands.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/comscore.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/controlsColor.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/conviva.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/keyboardShortcuts.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/manager.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/qualityLabels.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/relatedVideosManager.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/replaceMacros.d.ts +0 -0
- /package/esm/{utilities → src/utilities}/sse.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-262bef63.js";import{U as s,h as a}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-262bef63.js";import{U as s,h as a}from"./generic-6c14b09e.js";import{f as d}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}var m=r.getComponent("Component"),u=function(){n(u,m);var s,a,d=(s=u,a=p(),function(){var e,t=i(s);if(a){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function u(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(n=d.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(u,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),u}(),c=function(e,t){var n=v(e,t.video.gist.id),o=h(e[n],t.video.gist.id),i=f(e[n],o);x(i.nextEp)},v=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},x=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),m=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=m&&m.firstChild;)null==p||p.appendChild(m.firstChild)};export{u as default,c as initaliseFunctionality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,g as r}from"./icons-262bef63.js";import{U as c,aa as d}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,g as r}from"./icons-262bef63.js";import{U as c,aa as d}from"./generic-6c14b09e.js";import{a as p}from"./autoNextVideo-ca468d20.js";import{j as m,g as u}from"./skin-2a3ee818.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-c276e2a6.js";import"./localisation-0bf399a1.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}}))}}]),g}();export{h as default};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export = ChromecastSessionManager;
|
|
2
|
+
/** @lends ChromecastSessionManager.prototype **/
|
|
3
|
+
declare class ChromecastSessionManager {
|
|
4
|
+
static hasConnected: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether or not the current Chromecast API is available (that is,
|
|
7
|
+
* `window.chrome`, `window.chrome.cast`, and `window.cast` exist).
|
|
8
|
+
*
|
|
9
|
+
* @static
|
|
10
|
+
* @returns {boolean} true if the Chromecast API is available
|
|
11
|
+
*/
|
|
12
|
+
static isChromecastAPIAvailable(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether or not there is a current CastSession and it is connected.
|
|
15
|
+
*
|
|
16
|
+
* @static
|
|
17
|
+
* @returns {boolean} true if the current CastSession exists and is connected
|
|
18
|
+
*/
|
|
19
|
+
static isChromecastConnected(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Stores the state of the current Chromecast session and its associated objects such
|
|
22
|
+
* as the
|
|
23
|
+
* [RemotePlayerController](https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayerController),
|
|
24
|
+
* and the
|
|
25
|
+
* [RemotePlayer](https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayer).
|
|
26
|
+
*
|
|
27
|
+
* WARNING: Do not instantiate this class until the
|
|
28
|
+
* [CastContext](https://developers.google.com/cast/docs/reference/chrome/cast.framework.CastContext)
|
|
29
|
+
* has been configured.
|
|
30
|
+
*
|
|
31
|
+
* For an undocumented (and thus unknown) reason, RemotePlayer and
|
|
32
|
+
* RemotePlayerController instances created before the cast context has been configured
|
|
33
|
+
* or after requesting a session or loading media will not stay in sync with media
|
|
34
|
+
* items that are loaded later.
|
|
35
|
+
*
|
|
36
|
+
* For example, the first item that you cast will work as expected: events on
|
|
37
|
+
* RemotePlayerController will fire and the state (currentTime, duration, etc) of the
|
|
38
|
+
* RemotePlayer instance will update as the media item plays. However, if a new media
|
|
39
|
+
* item is loaded via a `loadMedia` request, the media item will play, but the
|
|
40
|
+
* remotePlayer will be in a "media unloaded" state where the duration is 0, the
|
|
41
|
+
* currentTime does not update, and no change events are fired (except, strangely,
|
|
42
|
+
* displayStatus updates).
|
|
43
|
+
*
|
|
44
|
+
* @param player {object} Video.js Player
|
|
45
|
+
* @constructs ChromecastSessionManager
|
|
46
|
+
*/
|
|
47
|
+
constructor(player: object);
|
|
48
|
+
player: any;
|
|
49
|
+
_sessionListener: any;
|
|
50
|
+
_castListener: any;
|
|
51
|
+
remotePlayer: any;
|
|
52
|
+
remotePlayerController: any;
|
|
53
|
+
/**
|
|
54
|
+
* Add event listeners for events triggered on the current CastContext.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
private _addCastContextEventListeners;
|
|
59
|
+
/**
|
|
60
|
+
* Keeps the player's source cache from being overwritten with the `blob:` URL that
|
|
61
|
+
* MSE-based source handlers (dash.js, VHS) attach to the media element.
|
|
62
|
+
*
|
|
63
|
+
* `_reloadTech` re-sets the same sources on every cast connect/disconnect. Video.js
|
|
64
|
+
* only ignores a tech `sourceset` with a `blob:` URL when the player source differs
|
|
65
|
+
* from the previous one, so on a same-URL reload `currentSources()` is replaced by
|
|
66
|
+
* `{ src: 'blob:...', type: '' }`. That drops `type` and the DRM options, so the next
|
|
67
|
+
* cast sends no license data and the next reload fails with
|
|
68
|
+
* MEDIA_ERR_SRC_NOT_SUPPORTED.
|
|
69
|
+
*
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
private _preserveSourceCacheOnMediaSourceAttach;
|
|
73
|
+
/**
|
|
74
|
+
* Remove event listeners that were added in {@link
|
|
75
|
+
* ChromecastSessionManager#_addCastContextEventListeners}.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private _removeCastContextEventListeners;
|
|
80
|
+
/**
|
|
81
|
+
* Handle the CastContext's SessionState change event.
|
|
82
|
+
*
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private _onSessionStateChange;
|
|
86
|
+
/**
|
|
87
|
+
* Rejoins a CastSession that is already running when this player loads, which is what
|
|
88
|
+
* happens when the page is refreshed while casting. The Cast SDK restores the session
|
|
89
|
+
* on its own, but `hasConnected` is in-memory state that a refresh resets, so without
|
|
90
|
+
* this the Chromecast Tech reports itself unavailable and the player starts playing
|
|
91
|
+
* the item locally while the receiver is still playing it.
|
|
92
|
+
*
|
|
93
|
+
* Only a session that is already playing this player's current source is adopted, so
|
|
94
|
+
* that a session started from another tab or by another app is left alone.
|
|
95
|
+
*
|
|
96
|
+
* @private
|
|
97
|
+
*/
|
|
98
|
+
private _resumeExistingSession;
|
|
99
|
+
/**
|
|
100
|
+
* Returns whether the given MediaSession is playing the item that this player
|
|
101
|
+
* currently has loaded.
|
|
102
|
+
*
|
|
103
|
+
* @private
|
|
104
|
+
* @param mediaSession {object} a Chromecast MediaSession
|
|
105
|
+
* @return {boolean} true if the receiver is playing this player's current source
|
|
106
|
+
*/
|
|
107
|
+
private _isPlayingCurrentSource;
|
|
108
|
+
/**
|
|
109
|
+
* Handle the CastContext's CastState change event.
|
|
110
|
+
*
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
private _onCastStateChange;
|
|
114
|
+
/**
|
|
115
|
+
* Triggers player events that notifies listeners that Chromecast devices are
|
|
116
|
+
* either available or unavailable.
|
|
117
|
+
*
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private _notifyPlayerOfDevicesAvailabilityChange;
|
|
121
|
+
/**
|
|
122
|
+
* Returns whether or not there are Chromecast devices available to cast to.
|
|
123
|
+
*
|
|
124
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework#.CastState
|
|
125
|
+
* @param {String} castState
|
|
126
|
+
* @return {boolean} true if there are Chromecast devices available to cast to.
|
|
127
|
+
*/
|
|
128
|
+
hasAvailableDevices(castState: string): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Opens the Chromecast casting menu by requesting a CastSession. Does nothing if the
|
|
131
|
+
* Video.js player does not have a source.
|
|
132
|
+
*/
|
|
133
|
+
openCastMenu(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Reloads the Video.js player's Tech. This causes the player to re-evaluate which
|
|
136
|
+
* Tech should be used for the current source by iterating over available Tech and
|
|
137
|
+
* calling `Tech.isSupported` and `Tech.canPlaySource`. Video.js uses the first
|
|
138
|
+
* Tech that returns true from both of those functions. This is what allows us to
|
|
139
|
+
* switch back and forth between the Chromecast Tech and other available Tech when a
|
|
140
|
+
* CastSession is connected or disconnected.
|
|
141
|
+
*
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private _reloadTech;
|
|
145
|
+
_resumingSession: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Returns whether the Tech that is currently being loaded should adopt the media that
|
|
148
|
+
* the receiver is already playing, rather than loading the source itself.
|
|
149
|
+
*
|
|
150
|
+
* @return {boolean} true while a rejoined session is being handed to the Tech
|
|
151
|
+
*/
|
|
152
|
+
isResumingSession(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.CastContext
|
|
155
|
+
* @returns {object} the current CastContext, if one exists
|
|
156
|
+
*/
|
|
157
|
+
getCastContext(): object;
|
|
158
|
+
/**
|
|
159
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayer
|
|
160
|
+
* @returns {object} the current RemotePlayer, if one exists
|
|
161
|
+
*/
|
|
162
|
+
getRemotePlayer(): object;
|
|
163
|
+
/**
|
|
164
|
+
* @see https://developers.google.com/cast/docs/reference/chrome/cast.framework.RemotePlayerController
|
|
165
|
+
* @returns {object} the current RemotePlayerController, if one exists
|
|
166
|
+
*/
|
|
167
|
+
getRemotePlayerController(): object;
|
|
168
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export = ChromecastTechUI;
|
|
2
|
+
/**
|
|
3
|
+
* This class represents the UI that is shown in the player while the Chromecast Tech is
|
|
4
|
+
* active. The UI has a single root DOM element that displays the poster image of the
|
|
5
|
+
* current item and title and subtitle. This class receives updates to the poster, title
|
|
6
|
+
* and subtitle when the media item that the player is playing changes.
|
|
7
|
+
*
|
|
8
|
+
* @class ChromecastTechUI
|
|
9
|
+
*/
|
|
10
|
+
declare class ChromecastTechUI {
|
|
11
|
+
_el: DOMElement;
|
|
12
|
+
/**
|
|
13
|
+
* Creates and returns a single DOMElement that contains the UI. This implementation
|
|
14
|
+
* of the Chromecast Tech's UI displays a poster image, a title and a subtitle.
|
|
15
|
+
*
|
|
16
|
+
* @private
|
|
17
|
+
* @returns {DOMElement}
|
|
18
|
+
*/
|
|
19
|
+
private _createDOMElement;
|
|
20
|
+
/**
|
|
21
|
+
* A helper method for creating DOMElements of the given type and with the given class
|
|
22
|
+
* name(s).
|
|
23
|
+
*
|
|
24
|
+
* @param type {string} the kind of DOMElement to create (ex: 'div')
|
|
25
|
+
* @param className {string} the class name(s) to give to the DOMElement. May also be
|
|
26
|
+
* a space-delimited list of class names.
|
|
27
|
+
* @returns {DOMElement}
|
|
28
|
+
*/
|
|
29
|
+
_createElement(type: string, className: string): DOMElement;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the root DOMElement to be shown in the player's UI.
|
|
32
|
+
*
|
|
33
|
+
* @returns {DOMElement}
|
|
34
|
+
*/
|
|
35
|
+
getDOMElement(): DOMElement;
|
|
36
|
+
/**
|
|
37
|
+
* Finds the poster's DOMElement in the root UI element.
|
|
38
|
+
*
|
|
39
|
+
* @private
|
|
40
|
+
* @returns {DOMElement}
|
|
41
|
+
*/
|
|
42
|
+
private _findPosterEl;
|
|
43
|
+
/**
|
|
44
|
+
* Finds the poster's <img> DOMElement in the root UI element.
|
|
45
|
+
*
|
|
46
|
+
* @private
|
|
47
|
+
* @returns {DOMElement}
|
|
48
|
+
*/
|
|
49
|
+
private _findPosterImageEl;
|
|
50
|
+
/**
|
|
51
|
+
* Finds the title's DOMElement in the root UI element.
|
|
52
|
+
*
|
|
53
|
+
* @private
|
|
54
|
+
* @returns {DOMElement}
|
|
55
|
+
*/
|
|
56
|
+
private _findTitleEl;
|
|
57
|
+
/**
|
|
58
|
+
* Finds the subtitle's DOMElement in the root UI element.
|
|
59
|
+
*
|
|
60
|
+
* @private
|
|
61
|
+
* @returns {DOMElement}
|
|
62
|
+
*/
|
|
63
|
+
private _findSubtitleEl;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the current poster image URL and updates the poster image DOMElement with the
|
|
66
|
+
* new poster image URL.
|
|
67
|
+
*
|
|
68
|
+
* @param poster {string} a URL for a poster image
|
|
69
|
+
*/
|
|
70
|
+
updatePoster(poster: string): void;
|
|
71
|
+
_poster: string;
|
|
72
|
+
/**
|
|
73
|
+
* Gets the current poster image URL.
|
|
74
|
+
*
|
|
75
|
+
* @returns {string} the URL for th current poster image
|
|
76
|
+
*/
|
|
77
|
+
getPoster(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Sets the current title and updates the title's DOMElement with the new text.
|
|
80
|
+
*
|
|
81
|
+
* @param title {string} a title to show
|
|
82
|
+
*/
|
|
83
|
+
updateTitle(title: string): void;
|
|
84
|
+
_title: string;
|
|
85
|
+
/**
|
|
86
|
+
* Sets the current subtitle and updates the subtitle's DOMElement with the new text.
|
|
87
|
+
*
|
|
88
|
+
* @param subtitle {string} a subtitle to show
|
|
89
|
+
*/
|
|
90
|
+
updateSubtitle(subtitle: string): void;
|
|
91
|
+
_subtitle: string;
|
|
92
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/asyncToGenerator";import
|
|
1
|
+
import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{ae as d,R as p,U as u,h as v,Q as m}from"./generic-6c14b09e.js";import{E as f}from"./icons-262bef63.js";import{f as h}from"./skin-2a3ee818.js";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}var y,C=c.getComponent("Component"),w=function(){s(d,C);var e,l,c=(e=d,l=b(),function(){var t,i=o(e);if(l){var n=o(this).constructor;t=Reflect.construct(i,arguments,n)}else t=i.apply(this,arguments);return r(this,t)});function d(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,d),i=c.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,y=s.playerId,j(i.el(),i.seriesData),i.loadCSS(),i}return i(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),d}();function L(){return(L=e(l.mark((function e(t,i,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(y),g(y),u(y,i).then((function(e){v(e.response),m(y)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return L.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function j(e,t){for(var i='<div class="hover-div"></div>\n '.concat(f(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{j as customSeasonList,k as handleSeasonChange,w as seriesModule};
|
|
@@ -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 o from"@babel/runtime/helpers/assertThisInitialized";import n 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{f as r,g as d,B as c}from"./icons-262bef63.js";import{n as u,af as m,ag as v,U as p,b as h,M as f}from"./generic-4943353c.js";import{j as y,s as g,p as b,l as C,g as E,i as k}from"./skin-2a3ee818.js";import{a as N}from"./autoNextVideo-30de255c.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-6a666280.js";import"./localisation-0bf399a1.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}var I=a.getComponent("Component"),S=function(){n(T,I);var S,w,L=(S=T,w=x(),function(){var e,t=l(S);if(w){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function T(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,T),(d=L.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.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=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,y,g=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,b=[];g.map((function(t){b.push.apply(b,e(t.episodes))})),m(b),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(y=f.video)||void 0===y?void 0:y.id),N({playerId:d.playerId,content:b,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(T,[{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("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-f6d0f5ce.js").then((function(e){var t=document.getElementById("series-v2");t||((t=document.createElement("style")).id="series-v2",document.head.appendChild(t)),t.textContent="".concat(e.default)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(y(),e.classList.remove("hidden"),e.hidden=!1,s.classList.add("open"),g(this.playerId,e)):(e.classList.add("hidden"),e.hidden=!0,s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t,s=this,o=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var n=0;n<(null==o?void 0:o.length);n++)o[n]&&(o[n].tabIndex=-1);for(var i=(null===(t=this.el())||void 0===t?void 0:t.querySelectorAll(".series-container"))||[],l=0;l<i.length;l++)i[l].tabIndex=-1;this._suppressToggleClick=!0,setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus({preventScroll:!0}),setTimeout((function(){s._suppressToggleClick=!1}),300)}),100)}},{key:"focusFirstSeason",value:function(){var e=a.dom.$(".season-holder",this.el())||a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"focusFirstEpisode",value:function(){var e=a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});s.setAttribute("aria-labelledby","seasons"),s.hidden=!0;var o=a.dom.$(".series-selector-icon",this.el());o.onpointerdown=function(){e._allowToggle=!0},o.onmousedown=function(){e._allowToggle=!0},o.onkeydown=function(t){"Enter"!==t.key&&" "!==t.key||(e._allowToggle=!0)},o.onclick=function(){if(!e._suppressToggleClick){var t=s.classList.contains("hidden");t&&!e._allowToggle||(e._allowToggle=!1,e.toggleOpenClose(s),t?(e.handleTabIndexSelector(),s.classList.contains("hidden")||e.focusFirstSeason()):e.handleCloseTabIndex())}};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),t.hidden=!0,s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=b(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),C(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.tabIndex=-1,d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l,a,r,d,c;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===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(k(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),h.ariaHidden=!0,a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,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===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(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=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=b(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1),this.focusFirstEpisode()}}]),T}();export{S as default};
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n 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{f as r,g as d,B as c}from"./icons-262bef63.js";import{n as u,af as m,ag as v,U as p,b as h,M as f}from"./generic-6c14b09e.js";import{j as y,s as g,p as b,l as C,g as E,i as k}from"./skin-2a3ee818.js";import{a as N}from"./autoNextVideo-ca468d20.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-c276e2a6.js";import"./localisation-0bf399a1.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}var S=a.getComponent("Component"),I=function(){n(T,S);var I,w,L=(I=T,w=x(),function(){var e,t=l(I);if(w){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function T(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,T),(d=L.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.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=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,y,g=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,b=[];g.map((function(t){b.push.apply(b,e(t.episodes))})),m(b),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(y=f.video)||void 0===y?void 0:y.id),N({playerId:d.playerId,content:b,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(T,[{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("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-f6d0f5ce.js").then((function(e){var t=document.getElementById("series-v2");t||((t=document.createElement("style")).id="series-v2",document.head.appendChild(t)),t.textContent="".concat(e.default)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(y(),e.classList.remove("hidden"),e.hidden=!1,s.classList.add("open"),g(this.playerId,e)):(e.classList.add("hidden"),e.hidden=!0,s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t,s=this,o=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var n=0;n<(null==o?void 0:o.length);n++)o[n]&&(o[n].tabIndex=-1);for(var i=(null===(t=this.el())||void 0===t?void 0:t.querySelectorAll(".series-container"))||[],l=0;l<i.length;l++)i[l].tabIndex=-1;this._suppressToggleClick=!0,setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus({preventScroll:!0}),setTimeout((function(){s._suppressToggleClick=!1}),300)}),100)}},{key:"focusFirstSeason",value:function(){var e=a.dom.$(".season-holder",this.el())||a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"focusFirstEpisode",value:function(){var e=a.dom.$(".series-container",this.el());e&&e.focus()}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden"});s.setAttribute("aria-labelledby","seasons"),s.hidden=!0;var o=a.dom.$(".series-selector-icon",this.el());o.onpointerdown=function(){e._allowToggle=!0},o.onmousedown=function(){e._allowToggle=!0},o.onkeydown=function(t){"Enter"!==t.key&&" "!==t.key||(e._allowToggle=!0)},o.onclick=function(){if(!e._suppressToggleClick){var t=s.classList.contains("hidden");t&&!e._allowToggle||(e._allowToggle=!1,e.toggleOpenClose(s),t?(e.handleTabIndexSelector(),s.classList.contains("hidden")||e.focusFirstSeason()):e.handleCloseTabIndex())}};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(i,"px"),a.dom.appendContent(t,s),n.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),t.hidden=!0,s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=b(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),C(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.tabIndex=-1,d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l,a,r,d,c;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===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(k(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),h.ariaHidden=!0,a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,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===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(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=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=b(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1),this.focusFirstEpisode()}}]),T}();export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n 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,g as d,B as c}from"./icons-262bef63.js";import{n as m,af as u,ag as p,b as v,M as h,U as f}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n 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,g as d,B as c}from"./icons-262bef63.js";import{n as m,af as u,ag as p,b as v,M as h,U as f}from"./generic-6c14b09e.js";import{j as C,p as g,g as y}from"./skin-2a3ee818.js";import{a as b}from"./autoNextVideo-ca468d20.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-c276e2a6.js";import"./localisation-0bf399a1.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(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(o){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,o,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.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=m(),null!==(a=s(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))})),u(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 o(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-87343239.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,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var s=document.getElementById(this.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(n,"px"),a.dom.appendContent(t,o),s.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),s=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var s=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(s,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=g(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(s,n),a.dom.appendContent(s,i),a.dom.appendContent(e,s),a.dom.appendContent(e,l),y(this.playerId).on("fullscreenchange",(function(){var o=document.getElementById(t.playerId);if(o){var s=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;y(this.playerId);for(var t=v(),o=a.dom.createEl("div",{className:"season-container"}),s=function(s){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(n=t[s])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==s&&(r.checked=!0),r.onclick=function(t){h.set(s),e.showSeasonDetails(s)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},n=0;n<t.length;n++)s(n);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var s=this;t=t.map((function(e){var t,o,n,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===(o=e.gist)||void 0===o||null===(n=o.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var n=function(n){var i,l,r,d,c,m,u,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,g),a.dom.appendContent(v,h),a.dom.appendContent(o,v);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||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[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(u=t[n])||void 0===u?void 0:u.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(v,y),a.dom.appendContent(o,v),y.onclick=function(e){var o;e.stopPropagation(),p(null===(o=t[n])||void 0===o?void 0:o.id),f(s.playerId,t[n].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 o,s,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(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 o=v()[e].episodes;this.getSeasonDetailsContainer(o,t);var s=a.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var n=g(c());s.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,c as o,d as s,e as i}from"./features-
|
|
1
|
+
import{a as e,b as t,c as o,d as s,e as i}from"./features-0d4290a8.js";import{e as r,a7 as n}from"./generic-6c14b09e.js";import{S as l,M as a,a as m,N as d,b as u,R as p}from"./icons-262bef63.js";import{g as c,b}from"./skin-2a3ee818.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-28891b91.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(v,f){c(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.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&&s(e,"default",u());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",p())}(v,f),function(s,i){var n=c(s),a=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",l()),a&&import("./nextEpisodeButton-a3ed5cde.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,r())}))})),n.one("loadedmetadata",(function(){var e;a&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,r,n=c(e),l=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],p=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(l&&(l.style.display="none"),u&&(u.style.display="none"),p&&(p.style.display="none"));null===(o=n.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(b(a(window.controlsColor))),null===(i=n.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(r=i.el())||void 0===r||r.appendChild(b(m(window.controlsColor)));var v=n.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(d()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./skin-2a3ee818.js";import{f as r,n as t}from"./features-
|
|
1
|
+
import{g as e}from"./skin-2a3ee818.js";import{f as r,n as t}from"./features-0d4290a8.js";import{g as o}from"./renditions-28891b91.js";import{b as i}from"./captions-4dea3682.js";import"@babel/runtime/helpers/toConsumableArray";import"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"./generic-6c14b09e.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-8ea05bed.js";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-c4d10b91.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,s){e(t).on("loadeddata",(function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)}))}(s,n),function(r){var o=e(r);o.controls(!1),t(r)}(s),function(r){var t=e(r);t.addChild("SubsCapsButton")}(s)}export{s as initialiseSkin};
|