@viewlift/player-backup 2.0.304-backup → 2.0.306-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-f3ce1d3c.js +1 -0
- package/cjs/bundle.css +493 -1136
- package/cjs/{caption-settings-8f59beca.js → caption-settings-8ded8039.js} +1 -1
- package/cjs/{captions-6cbd3375.js → captions-8c11c3bc.js} +1 -1
- package/cjs/{features-35821239.js → features-f30138d4.js} +1 -1
- package/cjs/generic-3cfdb48b.js +1 -0
- package/cjs/{index-58f88daa.js → index-3c6c2caa.js} +1 -1
- package/cjs/{index-c2982870.js → index-9071306d.js} +1 -1
- package/cjs/index-d8a7ba61.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-0950cfd9.js → multicamv2-80b62af3.js} +1 -1
- package/cjs/{multicamv2-c47357d9.js → multicamv2-e9416401.js} +1 -1
- package/cjs/{nextEpisodeButton-2921adbd.js → nextEpisodeButton-e408b25e.js} +1 -1
- package/cjs/playlist-95e1b493.js +1 -0
- package/cjs/{renditions-627bdfad.js → renditions-292f4eaa.js} +1 -1
- package/cjs/{resolution-3af2cf1b.js → resolution-50930c62.js} +1 -1
- package/cjs/{series-99d70430.js → series-3a7d9923.js} +1 -1
- package/cjs/series-v2-de1ac589.js +1 -0
- package/cjs/series-v2-e14a2533.js +1 -0
- package/cjs/{settings-icon-0642c8ef.js → settings-icon-fae95200.js} +1 -1
- package/cjs/{skin-a5fcfafd.js → skin-0e46ccab.js} +1 -1
- package/cjs/skin-13b96880.js +1 -0
- package/cjs/skin-3cf9aae0.js +1 -0
- package/cjs/skin-5c293b1b.js +1 -0
- package/cjs/{skin-d691715a.js → skin-70979924.js} +1 -1
- package/cjs/skin-bf73825a.js +1 -0
- package/cjs/{skin-ea0e0331.js → skin-cd1fdac9.js} +1 -1
- package/{esm/skin-32713204.js → cjs/skin-dfce3703.js} +1 -1
- package/cjs/{skin-c125f0f9.js → skin-e422e05f.js} +1 -1
- package/cjs/skin-f1d7b17b.js +1 -0
- package/cjs/util-872c66b3.js +1 -0
- package/cjs/videoSelector-92f5c69f.js +1 -0
- package/cjs/videoSelector-9bdbfead.js +1 -0
- package/esm/autoNextVideo-3019eae8.js +1 -0
- package/esm/bundle.css +493 -1136
- package/esm/{caption-settings-7e20f930.js → caption-settings-bbc9fb42.js} +1 -1
- package/esm/{captions-7e8712e5.js → captions-d8eaa7b9.js} +1 -1
- package/esm/components/auto-next-video/autoNextVideo.d.ts +0 -1
- package/esm/components/video-selector/videoSelector.d.ts +0 -4
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +0 -4
- package/esm/{features-dcfb2809.js → features-7b6b3057.js} +1 -1
- package/esm/generic-228e9506.js +1 -0
- package/esm/{icons-262bef63.js → icons-699e8cf0.js} +1 -1
- package/esm/index-2a60cd16.js +1 -0
- package/esm/{index-ec92c082.js → index-4a0d34d8.js} +1 -1
- package/esm/{index-0a18ab16.js → index-a03f448e.js} +1 -1
- package/esm/index.d.ts +0 -16
- package/esm/index.js +1 -1
- package/esm/{multicamv2-a85777a6.js → multicamv2-198b4a93.js} +1 -1
- package/esm/{multicamv2-41808335.js → multicamv2-8a3724bd.js} +1 -1
- package/esm/{nextEpisodeButton-82e1ff70.js → nextEpisodeButton-dde71468.js} +1 -1
- package/esm/playlist-3ab87346.js +1 -0
- package/esm/{renditions-620d93b3.js → renditions-4a8ac501.js} +1 -1
- package/esm/{resolution-2ee017b4.js → resolution-1753099d.js} +1 -1
- package/esm/{series-8076ce3f.js → series-9d466c78.js} +1 -1
- package/esm/series-v2-1583cbf2.js +1 -0
- package/esm/series-v2-3169b19c.js +1 -0
- package/esm/{settings-icon-c65eb622.js → settings-icon-761d323a.js} +1 -1
- package/esm/skin-2a69b858.js +1 -0
- package/esm/skin-2d98627f.js +1 -0
- package/esm/{skin-b85fa341.js → skin-3034bb5d.js} +1 -1
- package/esm/{skin-dff8a656.js → skin-3a889883.js} +1 -1
- package/esm/skin-587d767c.js +1 -0
- package/esm/skin-5cae6d20.js +1 -0
- package/esm/skin-6d4dc56e.js +1 -0
- package/esm/skin-ba2be5f8.js +1 -0
- package/esm/{skin-531e8212.js → skin-e3c768a3.js} +1 -1
- package/esm/skin-e5855d04.js +1 -0
- package/esm/util-4c8d7690.js +1 -0
- package/esm/videoSelector-01f0735b.js +1 -0
- package/esm/videoSelector-c7a230a0.js +1 -0
- package/package.json +29 -29
- package/cjs/autoNextVideo-4837ff44.js +0 -1
- package/cjs/generic-befcf1eb.js +0 -1
- package/cjs/index-330e0bd9.js +0 -1
- package/cjs/index-48c739ee.js +0 -1
- package/cjs/index-b6fe43ac.js +0 -1
- package/cjs/playlist-d5607cad.js +0 -1
- package/cjs/relatedVideosManager-eeeaf32c.js +0 -1
- package/cjs/series-v2-3e77221f.js +0 -1
- package/cjs/series-v2-8a53b69c.js +0 -1
- package/cjs/skin-5108592a.js +0 -1
- package/cjs/skin-632baab6.js +0 -1
- package/cjs/skin-66dce245.js +0 -1
- package/cjs/skin-72d95ca5.js +0 -1
- package/cjs/skin-92e87fae.js +0 -1
- package/cjs/skin-b1629004.js +0 -1
- package/cjs/skin-ffb61803.js +0 -1
- package/cjs/videoSelector-4d1407a1.js +0 -1
- package/cjs/videoSelector-8dc7e880.js +0 -1
- package/esm/autoNextVideo-d4f0c0e0.js +0 -1
- package/esm/components/chapters/events.d.ts +0 -15
- package/esm/components/chapters/index.d.ts +0 -13
- package/esm/components/chapters/markers.d.ts +0 -16
- package/esm/components/chapters/store.d.ts +0 -5
- package/esm/components/chapters/timelineMapper.d.ts +0 -35
- package/esm/generic-2d23b129.js +0 -1
- package/esm/helpers/apiErrorTracker.d.ts +0 -1
- package/esm/helpers/drmErrorDetection.d.ts +0 -6
- package/esm/index-0b18e334.js +0 -1
- package/esm/index-482a3ad6.js +0 -1
- package/esm/index-49a4116a.js +0 -1
- package/esm/playlist-a48be6e8.js +0 -1
- package/esm/relatedVideosManager-8dd9aa24.js +0 -1
- package/esm/series-v2-8a8d61c6.js +0 -1
- package/esm/series-v2-fbd88587.js +0 -1
- package/esm/skin/cn_news/skin.d.ts +0 -1
- package/esm/skin-14be9be3.js +0 -1
- package/esm/skin-3653c5b3.js +0 -1
- package/esm/skin-3779805c.js +0 -1
- package/esm/skin-382f17e7.js +0 -1
- package/esm/skin-607beba6.js +0 -1
- package/esm/skin-dfcb0249.js +0 -1
- package/esm/skin-fabf69ae.js +0 -1
- package/esm/utilities/relatedVideosManager.d.ts +0 -11
- package/esm/videoSelector-9a1dd40f.js +0 -1
- package/esm/videoSelector-e3f64e95.js +0 -1
- package/viewlift-player-backup-2.0.304-backup.tgz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("video.js"),n=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},i=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","news","mini","news_live"],r=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},o="http://www.w3.org/2000/svg";var l=function(t){e(document.querySelectorAll("[video-idx]")).map(function(e){var n=e.getAttribute("video-idx");e.style.border=n==t?"2px solid white":"none"})},a="",u=function(e,t){var n;if(t){var i=document.getElementById(e),r=null===(n=window.getComputedStyle(i,null))||void 0===n?void 0:n.height;t.style.height!==r&&(t.style.height="".concat(r))}};exports.clearEventListeners=function(){window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler)},exports.closeOpenDrawers=function(){var t=e(document.getElementsByClassName("vjs-control vjs-button open"));null==t||t.map(function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()})},exports.createIconMarkup=function(e){return r(e)},exports.debounce=function(e,t){var n;return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var l=this;clearTimeout(n),n=setTimeout(function(){e.apply(l,r)},t)}},exports.detectOrientationChange=function(e,t){var n,i=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&a!==n){var r=window.getComputedStyle(i,null).getPropertyValue("height");t&&(t.style.height="".concat(r)),a=n}}(e,t)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(n),n=setTimeout(function(){i()},100)})},exports.getPlayer=n,exports.handleDrawerResizing=function(e,t){var i,r=n(e),o=n(e).el(),l=new ResizeObserver(function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){u(e,t)},300))});l.observe(o),r.on("dispose",function(){l.disconnect()}),r.on("fullscreenchange",function(){setTimeout(function(){u(e,t)},50)})},exports.highlightVideo=function(t,i){if(i){var r,o,a=n(i);if(a&&"function"==typeof a.el&&null!=a&&null!==(r=a.el())&&void 0!==r&&null!==(o=r.classList)&&void 0!==o&&o.contains("skin_defaultv2"))return void l(t)}var u=e(document.querySelectorAll("[video-idx]"));console.log(u),u.map(function(e){var n=e.parentNode,i=e.getAttribute("video-idx");n.style.background=i==t?"gray":"none"})},exports.highlightVideo_DEFAULTV2_TEMP=l,exports.impolicy16x9=function(e){return e&&e.includes("?impolicy")?e:e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},exports.injectSVG=function(e,t){if(!e)return null;e.classList.add("vjs-svg-icon");var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0 0 48 48",n=document.createElementNS(o,"svg");n.setAttribute("viewBox",t),n.setAttribute("preserveAspectRatio","xMidYMid meet");var i=document.createElementNS(o,"use");return i.setAttributeNS(null,"href",e),n.appendChild(i),{svg:n,use:i}}(t),i=n.svg,r=n.use;return e.appendChild(i),r},exports.isNotAValidSkin=function(e){return!i.includes(e)},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=r,exports.setUpdatedElHeight=u,exports.throttle=function(e,t){var n=null,i=null;return function(){for(var r=this,o=arguments.length,l=new Array(o),a=0;a<o;a++)l[a]=arguments[a];i?(clearTimeout(n),n=setTimeout(function(){Date.now()-i>=t&&(e.apply(r,l),i=Date.now())},t-(Date.now()-i))):(e.apply(this,l),i=Date.now())}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./skin-
|
|
1
|
+
"use strict";var e=require("./skin-5c293b1b.js"),r=require("./features-f30138d4.js"),i=require("./renditions-292f4eaa.js"),t=require("./captions-8c11c3bc.js");require("@babel/runtime/helpers/toConsumableArray"),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("./generic-3cfdb48b.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(n,s){Promise.resolve().then(function(){return require("./skin-7f60cfe9.js")}).then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(n,s){e.getPlayer(n).on("loadeddata",function(){var e;(null===(e=i.getRenditions(n))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(n,s),null!=s&&s.disableCaptions&&t.removeCaptions(n)})}(n,s),function(i){var t=e.getPlayer(i);t.controls(!1),r.addDBClickFullScreen(i)}(n),function(r){var i=e.getPlayer(r);i.addChild("SubsCapsButton")}(n)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-f30138d4.js"),l=require("./skin-5c293b1b.js"),i=require("./index-d8a7ba61.js"),r=require("./index-9071306d.js"),o=require("./browser-3670a923.js");require("videojs-contrib-quality-menu");var n=require("video.js"),u=require("./generic-3cfdb48b.js"),d=require("./icons-eb807ef0.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-292f4eaa.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-f3ce1d3c.js"),require("./util-872c66b3.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@viewlift/comscore/index.js");function t(n,u){var d,t=l.getPlayer(n),a=(null==u||null===(d=u.res)||void 0===d?void 0:d.siteId)||"";t&&(t.on("loadeddata",function(){var e,d,t,s,v;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=u&&null!==(e=u.series)&&void 0!==e&&e.enable||null!==(d=window)&&void 0!==d&&null!==(t=d.app_data)&&void 0!==t&&null!==(s=t.appcmsMain)&&void 0!==s&&null!==(v=s.features)&&void 0!==v&&v.auto_play)||null!=u&&u.liveVideo||i.addNextEpPreview(n,u),null!=u&&u.liveVideo||o.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===a||r.initiateTrickplay(n)}),t.one("play",function(){var l,i,r,o;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(n,null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}var a=function(e,i){var r,o,u,d,t,a,s,v,c,p,y,b,m=l.getPlayer(e),g=(null==i?void 0:i.theme)||{},q=n.dom.$(".vjs-play-progress"),h=n.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(u=o.appcmsMain)||void 0===u||null===(d=u.brand)||void 0===d||null===(t=d.cta)||void 0===t||null===(a=t.primary)||void 0===a?void 0:a.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(y=p.cta)||void 0===y||null===(b=y.primary)||void 0===b?void 0:b.backgroundColor));var f=m.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&q&&(q.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&f&&(f.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?f.el().style.borderRadius=".3em":f.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,o){l.getPlayer(r).addClass("skin_vlone"),t(r,o),function(r,o){var n,t,a,s,v,c,p,y,b=l.getPlayer(r),m=(null==o?void 0:o.liveVideo)||!1,g=(null==o||null===(n=o.res)||void 0===n?void 0:n.contentType)||"video",q=(null==o||null===(t=o.res)||void 0===t||null===(a=t[g])||void 0===a?void 0:a.isSSAIEnabled)||!1,h=u.getSource(null==o?void 0:o.res,r)||{};h.src;var f=(null==o?void 0:o.skin_settings)||{},k=(null==o||null===(s=o.customData)||void 0===s?void 0:s.ads)||{};if(m&&(null==o||!o.liveui)){var w,j,C=(null==b||null===(w=b.controlBar)||void 0===w||null===(j=w.getChild("LiveDisplay"))||void 0===j?void 0:j.el())||null;C&&(C.onclick=function(){try{var e;null==b||null===(e=b.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}})}null!=f&&f.skipBtn&&0==(null==o?void 0:o.liveVideo)&&0==(null==o?void 0:o.liveui)&&e.addSkipButton(r,"VL_ONE",d.SkipSvgV2());(null!=f&&f.rewindBtn&&0==(null==o?void 0:o.liveVideo)&&0==(null==o?void 0:o.liveui)||1==(null==o?void 0:o.liveui))&&e.addRewindButton(r,"VL_ONE",d.RewindSvgV2());(null==o||null===(v=o.relatedVideos)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&e.addVideoSelector(r,null==o?void 0:o.relatedVideos);null!=o&&null!==(p=o.series)&&void 0!==p&&p.enable&&e.addSeriesSelectorV2(r,o);(null==o||null===(y=o.streams)||void 0===y?void 0:y.length)>1&&e.addMulticamSelector(r,null==o?void 0:o.streams);if(i.addTVProviderImage(r,o),u.initialiseKeyboardEvents(r,o),q&&m&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&!(null==k||!k.liveAdClientSideTracking))u.initializeTransmit(r,o);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&q)if(m)u.setupAdvertisementMarkersForLinear(r);else{var S,B=null;if(null!=o&&null!==(S=o.series)&&void 0!==S&&S.enable){var T,V,P,A,M,E=null===(T=u.getCurrentVideo())||void 0===T||null===(V=T.video)||void 0===V||null===(P=V.gist)||void 0===P?void 0:P.id,R=u.getSeriesWatchMap(),_=(null==R?void 0:R.get(E))||{t:0,p:0},L=_.t,O=_.p;"function"==typeof(null===(A=window)||void 0===A||null===(M=A.watchHistory)||void 0===M?void 0:M.cb)&&window.watchHistory.cb({watchedTime:L}),O<95&&(B=L)}else{var x=o.watchHistoryResumeTime;o.watchedPercentage<95&&(B=x)}u.setupAdvertisementMarkers(r,B)}}(r,o),a(r,o)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./features-
|
|
1
|
+
"use strict";var e=require("./features-f30138d4.js"),r=require("./generic-3cfdb48b.js"),i=require("./icons-eb807ef0.js"),n=require("./skin-5c293b1b.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-292f4eaa.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(t,l){n.getPlayer(t).addClass("skin_default"),r.initialiseKeyboardEvents(t,l),Promise.resolve().then(function(){return require("./skin-ba38afdb.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",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(t,l),function(t,l){var s=n.getPlayer(t),o=(null==l?void 0:l.sres)||null;s.on("loadeddata",function(){e.addResolutionModule(t,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-e408b25e.js")}).then(function(e){e.initaliseFunctionality(l.sres.seasons,r.getCurrentVideo())})}),s.one("loadedmetadata",function(){var r;o&&(e.addSeriesModule(t,null==l||null===(r=l.sres)||void 0===r?void 0:r.seasons,l),e.addNextEpisodeButton(l.sres,l.res,t))})}(t,l),function(e,r){var t,l,s,o,u=n.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=u.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(l=t.el())||void 0===l||l.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(s=u.controlBar.getChild("FullscreenToggle"))||void 0===s||null===(o=s.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(t,l)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as l,r as i,d as e,e as n,j as o,k as t,l as r,m as s}from"./features-dcfb2809.js";import{e as a}from"./icons-262bef63.js";import{g as d,p as u,e as v}from"./skin-3653c5b3.js";import{g as C}from"./renditions-620d93b3.js";import{a as c,b as p}from"./index-49a4116a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{r as h}from"./relatedVideosManager-8dd9aa24.js";import{a7 as m,a8 as f,e as g,a9 as b,m as L}from"./generic-2d23b129.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-d4f0c0e0.js";import"./index-482a3ad6.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-7e8712e5.js";import"@viewlift/comscore/index.js";function B(B,y){d(B).addClass("skin_news_live"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,r,s,a,d,u,v,p;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||m)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(p=e.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe(function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(i,e),f&&f())})}}else c(i,e)})}(B,y),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,g,b,L,B,y,j,w,E,V,x,M,k,S,T,Z,A,P,_=d(l);null===(e=_.controlBar)||void 0===e||e.removeChild("PlayToggle");var H=null==_||null===(n=_.controlBar)||void 0===n||null===(o=n.el())||void 0===o||null===(t=o.children)||void 0===t?void 0:t[2],N=document.createElement("div");N.className="vjs-play-toggle-container",N.append(null==_||null===(r=_.controlBar)||void 0===r||null===(s=r.addChild("PlayToggle"))||void 0===s?void 0:s.el()),null==_||null===(a=_.controlBar)||void 0===a||null===(C=a.el())||void 0===C||C.insertBefore(N,H),null==_||null===(c=_.controlBar)||void 0===c||c.removeChild("VolumePanel"),null==_||null===(p=_.controlBar)||void 0===p||p.addChild("VolumePanel",{inline:!0},1);var I=null==_||null===(h=_.controlBar)||void 0===h?void 0:h.getChild("ProgressControl");null===(m=_.controlBar)||void 0===m||m.removeChild("SeekToLive"),null===(f=_.controlBar)||void 0===f||f.addChild("SeekToLive",{inline:!1},2);var q=null===(g=_.controlBar)||void 0===g||null===(b=g.getChild("SeekToLive"))||void 0===b?void 0:b.el();q&&(q.onclick=function(){if(_.paused())try{_.play()}catch(l){console.log(l)}});var O=document.createElement("div");O.className="custom-spaced-progress-bar",I&&O.append(I.el());null===(L=_.controlBar)||void 0===L||null===(B=L.el())||void 0===B||B.append(O);var R='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';_.el().insertBefore(u(R),null!==(y=_.el().firstChild)&&void 0!==y?y:null);var D=(null==_||null===(j=_.controlBar)||void 0===j||null===(w=j.getChild("PlayToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(D){D.style.height="18px",D.style.width="18px";var F=v(D,_.paused()?"#vjs-icon-play":"#vjs-icon-pause");_.on("pause",function(){return F.setAttributeNS(null,"href","#vjs-icon-play")}),_.on("play",function(){return F.setAttributeNS(null,"href","#vjs-icon-pause")})}var G=(null==_||null===(V=_.controlBar)||void 0===V||null===(x=V.getChild("FullscreenToggle"))||void 0===x||null===(M=x.el())||void 0===M?void 0:M.firstChild)||null;if(G){G.style.height="24px",G.style.width="24px";var z=v(G,"#vjs-icon-fullscreen");_.on("fullscreenchange",function(){var l=_.isFullscreen_;null==z||z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var J=(null==_||null===(k=_.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(J){var K=J.querySelector(".vjs-mute-control .vjs-icon-placeholder");K.classList.add("vjs-svg-icon"),K.style.height="24px",K.style.width="24px";var Q=v(K,_.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");_.on("volumechange",function(l){var i=_.volume();console.log(i,_.muted()),0==i||_.muted()?Q.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?Q.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?Q.setAttributeNS(null,"href","#vjs-icon-volume2"):Q.setAttributeNS(null,"href","#vjs-icon-volume3")})}var U=(null==_||null===(T=_.controlBar)||void 0===T||null===(Z=T.getChild("PictureInPictureToggle"))||void 0===Z?void 0:Z.el())||null;if(U){var W=null==U?void 0:U.querySelector(".vjs-icon-placeholder");W.style.height="25px",W.style.width="25px";var X=v(W,"#vjs-icon-pip");_.on("enterpictureinpicture",function(){X.setAttributeNS(null,"href","#vjs-icon-pip")})}var Y=(null==_||null===(A=_.controlBar)||void 0===A||null===(P=A.getChild("SubsCapsButton"))||void 0===P?void 0:P.el())||null;if(Y){var $=Y.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");$.classList.add("vjs-svg-icon"),$.style.height="29px",$.style.width="29px";var ll=v($,"#vjs-icon-caps");ll.setAttributeNS(null,"href","#vjs-icon-captions-off"),_.textTracks().on("change",function(l){for(var i=_.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?ll.setAttributeNS(null,"href","#vjs-icon-captions"):ll.setAttributeNS(null,"href","#vjs-icon-captions-off")})}_&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(_.liveTracker.on("liveedgechange",function(){nl(_)}),_.on("timeupdate",function(){nl(_)}));function il(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function el(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function nl(l){var i,e,n=l.liveTracker.atLiveEdge(),o=el(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=il(o)))}}}(B,y),function(l,u){var v,C,c,p,B,y,j,w,E,V=(null==u?void 0:u.liveVideo)||!1,x=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",M=(null==u||null===(C=u.res)||void 0===C||null===(c=C[x])||void 0===c?void 0:c.isSSAIEnabled)||!1,k=(null==u?void 0:u.skin_settings)||{};null==k||k.slowMoBtn;var S=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};i(l),null!=k&&k.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=k&&k.rewindBtn&&(0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&n(l,"VL_ONE",a());var T,Z=h.get();(null==Z||null===(B=Z.content)||void 0===B?void 0:B.length)>0&&o(l,Z);T=h.subscribe(function(i){var e,n,t=d(l);(null==t||null===(e=t.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(o(l,i),T&&T())}),(null==u||null===(y=u.streams)||void 0===y?void 0:y.length)>1&&t(l,null==u?void 0:u.streams);(null==u||null===(j=u.playlist)||void 0===j||null===(w=j.content)||void 0===w?void 0:w.length)>0&&r(l,null==u?void 0:u.playlist);null!=u&&null!==(E=u.series)&&void 0!==E&&E.enable&&s(l,u);if(M&&V&&"TRANSMIT"==(null==S?void 0:S.liveAdSticherProvider)&&null!=S&&S.liveAdClientSideTracking)m(l,u);else if("MEDIA_TAILOR"==(null==S?void 0:S.vodAdSticherProvider)&&null!=S&&S.vodAdClientSideTracking&&M)if(V)f(l);else{var A,P=null;if(null!=u&&null!==(A=u.series)&&void 0!==A&&A.enable){var _,H,N,I,q,O=null===(_=g())||void 0===_||null===(H=_.video)||void 0===H||null===(N=H.gist)||void 0===N?void 0:N.id,R=L(),D=(null==R?void 0:R.get(O))||{t:0,p:0},F=D.t,G=D.p;"function"==typeof(null===(I=window)||void 0===I||null===(q=I.watchHistory)||void 0===q?void 0:q.cb)&&window.watchHistory.cb({watchedTime:F}),G<95&&(P=F)}else{var z=u.watchHistoryResumeTime;u.watchedPercentage<95&&(P=z)}b(l,P)}}(B,y),p(B,y)}export{B as initialiseSkin};
|
|
1
|
+
"use strict";var e=require("./features-f30138d4.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-5c293b1b.js"),n=require("./renditions-292f4eaa.js"),t=require("./index-d8a7ba61.js");require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/toConsumableArray");var o=require("./generic-3cfdb48b.js");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("./autoNextVideo-f3ce1d3c.js"),require("./util-872c66b3.js"),require("@babel/runtime/helpers/typeof"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@viewlift/comscore/index.js"),exports.initialiseSkin=function(r,s){i.getPlayer(r).addClass("skin_news"),function(l,o){var r=i.getPlayer(l);r&&r.on("loadeddata",function(){var i,r,s,u,d,a,v;(null===(i=n.getRenditions(l))||void 0===i?void 0:i.length)>0&&0!=(null==o||null===(r=o.skin_settings)||void 0===r?void 0:r.settingsToggle)&&e.addSettingsButtonV2(l,o),!(null!=o&&null!==(s=o.series)&&void 0!==s&&s.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(a=d.appcmsMain)&&void 0!==a&&null!==(v=a.features)&&void 0!==v&&v.auto_play)||null!=o&&o.liveVideo||t.addNextEpPreview(l,o)})}(r,s),function(e,l){var n,t,o,r,s,u,d,a,v,C,c,h,p,f,g,m,y,L,b=i.getPlayer(e);if(null!=l&&l.liveVideo){var B,j,w,V,E,S,x=null===(B=b.controlBar)||void 0===B||null===(j=B.getChild("TimeDivider"))||void 0===j?void 0:j.el(),M=null===(w=b.controlBar)||void 0===w||null===(V=w.getChild("CurrentTimeDisplay"))||void 0===V?void 0:V.el(),k=null===(E=b.controlBar)||void 0===E||null===(S=E.getChild("DurationDisplay"))||void 0===S?void 0:S.el();x&&(x.style.display="none"),M&&(M.style.display="none"),k&&(k.style.display="none")}var T=null===(n=b.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),q=null===(t=b.controlBar)||void 0===t||null===(o=t.getChild("SeekToLive"))||void 0===o?void 0:o.el();q&&(q.onclick=function(){if(b.paused())try{b.play()}catch(e){console.log(e)}});var A=document.createElement("div");A.className="custom-spaced-progress-bar",T&&A.append(T.el());null===(r=b.controlBar)||void 0===r||null===(s=r.el())||void 0===s||s.append(A);var Z='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';b.el().insertBefore(i.parseSvgString(Z),null!==(u=b.el().firstChild)&&void 0!==u?u:null);var P=(null==b||null===(d=b.controlBar)||void 0===d||null===(a=d.getChild("PlayToggle"))||void 0===a||null===(v=a.el())||void 0===v?void 0:v.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var _=i.injectSVG(P,b.paused()?"#vjs-icon-play":"#vjs-icon-pause");b.on("pause",function(){return _.setAttributeNS(null,"href","#vjs-icon-play")}),b.on("play",function(){return _.setAttributeNS(null,"href","#vjs-icon-pause")})}var H=(null==b||null===(C=b.controlBar)||void 0===C||null===(c=C.getChild("FullscreenToggle"))||void 0===c||null===(h=c.el())||void 0===h?void 0:h.firstChild)||null;if(H){H.style.height="24px",H.style.width="24px";var N=i.injectSVG(H,"#vjs-icon-fullscreen");b.on("fullscreenchange",function(){var e=b.isFullscreen_;null==N||N.setAttributeNS(null,"href",e?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var D=(null==b||null===(p=b.controlBar)||void 0===p||null===(f=p.getChild("VolumePanel"))||void 0===f?void 0:f.el())||null;if(D){var F=D.querySelector(".vjs-mute-control .vjs-icon-placeholder");F.classList.add("vjs-svg-icon"),F.style.height="24px",F.style.width="24px";var R=i.injectSVG(F,b.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");b.on("volumechange",function(e){var l=b.volume();console.log(l,b.muted()),0==l||b.muted()?R.setAttributeNS(null,"href","#vjs-icon-mute"):l>0&&l<=.3?R.setAttributeNS(null,"href","#vjs-icon-volume1"):l>=.3&&l<=.7?R.setAttributeNS(null,"href","#vjs-icon-volume2"):R.setAttributeNS(null,"href","#vjs-icon-volume3")})}var G=(null==b||null===(g=b.controlBar)||void 0===g||null===(m=g.getChild("PictureInPictureToggle"))||void 0===m?void 0:m.el())||null;if(G){var I=null==G?void 0:G.querySelector(".vjs-icon-placeholder");I.style.height="25px",I.style.width="25px";var O=i.injectSVG(I,"#vjs-icon-pip");b.on("enterpictureinpicture",function(){O.setAttributeNS(null,"href","#vjs-icon-pip")})}var U=(null==b||null===(y=b.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(U){var z=U.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");z.classList.add("vjs-svg-icon"),z.style.height="29px",z.style.width="29px";var W=i.injectSVG(z,"#vjs-icon-caps");W.setAttributeNS(null,"href","#vjs-icon-captions-off"),b.textTracks().on("change",function(e){for(var l=b.textTracks(),i=!1,n=0;n<l.length;n++){var t=l[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?W.setAttributeNS(null,"href","#vjs-icon-captions"):W.setAttributeNS(null,"href","#vjs-icon-captions-off")})}b&&null!=l&&l.liveVideo&&null!=l&&l.liveui&&(b.liveTracker.on("liveedgechange",function(){Q(b)}),b.on("timeupdate",function(){Q(b)}));function J(e){var l=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60),t=function(e){return String(e).padStart(2,"0")};return 0===l?"".concat(t(i),":").concat(t(n)):"".concat(t(l),":").concat(t(i),":").concat(t(n))}function K(e){var l=e.seekable();if(l&&l.length>0){var i=l.end(0);return Math.max(0,i-e.currentTime())}return 0}function Q(e){var l,i,n=e.liveTracker.atLiveEdge(),t=K(e),o=null==e||null===(l=e.controlBar)||void 0===l||null===(i=l.remainingTimeDisplay)||void 0===i?void 0:i.el();if(o){var r=o.querySelector(".vjs-remaining-time-display");n?o.style.display="none":(o.style.display="flex",r&&(r.innerText=J(t)))}}}(r,s),function(i,n){var t,r,s,u,d,a,v,C,c,h,p=(null==n?void 0:n.liveVideo)||!1,f=(null==n||null===(t=n.res)||void 0===t?void 0:t.contentType)||"video",g=(null==n||null===(r=n.res)||void 0===r||null===(s=r[f])||void 0===s?void 0:s.isSSAIEnabled)||!1,m=(null==n?void 0:n.skin_settings)||{};null==m||m.slowMoBtn;var y=(null==n||null===(u=n.customData)||void 0===u?void 0:u.ads)||{};e.addBigMuteButton(i),null!=m&&m.skipBtn&&0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)&&e.addSkipButton(i,"VL_ONE",SkipSvgV2());null!=m&&m.rewindBtn&&(0==(null==n?void 0:n.liveVideo)&&0==(null==n?void 0:n.liveui)||1==(null==n?void 0:n.liveui))&&e.addRewindButton(i,"VL_ONE",l.RewindSvgV3());(null==n||null===(d=n.relatedVideos)||void 0===d||null===(a=d.content)||void 0===a?void 0:a.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.relatedVideos);(null==n||null===(v=n.streams)||void 0===v?void 0:v.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==n?void 0:n.streams);(null==n||null===(C=n.playlist)||void 0===C||null===(c=C.content)||void 0===c?void 0:c.length)>0&&e.addPlaylistSelector(i,null==n?void 0:n.playlist);null!=n&&null!==(h=n.series)&&void 0!==h&&h.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,n);if(g&&p&&"TRANSMIT"==(null==y?void 0:y.liveAdSticherProvider)&&null!=y&&y.liveAdClientSideTracking)o.initializeTransmit(i,n);else if("MEDIA_TAILOR"==(null==y?void 0:y.vodAdSticherProvider)&&null!=y&&y.vodAdClientSideTracking&&g)if(p)o.setupAdvertisementMarkersForLinear(i);else{var L,b=null;if(null!=n&&null!==(L=n.series)&&void 0!==L&&L.enable){var B,j,w,V,E,S=null===(B=o.getCurrentVideo())||void 0===B||null===(j=B.video)||void 0===j||null===(w=j.gist)||void 0===w?void 0:w.id,x=o.getSeriesWatchMap(),M=(null==x?void 0:x.get(S))||{t:0,p:0},k=M.t,T=M.p;"function"==typeof(null===(V=window)||void 0===V||null===(E=V.watchHistory)||void 0===E?void 0:E.cb)&&window.watchHistory.cb({watchedTime:k}),T<95&&(b=k)}else{var q=n.watchHistoryResumeTime;n.watchedPercentage<95&&(b=q)}o.setupAdvertisementMarkers(i,b)}}(r,s),t.addTVProviderImage(r,s)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./generic-
|
|
1
|
+
"use strict";var e=require("./generic-3cfdb48b.js"),r=require("./skin-5c293b1b.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass");var i=function(i){var t=r.getPlayer(i),u=document.getElementById("".concat(i));u&&u.addEventListener("touchstart",function(){t.paused()?e.play(i):e.pause(i)})},t=function(e){var i=r.getPlayer(e);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){t(e),i(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./features-f30138d4.js"),l=require("./icons-eb807ef0.js"),i=require("./skin-5c293b1b.js"),r=require("./renditions-292f4eaa.js"),n=require("./captions-8c11c3bc.js"),o=require("./index-d8a7ba61.js"),t=require("./index-9071306d.js"),d=require("./browser-3670a923.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("./generic-3cfdb48b.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("md5"),require("js-cookie"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-f3ce1d3c.js"),require("./util-872c66b3.js"),exports.initialiseSkin=function(u,a){i.getPlayer(u).addClass("skin_defaultv2"),function(){"Chrome"==d.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-4bc06df1.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),function(l,u){var a=i.getPlayer(l);a&&(a.on("loadeddata",function(){var i,a,s,v,c,p,m;(null===(i=r.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,u),(null===(a=n.getCaptions(l))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(l,u),!(null!=u&&null!==(s=u.series)&&void 0!==s&&s.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play)||null!=u&&u.liveVideo||o.addNextEpPreview(l,u),null!=u&&u.liveVideo||d.isMobile()||t.initiateTrickplay(l)}),a.one("play",function(){var i,r,n,o;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===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}(u,a),function(e,r){var n,o,t,d,u,a,s,v,c,p,m,h,g,q=i.getPlayer(e);null===(n=q.controlBar)||void 0===n||n.removeChild("VolumePanel"),null===(o=q.controlBar)||void 0===o||o.addChild("VolumePanel",{inline:!1},1);var b=null===(t=q.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),f=null===(d=q.controlBar)||void 0===d?void 0:d.getChild("CurrentTimeDisplay"),C=null===(u=q.controlBar)||void 0===u?void 0:u.getChild("SeekToLive"),y=document.createElement("div");y.className="custom-spaced-progress-bar",b&&f&&C&&y.append(b.el(),f.el(),C.el());null===(a=q.controlBar)||void 0===a||null===(s=a.el())||void 0===s||s.append(y),null==q||null===(v=q.controlBar)||void 0===v||null===(c=v.getChild("FullscreenToggle"))||void 0===c||null===(p=c.el())||void 0===p||p.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==q||null===(m=q.controlBar)||void 0===m||null===(h=m.getChild("FullscreenToggle"))||void 0===h||null===(g=h.el())||void 0===g||g.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var V=document.getElementsByClassName("vjs-time-control");r.liveVideo&&V[0]&&(V[0].style.display="none")}(u,a),function(i,r){var n,o,t,d,u,a,s=(null==r?void 0:r.skin_settings)||{},v=0!=(null==s?void 0:s.slowMoBtn);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&&v&&e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(u,a),o.addTVProviderImage(u,a)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/typeof"),n=require("./generic-3cfdb48b.js"),t=require("./skin-5c293b1b.js"),o=!1;exports.getVideoDuration=function(e){var n=t.getPlayer(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")},exports.onReplay=function(e,r){var i=t.getPlayer(e);i?(i.on("ended",function(){return o=!0}),i.on("timeupdate",function(){if(!i.paused()&&o){var e,t,a=null===(e=n.getCurrentVideo())||void 0===e||null===(t=e.video)||void 0===t?void 0:t.id;n.videoReplayTracker.get(a)?(n.videoReplayTracker.clear(),n.trackMap.clear(),r(),n.videoReplayTracker.set(a)):(n.videoReplayTracker.clear(),n.videoReplayTracker.set(a)),o=!1}})):r("Cannot find player with id: '".concat(e,"'"))},exports.onTimeUpdate=function(e,n){var o=t.getPlayer(e);o?o.on("timeupdate",function(){return n(o.currentTime())}):n("Cannot find player with id: '".concat(e,"'"))},exports.onVideoEnded=function(e,n){var o=t.getPlayer(e);o?o.on("ended",function(){return n(!0)}):n("Cannot find player with id: '".concat(e,"'"))},exports.playerEvents=function(){var n=function(e,n){var o=t.getPlayer(e);if(!o)throw"Cannot find player with id: '".concat(e,"'");if("function"!=typeof n)throw"Callback function (cb) is missing or not a function";return o};return{onPlay:function(e,t){n(e,t).on("play",function(){return t()})},onPause:function(e,t){n(e,t).on("pause",function(){return t()})},onMute:function(e,t){var o=n(e,t);o.on("volumechange",function(){o.muted()?t({muted:!0}):t({muted:!1})})},onPictureInPictureChange:function(e,t){var o=n(e,t);o.on("enterpictureinpicture",function(){t({pip:!0})}),o.on("leavepictureinpicture",function(){t({pip:!1})})},onFullScreenChange:function(e,t){var o=n(e,t);o.on("fullscreenchange",function(e){o.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})})},onSetVolume:function(e,t){var o=n(e,t);o.on("volumechange",function(){var e=100*o.volume().toFixed(2);o.muted()?t({vol:0}):t({vol:e})})},onSeeked:function(e,t){var o=n(e,t);o.on("seeked",function(){t({seeked:o.currentTime()})})},onSubtitleEnable:function(e,t){var o=n(e,t);o.textTracks().on("change",function(e){console.log(o.textTracks());var n=o.textTracks().tracks_.filter(function(e){return("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode});n.length>0&&t({enabled:n[0]})})},onDisableSubtitles:function(e,t){var o=n(e,t);o.textTracks().on("change",function(e){var n,r;console.log(o.textTracks()),(null==o||null===(n=o.textTracks())||void 0===n||null===(r=n.tracks_)||void 0===r?void 0:r.every(function(e){return"showing"!=e.mode}))&&t({captions_disabled:!0})})},onSubtitleCueChange:function(t,o){var r=n(t,o);r.on("loadeddata",function(){var n,t,i,a,c,u=r.textTracks();"object"==e(r.dash)&&null!=r.dash&&r.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(i=t.dashjs)||void 0===i||null===(a=i.MediaPlayer)||void 0===a||null===(c=a.events)||void 0===c?void 0:c.CAPTION_RENDERED,function(e){o(e)});for(var l=0;l<u.length;l++){var d=u[l];"metadata"===d.kind&&(d.mode="hidden",n=d)}n&&n.addEventListener("cuechange",function(){var e=n.activeCues;if(e&&e.length>0)for(var t=0;t<e.length;t++){var r=e[t];o(r)}else console.log("no active cue at this moment")})})},onError:function(e,t){var o=n(e,t);o.on("error",function(){var e,n;t({error:null==o||null===(e=o.error())||void 0===e?void 0:e.code,msg:null==o||null===(n=o.error())||void 0===n?void 0:n.message})})}}},exports.seekToTimeStamp=function(e,n,o){var r=t.getPlayer(e);r?n>=0&&n<=r.duration()?(o({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),r.currentTime(n)):o({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):o("Cannot find player with id: '".concat(e,"'"))},exports.setPlaybackSpeed=function(e,n){var o=t.getPlayer(e);if(!o)return"Cannot find player with id: '".concat(e,"'");try{return o.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}};
|
|
@@ -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"),l=require("video.js"),a=require("./icons-eb807ef0.js"),r=require("./generic-3cfdb48b.js"),d=require("./skin-5c293b1b.js"),s=require("./autoNextVideo-f3ce1d3c.js"),c=require("./localisation-56e0a999.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("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-872c66b3.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(r.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.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=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";d.highlightVideo(e),r.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(d.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||d.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(c=r.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),d.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),r=require("video.js"),a=require("./icons-eb807ef0.js"),l=require("./generic-3cfdb48b.js"),d=require("./skin-5c293b1b.js"),s=require("./autoNextVideo-f3ce1d3c.js"),c=require("./localisation-56e0a999.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("./browser-3670a923.js"),require("md5"),require("js-cookie"),require("./captions-8c11c3bc.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-872c66b3.js");var v=r.getComponent("Component"),m=function(){i(b,v);var m,p,h=(m=b,p=u(),function(){var e,t=o(m);if(p){var i=o(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return n(this,e)});function b(t){var i,n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,b),(o=h.call(this,t,r)).playerId=r.playerId,o.seriesData=r.sres,o.videos=r.related.content,o.cb=(null==r||null===(i=r.related)||void 0===i?void 0:i.cb)||null,o.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,o.currentVideoData=r.res,o.initialiseStructure(),o.loadCSS(),o.autoNext&&(l.setVideoIdx(0),s.autoPlayNext({playerId:o.playerId,content:o.videos,cb:o.cb})),o}return t(b,[{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(),i=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=i.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),i.classList.remove("hidden"),t.classList.add("open"),i.style.right="0px",d.setUpdatedElHeight(e.playerId,i)):(i.classList.add("hidden"),t.classList.remove("open"),i.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height");i.style.height="".concat(o),r.dom.appendContent(t,i),n.style.overflow="hidden",this.addFunctionality(i),d.detectOrientationChange(this.playerId,i)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,i=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),o=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});o.onclick=function(){e.classList.add("hidden"),i.classList.remove("open"),e.style.right="-350px"};for(var s=r.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),v=r.dom.createEl("div",{className:"video-container"}),m=function(e){var i,n,o,a,s,c=r.dom.createEl("div",{className:"video -".concat(e)}),m=r.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){l.setVideoIdx(e+1);for(var i=r.dom.$$(".recommended"),n=0;n<i.length;n++)i[n].style.border="none";d.highlightVideo_DEFAULTV2_TEMP(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 p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==t||null===(i=t.videos)||void 0===i||null===(n=i[e])||void 0===n?void 0:n.img)||(null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.fallbackImage)),p.alt="No Thumbnail Available",m.append(p);var h=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(c,m),r.dom.appendContent(c,h),r.dom.appendContent(v,c),r.dom.appendContent(u,v)},p=0;p<this.videos.length;p++)m(p);r.dom.appendContent(n,o),r.dom.appendContent(n,s),r.dom.appendContent(e,n),r.dom.appendContent(e,u),d.handleDrawerResizing(this.playerId,e)}}]),b}();exports.default=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as n,h as t,$ as i,_ as o,a0 as a}from"./generic-228e9506.js";import{a as e}from"./util-4c8d7690.js";import{g as c,h as s}from"./skin-ba2be5f8.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;u=null==l?void 0:l.cb;var v=l.playerId;e(v,function(){var e=c(v);0!==(null==e?void 0:e.currentTime())&&((f=o())>d.length-1||(a(f+1),n(v,d[f].id).then(function(n){s(f,v),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,v),f++,r=setTimeout(function(){i(v)&&m(f,v,d)},5e3)})))})},m=function t(i,o,e,c){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){s(f,o),f++,h(n)}).catch(function(n){h(n),setTimeout(function(){s(f,o),f++,t(f,o,e)},5e3)}))},h=function(n){u&&u(n)};export{l as a,m as s};
|