@viewlift/player-backup 2.0.367-backup → 2.0.369-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-39137ea7.js → autoNextVideo-423d63c8.js} +1 -1
- package/cjs/bundle.css +653 -647
- package/cjs/{caption-settings-0d09a023.js → caption-settings-03628f5c.js} +1 -1
- package/cjs/captions-6d34f14b.js +1 -0
- package/cjs/{features-23064295.js → features-579dfc09.js} +1 -1
- package/cjs/generic-25227e81.js +1 -0
- package/cjs/{index-4d9691aa.js → index-7ba0c893.js} +1 -1
- package/cjs/{index-e0705a65.js → index-8a1b84d3.js} +1 -1
- package/cjs/{index-8ccb921b.js → index-a276fc30.js} +1 -1
- package/cjs/{index-21f99efb.js → index-db332a6d.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-8f462e38.js → multicamv2-6d996e0b.js} +1 -1
- package/cjs/{multicamv2-b8c17949.js → multicamv2-c256747c.js} +1 -1
- package/cjs/{nextEpisodeButton-d9cd5fb1.js → nextEpisodeButton-998a1ee5.js} +1 -1
- package/cjs/{playlist-6969c5ca.js → playlist-bd921770.js} +1 -1
- package/cjs/{series-66922472.js → series-3467f447.js} +1 -1
- package/cjs/{series-v2-85ae7b80.js → series-v2-aac02f76.js} +1 -1
- package/cjs/{series-v2-d31238b9.js → series-v2-b021fcb5.js} +1 -1
- package/cjs/{skin-726761e7.js → skin-349b3663.js} +1 -1
- package/cjs/{skin-97f54825.js → skin-34f792b7.js} +1 -1
- package/cjs/{skin-7be222c3.js → skin-35c00530.js} +1 -1
- package/cjs/{skin-2c0788b0.js → skin-46df7021.js} +1 -1
- package/cjs/{skin-1dbd805c.js → skin-6667167e.js} +1 -1
- package/cjs/{skin-034b2cc3.js → skin-68fcfaff.js} +1 -1
- package/cjs/{skin-e9dbdb98.js → skin-7e53cab5.js} +1 -1
- package/cjs/{skin-683cc0d5.js → skin-a2409a61.js} +1 -1
- package/cjs/{skin-e8cb7689.js → skin-f408a8df.js} +1 -1
- package/cjs/{skin-48e3676a.js → skin-fc6db1d4.js} +1 -1
- package/cjs/{videoSelector-f97158a8.js → videoSelector-4ffe5b7f.js} +1 -1
- package/cjs/{videoSelector-b4dabf14.js → videoSelector-e8d21264.js} +1 -1
- package/esm/{autoNextVideo-2cf2a466.js → autoNextVideo-cad097ab.js} +1 -1
- package/esm/bundle.css +653 -647
- package/esm/{caption-settings-e1a53633.js → caption-settings-a34f9eb6.js} +1 -1
- package/esm/captions-beaade8a.js +1 -0
- package/esm/{features-f801ac8f.js → features-dc601109.js} +1 -1
- package/esm/generic-326a71a3.js +1 -0
- package/esm/{index-e8f0fd76.js → index-662263e1.js} +1 -1
- package/esm/{index-f822cbee.js → index-98364c13.js} +1 -1
- package/esm/{index-b2787475.js → index-d9840bdb.js} +1 -1
- package/esm/{index-02b0a133.js → index-df589dc0.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-dd9f7e2e.js → multicamv2-55a8ddf8.js} +1 -1
- package/esm/{multicamv2-aafe0810.js → multicamv2-76c9d34d.js} +1 -1
- package/esm/{nextEpisodeButton-09890402.js → nextEpisodeButton-cfefe961.js} +1 -1
- package/esm/{playlist-238c7916.js → playlist-05e214e9.js} +1 -1
- package/esm/{series-4995e7da.js → series-d48a5f64.js} +1 -1
- package/esm/{series-v2-497e237a.js → series-v2-81097d29.js} +1 -1
- package/esm/{series-v2-bfcf3143.js → series-v2-f67e637d.js} +1 -1
- package/esm/{skin-715400e8.js → skin-00682294.js} +1 -1
- package/esm/{skin-ffd719f6.js → skin-248d30eb.js} +1 -1
- package/esm/{skin-f088d573.js → skin-4015b68e.js} +1 -1
- package/esm/{skin-23645580.js → skin-569ec669.js} +1 -1
- package/esm/{skin-37630f8b.js → skin-79aa1313.js} +1 -1
- package/esm/{skin-d3ef74e4.js → skin-ba2fdd77.js} +1 -1
- package/esm/{skin-93b5b4e7.js → skin-da04ffa7.js} +1 -1
- package/esm/{skin-e5d67823.js → skin-ec2a96b8.js} +1 -1
- package/esm/{skin-6fe61142.js → skin-f065740a.js} +1 -1
- package/esm/{skin-55d12fd9.js → skin-f675016d.js} +1 -1
- package/esm/src/apis/index.d.ts +4 -4
- package/esm/src/helpers/token.d.ts +1 -1
- package/esm/src/index.d.ts +1 -1
- package/esm/{videoSelector-23dd3316.js → videoSelector-7b03e2ee.js} +1 -1
- package/esm/{videoSelector-a26f3b99.js → videoSelector-8290988a.js} +1 -1
- package/package.json +1 -1
- package/cjs/captions-4dfe293a.js +0 -1
- package/cjs/generic-d59df798.js +0 -1
- package/esm/captions-1f931e14.js +0 -1
- package/esm/generic-1ec63419.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,p as e,e as i}from"./skin-3653c5b3.js";import{e as n}from"./features-f801ac8f.js";import{g as o}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-1ec63419.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"./captions-1f931e14.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./renditions-620d93b3.js";var t='<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="white"/>\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 <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\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 <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" 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="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 </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',r='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function u(u,s){l(u).addClass("skin_cn_news"),function(n,r){var u,s,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(u=c.el().firstChild)&&void 0!==u?u:null),null===(s=c.controlBar)||void 0===s||s.removeChild("VolumePanel"),null===(a=c.controlBar)||void 0===a||a.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",function(){return r.setAttributeNS(null,"href","#vjs-icon-pause")}),l.on("pause",function(){return r.setAttributeNS(null,"href","#vjs-icon-play")})})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=i(t,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",function(){var e=l.muted()||0===l.volume();r.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")})}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;i(t,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;i(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};r(),l.textTracks().on("change",r)}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,"#vjs-icon-fullscreen");l.on("fullscreenchange",function(){null==r||r.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var t,r,u=n.el().querySelector(".vjs-seek-to-live-text"),s=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;u&&(u.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?s:a)};v(),l.on("timeupdate",v),null===(t=l.liveTracker)||void 0===t||null===(r=t.on)||void 0===r||r.call(t,"liveedgechange",v),n.on("click",function(){if(l.paused())try{l.play()}catch(l){}})}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?t.style.display="none":(t.style.display="flex",r&&(r.innerText=(u=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),s=Math.floor(u/3600),a=Math.floor(u%3600/60),v=Math.floor(u%60),c=function(l){return String(l).padStart(2,"0")},0===s?"".concat(c(a),":").concat(c(v)):"".concat(c(s),":").concat(c(a),":").concat(c(v)))));var u,s,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(u,s),function(l,e){var i,o,t,u,s=(null==e||null===(i=e.res)||void 0===i?void 0:i.contentType)||"video",a=(null==e||null===(o=e.res)||void 0===o||null===(t=o[s])||void 0===t||null===(u=t.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(u,s)}export{u as initialiseSkin};
|
|
1
|
+
import{g as l,p as e,e as i}from"./skin-3653c5b3.js";import{e as n}from"./features-dc601109.js";import{g as o}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-326a71a3.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"./captions-beaade8a.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./renditions-620d93b3.js";var t='<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="white"/>\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 <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\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 <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" 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="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 </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',r='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function u(u,s){l(u).addClass("skin_cn_news"),function(n,r){var u,s,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(u=c.el().firstChild)&&void 0!==u?u:null),null===(s=c.controlBar)||void 0===s||s.removeChild("VolumePanel"),null===(a=c.controlBar)||void 0===a||a.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",function(){return r.setAttributeNS(null,"href","#vjs-icon-pause")}),l.on("pause",function(){return r.setAttributeNS(null,"href","#vjs-icon-play")})})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=i(t,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",function(){var e=l.muted()||0===l.volume();r.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")})}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;i(t,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;i(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};r(),l.textTracks().on("change",r)}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,"#vjs-icon-fullscreen");l.on("fullscreenchange",function(){null==r||r.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var t,r,u=n.el().querySelector(".vjs-seek-to-live-text"),s=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;u&&(u.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?s:a)};v(),l.on("timeupdate",v),null===(t=l.liveTracker)||void 0===t||null===(r=t.on)||void 0===r||r.call(t,"liveedgechange",v),n.on("click",function(){if(l.paused())try{l.play()}catch(l){}})}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?t.style.display="none":(t.style.display="flex",r&&(r.innerText=(u=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),s=Math.floor(u/3600),a=Math.floor(u%3600/60),v=Math.floor(u%60),c=function(l){return String(l).padStart(2,"0")},0===s?"".concat(c(a),":").concat(c(v)):"".concat(c(s),":").concat(c(a),":").concat(c(v)))));var u,s,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(u,s),function(l,e){var i,o,t,u,s=(null==e||null===(i=e.res)||void 0===i?void 0:i.contentType)||"video",a=(null==e||null===(o=e.res)||void 0===o||null===(t=o[s])||void 0===t||null===(u=t.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(u,s)}export{u as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./skin-3653c5b3.js";import{f as r,n as t}from"./features-
|
|
1
|
+
import{g as e}from"./skin-3653c5b3.js";import{f as r,n as t}from"./features-dc601109.js";import{g as o}from"./renditions-620d93b3.js";import{b as i}from"./captions-beaade8a.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-326a71a3.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-05efadfa.js";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";function s(s,n){import("./skin-c4d10b91.js").then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,s){e(t).on("loadeddata",function(){var e;(null===(e=o(t))||void 0===e?void 0:e.length)>0&&r(t,s),null!=s&&s.disableCaptions&&i(t)})}(s,n),function(r){var o=e(r);o.controls(!1),t(r)}(s),function(r){var t=e(r);t.addChild("SubsCapsButton")}(s)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,U as t}from"./generic-
|
|
1
|
+
import{T as e,U as t}from"./generic-326a71a3.js";import{g as r}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-beaade8a.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(o){import("./skin-2c638dc1.js").then(function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)}),i(),function(o){var i=document.getElementById("".concat(o)),n=r(o);i&&i.addEventListener("touchstart",function(){n.paused()?e(o):t(o)})}(o)}var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as e,U as r}from"./generic-
|
|
1
|
+
import{T as e,U as r}from"./generic-326a71a3.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-beaade8a.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{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-dc601109.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-beaade8a.js";import{a as g,b as C}from"./index-98364c13.js";import{i as j}from"./index-d9840bdb.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-326a71a3.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-cad097ab.js";import"./index-df589dc0.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{h as e,d as l,e as n,o as i,p as o,q as t}from"./features-f801ac8f.js";import{g as r}from"./skin-3653c5b3.js";import{a,b as u}from"./index-f822cbee.js";import{i as d}from"./index-b2787475.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-1ec63419.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-2cf2a466.js";import"./index-02b0a133.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-1f931e14.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-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};
|
package/esm/src/apis/index.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ export namespace baseUrlManager {
|
|
|
4
4
|
}
|
|
5
5
|
export function getVideoDetails(id: any, token: any, ssaiDisable?: boolean): Promise<any>;
|
|
6
6
|
export function getSeriesDetails(id: any, token: any): Promise<any>;
|
|
7
|
-
export function saveWatchHistory(params: any): Promise<import("axios").AxiosResponse<any, any, {}
|
|
8
|
-
export function getVideoInfo(videoId: any, token: any): Promise<import("axios").AxiosResponse<any, any, {}
|
|
9
|
-
export function getSeriesWatchHistory(data: any): Promise<import("axios").AxiosResponse<any, any, {}
|
|
7
|
+
export function saveWatchHistory(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
export function getVideoInfo(videoId: any, token: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
export function getSeriesWatchHistory(data: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
10
|
export function getLinearChannelDetails(params: any, token: any, ssaiDisable?: boolean): Promise<any>;
|
|
11
|
-
export function getEntitlementData(id: any, token: any, url: any, locationData: any): Promise<import("axios").AxiosResponse<any, any, {}
|
|
11
|
+
export function getEntitlementData(id: any, token: any, url: any, locationData: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
12
|
export function apiHeaders(endpoint: any): any;
|
|
13
13
|
export function apiParams(endpoint: any): any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function token_authentication_enabled(params: any): boolean;
|
|
2
2
|
export function getToken(): Promise<any>;
|
|
3
|
-
export function fetchRefreshToken(): Promise<import("axios").AxiosResponse<any, any, {}
|
|
3
|
+
export function fetchRefreshToken(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
4
4
|
export function refreshTokenManager(): {
|
|
5
5
|
set(token: any): void;
|
|
6
6
|
get(): any;
|
package/esm/src/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare function VLPlayerCore(): {
|
|
|
30
30
|
getVolume: (playerId: any) => string;
|
|
31
31
|
disableControls: (playerId: any) => void;
|
|
32
32
|
setPlaybackSpeed: (playerId: any, speed: any) => string;
|
|
33
|
-
getEntitlementData: (id: any, token: any, url: any, locationData: any) => Promise<import("axios").AxiosResponse<any, any, {}
|
|
33
|
+
getEntitlementData: (id: any, token: any, url: any, locationData: any) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
34
34
|
getSsaiEvents: typeof getSsaiEvents;
|
|
35
35
|
getPlayerControlEvents: typeof getPlayerControlEvents;
|
|
36
36
|
playerEvents: typeof playerEvents;
|
|
@@ -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-326a71a3.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-cad097ab.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-beaade8a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-df589dc0.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-326a71a3.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-cad097ab.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-beaade8a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-df589dc0.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-4dfe293a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=require("@babel/runtime/helpers/toConsumableArray"),e=require("./skin-66dce245.js");exports.addCaptions=function(t,n){var r=e.getPlayer(t);r.remoteTextTracks().tracks_.map(function(t){r.removeRemoteTextTrack(t)}),n.map(function(t){r.addRemoteTextTrack({src:t.url,srclang:t.srclang,label:t.label||(null==t?void 0:t.language)})})},exports.disableCaptions=function(t,n){for(var r=e.getPlayer(t).textTracks(),a=0;a<r.length;a++){var o=r[a];"subtitles"!==o.kind&&"captions"!==o.kind||o.id!==n||(o.mode="hidden")}},exports.enableCaptions=function(t,n){var r,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(r=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===r||null===(a=r[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","flex"));for(var i=e.getPlayer(t).textTracks(),l=0;l<i.length;l++){var s=i[l];"subtitles"!==s.kind&&"captions"!==s.kind||s.id!=n||(s.mode="showing")}},exports.getCaptions=function(t){var n,r=e.getPlayer(t),a=null==r||null===(n=r.textTracks())||void 0===n?void 0:n.tracks_.filter(function(t){return"subtitles"==t.kind||"captions"===t.kind});return function(){var t,e=null===(t=document)||void 0===t?void 0:t.querySelector(".vjs-texttrack-settings"),n=null==e?void 0:e.querySelector(".vjs-control-text");e&&n&&(n.textContent="opens captions settings");var r=document.querySelectorAll(".vjs-subtitles-menu-item");(null==r?void 0:r.length)>0&&r.forEach(function(t,e){var n=t.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)})}(),a||[]},exports.removeCaptions=function(t){var n=e.getPlayer(t);n.remoteTextTracks().tracks_.map(function(t){"subtitles"==(null==t?void 0:t.kind)||null==t||t.kind,n.removeRemoteTextTrack(t)})},exports.removeDuplicateCaptions=function(n){var r,a,o=e.getPlayer(n);if(o){var i=t((null===(r=o.textTracks())||void 0===r?void 0:r.tracks_)||[]).filter(function(t){return"subtitles"===t.kind||"captions"===t.kind}),l=new Set((null===(a=o.remoteTextTracks())||void 0===a?void 0:a.tracks_)||[]),s=new Map;i.forEach(function(t){var e="".concat(t.kind,"|").concat(t.language||"","|").concat(t.label||"");s.has(e)||s.set(e,[]),s.get(e).push(t)}),s.forEach(function(t){if(!(t.length<2)){var e=t.find(function(t){return"showing"===t.mode})||t[0];t.forEach(function(t){t!==e&&l.has(t)&&o.removeRemoteTextTrack(t)})}})}},exports.syncTtmlDisplay=function(t){var n,r=e.getPlayer(t),a=null==r||null===(n=r.el())||void 0===n?void 0:n.querySelector(".vjs-text-track-display-ttml");a&&(Array.from(r.textTracks()).some(function(t){return("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode})?a.style.setProperty("display","flex"):(a.style.setProperty("display","none","important"),a.innerHTML=""))};
|