@viewlift/player-backup 2.0.369-backup → 2.0.371-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-423d63c8.js → autoNextVideo-014e59d0.js} +1 -1
- package/cjs/bundle.css +536 -536
- package/cjs/{caption-settings-03628f5c.js → caption-settings-b180c3d6.js} +1 -1
- package/cjs/captions-f654ac90.js +1 -0
- package/cjs/{features-579dfc09.js → features-9684e788.js} +1 -1
- package/cjs/{generic-25227e81.js → generic-5d5dffe3.js} +1 -1
- package/cjs/{index-7ba0c893.js → index-4b7b6ddf.js} +1 -1
- package/cjs/{index-db332a6d.js → index-b8b0e295.js} +1 -1
- package/cjs/{index-a276fc30.js → index-e08ada02.js} +1 -1
- package/cjs/{index-8a1b84d3.js → index-ed90b7d4.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-c256747c.js → multicamv2-0bc7653e.js} +1 -1
- package/cjs/{multicamv2-6d996e0b.js → multicamv2-e040db2c.js} +1 -1
- package/cjs/{nextEpisodeButton-998a1ee5.js → nextEpisodeButton-e428e8e4.js} +1 -1
- package/cjs/{playlist-bd921770.js → playlist-4b1d2166.js} +1 -1
- package/cjs/{series-3467f447.js → series-5d8c2642.js} +1 -1
- package/cjs/{series-v2-aac02f76.js → series-v2-a702f0e5.js} +1 -1
- package/cjs/{series-v2-b021fcb5.js → series-v2-f589d854.js} +1 -1
- package/cjs/{skin-a2409a61.js → skin-1d8a5306.js} +1 -1
- package/cjs/{skin-68fcfaff.js → skin-7d8552e1.js} +1 -1
- package/cjs/{skin-7e53cab5.js → skin-93430ee6.js} +1 -1
- package/cjs/{skin-46df7021.js → skin-a2fe0e3e.js} +1 -1
- package/cjs/{skin-349b3663.js → skin-a5b02b9a.js} +1 -1
- package/cjs/{skin-6667167e.js → skin-a6e89cf2.js} +1 -1
- package/cjs/{skin-f408a8df.js → skin-d0deb9ba.js} +1 -1
- package/cjs/{skin-35c00530.js → skin-d2065321.js} +1 -1
- package/cjs/{skin-fc6db1d4.js → skin-ed65b435.js} +1 -1
- package/cjs/{skin-34f792b7.js → skin-f33b8a7f.js} +1 -1
- package/cjs/{videoSelector-e8d21264.js → videoSelector-69bb305c.js} +1 -1
- package/cjs/{videoSelector-4ffe5b7f.js → videoSelector-f35aff87.js} +1 -1
- package/esm/{autoNextVideo-cad097ab.js → autoNextVideo-44b94df7.js} +1 -1
- package/esm/bundle.css +536 -536
- package/esm/{caption-settings-a34f9eb6.js → caption-settings-00db0381.js} +1 -1
- package/esm/captions-31e9a949.js +1 -0
- package/esm/{features-dc601109.js → features-22d44665.js} +1 -1
- package/esm/{generic-326a71a3.js → generic-b27ef2d8.js} +1 -1
- package/esm/{index-df589dc0.js → index-0d81cb18.js} +1 -1
- package/esm/{index-662263e1.js → index-17df9643.js} +1 -1
- package/esm/{index-98364c13.js → index-ed2ada15.js} +1 -1
- package/esm/{index-d9840bdb.js → index-f20f3a0f.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-76c9d34d.js → multicamv2-1dfcd361.js} +1 -1
- package/esm/{multicamv2-55a8ddf8.js → multicamv2-9a1f43cb.js} +1 -1
- package/esm/{nextEpisodeButton-cfefe961.js → nextEpisodeButton-ac5a62f9.js} +1 -1
- package/esm/{playlist-05e214e9.js → playlist-a8755fbd.js} +1 -1
- package/esm/{series-d48a5f64.js → series-137e2b9d.js} +1 -1
- package/esm/{series-v2-f67e637d.js → series-v2-97b23caa.js} +1 -1
- package/esm/{series-v2-81097d29.js → series-v2-c1fabd6a.js} +1 -1
- package/esm/{skin-ba2fdd77.js → skin-0f778f17.js} +1 -1
- package/esm/{skin-569ec669.js → skin-29678dc2.js} +1 -1
- package/esm/{skin-00682294.js → skin-3c003f75.js} +1 -1
- package/esm/{skin-248d30eb.js → skin-42f72fba.js} +1 -1
- package/esm/{skin-4015b68e.js → skin-8457cf77.js} +1 -1
- package/esm/{skin-79aa1313.js → skin-8781e3b0.js} +1 -1
- package/esm/{skin-da04ffa7.js → skin-93c64f6c.js} +1 -1
- package/esm/{skin-f675016d.js → skin-b0578d05.js} +1 -1
- package/esm/{skin-f065740a.js → skin-e2264421.js} +1 -1
- package/esm/{skin-ec2a96b8.js → skin-fd20ed70.js} +1 -1
- package/esm/{videoSelector-7b03e2ee.js → videoSelector-0f28b105.js} +1 -1
- package/esm/{videoSelector-8290988a.js → videoSelector-214b5811.js} +1 -1
- package/package.json +1 -1
- package/cjs/captions-6d34f14b.js +0 -1
- package/esm/captions-beaade8a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,d as l,e as n,o as i,p as o,q as t}from"./features-dc601109.js";import{g as r}from"./skin-3653c5b3.js";import{a,b as u}from"./index-98364c13.js";import{i as d}from"./index-d9840bdb.js";import{p as v,a as s}from"./browser-05efadfa.js";import c from"@babel/runtime/helpers/defineProperty";import p from"@babel/runtime/helpers/toConsumableArray";import f from"video.js";import"videojs-contrib-quality-menu";import{r as b,a as m,b as y}from"./resolution-43f91f56.js";import{r as g}from"./relatedVideosManager-81661348.js";import{f as h,aa as j,ae as w,af as _,e as L,ag as C,p as B}from"./generic-326a71a3.js";import{c as T,d as k}from"./icons-262bef63.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"./renditions-620d93b3.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-cad097ab.js";import"./index-df589dc0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/assertThisInitialized";import"axios";import"md5";import"js-cookie";import"./captions-beaade8a.js";import"@viewlift/comscore/index.js";function E(e,l){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);l&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,i)}return n}function O(e){for(var l=1;l<arguments.length;l++){var n=null!=arguments[l]?arguments[l]:{};l%2?E(Object(n),!0).forEach(function(l){c(e,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(n,l))})}return e}var I=function(e,l){var n,i;if(e&&null!=l){e.options_.label=l;var o=null===(n=e.el())||void 0===n||null===(i=n.querySelector)||void 0===i?void 0:i.call(n,".vjs-menu-item-text");o&&(o.innerHTML=l)}},A=function(e){var l,n;return null!==(l=null!==(n=null==e?void 0:e.bitrate)&&void 0!==n?n:null==e?void 0:e.bandwidth)&&void 0!==l?l:0},P=function(e){var l=y();return l?"".concat(e," ").concat(l):e},R=function(e){var l,n=null===(l=v.getConfig())||void 0===l?void 0:l.qualityLabels,i=b();if(null!=n&&n.auto&&"function"==typeof f.addLanguage){var o="function"==typeof e.language&&e.language()||"en";f.addLanguage(o,{Auto:n.auto})}var t=function(e){var l,n=e.getChild("controlBar");return n&&(n.getChild("QualityMenuButton")||(null===(l=n.children())||void 0===l?void 0:l.find(function(e){return"QualityMenuButton"===(null==e?void 0:e.name_)})))||null}(e);if(t&&!t._qualityLabelsPatched){if(t._qualityLabelsPatched=!0,"function"==typeof t.groupByResolution_){var r=t.groupByResolution_.bind(t);t.groupByResolution_=function(){var e=this;return r().reduce(function(l,n){return l.concat(function(e,l){var n,i=p(l.levels||[]).sort(function(l,n){return A(e[n])-A(e[l])}),o=m(null==e||null===(n=e[i[0]])||void 0===n?void 0:n.height),t=null!=o?o:l.label,r=null!=o?"":l.subLabel,a=A(e[i[i.length-1]]);return A(e[i[0]])===a?[O(O({},l),{},{label:t,subLabel:r})]:i.map(function(n){return O(O({},l),{},{levels:[n],active:e.selectedIndex===n,label:A(e[n])>a?P(t):t,subLabel:r})})}(e.qualityLevels_,n))},[])}}if("function"==typeof t.createItems){var a=t.createItems.bind(t);t.createItems=function(){var e=a();return e.forEach(function(e){var l;return I(e,null===(l=e.options_)||void 0===l?void 0:l.label)}),this.autoMenuItem_&&null!=n&&n.auto&&I(this.autoMenuItem_,i),e}}"function"==typeof t.update&&t.update()}},S=function(e){var l=r(e);if(l){var n=function(e){var l,n,i,o,t,r=null==e||null===(l=e.dash)||void 0===l?void 0:l.mediaPlayer;if(r&&"function"==typeof e.qualityLevels&&e._dashQualityLevelsFor!==r){var a=(null===(n=r.getRepresentationsByType)||void 0===n?void 0:n.call(r,"video"))||[];if(a.length){e._dashQualityLevelsFor=r;for(var u=e.qualityLevels();u.length;)u.removeQualityLevel(u[0]);var d=function(e){return(null==e?void 0:e.bandwidth)||1e3*((null==e?void 0:e.bitrateInKbit)||0)},v=a.map(function(){return!0}),s=!1,c=function(){s=!1;var e=a.filter(function(e,l){return v[l]});if(e.length&&e.length!==a.length){var l=e.reduce(function(e,l){return d(l)>d(e)?l:e});r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),r.setRepresentationForTypeById("video",l.id,!0)}else r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})};a.forEach(function(e,l){u.addQualityLevel({id:String(e.id),width:e.width,height:e.height,bandwidth:d(e),enabled:function(e){if("boolean"!=typeof e)return v[l];v[l]=e,s||(s=!0,Promise.resolve().then(c))}})});var p=function(e){var l=a.findIndex(function(l){return l.id===(null==e?void 0:e.id)});l<0||u.selectedIndex===l||(u.selectedIndex_=l,u.trigger({type:"change",selectedIndex:l}))},f=null===(i=window)||void 0===i||null===(o=i.dashjs)||void 0===o||null===(t=o.MediaPlayer)||void 0===t?void 0:t.events;return null!=f&&f.QUALITY_CHANGE_RENDERED&&r.on(f.QUALITY_CHANGE_RENDERED,function(e){var l=e.mediaType,n=e.newRepresentation;"video"===l&&p(n)}),function(){var e;return p(null===(e=r.getCurrentRepresentationForType)||void 0===e?void 0:e.call(r,"video"))}}}}(l);"function"==typeof l.qualityMenu&&l.qualityMenu({useResolutionLabels:!0}),l.ready(function(){R(l),n&&n()}),l.on("loadstart",function(){l.ready(function(){return R(l)})})}};function x(v,c){r(v).addClass("skin_vlone"),function(l,n){var i,o=r(l),t=(null==n||null===(i=n.res)||void 0===i?void 0:i.siteId)||"";o&&(o.on("loadeddata",function(){var e,i,o,r,u,v,c,p;S(l);var f=(null===(e=g.get())||void 0===e||null===(i=e.content)||void 0===i?void 0:i.length)>0;if(!(null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null!==(r=window)&&void 0!==r&&null!==(u=r.app_data)&&void 0!==u&&null!==(v=u.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play||f)||null!=n&&n.liveVideo){if(!(null!=n&&n.liveVideo||null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable)){var b;b=g.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(a(l,n),b&&b())})}}else a(l,n);null!=n&&n.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||d(l)}),o.one("play",function(){var n,i,o,t;null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(l,null===(o=window)||void 0===o||null===(t=o.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(v,c),function(e,a){var d,v,s,c,p,f,b,m=r(e),y=(null==a?void 0:a.liveVideo)||!1,E=(null==a||null===(d=a.res)||void 0===d?void 0:d.contentType)||"video",O=(null==a||null===(v=a.res)||void 0===v||null===(s=v[E])||void 0===s?void 0:s.isSSAIEnabled)||!1,I=h(null==a?void 0:a.res,e)||{};I.src;var A=(null==a?void 0:a.skin_settings)||{},P=(null==a||null===(c=a.customData)||void 0===c?void 0:c.ads)||{};if(y&&(null==a||!a.liveui)){var R,S=null==m||null===(R=m.controlBar)||void 0===R?void 0:R.getChild("LiveDisplay"),x=(null==S?void 0:S.el())||null,q=null==x?void 0:x.querySelector(".vjs-live-display");if(x&&q){var M,D,V=document.createElement("button");V.type="button",V.className="vjs-live-display",V.setAttribute("aria-label","live"),V.textContent="LIVE";var N=function(){try{var e;null==m||null===(e=m.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};V.addEventListener("click",N),q.replaceWith(V),S&&(S.contentEl_=V);var Q=live_button_el.querySelector(".vjs-live-display")||live_button_el,H=function(){var e,l,n,i=null===(e=null==m||null===(l=m.liveTracker)||void 0===l||null===(n=l.atLiveEdge)||void 0===n?void 0:n.call(l))||void 0===e||e;Q.classList.toggle("vjs-behind-live",!i)};null==m||null===(M=m.liveTracker)||void 0===M||null===(D=M.on)||void 0===D||D.call(M,"liveedgechange",H),H(),x.removeAttribute("tabindex"),x.removeAttribute("role"),x.removeAttribute("aria-label")}}null!=A&&A.skipBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)&&l(e,"VL_ONE",T());(null!=A&&A.rewindBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)||1==(null==a?void 0:a.liveui))&&n(e,"VL_ONE",k());var F,U=g.get();(null==U||null===(p=U.content)||void 0===p?void 0:p.length)>0&&i(e,U);F=g.subscribe(function(l){var n,o,t=r(e);(null==t||null===(n=t.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(i(e,l),F&&F())}),null!=a&&null!==(f=a.series)&&void 0!==f&&f.enable&&o(e,a);(null==a||null===(b=a.streams)||void 0===b?void 0:b.length)>1&&t(e,null==a?void 0:a.streams);if(u(e,a),j(e,a),O&&y&&"TRANSMIT"==(null==P?void 0:P.liveAdSticherProvider)&&!(null==P||!P.liveAdClientSideTracking))w(e,a);else if("MEDIA_TAILOR"==(null==P?void 0:P.vodAdSticherProvider)&&null!=P&&P.vodAdClientSideTracking&&O)if(y)_(e);else{var G,K=null;if(null!=a&&null!==(G=a.series)&&void 0!==G&&G.enable){var Y,$,z,J,W,X=null===(Y=L())||void 0===Y||null===($=Y.video)||void 0===$||null===(z=$.gist)||void 0===z?void 0:z.id,Z=B(),ee=(null==Z?void 0:Z.get(X))||{t:0,p:0},le=ee.t,ne=ee.p;"function"==typeof(null===(J=window)||void 0===J||null===(W=J.watchHistory)||void 0===W?void 0:W.cb)&&window.watchHistory.cb({watchedTime:le}),ne<95&&(K=le)}else{var ie=a.watchHistoryResumeTime;a.watchedPercentage<95&&(K=ie)}C(e,K)}}(v,c),q(v,c)}var q=function(e,l){var n,i,o,t,a,u,d,v,s,c,p,b,m=r(e),y=(null==l?void 0:l.theme)||{},g=f.dom.$(".vjs-play-progress"),h=f.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(u=a.primary)||void 0===u?void 0:u.backgroundColor)),g&&(g.style.background="".concat(null===(d=window)||void 0===d||null===(v=d.app_data)||void 0===v||null===(s=v.appcmsMain)||void 0===s||null===(c=s.brand)||void 0===c||null===(p=c.cta)||void 0===p||null===(b=p.primary)||void 0===b?void 0:b.backgroundColor));var j=m.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&g&&(g.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{x as initialiseSkin};
|
|
1
|
+
import{h as e,d as l,e as n,o as i,p as o,q as t}from"./features-22d44665.js";import{g as r}from"./skin-3653c5b3.js";import{a,b as u}from"./index-ed2ada15.js";import{i as d}from"./index-f20f3a0f.js";import{p as v,a as s}from"./browser-05efadfa.js";import c from"@babel/runtime/helpers/defineProperty";import p from"@babel/runtime/helpers/toConsumableArray";import f from"video.js";import"videojs-contrib-quality-menu";import{r as b,a as m,b as y}from"./resolution-43f91f56.js";import{r as g}from"./relatedVideosManager-81661348.js";import{f as h,aa as j,ae as w,af as _,e as L,ag as C,p as B}from"./generic-b27ef2d8.js";import{c as T,d as k}from"./icons-262bef63.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"./renditions-620d93b3.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-44b94df7.js";import"./index-0d81cb18.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/assertThisInitialized";import"axios";import"md5";import"js-cookie";import"./captions-31e9a949.js";import"@viewlift/comscore/index.js";function E(e,l){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);l&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,i)}return n}function O(e){for(var l=1;l<arguments.length;l++){var n=null!=arguments[l]?arguments[l]:{};l%2?E(Object(n),!0).forEach(function(l){c(e,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(n,l))})}return e}var I=function(e,l){var n,i;if(e&&null!=l){e.options_.label=l;var o=null===(n=e.el())||void 0===n||null===(i=n.querySelector)||void 0===i?void 0:i.call(n,".vjs-menu-item-text");o&&(o.innerHTML=l)}},A=function(e){var l,n;return null!==(l=null!==(n=null==e?void 0:e.bitrate)&&void 0!==n?n:null==e?void 0:e.bandwidth)&&void 0!==l?l:0},P=function(e){var l=y();return l?"".concat(e," ").concat(l):e},R=function(e){var l,n=null===(l=v.getConfig())||void 0===l?void 0:l.qualityLabels,i=b();if(null!=n&&n.auto&&"function"==typeof f.addLanguage){var o="function"==typeof e.language&&e.language()||"en";f.addLanguage(o,{Auto:n.auto})}var t=function(e){var l,n=e.getChild("controlBar");return n&&(n.getChild("QualityMenuButton")||(null===(l=n.children())||void 0===l?void 0:l.find(function(e){return"QualityMenuButton"===(null==e?void 0:e.name_)})))||null}(e);if(t&&!t._qualityLabelsPatched){if(t._qualityLabelsPatched=!0,"function"==typeof t.groupByResolution_){var r=t.groupByResolution_.bind(t);t.groupByResolution_=function(){var e=this;return r().reduce(function(l,n){return l.concat(function(e,l){var n,i=p(l.levels||[]).sort(function(l,n){return A(e[n])-A(e[l])}),o=m(null==e||null===(n=e[i[0]])||void 0===n?void 0:n.height),t=null!=o?o:l.label,r=null!=o?"":l.subLabel,a=A(e[i[i.length-1]]);return A(e[i[0]])===a?[O(O({},l),{},{label:t,subLabel:r})]:i.map(function(n){return O(O({},l),{},{levels:[n],active:e.selectedIndex===n,label:A(e[n])>a?P(t):t,subLabel:r})})}(e.qualityLevels_,n))},[])}}if("function"==typeof t.createItems){var a=t.createItems.bind(t);t.createItems=function(){var e=a();return e.forEach(function(e){var l;return I(e,null===(l=e.options_)||void 0===l?void 0:l.label)}),this.autoMenuItem_&&null!=n&&n.auto&&I(this.autoMenuItem_,i),e}}"function"==typeof t.update&&t.update()}},S=function(e){var l=r(e);if(l){var n=function(e){var l,n,i,o,t,r=null==e||null===(l=e.dash)||void 0===l?void 0:l.mediaPlayer;if(r&&"function"==typeof e.qualityLevels&&e._dashQualityLevelsFor!==r){var a=(null===(n=r.getRepresentationsByType)||void 0===n?void 0:n.call(r,"video"))||[];if(a.length){e._dashQualityLevelsFor=r;for(var u=e.qualityLevels();u.length;)u.removeQualityLevel(u[0]);var d=function(e){return(null==e?void 0:e.bandwidth)||1e3*((null==e?void 0:e.bitrateInKbit)||0)},v=a.map(function(){return!0}),s=!1,c=function(){s=!1;var e=a.filter(function(e,l){return v[l]});if(e.length&&e.length!==a.length){var l=e.reduce(function(e,l){return d(l)>d(e)?l:e});r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),r.setRepresentationForTypeById("video",l.id,!0)}else r.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})};a.forEach(function(e,l){u.addQualityLevel({id:String(e.id),width:e.width,height:e.height,bandwidth:d(e),enabled:function(e){if("boolean"!=typeof e)return v[l];v[l]=e,s||(s=!0,Promise.resolve().then(c))}})});var p=function(e){var l=a.findIndex(function(l){return l.id===(null==e?void 0:e.id)});l<0||u.selectedIndex===l||(u.selectedIndex_=l,u.trigger({type:"change",selectedIndex:l}))},f=null===(i=window)||void 0===i||null===(o=i.dashjs)||void 0===o||null===(t=o.MediaPlayer)||void 0===t?void 0:t.events;return null!=f&&f.QUALITY_CHANGE_RENDERED&&r.on(f.QUALITY_CHANGE_RENDERED,function(e){var l=e.mediaType,n=e.newRepresentation;"video"===l&&p(n)}),function(){var e;return p(null===(e=r.getCurrentRepresentationForType)||void 0===e?void 0:e.call(r,"video"))}}}}(l);"function"==typeof l.qualityMenu&&l.qualityMenu({useResolutionLabels:!0}),l.ready(function(){R(l),n&&n()}),l.on("loadstart",function(){l.ready(function(){return R(l)})})}};function x(v,c){r(v).addClass("skin_vlone"),function(l,n){var i,o=r(l),t=(null==n||null===(i=n.res)||void 0===i?void 0:i.siteId)||"";o&&(o.on("loadeddata",function(){var e,i,o,r,u,v,c,p;S(l);var f=(null===(e=g.get())||void 0===e||null===(i=e.content)||void 0===i?void 0:i.length)>0;if(!(null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable||null!==(r=window)&&void 0!==r&&null!==(u=r.app_data)&&void 0!==u&&null!==(v=u.appcmsMain)&&void 0!==v&&null!==(c=v.features)&&void 0!==c&&c.auto_play||f)||null!=n&&n.liveVideo){if(!(null!=n&&n.liveVideo||null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable)){var b;b=g.subscribe(function(e){var i;(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(a(l,n),b&&b())})}}else a(l,n);null!=n&&n.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||d(l)}),o.one("play",function(){var n,i,o,t;null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.iframeOverlayUrl&&e(l,null===(o=window)||void 0===o||null===(t=o.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(v,c),function(e,a){var d,v,s,c,p,f,b,m=r(e),y=(null==a?void 0:a.liveVideo)||!1,E=(null==a||null===(d=a.res)||void 0===d?void 0:d.contentType)||"video",O=(null==a||null===(v=a.res)||void 0===v||null===(s=v[E])||void 0===s?void 0:s.isSSAIEnabled)||!1,I=h(null==a?void 0:a.res,e)||{};I.src;var A=(null==a?void 0:a.skin_settings)||{},P=(null==a||null===(c=a.customData)||void 0===c?void 0:c.ads)||{};if(y&&(null==a||!a.liveui)){var R,S=null==m||null===(R=m.controlBar)||void 0===R?void 0:R.getChild("LiveDisplay"),x=(null==S?void 0:S.el())||null,q=null==x?void 0:x.querySelector(".vjs-live-display");if(x&&q){var M,D,V=document.createElement("button");V.type="button",V.className="vjs-live-display",V.setAttribute("aria-label","live"),V.textContent="LIVE";var N=function(){try{var e;null==m||null===(e=m.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};V.addEventListener("click",N),q.replaceWith(V),S&&(S.contentEl_=V);var Q=live_button_el.querySelector(".vjs-live-display")||live_button_el,H=function(){var e,l,n,i=null===(e=null==m||null===(l=m.liveTracker)||void 0===l||null===(n=l.atLiveEdge)||void 0===n?void 0:n.call(l))||void 0===e||e;Q.classList.toggle("vjs-behind-live",!i)};null==m||null===(M=m.liveTracker)||void 0===M||null===(D=M.on)||void 0===D||D.call(M,"liveedgechange",H),H(),x.removeAttribute("tabindex"),x.removeAttribute("role"),x.removeAttribute("aria-label")}}null!=A&&A.skipBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)&&l(e,"VL_ONE",T());(null!=A&&A.rewindBtn&&0==(null==a?void 0:a.liveVideo)&&0==(null==a?void 0:a.liveui)||1==(null==a?void 0:a.liveui))&&n(e,"VL_ONE",k());var F,U=g.get();(null==U||null===(p=U.content)||void 0===p?void 0:p.length)>0&&i(e,U);F=g.subscribe(function(l){var n,o,t=r(e);(null==t||null===(n=t.controlBar)||void 0===n||!n.getChild("videoSelector"))&&(null==l||null===(o=l.content)||void 0===o?void 0:o.length)>0&&(i(e,l),F&&F())}),null!=a&&null!==(f=a.series)&&void 0!==f&&f.enable&&o(e,a);(null==a||null===(b=a.streams)||void 0===b?void 0:b.length)>1&&t(e,null==a?void 0:a.streams);if(u(e,a),j(e,a),O&&y&&"TRANSMIT"==(null==P?void 0:P.liveAdSticherProvider)&&!(null==P||!P.liveAdClientSideTracking))w(e,a);else if("MEDIA_TAILOR"==(null==P?void 0:P.vodAdSticherProvider)&&null!=P&&P.vodAdClientSideTracking&&O)if(y)_(e);else{var G,K=null;if(null!=a&&null!==(G=a.series)&&void 0!==G&&G.enable){var Y,$,z,J,W,X=null===(Y=L())||void 0===Y||null===($=Y.video)||void 0===$||null===(z=$.gist)||void 0===z?void 0:z.id,Z=B(),ee=(null==Z?void 0:Z.get(X))||{t:0,p:0},le=ee.t,ne=ee.p;"function"==typeof(null===(J=window)||void 0===J||null===(W=J.watchHistory)||void 0===W?void 0:W.cb)&&window.watchHistory.cb({watchedTime:le}),ne<95&&(K=le)}else{var ie=a.watchHistoryResumeTime;a.watchedPercentage<95&&(K=ie)}C(e,K)}}(v,c),q(v,c)}var q=function(e,l){var n,i,o,t,a,u,d,v,s,c,p,b,m=r(e),y=(null==l?void 0:l.theme)||{},g=f.dom.$(".vjs-play-progress"),h=f.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(o=i.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(u=a.primary)||void 0===u?void 0:u.backgroundColor)),g&&(g.style.background="".concat(null===(d=window)||void 0===d||null===(v=d.app_data)||void 0===v||null===(s=v.appcmsMain)||void 0===s||null===(c=s.brand)||void 0===c||null===(p=c.cta)||void 0===p||null===(b=p.primary)||void 0===b?void 0:b.backgroundColor));var j=m.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&g&&(g.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&j&&(j.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&h&&(h.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?j.el().style.borderRadius=".3em":j.el().style.borderRadius="1.3em")};export{x as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-
|
|
1
|
+
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-22d44665.js";import{M as u,a as v,c as m,d as p}from"./icons-262bef63.js";import{g as c,b as h}from"./skin-3653c5b3.js";import{g as f}from"./renditions-620d93b3.js";import{g as b}from"./captions-31e9a949.js";import{a as g,b as C}from"./index-ed2ada15.js";import{i as j}from"./index-f20f3a0f.js";import{a as y,d as w}from"./browser-05efadfa.js";import{r as V}from"./relatedVideosManager-81661348.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"./generic-b27ef2d8.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-44b94df7.js";import"./index-0d81cb18.js";function B(B,k){c(B).addClass("skin_defaultv2"),function(){"Chrome"==w()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-46def1ff.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,t,r,a,d,s,u,v,m,p;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n);var c=(null===(r=V.get())||void 0===r||null===(a=r.content)||void 0===a?void 0:a.length)>0;if(!(null!=n&&null!==(d=n.series)&&void 0!==d&&d.enable||null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(v=u.appcmsMain)&&void 0!==v&&null!==(m=v.features)&&void 0!==m&&m.auto_play||c)||null!=n&&n.liveVideo){if(!(null!=n&&n.liveVideo||null!=n&&null!==(p=n.series)&&void 0!==p&&p.enable)){var h;h=V.subscribe(function(l){var e;(null==l||null===(e=l.content)||void 0===e?void 0:e.length)>0&&(g(i,n),h&&h())})}}else g(i,n);null!=n&&n.liveVideo||y()||j(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(B,k),function(l,e){var o,i,n,t,r,a,d,s,m,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),w=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",j&&y&&w&&V.append(j.el(),y.el(),w.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(V),null==C||null===(s=C.controlBar)||void 0===s||null===(m=s.getChild("FullscreenToggle"))||void 0===m||null===(p=m.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(v(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(B,k),function(l,e){var o,u,v,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",m());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);var C,j=V.get();(null==j||null===(o=j.content)||void 0===o?void 0:o.length)>0&&r(l,j);C=V.subscribe(function(e){var o,i,n=c(l);(null==n||null===(o=n.controlBar)||void 0===o||!o.getChild("videoSelector"))&&(null==e||null===(i=e.content)||void 0===i?void 0:i.length)>0&&(r(l,e),C&&C())}),(null==e||null===(u=e.streams)||void 0===u?void 0:u.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(v=e.playlist)||void 0===v||null===(h=v.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(B,k),C(B,k)}export{B as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,U as r}from"./generic-
|
|
1
|
+
import{T as e,U as r}from"./generic-b27ef2d8.js";import{g as t}from"./skin-3653c5b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"./captions-31e9a949.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",function(){i.paused()?e(o):r(o)})},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";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 d,g as s}from"./icons-262bef63.js";import{X as r,ad as c}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";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 d,g as s}from"./icons-262bef63.js";import{X as r,ad as c}from"./generic-b27ef2d8.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-3653c5b3.js";import{a as y,u as f}from"./autoNextVideo-44b94df7.js";import{g as E}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"./captions-31e9a949.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-0d81cb18.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(B,I);var N,x,k=(N=B,x=C(),function(){var e,t=l(N);if(x){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function B(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,B),(i=k.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,f(i.videos),i._refreshList()}),i}return t(B,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,d,s,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(d=l.images)||void 0===d?void 0:d.placeholderCover)),h.alt="".concat((null==this||null===(s=this.videos[e])||void 0===s||null===(r=s.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(B,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",ariaExpanded:!1,innerHTML:"".concat(d())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-89c7f4d2.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"}),n=a.dom.$(".video-selector-icon",this.el());n.onclick=function(){var i,l;null!==(i=o.classList)&&void 0!==i&&i.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o),e.handleTabIndexSelector(),null===(l=e.titleEl)||void 0===l||l.focus(),n.setAttribute("aria-expanded",!0)):(o.classList.add("hidden"),t.classList.remove("open"),n.setAttribute("aria-expanded",!1))};var i=document.getElementById(this.playerId);if(i){var l=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(l),a.dom.appendContent(t,o),i.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(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,o;this.titleEl&&(this.titleEl.tabIndex=0),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.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,o,n;this.titleEl&&(this.titleEl.tabIndex=-1),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1),null!==(t=document.getElementsByClassName("video-selector-icon"))&&void 0!==t&&t[0]&&document.getElementsByClassName("video-selector-icon")[0].setAttribute("aria-expanded",!1);for(var i=document.getElementsByClassName("video-accessibility"),l=(null==i||null===(o=i[0])||void 0===o||null===(n=o.children)||void 0===n?void 0:n.length)||0,a=0;a<l;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("button",{className:"video-selector-cross-icon",ariaLabel:"close video selector",type:"button",tabIndex:-1,innerHTML:"".concat(s())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=E("relatedVideoTitle")||"Recommended",d=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});d.setAttribute("role","heading"),d.setAttribute("aria-level","2"),this.titleEl=d;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,l,d,s,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("button",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(d=l.appcmsMain)||void 0===d||null===(s=d.images)||void 0===s?void 0:s.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),b.setAttribute("aria-hidden","true"),h.append(b);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,y),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(n,d),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,r),b(this.playerId,e)}}]),B}();export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{X as s,ad as c}from"./generic-
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import l from"video.js";import{E as r,g as d}from"./icons-262bef63.js";import{X as s,ad as c}from"./generic-b27ef2d8.js";import{m,j as u,s as v,k as p,l as h}from"./skin-3653c5b3.js";import{a as f,u as b}from"./autoNextVideo-44b94df7.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-81661348.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"./captions-31e9a949.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-0d81cb18.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var N=l.getComponent("Component"),E=function(){n(I,N);var E,k,j=(E=I,k=C(),function(){var e,t=a(E);if(k){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function I(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(i=j.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe(function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,b(i.videos),i._refreshList()}),i}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,r=this,d=l.dom.createEl("div",{className:"video -".concat(e)}),u=l.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=l.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),s(r.playerId,r.videos[e].id).then(function(e){r.cb&&r.cb(e)}).catch(function(e){r.cb&&r.cb(e)})};var v=document.createElement("img");v.className="related-thumbnail-image",v.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.fallbackImage)),v.alt="No Thumbnail Available",u.append(v);var p=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return l.dom.appendContent(d,u),l.dom.appendContent(d,p),d}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){l.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)l.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var l=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof l?function(e){return l.apply(n,e)}:l}(I,"dispose",this,3)([])}},{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("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",v(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),l.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(d())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=l.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),r=l.dom.createEl("div",{className:"video-selector-content"}),u=l.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n,i,a,d,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.dom.createEl("div",{className:"recommended -".concat(e)});p.setAttribute("video-idx",e),p.onclick=function(){c(e+1);for(var o=l.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),s(t.playerId,t.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",p.append(h);var f=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(d=t.videos[e])||void 0===d?void 0:d.title)||"")});l.dom.appendContent(v,p),l.dom.appendContent(v,f),l.dom.appendContent(u,v),l.dom.appendContent(r,u)},p=0;p<this.videos.length;p++)v(p);l.dom.appendContent(n,i),l.dom.appendContent(n,a),l.dom.appendContent(e,n),l.dom.appendContent(e,r),h(this.playerId,e)}}]),I}();export{E as default};
|
package/package.json
CHANGED
package/cjs/captions-6d34f14b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("./skin-66dce245.js"),n={en:"English",eng:"English",es:"Spanish",spa:"Spanish",fr:"French",fre:"French",fra:"French",de:"German",ger:"German",deu:"German",pt:"Portuguese",por:"Portuguese",it:"Italian",ita:"Italian",nl:"Dutch",nld:"Dutch",dut:"Dutch",ru:"Russian",rus:"Russian",zh:"Chinese",zho:"Chinese",chi:"Chinese",ja:"Japanese",jpn:"Japanese",ko:"Korean",kor:"Korean",ar:"Arabic",ara:"Arabic",hi:"Hindi",hin:"Hindi",sv:"Swedish",swe:"Swedish",no:"Norwegian",nor:"Norwegian",da:"Danish",dan:"Danish",fi:"Finnish",fin:"Finnish",pl:"Polish",pol:"Polish",tr:"Turkish",tur:"Turkish",el:"Greek",ell:"Greek",gre:"Greek",he:"Hebrew",heb:"Hebrew",th:"Thai",tha:"Thai",vi:"Vietnamese",vie:"Vietnamese",id:"Indonesian",ind:"Indonesian",ms:"Malay",msa:"Malay",may:"Malay",cs:"Czech",ces:"Czech",cze:"Czech",sk:"Slovak",slk:"Slovak",slo:"Slovak",hu:"Hungarian",hun:"Hungarian",ro:"Romanian",ron:"Romanian",rum:"Romanian",uk:"Ukrainian",ukr:"Ukrainian"},a=function(e){return e&&n[e.trim().toLowerCase()]||e},r=videojs.getComponent("TextTrackMenuItem");if(r&&!r.prototype.__vlLanguageLabelPatched){var i=r.prototype.localize;r.prototype.localize=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.call.apply(i,[this,a(e)].concat(n))},r.prototype.__vlLanguageLabelPatched=!0}exports.addCaptions=function(e,n){var r=t.getPlayer(e);r.remoteTextTracks().tracks_.map(function(e){r.removeRemoteTextTrack(e)}),n.map(function(e){r.addRemoteTextTrack({src:e.url,srclang:e.srclang,label:a(e.label||(null==e?void 0:e.language))})})},exports.disableCaptions=function(e,n){for(var a=t.getPlayer(e).textTracks(),r=0;r<a.length;r++){var i=a[r];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},exports.enableCaptions=function(e,n){var a,r,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(i=r.style)||void 0===i||i.setProperty("display","flex"));for(var o=t.getPlayer(e).textTracks(),s=0;s<o.length;s++){var l=o[s];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},exports.getCaptions=function(e){var n,a=t.getPlayer(e),r=null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(e){return"subtitles"==e.kind||"captions"===e.kind});return function(){var e,t=null===(e=document)||void 0===e?void 0:e.querySelector(".vjs-texttrack-settings"),n=null==t?void 0:t.querySelector(".vjs-control-text");t&&n&&(n.textContent="opens captions settings");var a=document.querySelectorAll(".vjs-subtitles-menu-item");(null==a?void 0:a.length)>0&&a.forEach(function(e,t){var n=e.querySelector(".vjs-menu-item-text");"en"==n.textContent?n.setAttribute("aria-label","English"):"es"==n.textContent?n.setAttribute("aria-label","Espanol"):n.setAttribute("aria-label",n.textContent)})}(),r||[]},exports.removeCaptions=function(e){var n=t.getPlayer(e);n.remoteTextTracks().tracks_.map(function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)})},exports.removeDuplicateCaptions=function(n){var a,r,i=t.getPlayer(n);if(i){var o=e((null===(a=i.textTracks())||void 0===a?void 0:a.tracks_)||[]).filter(function(e){return"subtitles"===e.kind||"captions"===e.kind}),s=new Set((null===(r=i.remoteTextTracks())||void 0===r?void 0:r.tracks_)||[]),l=new Map;o.forEach(function(e){var t="".concat(e.kind,"|").concat(e.language||"","|").concat(e.label||"");l.has(t)||l.set(t,[]),l.get(t).push(e)}),l.forEach(function(e){if(!(e.length<2)){var t=e.find(function(e){return"showing"===e.mode})||e[0];e.forEach(function(e){e!==t&&s.has(e)&&i.removeRemoteTextTrack(e)})}})}},exports.syncTtmlDisplay=function(e){var n,a=t.getPlayer(e),r=null==a||null===(n=a.el())||void 0===n?void 0:n.querySelector(".vjs-text-track-display-ttml");r&&(Array.from(a.textTracks()).some(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode})?r.style.setProperty("display","flex"):(r.style.setProperty("display","none","important"),r.innerHTML=""))};
|
package/esm/captions-beaade8a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./skin-3653c5b3.js";var n={en:"English",eng:"English",es:"Spanish",spa:"Spanish",fr:"French",fre:"French",fra:"French",de:"German",ger:"German",deu:"German",pt:"Portuguese",por:"Portuguese",it:"Italian",ita:"Italian",nl:"Dutch",nld:"Dutch",dut:"Dutch",ru:"Russian",rus:"Russian",zh:"Chinese",zho:"Chinese",chi:"Chinese",ja:"Japanese",jpn:"Japanese",ko:"Korean",kor:"Korean",ar:"Arabic",ara:"Arabic",hi:"Hindi",hin:"Hindi",sv:"Swedish",swe:"Swedish",no:"Norwegian",nor:"Norwegian",da:"Danish",dan:"Danish",fi:"Finnish",fin:"Finnish",pl:"Polish",pol:"Polish",tr:"Turkish",tur:"Turkish",el:"Greek",ell:"Greek",gre:"Greek",he:"Hebrew",heb:"Hebrew",th:"Thai",tha:"Thai",vi:"Vietnamese",vie:"Vietnamese",id:"Indonesian",ind:"Indonesian",ms:"Malay",msa:"Malay",may:"Malay",cs:"Czech",ces:"Czech",cze:"Czech",sk:"Slovak",slk:"Slovak",slo:"Slovak",hu:"Hungarian",hun:"Hungarian",ro:"Romanian",ron:"Romanian",rum:"Romanian",uk:"Ukrainian",ukr:"Ukrainian"},a=function(e){return e&&n[e.trim().toLowerCase()]||e},r=videojs.getComponent("TextTrackMenuItem");if(r&&!r.prototype.__vlLanguageLabelPatched){var i=r.prototype.localize;r.prototype.localize=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.call.apply(i,[this,a(e)].concat(n))},r.prototype.__vlLanguageLabelPatched=!0}var o=function(e,n){var a,r,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(i=r.style)||void 0===i||i.setProperty("display","flex"));for(var o=t(e).textTracks(),s=0;s<o.length;s++){var l=o[s];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},s=function(e,n){for(var a=t(e).textTracks(),r=0;r<a.length;r++){var i=a[r];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},l=function(e){var n,a=t(e),r=null==a||null===(n=a.textTracks())||void 0===n?void 0:n.tracks_.filter(function(e){return"subtitles"==e.kind||"captions"===e.kind});return function(){var e,t=null===(e=document)||void 0===e?void 0:e.querySelector(".vjs-texttrack-settings"),n=null==t?void 0:t.querySelector(".vjs-control-text");t&&n&&(n.textContent="opens captions settings");var a=document.querySelectorAll(".vjs-subtitles-menu-item");(null==a?void 0:a.length)>0&&a.forEach(function(e,t){var n=e.querySelector(".vjs-menu-item-text");"en"==n.textContent?n.setAttribute("aria-label","English"):"es"==n.textContent?n.setAttribute("aria-label","Espanol"):n.setAttribute("aria-label",n.textContent)})}(),r||[]},u=function(n){var a,r,i=t(n);if(i){var o=e((null===(a=i.textTracks())||void 0===a?void 0:a.tracks_)||[]).filter(function(e){return"subtitles"===e.kind||"captions"===e.kind}),s=new Set((null===(r=i.remoteTextTracks())||void 0===r?void 0:r.tracks_)||[]),l=new Map;o.forEach(function(e){var t="".concat(e.kind,"|").concat(e.language||"","|").concat(e.label||"");l.has(t)||l.set(t,[]),l.get(t).push(e)}),l.forEach(function(e){if(!(e.length<2)){var t=e.find(function(e){return"showing"===e.mode})||e[0];e.forEach(function(e){e!==t&&s.has(e)&&i.removeRemoteTextTrack(e)})}})}},c=function(e){var n=t(e);n.remoteTextTracks().tracks_.map(function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)})},d=function(e,n){var r=t(e);r.remoteTextTracks().tracks_.map(function(e){r.removeRemoteTextTrack(e)}),n.map(function(e){r.addRemoteTextTrack({src:e.url,srclang:e.srclang,label:a(e.label||(null==e?void 0:e.language))})})},h=function(e){var n,a=t(e),r=null==a||null===(n=a.el())||void 0===n?void 0:n.querySelector(".vjs-text-track-display-ttml");r&&(Array.from(a.textTracks()).some(function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode})?r.style.setProperty("display","flex"):(r.style.setProperty("display","none","important"),r.innerHTML=""))};export{d as a,c as b,s as d,o as e,l as g,u as r,h as s};
|