@viewlift/player-backup 2.0.386-backup → 2.0.388-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-19aa333e.js → autoNextVideo-5d96dfd8.js} +1 -1
- package/cjs/bundle.css +999 -999
- package/cjs/{features-5d7e8cc1.js → features-159b6881.js} +1 -1
- package/cjs/generic-a5c16647.js +1 -0
- package/cjs/{index-a4523b2c.js → index-52087553.js} +1 -1
- package/cjs/{index-ebc4afef.js → index-788fb63b.js} +1 -1
- package/cjs/{index-79d88164.js → index-c05087e2.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-f94727ee.js → multicamv2-a0e40578.js} +1 -1
- package/cjs/{multicamv2-20ae48e0.js → multicamv2-ad4fbf67.js} +1 -1
- package/cjs/{nextEpisodeButton-0e962dc4.js → nextEpisodeButton-938129c4.js} +1 -1
- package/cjs/{playlist-8596ffa9.js → playlist-dc97212e.js} +1 -1
- package/cjs/{series-2ec5a41a.js → series-95f0d2b1.js} +1 -1
- package/cjs/{series-v2-26626d6c.js → series-v2-4dfa43e1.js} +1 -1
- package/cjs/{series-v2-2e339e9b.js → series-v2-d31d9594.js} +1 -1
- package/cjs/{skin-12ea8f57.js → skin-01c0f6b9.js} +1 -1
- package/cjs/{skin-59aa968d.js → skin-0427f15f.js} +1 -1
- package/cjs/{skin-1bbb2916.js → skin-45b59e86.js} +1 -1
- package/cjs/{skin-a64932ac.js → skin-9860884e.js} +1 -1
- package/cjs/{skin-87233809.js → skin-9c0c0ae3.js} +1 -1
- package/cjs/{skin-96e07080.js → skin-ac9cf139.js} +1 -1
- package/cjs/{skin-b0f1d65d.js → skin-c9fa937e.js} +1 -1
- package/cjs/{skin-ace14d43.js → skin-cab8b6d2.js} +1 -1
- package/cjs/{skin-0f56c90a.js → skin-cbbea5d0.js} +1 -1
- package/cjs/{skin-5747db33.js → skin-ce275bae.js} +1 -1
- package/cjs/{videoSelector-14a6a823.js → videoSelector-c825e386.js} +1 -1
- package/cjs/{videoSelector-0dd43a1a.js → videoSelector-ced69919.js} +1 -1
- package/cjs/videojs-dash5.es-62f51650.js +1 -0
- package/esm/{autoNextVideo-5727bb50.js → autoNextVideo-ac1f3171.js} +1 -1
- package/esm/bundle.css +999 -999
- package/esm/{features-d1d7461f.js → features-64cd7edf.js} +1 -1
- package/esm/generic-e5ce545a.js +1 -0
- package/esm/{index-27b173c2.js → index-302e85e4.js} +1 -1
- package/esm/{index-a8eb06aa.js → index-66c8402b.js} +1 -1
- package/esm/{index-c903c091.js → index-8192aad1.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-72b751be.js → multicamv2-05305256.js} +1 -1
- package/esm/{multicamv2-2a484b22.js → multicamv2-5824c3b6.js} +1 -1
- package/esm/{nextEpisodeButton-38e39284.js → nextEpisodeButton-44b32ceb.js} +1 -1
- package/esm/{playlist-070bc603.js → playlist-207f98bd.js} +1 -1
- package/esm/{series-1ad08b8b.js → series-a776c9da.js} +1 -1
- package/esm/{series-v2-0e6f1fc1.js → series-v2-3615cc8d.js} +1 -1
- package/esm/{series-v2-f502d197.js → series-v2-41136150.js} +1 -1
- package/esm/{skin-65fab669.js → skin-11d9d9fa.js} +1 -1
- package/esm/{skin-24ed1b71.js → skin-31df38ce.js} +1 -1
- package/esm/skin-35f52ac7.js +1 -0
- package/esm/{skin-dd2d5f12.js → skin-469b3d49.js} +1 -1
- package/esm/{skin-c6d3eac0.js → skin-850c4cb7.js} +1 -1
- package/esm/{skin-6af2950f.js → skin-8bd7af13.js} +1 -1
- package/esm/{skin-71418867.js → skin-9bca7f9c.js} +1 -1
- package/esm/{skin-a6a30830.js → skin-c416303b.js} +1 -1
- package/esm/{skin-4ce58a71.js → skin-c4dea6da.js} +1 -1
- package/esm/{skin-237bef24.js → skin-f923ce4c.js} +1 -1
- package/esm/src/index.d.ts +1 -0
- package/esm/src/utilities/beacon.d.ts +6 -0
- package/esm/{videoSelector-ea5a2015.js → videoSelector-9592ec68.js} +1 -1
- package/esm/{videoSelector-f39e4dfc.js → videoSelector-fb7fb8d6.js} +1 -1
- package/esm/videojs-dash5.es-24300b5e.js +1 -0
- package/package.json +1 -1
- package/cjs/generic-46d02ba0.js +0 -1
- package/cjs/videojs-dash5.es-0f92604f.js +0 -1
- package/esm/generic-72bc2234.js +0 -1
- package/esm/skin-de1d7d56.js +0 -1
- package/esm/videojs-dash5.es-cfe95daa.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,p as e,e as i}from"./skin-2a3ee818.js";import{e as n}from"./features-d1d7461f.js";import{g as o}from"./localisation-2f1ee38c.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-72bc2234.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-90173c21.js";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./renditions-28891b91.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 s(s,u){var a=l(s);a.addClass("skin_cn_news"),a.toggleClass("vjs-cn-news-vod",!(null!=u&&u.liveVideo)),function(n,r){var s,u,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(s=c.el().firstChild)&&void 0!==s?s:null),null===(u=c.controlBar)||void 0===u||u.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,s=n.el().querySelector(".vjs-seek-to-live-text"),u=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;s&&(s.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?u: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=(s=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),u=Math.floor(s/3600),a=Math.floor(s%3600/60),v=Math.floor(s%60),c=function(l){return String(l).padStart(2,"0")},0===u?"".concat(c(a),":").concat(c(v)):"".concat(c(u),":").concat(c(a),":").concat(c(v)))));var s,u,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(s,u),function(l,e){var i,o,t,s,u=(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[u])||void 0===t||null===(s=t.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(s,u)}export{s as initialiseSkin};
|
|
1
|
+
import{g as l,p as e,e as i}from"./skin-2a3ee818.js";import{e as n}from"./features-64cd7edf.js";import{g as o}from"./localisation-2f1ee38c.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-e5ce545a.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-90173c21.js";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./renditions-28891b91.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 s(s,u){var a=l(s);a.addClass("skin_cn_news"),a.toggleClass("vjs-cn-news-vod",!(null!=u&&u.liveVideo)),function(n,r){var s,u,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(s=c.el().firstChild)&&void 0!==s?s:null),null===(u=c.controlBar)||void 0===u||u.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,s=n.el().querySelector(".vjs-seek-to-live-text"),u=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;s&&(s.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?u: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=(s=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),u=Math.floor(s/3600),a=Math.floor(s%3600/60),v=Math.floor(s%60),c=function(l){return String(l).padStart(2,"0")},0===u?"".concat(c(a),":").concat(c(v)):"".concat(c(u),":").concat(c(a),":").concat(c(v)))));var s,u,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(s,u),function(l,e){var i,o,t,s,u=(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[u])||void 0===t||null===(s=t.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(s,u)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,d as l,e as i,f as n,p as o,q as t,r}from"./features-d1d7461f.js";import{g as a}from"./skin-2a3ee818.js";import{a as u,b as d}from"./index-a8eb06aa.js";import{i as v}from"./index-c903c091.js";import{i as s}from"./browser-02f174cf.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{g as m,r as b,a as y,b as g}from"./resolution-d9d21f0e.js";import{r as h}from"./relatedVideosManager-93533a90.js";import{i as j,aa as w,ah as _,ai as L,e as C,aj as B,q as E}from"./generic-72bc2234.js";import{c as T,d as k}from"./icons-f9c8be77.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-28891b91.js";import"./localisation-2f1ee38c.js";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"./autoNextVideo-5727bb50.js";import"./index-27b173c2.js";import"./manager-d812dea7.js";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-90173c21.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function O(e,l){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);l&&(n=n.filter((function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),i.push.apply(i,n)}return i}function I(e){for(var l=1;l<arguments.length;l++){var i=null!=arguments[l]?arguments[l]:{};l%2?O(Object(i),!0).forEach((function(l){c(e,l,i[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(i,l))}))}return e}var P=function(e,l){var i,n;if(e&&null!=l){e.options_.label=l;var o=null===(i=e.el())||void 0===i||null===(n=i.querySelector)||void 0===n?void 0:n.call(i,".vjs-menu-item-text");o&&(o.innerHTML=l)}},A=function(e){var l,i;return null!==(l=null!==(i=null==e?void 0:e.bitrate)&&void 0!==i?i:null==e?void 0:e.bandwidth)&&void 0!==l?l:0},R=function(e){var l=m(),i=b();if(null!=l&&l.auto&&"function"==typeof f.addLanguage){var n="function"==typeof e.language&&e.language()||"en";f.addLanguage(n,{Auto:l.auto})}var o=function(e){var l,i=e.getChild("controlBar");return i&&(i.getChild("QualityMenuButton")||(null===(l=i.children())||void 0===l?void 0:l.find((function(e){return"QualityMenuButton"===(null==e?void 0:e.name_)}))))||null}(e);if(o&&!o._qualityLabelsPatched){if(o._qualityLabelsPatched=!0,"function"==typeof o.groupByResolution_){var t=o.groupByResolution_.bind(o);o.groupByResolution_=function(){var e=this;return t().reduce((function(l,i){return l.concat(function(e,l){var i,n=p(l.levels||[]).sort((function(l,i){return A(e[i])-A(e[l])})),o=y(null==e||null===(i=e[n[0]])||void 0===i?void 0:i.height),t=null!=o?o:l.label,r=null!=o?"":l.subLabel,a=A(e[n[n.length-1]]),u=g();return u&&A(e[n[0]])!==a?n.map((function(i){return I(I({},l),{},{levels:[i],active:e.selectedIndex===i,label:A(e[i])>a?"".concat(t," ").concat(u):t,subLabel:r})})):[I(I({},l),{},{label:t,subLabel:r})]}(e.qualityLevels_,i))}),[])}}if("function"==typeof o.createItems){var r=o.createItems.bind(o);o.createItems=function(){var e=r();return e.forEach((function(e){var l;return P(e,null===(l=e.options_)||void 0===l?void 0:l.label)})),this.autoMenuItem_&&null!=l&&l.auto&&P(this.autoMenuItem_,i),e}}"function"==typeof o.update&&o.update()}},S=function(e){var l=a(e);if(l){var i=function(e){var l,i,n,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===(i=r.getRepresentationsByType)||void 0===i?void 0:i.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===(n=window)||void 0===n||null===(o=n.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,i=e.newRepresentation;"video"===l&&p(i)})),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),i&&i()})),l.on("loadstart",(function(){l.ready((function(){return R(l)}))}))}};function x(c,p){a(c).addClass("skin_vlone"),function(l,i){var n,o=a(l),t=(null==i||null===(n=i.res)||void 0===n?void 0:n.siteId)||"";o&&(o.on("loadeddata",(function(){var e,n,o,r,a,d,c,p;S(l);var f=(null===(e=h.get())||void 0===e||null===(n=e.content)||void 0===n?void 0:n.length)>0;if(!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(r=window)&&void 0!==r&&null!==(a=r.app_data)&&void 0!==a&&null!==(d=a.appcmsMain)&&void 0!==d&&null!==(c=d.features)&&void 0!==c&&c.auto_play||f)||null!=i&&i.liveVideo){if(!(null!=i&&i.liveVideo||null!=i&&null!==(p=i.series)&&void 0!==p&&p.enable)){var m;m=h.subscribe((function(e){var n;(null==e||null===(n=e.content)||void 0===n?void 0:n.length)>0&&(u(l,i),m&&m())}))}}else u(l,i);null!=i&&i.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||v(l)})),o.one("play",(function(){var i,n,o,t;null!==(i=window)&&void 0!==i&&null!==(n=i.customData)&&void 0!==n&&n.iframeOverlayUrl&&e(l,null===(o=window)||void 0===o||null===(t=o.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(c,p),function(e,u){var v,s,c,p,f,m,b,y=a(e),g=(null==u?void 0:u.liveVideo)||!1,O=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",I=(null==u||null===(s=u.res)||void 0===s||null===(c=s[O])||void 0===c?void 0:c.isSSAIEnabled)||!1,P=j(null==u?void 0:u.res,e)||{};P.src;var A=(null==u?void 0:u.skin_settings)||{},R=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};if(g&&(null==u||!u.liveui)){var S,x=null==y||null===(S=y.controlBar)||void 0===S?void 0:S.getChild("LiveDisplay"),M=(null==x?void 0:x.el())||null,q=null==M?void 0:M.querySelector(".vjs-live-display");if(M&&q){var D,V,N=document.createElement("button");N.type="button",N.className="vjs-live-display",N.setAttribute("aria-label","live"),N.textContent="LIVE";var Q=function(){try{var e;null==y||null===(e=y.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};N.addEventListener("click",Q),q.replaceWith(N),x&&(x.contentEl_=N);var H=live_button_el.querySelector(".vjs-live-display")||live_button_el,F=function(){var e,l,i,n=null===(e=null==y||null===(l=y.liveTracker)||void 0===l||null===(i=l.atLiveEdge)||void 0===i?void 0:i.call(l))||void 0===e||e;H.classList.toggle("vjs-behind-live",!n)};null==y||null===(D=y.liveTracker)||void 0===D||null===(V=D.on)||void 0===V||V.call(D,"liveedgechange",F),F(),M.removeAttribute("tabindex"),M.removeAttribute("role"),M.removeAttribute("aria-label")}}(null!=A&&A.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&l(e,"VL_ONE",T(),u);(null!=A&&A.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&i(e,"VL_ONE",k());n(e,u);var U,G=h.get();(null==G||null===(f=G.content)||void 0===f?void 0:f.length)>0&&o(e,G);U=h.subscribe((function(l){var i,n,t=a(e);(null==t||null===(i=t.controlBar)||void 0===i||!i.getChild("videoSelector"))&&(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(o(e,l),U&&U())})),null!=u&&null!==(m=u.series)&&void 0!==m&&m.enable&&t(e,u);(null==u||null===(b=u.streams)||void 0===b?void 0:b.length)>1&&r(e,null==u?void 0:u.streams);if(d(e,u),w(e,u),I&&g&&"TRANSMIT"==(null==R?void 0:R.liveAdSticherProvider)&&!(null==R||!R.liveAdClientSideTracking))_(e,u);else if("MEDIA_TAILOR"==(null==R?void 0:R.vodAdSticherProvider)&&null!=R&&R.vodAdClientSideTracking&&I)if(g)L(e);else{var K,W=null;if(null!=u&&null!==(K=u.series)&&void 0!==K&&K.enable){var Y,$,z,J,X,Z=null===(Y=C())||void 0===Y||null===($=Y.video)||void 0===$||null===(z=$.gist)||void 0===z?void 0:z.id,ee=E(),le=(null==ee?void 0:ee.get(Z))||{t:0,p:0},ie=le.t,ne=le.p;"function"==typeof(null===(J=window)||void 0===J||null===(X=J.watchHistory)||void 0===X?void 0:X.cb)&&window.watchHistory.cb({watchedTime:ie}),ne<95&&(W=ie)}else{var oe=u.watchHistoryResumeTime;u.watchedPercentage<95&&(W=oe)}B(e,W)}}(c,p),M(c,p)}var M=function(e,l){var i,n,o,t,r,u,d,v,s,c,p,m,b=a(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===(i=window)||void 0===i||null===(n=i.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(r=t.cta)||void 0===r||null===(u=r.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===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var j=b.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{i as e,d as l,e as i,f as n,p as o,q as t,r}from"./features-64cd7edf.js";import{g as a}from"./skin-2a3ee818.js";import{a as u,b as d}from"./index-66c8402b.js";import{i as v}from"./index-8192aad1.js";import{i as s}from"./browser-02f174cf.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{g as m,r as b,a as y,b as g}from"./resolution-d9d21f0e.js";import{r as h}from"./relatedVideosManager-93533a90.js";import{i as j,ab as w,ai as _,aj as L,e as C,ak as B,q as k}from"./generic-e5ce545a.js";import{c as E,d as T}from"./icons-f9c8be77.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-28891b91.js";import"./localisation-2f1ee38c.js";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"./autoNextVideo-ac1f3171.js";import"./index-302e85e4.js";import"./manager-d812dea7.js";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-90173c21.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function O(e,l){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);l&&(n=n.filter((function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable}))),i.push.apply(i,n)}return i}function I(e){for(var l=1;l<arguments.length;l++){var i=null!=arguments[l]?arguments[l]:{};l%2?O(Object(i),!0).forEach((function(l){c(e,l,i[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(i,l))}))}return e}var P=function(e,l){var i,n;if(e&&null!=l){e.options_.label=l;var o=null===(i=e.el())||void 0===i||null===(n=i.querySelector)||void 0===n?void 0:n.call(i,".vjs-menu-item-text");o&&(o.innerHTML=l)}},A=function(e){var l,i;return null!==(l=null!==(i=null==e?void 0:e.bitrate)&&void 0!==i?i:null==e?void 0:e.bandwidth)&&void 0!==l?l:0},R=function(e){var l=m(),i=b();if(null!=l&&l.auto&&"function"==typeof f.addLanguage){var n="function"==typeof e.language&&e.language()||"en";f.addLanguage(n,{Auto:l.auto})}var o=function(e){var l,i=e.getChild("controlBar");return i&&(i.getChild("QualityMenuButton")||(null===(l=i.children())||void 0===l?void 0:l.find((function(e){return"QualityMenuButton"===(null==e?void 0:e.name_)}))))||null}(e);if(o&&!o._qualityLabelsPatched){if(o._qualityLabelsPatched=!0,"function"==typeof o.groupByResolution_){var t=o.groupByResolution_.bind(o);o.groupByResolution_=function(){var e=this;return t().reduce((function(l,i){return l.concat(function(e,l){var i,n=p(l.levels||[]).sort((function(l,i){return A(e[i])-A(e[l])})),o=y(null==e||null===(i=e[n[0]])||void 0===i?void 0:i.height),t=null!=o?o:l.label,r=null!=o?"":l.subLabel,a=A(e[n[n.length-1]]),u=g();return u&&A(e[n[0]])!==a?n.map((function(i){return I(I({},l),{},{levels:[i],active:e.selectedIndex===i,label:A(e[i])>a?"".concat(t," ").concat(u):t,subLabel:r})})):[I(I({},l),{},{label:t,subLabel:r})]}(e.qualityLevels_,i))}),[])}}if("function"==typeof o.createItems){var r=o.createItems.bind(o);o.createItems=function(){var e=r();return e.forEach((function(e){var l;return P(e,null===(l=e.options_)||void 0===l?void 0:l.label)})),this.autoMenuItem_&&null!=l&&l.auto&&P(this.autoMenuItem_,i),e}}"function"==typeof o.update&&o.update()}},S=function(e){var l=a(e);if(l){var i=function(e){var l,i,n,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===(i=r.getRepresentationsByType)||void 0===i?void 0:i.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===(n=window)||void 0===n||null===(o=n.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,i=e.newRepresentation;"video"===l&&p(i)})),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),i&&i()})),l.on("loadstart",(function(){l.ready((function(){return R(l)}))}))}};function x(c,p){a(c).addClass("skin_vlone"),function(l,i){var n,o=a(l),t=(null==i||null===(n=i.res)||void 0===n?void 0:n.siteId)||"";o&&(o.on("loadeddata",(function(){var e,n,o,r,a,d,c,p;S(l);var f=(null===(e=h.get())||void 0===e||null===(n=e.content)||void 0===n?void 0:n.length)>0;if(!(null!=i&&null!==(o=i.series)&&void 0!==o&&o.enable||null!==(r=window)&&void 0!==r&&null!==(a=r.app_data)&&void 0!==a&&null!==(d=a.appcmsMain)&&void 0!==d&&null!==(c=d.features)&&void 0!==c&&c.auto_play||f)||null!=i&&i.liveVideo){if(!(null!=i&&i.liveVideo||null!=i&&null!==(p=i.series)&&void 0!==p&&p.enable)){var m;m=h.subscribe((function(e){var n;(null==e||null===(n=e.content)||void 0===n?void 0:n.length)>0&&(u(l,i),m&&m())}))}}else u(l,i);null!=i&&i.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||v(l)})),o.one("play",(function(){var i,n,o,t;null!==(i=window)&&void 0!==i&&null!==(n=i.customData)&&void 0!==n&&n.iframeOverlayUrl&&e(l,null===(o=window)||void 0===o||null===(t=o.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(c,p),function(e,u){var v,s,c,p,f,m,b,y=a(e),g=(null==u?void 0:u.liveVideo)||!1,O=(null==u||null===(v=u.res)||void 0===v?void 0:v.contentType)||"video",I=(null==u||null===(s=u.res)||void 0===s||null===(c=s[O])||void 0===c?void 0:c.isSSAIEnabled)||!1,P=j(null==u?void 0:u.res,e)||{};P.src;var A=(null==u?void 0:u.skin_settings)||{},R=(null==u||null===(p=u.customData)||void 0===p?void 0:p.ads)||{};if(g&&(null==u||!u.liveui)){var S,x=null==y||null===(S=y.controlBar)||void 0===S?void 0:S.getChild("LiveDisplay"),M=(null==x?void 0:x.el())||null,q=null==M?void 0:M.querySelector(".vjs-live-display");if(M&&q){var D,V,N=document.createElement("button");N.type="button",N.className="vjs-live-display",N.setAttribute("aria-label","live"),N.textContent="LIVE";var Q=function(){try{var e;null==y||null===(e=y.liveTracker)||void 0===e||e.seekToLiveEdge()}catch(e){console.log(e,"Cannot seek to LE")}};N.addEventListener("click",Q),q.replaceWith(N),x&&(x.contentEl_=N);var H=live_button_el.querySelector(".vjs-live-display")||live_button_el,F=function(){var e,l,i,n=null===(e=null==y||null===(l=y.liveTracker)||void 0===l||null===(i=l.atLiveEdge)||void 0===i?void 0:i.call(l))||void 0===e||e;H.classList.toggle("vjs-behind-live",!n)};null==y||null===(D=y.liveTracker)||void 0===D||null===(V=D.on)||void 0===V||V.call(D,"liveedgechange",F),F(),M.removeAttribute("tabindex"),M.removeAttribute("role"),M.removeAttribute("aria-label")}}(null!=A&&A.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&l(e,"VL_ONE",E(),u);(null!=A&&A.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&i(e,"VL_ONE",T());n(e,u);var U,G=h.get();(null==G||null===(f=G.content)||void 0===f?void 0:f.length)>0&&o(e,G);U=h.subscribe((function(l){var i,n,t=a(e);(null==t||null===(i=t.controlBar)||void 0===i||!i.getChild("videoSelector"))&&(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(o(e,l),U&&U())})),null!=u&&null!==(m=u.series)&&void 0!==m&&m.enable&&t(e,u);(null==u||null===(b=u.streams)||void 0===b?void 0:b.length)>1&&r(e,null==u?void 0:u.streams);if(d(e,u),w(e,u),I&&g&&"TRANSMIT"==(null==R?void 0:R.liveAdSticherProvider)&&!(null==R||!R.liveAdClientSideTracking))_(e,u);else if("MEDIA_TAILOR"==(null==R?void 0:R.vodAdSticherProvider)&&null!=R&&R.vodAdClientSideTracking&&I)if(g)L(e);else{var K,W=null;if(null!=u&&null!==(K=u.series)&&void 0!==K&&K.enable){var Y,$,z,J,X,Z=null===(Y=C())||void 0===Y||null===($=Y.video)||void 0===$||null===(z=$.gist)||void 0===z?void 0:z.id,ee=k(),le=(null==ee?void 0:ee.get(Z))||{t:0,p:0},ie=le.t,ne=le.p;"function"==typeof(null===(J=window)||void 0===J||null===(X=J.watchHistory)||void 0===X?void 0:X.cb)&&window.watchHistory.cb({watchedTime:ie}),ne<95&&(W=ie)}else{var oe=u.watchHistoryResumeTime;u.watchedPercentage<95&&(W=oe)}B(e,W)}}(c,p),M(c,p)}var M=function(e,l){var i,n,o,t,r,u,d,v,s,c,p,m,b=a(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===(i=window)||void 0===i||null===(n=i.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(t=o.brand)||void 0===t||null===(r=t.cta)||void 0===r||null===(u=r.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===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var j=b.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/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ declare function VLPlayerCore(): {
|
|
|
48
48
|
getChapterEvents: typeof getChapterEvents;
|
|
49
49
|
onWatchInVerticalView: (playerId: any, cb: any) => void;
|
|
50
50
|
fireBeaconEvent: (playerId: string, eventName: string) => boolean;
|
|
51
|
+
setActiveBeaconPlayer: (playerId: string) => void;
|
|
51
52
|
getDvrManager: (playerId: string) => any;
|
|
52
53
|
};
|
|
53
54
|
import { getSsaiEvents } from "./helpers/ssaiEventHandler";
|
|
@@ -28,6 +28,12 @@ export function updateBeaconContent(playerId: string, content: any): void;
|
|
|
28
28
|
* @returns {Boolean} whether the event was sent
|
|
29
29
|
*/
|
|
30
30
|
export function fireBeaconEvent(playerId: string, eventName: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Marks the multiview window the viewer is watching. Only that player sends PING; the others keep
|
|
33
|
+
* their other beacons. MV_SELECTION sets it too, so hosts only need this for the initial window.
|
|
34
|
+
* @param {String|null} playerId - null makes every player report watch time again
|
|
35
|
+
*/
|
|
36
|
+
export function setActiveBeaconPlayer(playerId: string | null): void;
|
|
31
37
|
export function disposeBeacon(playerId: any): void;
|
|
32
38
|
import { BEACON_EVENTS } from "./beaconHelpers";
|
|
33
39
|
export { BEACON_EVENTS };
|
|
@@ -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 i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as s,g as d}from"./icons-f9c8be77.js";import{Y as r,
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import i from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as s,g as d}from"./icons-f9c8be77.js";import{Y as r,ah as c}from"./generic-e5ce545a.js";import{i as u,j as m,s as v,k as p,h,l as b}from"./skin-2a3ee818.js";import{a as f,u as y}from"./autoNextVideo-ac1f3171.js";import{g}from"./localisation-2f1ee38c.js";import{r as C}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-90173c21.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-302e85e4.js";function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}var T=a.getComponent("Component"),I=function(){i(x,T);var I,N,k=(I=x,N=E(),function(){var e,t=l(I);if(N){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function x(t){var o,i,n,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,x),(n=k.call(this,t,l)).playerId=l.playerId,n.seriesData=l.sres,n.videos=l.related.content,n.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,n.autoNext=(null==l||null===(i=l.related)||void 0===i?void 0:i.autoNext)||!1,n.currentVideoData=l.res,n.initialiseStructure(),n.loadCSS(),n.autoNext&&(c(0),f({playerId:n.playerId,content:n.videos,cb:n.cb})),n._unsubRelated=C.subscribe((function(e){var t;n.videos=(null==e?void 0:e.content)||n.videos,n.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:n.cb,y(n.videos),n._refreshList()})),n}return t(x,[{key:"_buildVideoItem",value:function(e){var t,o,i,n,l,s,d,r,c,m=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("button",{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&&m.loadVideoAssetById(e)},p.onclick=function(){m.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(u(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||u(null===(i=window)||void 0===i||null===(n=i.app_data)||void 0===n||null===(l=n.appcmsMain)||void 0===l||null===(s=l.images)||void 0===s?void 0:s.placeholderCover)),h.alt="".concat((null==this||null===(d=this.videos[e])||void 0===d||null===(r=d.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),h.setAttribute("aria-hidden","true"),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,i,n){var a=o(l(1&n?e.prototype:e),t,i);return 2&n&&"function"==typeof a?function(e){return a.apply(i,e)}:a}(x,"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(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-49c794e9.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"});o.setAttribute("aria-hidden","true"),o.hidden=!0;var i=a.dom.$(".video-selector-icon",this.el()),n=function(){e._allowToggle=!0,clearTimeout(e._allowToggleTimer),e._allowToggleTimer=setTimeout((function(){e._allowToggle=!1}),700)};i.onpointerdown=n,i.onmousedown=n,i.onkeydown=function(e){"Enter"!==e.key&&" "!==e.key||n()},i.onblur=function(){e._allowToggle=!1,clearTimeout(e._allowToggleTimer)},i.onclick=function(){var n;if(!e._suppressToggleClick){var l,a=null===(n=o.classList)||void 0===n?void 0:n.contains("hidden");if(!a||e._allowToggle)if(e._allowToggle=!1,clearTimeout(e._allowToggleTimer),a)m(),o.classList.remove("hidden"),o.hidden=!1,o.setAttribute("aria-hidden","false"),t.classList.add("open"),v(e.playerId,o),e.handleTabIndexSelector(),null===(l=e.titleEl)||void 0===l||l.focus(),i.setAttribute("aria-expanded",!0);else o.classList.add("hidden"),o.hidden=!0,o.setAttribute("aria-hidden","true"),t.classList.remove("open"),i.setAttribute("aria-expanded",!1),e.handleCloseTabIndex(!1)}};var l=document.getElementById(this.playerId);if(l){var s=window.getComputedStyle(l,null).getPropertyValue("height");o.style.height="".concat(s),a.dom.appendContent(t,o),l.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"),i=0;i<o.length;i++)o[i].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 i=document.getElementsByClassName("video-accessibility"),n=(null==i||null===(t=i[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<n;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o,i,n=this,l=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];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 a=document.getElementsByClassName("video-accessibility"),s=(null==a||null===(o=a[0])||void 0===o||null===(i=o.children)||void 0===i?void 0:i.length)||0,d=0;d<s;d++)document.getElementsByClassName("recommended -".concat(d))&&(document.getElementsByClassName("recommended -".concat(d))[0].tabIndex=-1);l&&(this._suppressToggleClick=!0,setTimeout((function(){document.getElementsByClassName("video-selector-icon")[0]&&document.getElementsByClassName("video-selector-icon")[0].focus({preventScroll:!0}),setTimeout((function(){n._suppressToggleClick=!1}),300)}),100))}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),i=a.dom.createEl("div",{className:"video-selector-head"}),n=a.dom.createEl("button",{className:"video-selector-cross-icon",ariaLabel:"close video selector",type:"button",tabIndex:-1,innerHTML:"".concat(d())});n.onkeydown=function(i){"Enter"===i.key&&(e.classList.add("hidden"),e.hidden=!0,e.setAttribute("aria-hidden","true"),o.classList.remove("open"),t.handleCloseTabIndex())},n.onclick=function(){e.classList.add("hidden"),e.hidden=!0,e.setAttribute("aria-hidden","true"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=g("relatedVideoTitle")||"Recommended",s=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});s.setAttribute("role","heading"),s.setAttribute("aria-level","2"),this.titleEl=s;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var o,i,n,l,s,d,m,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(u(null==t||null===(o=t.videos)||void 0===o||null===(i=o[e])||void 0===i?void 0:i.img)||u(null===(n=window)||void 0===n||null===(l=n.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.images)||void 0===d?void 0:d.placeholderCover)),b.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),b.setAttribute("aria-hidden","true"),h.append(b);var f=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,f),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(i,s),a.dom.appendContent(i,n),a.dom.appendContent(e,i),a.dom.appendContent(e,r),b(this.playerId,e)}}]),x}();export{I 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 r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{Y as d,
|
|
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 r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{Y as d,ah as c}from"./generic-e5ce545a.js";import{m,j as u,s as p,k as v,l as h}from"./skin-2a3ee818.js";import{a as f,u as b}from"./autoNextVideo-ac1f3171.js";import{g as y}from"./localisation-2f1ee38c.js";import{r as g}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-90173c21.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-302e85e4.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(I,E);var N,j,k=(N=I,j=C(),function(){var e,t=a(N);if(j){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=k.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,l=this,s=r.dom.createEl("div",{className:"video -".concat(e)}),u=r.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=r.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),d(l.playerId,l.videos[e].id).then((function(e){l.cb&&l.cb(e)})).catch((function(e){l.cb&&l.cb(e)}))};var p=document.createElement("img");p.className="related-thumbnail-image",p.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)),p.alt="No Thumbnail Available",u.append(p);var v=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return r.dom.appendContent(s,u),r.dom.appendContent(s,v),s}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){r.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)r.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var r=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return r.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=r.dom.createEl("div",{className:"video-selection-container hidden"});r.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",p(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),r.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),v(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(s())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),l=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,a,s,p=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){c(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),d(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",v.append(h);var f=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(p,v),r.dom.appendContent(p,f),r.dom.appendContent(u,p),r.dom.appendContent(l,u)},v=0;v<this.videos.length;v++)p(v);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,l),h(this.playerId,e)}}]),I}();export{N as default};
|