@viewlift/player-backup 2.0.375-backup → 2.0.376-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-8316b7c4.js → autoNextVideo-d014b6e0.js} +1 -1
- package/cjs/bundle.css +428 -428
- package/cjs/{features-541cfdcb.js → features-8a3c29d7.js} +1 -1
- package/cjs/{generic-ddb9f830.js → generic-4ae5602c.js} +1 -1
- package/cjs/{index-91441ebe.js → index-24bf35bd.js} +1 -1
- package/cjs/index-774736bd.js +1 -0
- package/cjs/index-f3365b73.js +1 -0
- package/cjs/{index-7017ec38.js → index-f3d67a94.js} +1 -1
- package/cjs/{index-6822b5b5.js → index-f3f48477.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-e214d56d.js → multicamv2-aebcf40b.js} +1 -1
- package/cjs/{multicamv2-f859af0e.js → multicamv2-d8d221dd.js} +1 -1
- package/cjs/{nextEpisodeButton-d818eff8.js → nextEpisodeButton-d95e7bdc.js} +1 -1
- package/cjs/{playlist-67d74a2b.js → playlist-b2f07413.js} +1 -1
- package/cjs/{series-2fbef62b.js → series-7c67fc81.js} +1 -1
- package/cjs/{series-v2-0f61d2e5.js → series-v2-3968ecf4.js} +1 -1
- package/cjs/{series-v2-663e3ea7.js → series-v2-78f6b95a.js} +1 -1
- package/cjs/{skin-7a90fce9.js → skin-0517c551.js} +1 -1
- package/cjs/{skin-2db97eac.js → skin-102cabb5.js} +1 -1
- package/cjs/{skin-ef4a5769.js → skin-1f210273.js} +1 -1
- package/cjs/{skin-ca2b0407.js → skin-3bb8a9bf.js} +1 -1
- package/cjs/{skin-1b6bad92.js → skin-3db6272d.js} +1 -1
- package/cjs/{skin-730b9c41.js → skin-431b10b8.js} +1 -1
- package/cjs/{skin-ecb40ff3.js → skin-6463d5b1.js} +1 -1
- package/cjs/{skin-c7284d41.js → skin-65de5d2e.js} +1 -1
- package/cjs/{skin-4701bbb1.js → skin-914eb9db.js} +1 -1
- package/cjs/{skin-d007d625.js → skin-d519da59.js} +1 -1
- package/cjs/{videoSelector-dec6e057.js → videoSelector-b732a762.js} +1 -1
- package/cjs/{videoSelector-5b39b88d.js → videoSelector-f43303bd.js} +1 -1
- package/esm/{autoNextVideo-d90e89be.js → autoNextVideo-b2ddf881.js} +1 -1
- package/esm/bundle.css +428 -428
- package/esm/{features-5a73d4fc.js → features-9e2baef8.js} +1 -1
- package/esm/{generic-061851d1.js → generic-eb13663c.js} +1 -1
- package/esm/index-28ebfa21.js +1 -0
- package/esm/{index-7a550e72.js → index-332dbf74.js} +1 -1
- package/esm/{index-d120a4cc.js → index-3b81e5fe.js} +1 -1
- package/esm/{index-f648e9c2.js → index-a9c6d5d8.js} +1 -1
- package/esm/index-cbb86a6c.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-5b81efa1.js → multicamv2-7d1ffd86.js} +1 -1
- package/esm/{multicamv2-baf41d9b.js → multicamv2-e3c0d0d9.js} +1 -1
- package/esm/{nextEpisodeButton-f9a2d975.js → nextEpisodeButton-11b1fa06.js} +1 -1
- package/esm/{playlist-a47b041e.js → playlist-cb04c889.js} +1 -1
- package/esm/{series-1cc84308.js → series-ac134521.js} +1 -1
- package/esm/{series-v2-0698df9c.js → series-v2-06f521ce.js} +1 -1
- package/esm/{series-v2-f913e362.js → series-v2-37717af4.js} +1 -1
- package/esm/{settings-icon-3d9ec523.js → settings-icon-43390aef.js} +1 -1
- package/esm/{skin-00d58c5d.js → skin-2afe6ef1.js} +1 -1
- package/esm/{skin-c1bd2da5.js → skin-341b9a62.js} +1 -1
- package/esm/{skin-d5dea9b2.js → skin-56f99a67.js} +1 -1
- package/esm/{skin-84df67c6.js → skin-6e0916ac.js} +1 -1
- package/esm/{skin-ff84766b.js → skin-7aa5e4f5.js} +1 -1
- package/esm/{skin-426412d0.js → skin-7f5ab942.js} +1 -1
- package/esm/{skin-97dde5c6.js → skin-977f1785.js} +1 -1
- package/esm/{skin-60971e8f.js → skin-a55e8e1d.js} +1 -1
- package/esm/{skin-e0a3db9a.js → skin-ab1fba9b.js} +1 -1
- package/esm/{skin-c3aee0cd.js → skin-fd6cbbf4.js} +1 -1
- package/esm/{videoSelector-3149d4ee.js → videoSelector-0391e90b.js} +1 -1
- package/esm/{videoSelector-3fa509f9.js → videoSelector-6c8f29bd.js} +1 -1
- package/package.json +1 -1
- package/cjs/_commonjsHelpers-81c4d214.js +0 -1
- package/cjs/index-62250ea0.js +0 -1
- package/cjs/index-9ff76281.js +0 -1
- package/esm/_commonjsHelpers-0307ea52.js +0 -1
- package/esm/index-23afe568.js +0 -1
- package/esm/index-c4656b30.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,s as i,d as e,e as n,f as o,k as t,l as r,m as s,n as a}from"./features-5a73d4fc.js";import{e as d}from"./icons-f9c8be77.js";import{g as u,p as v,e as C}from"./skin-2a3ee818.js";import{g as c}from"./renditions-28891b91.js";import"./captions-8c8e9f2b.js";import{a as p,b as h}from"./index-f648e9c2.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{r as m}from"./relatedVideosManager-93533a90.js";import{a9 as f,aa as g,e as b,ab as y,o as L}from"./generic-061851d1.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./playerControlEvents-96ef1a5d.js";import"./autoNextVideo-d90e89be.js";import"./index-d120a4cc.js";import"@babel/runtime/helpers/typeof";import"./manager-d812dea7.js";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"@viewlift/comscore/index.js";function B(B,j){u(B).addClass("skin_news"),function(i,e){var n=u(i);n&&n.on("loadeddata",(function(){var n,o,t,r,s,a,d,u,v,C;(null===(n=c(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var h=(null===(t=m.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||h)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(C=e.series)&&void 0!==C&&C.enable)){var f;f=m.subscribe((function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(p(i,e),f&&f())}))}}else p(i,e)}))}(B,j),function(l,i){var e,n,o,t,r,s,a,d,c,p,h,m,f,g,b,y,L,B,j=u(l);if(null!=i&&i.liveVideo){var w,E,V,x,M,k,S=null===(w=j.controlBar)||void 0===w||null===(E=w.getChild("TimeDivider"))||void 0===E?void 0:E.el(),T=null===(V=j.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),Z=null===(M=j.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),T&&(T.style.display="none"),Z&&(Z.style.display="none")}var A=null===(e=j.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=j.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(j.paused())try{j.play()}catch(l){console.log(l)}});var N=document.createElement("div");N.className="custom-spaced-progress-bar",A&&N.append(A.el());null===(t=j.controlBar)||void 0===t||null===(r=t.el())||void 0===r||r.append(N);var _='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';j.el().insertBefore(v(_),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var P=(null==j||null===(a=j.controlBar)||void 0===a||null===(d=a.getChild("PlayToggle"))||void 0===d||null===(c=d.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=C(P,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",(function(){return D.setAttributeNS(null,"href","#vjs-icon-play")})),j.on("play",(function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")}))}var I=(null==j||null===(p=j.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(I){I.style.height="24px",I.style.width="24px";var q=C(I,"#vjs-icon-fullscreen");j.on("fullscreenchange",(function(){var l=j.isFullscreen_;null==q||q.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var O=(null==j||null===(f=j.controlBar)||void 0===f||null===(g=f.getChild("VolumePanel"))||void 0===g?void 0:g.el())||null;if(O){var R=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");R.classList.add("vjs-svg-icon"),R.style.height="24px",R.style.width="24px";var F=C(R,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",(function(l){var i=j.volume();console.log(i,j.muted()),0==i||j.muted()?F.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?F.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?F.setAttributeNS(null,"href","#vjs-icon-volume2"):F.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var G=(null==j||null===(b=j.controlBar)||void 0===b||null===(y=b.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(G){var z=null==G?void 0:G.querySelector(".vjs-icon-placeholder");z.style.height="25px",z.style.width="25px";var J=C(z,"#vjs-icon-pip");j.on("enterpictureinpicture",(function(){J.setAttributeNS(null,"href","#vjs-icon-pip")}))}var K=(null==j||null===(L=j.controlBar)||void 0===L||null===(B=L.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(K){var Q=K.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=C(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",(function(l){for(var i=j.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}j&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(j.liveTracker.on("liveedgechange",(function(){Y(j)})),j.on("timeupdate",(function(){Y(j)})));function W(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function X(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=W(o)))}}}(B,j),function(l,v){var C,c,p,h,B,j,w,E,V,x=(null==v?void 0:v.liveVideo)||!1,M=(null==v||null===(C=v.res)||void 0===C?void 0:C.contentType)||"video",k=(null==v||null===(c=v.res)||void 0===c||null===(p=c[M])||void 0===p?void 0:p.isSSAIEnabled)||!1,S=(null==v?void 0:v.skin_settings)||{};null==S||S.slowMoBtn;var T=(null==v||null===(h=v.customData)||void 0===h?void 0:h.ads)||{};i(l),null!=S&&S.skipBtn&&0==(null==v?void 0:v.liveVideo)&&0==(null==v?void 0:v.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=S&&S.rewindBtn&&(0==(null==v?void 0:v.liveVideo)&&0==(null==v?void 0:v.liveui)||1==(null==v?void 0:v.liveui))&&n(l,"VL_ONE",d());o(l,v);var Z,A=m.get();(null==A||null===(B=A.content)||void 0===B?void 0:B.length)>0&&t(l,A);Z=m.subscribe((function(i){var e,n,o=u(l);(null==o||null===(e=o.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(t(l,i),Z&&Z())})),(null==v||null===(j=v.streams)||void 0===j?void 0:j.length)>1&&r(l,null==v?void 0:v.streams);(null==v||null===(w=v.playlist)||void 0===w||null===(E=w.content)||void 0===E?void 0:E.length)>0&&s(l,null==v?void 0:v.playlist);null!=v&&null!==(V=v.series)&&void 0!==V&&V.enable&&a(l,v);if(k&&x&&"TRANSMIT"==(null==T?void 0:T.liveAdSticherProvider)&&null!=T&&T.liveAdClientSideTracking)f(l,v);else if("MEDIA_TAILOR"==(null==T?void 0:T.vodAdSticherProvider)&&null!=T&&T.vodAdClientSideTracking&&k)if(x)g(l);else{var H,N=null;if(null!=v&&null!==(H=v.series)&&void 0!==H&&H.enable){var _,P,D,I,q,O=null===(_=b())||void 0===_||null===(P=_.video)||void 0===P||null===(D=P.gist)||void 0===D?void 0:D.id,R=L(),F=(null==R?void 0:R.get(O))||{t:0,p:0},G=F.t,z=F.p;"function"==typeof(null===(I=window)||void 0===I||null===(q=I.watchHistory)||void 0===q?void 0:q.cb)&&window.watchHistory.cb({watchedTime:G}),z<95&&(N=G)}else{var J=v.watchHistoryResumeTime;v.watchedPercentage<95&&(N=J)}y(l,N)}}(B,j),h(B,j)}export{B as initialiseSkin};
|
|
1
|
+
import{g as l,s as i,d as e,e as n,f as o,k as t,l as r,m as s,n as a}from"./features-9e2baef8.js";import{e as d}from"./icons-f9c8be77.js";import{g as u,p as v,e as C}from"./skin-2a3ee818.js";import{g as c}from"./renditions-28891b91.js";import"./captions-8c8e9f2b.js";import{a as p,b as h}from"./index-a9c6d5d8.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{r as m}from"./relatedVideosManager-93533a90.js";import{a9 as f,aa as g,e as b,ab as y,o as L}from"./generic-eb13663c.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./playerControlEvents-96ef1a5d.js";import"./autoNextVideo-b2ddf881.js";import"./index-3b81e5fe.js";import"@babel/runtime/helpers/typeof";import"./manager-d812dea7.js";import"axios";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"@viewlift/comscore/index.js";function B(B,j){u(B).addClass("skin_news"),function(i,e){var n=u(i);n&&n.on("loadeddata",(function(){var n,o,t,r,s,a,d,u,v,C;(null===(n=c(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e);var h=(null===(t=m.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=e&&null!==(s=e.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(u=d.appcmsMain)&&void 0!==u&&null!==(v=u.features)&&void 0!==v&&v.auto_play||h)||null!=e&&e.liveVideo){if(!(null!=e&&e.liveVideo||null!=e&&null!==(C=e.series)&&void 0!==C&&C.enable)){var f;f=m.subscribe((function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(p(i,e),f&&f())}))}}else p(i,e)}))}(B,j),function(l,i){var e,n,o,t,r,s,a,d,c,p,h,m,f,g,b,y,L,B,j=u(l);if(null!=i&&i.liveVideo){var w,E,V,x,M,k,S=null===(w=j.controlBar)||void 0===w||null===(E=w.getChild("TimeDivider"))||void 0===E?void 0:E.el(),T=null===(V=j.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),Z=null===(M=j.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),T&&(T.style.display="none"),Z&&(Z.style.display="none")}var A=null===(e=j.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=j.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(j.paused())try{j.play()}catch(l){console.log(l)}});var _=document.createElement("div");_.className="custom-spaced-progress-bar",A&&_.append(A.el());null===(t=j.controlBar)||void 0===t||null===(r=t.el())||void 0===r||r.append(_);var N='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';j.el().insertBefore(v(N),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var P=(null==j||null===(a=j.controlBar)||void 0===a||null===(d=a.getChild("PlayToggle"))||void 0===d||null===(c=d.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=C(P,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",(function(){return D.setAttributeNS(null,"href","#vjs-icon-play")})),j.on("play",(function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")}))}var I=(null==j||null===(p=j.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(I){I.style.height="24px",I.style.width="24px";var q=C(I,"#vjs-icon-fullscreen");j.on("fullscreenchange",(function(){var l=j.isFullscreen_;null==q||q.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var O=(null==j||null===(f=j.controlBar)||void 0===f||null===(g=f.getChild("VolumePanel"))||void 0===g?void 0:g.el())||null;if(O){var R=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");R.classList.add("vjs-svg-icon"),R.style.height="24px",R.style.width="24px";var F=C(R,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",(function(l){var i=j.volume();console.log(i,j.muted()),0==i||j.muted()?F.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?F.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?F.setAttributeNS(null,"href","#vjs-icon-volume2"):F.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var G=(null==j||null===(b=j.controlBar)||void 0===b||null===(y=b.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(G){var K=null==G?void 0:G.querySelector(".vjs-icon-placeholder");K.style.height="25px",K.style.width="25px";var z=C(K,"#vjs-icon-pip");j.on("enterpictureinpicture",(function(){z.setAttributeNS(null,"href","#vjs-icon-pip")}))}var J=(null==j||null===(L=j.controlBar)||void 0===L||null===(B=L.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(J){var Q=J.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=C(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",(function(l){for(var i=j.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}j&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(j.liveTracker.on("liveedgechange",(function(){Y(j)})),j.on("timeupdate",(function(){Y(j)})));function W(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function X(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=W(o)))}}}(B,j),function(l,v){var C,c,p,h,B,j,w,E,V,x=(null==v?void 0:v.liveVideo)||!1,M=(null==v||null===(C=v.res)||void 0===C?void 0:C.contentType)||"video",k=(null==v||null===(c=v.res)||void 0===c||null===(p=c[M])||void 0===p?void 0:p.isSSAIEnabled)||!1,S=(null==v?void 0:v.skin_settings)||{};null==S||S.slowMoBtn;var T=(null==v||null===(h=v.customData)||void 0===h?void 0:h.ads)||{};i(l),null!=S&&S.skipBtn&&0==(null==v?void 0:v.liveVideo)&&0==(null==v?void 0:v.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=S&&S.rewindBtn&&(0==(null==v?void 0:v.liveVideo)&&0==(null==v?void 0:v.liveui)||1==(null==v?void 0:v.liveui))&&n(l,"VL_ONE",d());o(l,v);var Z,A=m.get();(null==A||null===(B=A.content)||void 0===B?void 0:B.length)>0&&t(l,A);Z=m.subscribe((function(i){var e,n,o=u(l);(null==o||null===(e=o.controlBar)||void 0===e||!e.getChild("videoSelector"))&&(null==i||null===(n=i.content)||void 0===n?void 0:n.length)>0&&(t(l,i),Z&&Z())})),(null==v||null===(j=v.streams)||void 0===j?void 0:j.length)>1&&r(l,null==v?void 0:v.streams);(null==v||null===(w=v.playlist)||void 0===w||null===(E=w.content)||void 0===E?void 0:E.length)>0&&s(l,null==v?void 0:v.playlist);null!=v&&null!==(V=v.series)&&void 0!==V&&V.enable&&a(l,v);if(k&&x&&"TRANSMIT"==(null==T?void 0:T.liveAdSticherProvider)&&null!=T&&T.liveAdClientSideTracking)f(l,v);else if("MEDIA_TAILOR"==(null==T?void 0:T.vodAdSticherProvider)&&null!=T&&T.vodAdClientSideTracking&&k)if(x)g(l);else{var H,_=null;if(null!=v&&null!==(H=v.series)&&void 0!==H&&H.enable){var N,P,D,I,q,O=null===(N=b())||void 0===N||null===(P=N.video)||void 0===P||null===(D=P.gist)||void 0===D?void 0:D.id,R=L(),F=(null==R?void 0:R.get(O))||{t:0,p:0},G=F.t,K=F.p;"function"==typeof(null===(I=window)||void 0===I||null===(q=I.watchHistory)||void 0===q?void 0:q.cb)&&window.watchHistory.cb({watchedTime:G}),K<95&&(_=G)}else{var z=v.watchHistoryResumeTime;v.watchedPercentage<95&&(_=z)}y(l,_)}}(B,j),h(B,j)}export{B as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,p as e,e as n}from"./skin-2a3ee818.js";import{e as i}from"./features-5a73d4fc.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-061851d1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./playerControlEvents-96ef1a5d.js";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 u(u,s){l(u).addClass("skin_cn_news"),function(i,r){var u,s,a,v,c=l(i);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,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("PlayToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=n(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,i,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("VolumePanel"))||void 0===i?void 0:i.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=n(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,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("PictureInPictureToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;n(t,"#vjs-icon-pip")}(c),function(l){var e,i,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("SubsCapsButton"))||void 0===i?void 0:i.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;n(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),n=!1,i=0;i<e.length;i++){var t=e[i];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){n=!0;break}}o.classList.toggle("vjs-cc-on",n)};r(),l.textTracks().on("change",r)}(c),function(l){var e,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("FullscreenToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=n(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 n,i=null==l||null===(n=l.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");if(i){var t,r,u=i.el().querySelector(".vjs-seek-to-live-text"),s=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,n;u&&(u.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(n=e.atLiveEdge)&&void 0!==n&&n.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),i.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,n,i,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.remainingTimeDisplay)||void 0===n?void 0:n.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(i=l.liveTracker)&&void 0!==i&&null!==(o=i.atLiveEdge)&&void 0!==o&&o.call(i)?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 n,o,t,u,s=(null==e||null===(n=e.res)||void 0===n?void 0:n.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)&&i(l,"CN_NEWS",r)}(u,s)}export{u as initialiseSkin};
|
|
1
|
+
import{g as l,p as e,e as n}from"./skin-2a3ee818.js";import{e as i}from"./features-9e2baef8.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-eb13663c.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-de5f6a74.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./playerControlEvents-96ef1a5d.js";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){l(s).addClass("skin_cn_news"),function(i,r){var s,u,a,v,c=l(i);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,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("PlayToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=n(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,i,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("VolumePanel"))||void 0===i?void 0:i.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=n(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,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("PictureInPictureToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;n(t,"#vjs-icon-pip")}(c),function(l){var e,i,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("SubsCapsButton"))||void 0===i?void 0:i.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;n(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),n=!1,i=0;i<e.length;i++){var t=e[i];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){n=!0;break}}o.classList.toggle("vjs-cc-on",n)};r(),l.textTracks().on("change",r)}(c),function(l){var e,i,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.getChild("FullscreenToggle"))||void 0===i||null===(o=i.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=n(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 n,i=null==l||null===(n=l.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");if(i){var t,r,s=i.el().querySelector(".vjs-seek-to-live-text"),u=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,n;s&&(s.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(n=e.atLiveEdge)&&void 0!==n&&n.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),i.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,n,i,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.remainingTimeDisplay)||void 0===n?void 0:n.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(i=l.liveTracker)&&void 0!==i&&null!==(o=i.atLiveEdge)&&void 0!==o&&o.call(i)?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 n,o,t,s,u=(null==e||null===(n=e.res)||void 0===n?void 0:n.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)&&i(l,"CN_NEWS",r)}(s,u)}export{s as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l,h as e,i as o,d as i,e as n,j as t,f as r,k as a,l as d,m as s,n as u}from"./features-
|
|
1
|
+
import{g as l,h as e,i as o,d as i,e as n,j as t,f as r,k as a,l as d,m as s,n as u}from"./features-9e2baef8.js";import{M as v,a as m,c as p,d as c}from"./icons-f9c8be77.js";import{g as h,b as f}from"./skin-2a3ee818.js";import{g as b}from"./renditions-28891b91.js";import{g}from"./captions-8c8e9f2b.js";import{a as C,b as j}from"./index-a9c6d5d8.js";import{i as y}from"./index-332dbf74.js";import{a as w,d as V}from"./browser-de5f6a74.js";import{r as B}from"./relatedVideosManager-93533a90.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-eb13663c.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";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"./playerControlEvents-96ef1a5d.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-b2ddf881.js";import"./index-3b81e5fe.js";function k(k,x){h(k).addClass("skin_defaultv2"),function(){"Chrome"==V()&&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=h(i);t&&(t.on("loadeddata",(function(){var o,t,r,a,d,s,u,v,m,p;(null===(o=b(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=g(i))||void 0===t?void 0:t.length)>0&&e(i,n);var c=(null===(r=B.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=B.subscribe((function(l){var e;(null==l||null===(e=l.content)||void 0===e?void 0:e.length)>0&&(C(i,n),h&&h())}))}}else C(i,n);null!=n&&n.liveVideo||w()||y(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)})))}(k,x),function(l,e){var o,i,n,t,r,a,d,s,u,p,c,b,g,C=h(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===(u=s.getChild("FullscreenToggle"))||void 0===u||null===(p=u.el())||void 0===p||p.appendChild(f(v(window.controlsColor))),null==C||null===(c=C.controlBar)||void 0===c||null===(b=c.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(f(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(k,x),function(l,e){var o,v,m,f,b,g=(null==e?void 0:e.skin_settings)||{},C=0!=(null==g?void 0:g.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",p());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",c());!e.liveVideo&&C&&t(l);r(l,e);var j,y=B.get();(null==y||null===(o=y.content)||void 0===o?void 0:o.length)>0&&a(l,y);j=B.subscribe((function(e){var o,i,n=h(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&&(a(l,e),j&&j())})),(null==e||null===(v=e.streams)||void 0===v?void 0:v.length)>1&&d(l,null==e?void 0:e.streams);(null==e||null===(m=e.playlist)||void 0===m||null===(f=m.content)||void 0===f?void 0:f.length)>0&&s(l,null==e?void 0:e.playlist);null!=e&&null!==(b=e.series)&&void 0!==b&&b.enable&&u(l,e)}(k,x),j(k,x)}export{k as initialiseSkin};
|
|
@@ -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{f as d,g as s}from"./icons-f9c8be77.js";import{V as r,a8 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{f as d,g as s}from"./icons-f9c8be77.js";import{V as r,a8 as c}from"./generic-eb13663c.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-2a3ee818.js";import{a as y,u as f}from"./autoNextVideo-b2ddf881.js";import{g as E}from"./localisation-0bf399a1.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-de5f6a74.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./playerControlEvents-96ef1a5d.js";import"./index-3b81e5fe.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var I=l.getComponent("Component"),N=function(){n(j,I);var N,x,k=(N=j,x=C(),function(){var e,t=a(N);if(x){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function j(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(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),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(j,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,d,s,r,c,u=this,v=l.dom.createEl("div",{className:"video -".concat(e)}),p=l.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===(a=i.appcmsMain)||void 0===a||null===(d=a.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=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return l.dom.appendContent(v,p),l.dom.appendContent(v,b),v}},{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}(j,"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("button",{className:"video-selector-icon",title:"video selector",ariaExpanded:!1,innerHTML:"".concat(d())});return l.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=l.dom.createEl("div",{className:"video-selection-container hidden"}),n=l.dom.$(".video-selector-icon",this.el());n.onclick=function(){var i,a;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===(a=e.titleEl)||void 0===a||a.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 a=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(a),l.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=l.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,a=0;a<i;a++)document.getElementsByClassName("recommended -".concat(a))[0]&&(document.getElementsByClassName("recommended -".concat(a))[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"),a=(null==i||null===(o=i[0])||void 0===o||null===(n=o.children)||void 0===n?void 0:n.length)||0,l=0;l<a;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=l.dom.createEl("div",{className:"video-selector-head"}),i=l.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 a=E("relatedVideoTitle")||"Recommended",d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:a,ariaLabel:a,tabIndex:-1});d.setAttribute("role","heading"),d.setAttribute("aria-level","2"),this.titleEl=d;for(var r=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,a,d,s,u,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.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===(a=i.app_data)||void 0===a||null===(d=a.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=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,y),l.dom.appendContent(c,p),l.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);l.dom.appendContent(n,d),l.dom.appendContent(n,i),l.dom.appendContent(e,n),l.dom.appendContent(e,r),b(this.playerId,e)}}]),j}();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 r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{V as d,a8 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 r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{V as d,a8 as c}from"./generic-eb13663c.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-b2ddf881.js";import{g as y}from"./localisation-0bf399a1.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-de5f6a74.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./playerControlEvents-96ef1a5d.js";import"./index-3b81e5fe.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,k,j=(N=I,k=C(),function(){var e,t=a(N);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,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};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.getAugmentedNamespace=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r};
|
package/cjs/index-62250ea0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("webcomponents.js/webcomponents-lite.js");var e=require("./_commonjsHelpers-81c4d214.js"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/assertThisInitialized"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),n=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty");function c(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(s){if("default"!==s&&!(s in e)){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}}))})),Object.freeze(e)}function l(e){return"string"==typeof window.navigator.userAgent&&window.navigator.userAgent.indexOf(e)>=0}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}module.exports=function(e){var o=e.getComponent("Button"),c=function(e){r(d,e);var c,l,h=(c=d,l=u(),function(){var e,t=n(c);if(l){var s=n(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return a(this,e)});function d(e,s){var r;return t(this,d),r=h.call(this,e,s),e.on("chromecastConnected",r._onChromecastConnected.bind(i(r))),e.on("chromecastDisconnected",r._onChromecastDisconnected.bind(i(r))),e.on("chromecastDevicesAvailable",r._onChromecastDevicesAvailable.bind(i(r))),e.on("chromecastDevicesUnavailable",r._onChromecastDevicesUnavailable.bind(i(r))),e.chromecastSessionManager&&e.chromecastSessionManager.hasAvailableDevices()?r._onChromecastDevicesAvailable():r._onChromecastDevicesUnavailable(),s.addCastLabelToButton?(r.el().classList.add("vjs-chromecast-button-lg"),r._labelEl=document.createElement("span"),r._labelEl.classList.add("vjs-chromecast-button-label"),r._updateCastLabelText(),r.el().appendChild(r._labelEl)):r.controlText("Open Chromecast menu"),r}return s(d,[{key:"buildCSSClass",value:function(){return"vjs-chromecast-button "+(this._isChromecastConnected?"vjs-chromecast-casting-state ":"")+(this.options_.addCastLabelToButton?"vjs-chromecast-button-lg ":"")+o.prototype.buildCSSClass()}},{key:"handleClick",value:function(){this.player().trigger("chromecastRequested")}},{key:"_onChromecastConnected",value:function(){this._isChromecastConnected=!0,this._reloadCSSClasses(),this._updateCastLabelText()}},{key:"_onChromecastDisconnected",value:function(){this._isChromecastConnected=!1,this._reloadCSSClasses(),this._updateCastLabelText()}},{key:"_onChromecastDevicesAvailable",value:function(){this.show()}},{key:"_onChromecastDevicesUnavailable",value:function(){this.hide()}},{key:"_reloadCSSClasses",value:function(){this.el_&&(this.el_.className=this.buildCSSClass())}},{key:"_updateCastLabelText",value:function(){this._labelEl&&(this._labelEl.textContent=this._isChromecastConnected?this.localize("Disconnect Cast"):this.localize("Cast"))}}]),d}(o);e.registerComponent("chromecastButton",c)};var h=Object.freeze({__proto__:null}),d=e.getAugmentedNamespace(h),m=function(){function e(s){t(this,e),this.player=s,this._sessionListener=this._onSessionStateChange.bind(this),this._castListener=this._onCastStateChange.bind(this),this._addCastContextEventListeners(),this._preserveSourceCacheOnMediaSourceAttach(),this._resumeExistingSession(),this.player.on("dispose",this._removeCastContextEventListeners.bind(this)),this._notifyPlayerOfDevicesAvailabilityChange(this.getCastContext().getCastState()),this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer)}return s(e,[{key:"_addCastContextEventListeners",value:function(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().addEventListener(e,this._sessionListener),this.getCastContext().addEventListener(t,this._castListener)}},{key:"_preserveSourceCacheOnMediaSourceAttach",value:function(){var e=this.player,t=e.handleTechSourceset_;"function"==typeof t&&(e.handleTechSourceset_=function(s){var i=e.currentSource().src;return!e.changingSrc_&&i&&!/^blob:/.test(i)&&/^blob:/.test(s.src)&&(e.lastSource_=null),t.call(e,s)})}},{key:"_removeCastContextEventListeners",value:function(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().removeEventListener(e,this._sessionListener),this.getCastContext().removeEventListener(t,this._castListener)}},{key:"_onSessionStateChange",value:function(e){e.sessionState===cast.framework.SessionState.SESSION_ENDED&&(this.player.trigger("chromecastDisconnected"),this._reloadTech()),e.sessionState===cast.framework.SessionState.SESSION_RESUMED&&this._resumeExistingSession()}},{key:"_resumeExistingSession",value:function(){var t=this.getCastContext().getCurrentSession(),s=t&&t.getMediaSession();!e.hasConnected&&s&&this._isPlayingCurrentSource(s)&&(e.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech({currentTime:s.getEstimatedTime(),paused:s.playerState===chrome.cast.media.PlayerState.PAUSED,resumeSession:!0}))}},{key:"_isPlayingCurrentSource",value:function(e){var t=this.player.currentSource(),s=e.media&&e.media.contentId;return!!(s&&t&&t.src)&&s===t.src}},{key:"_onCastStateChange",value:function(e){this._notifyPlayerOfDevicesAvailabilityChange(e.castState)}},{key:"_notifyPlayerOfDevicesAvailabilityChange",value:function(e){this.hasAvailableDevices(e)?this.player.trigger("chromecastDevicesAvailable"):this.player.trigger("chromecastDevicesUnavailable")}},{key:"hasAvailableDevices",value:function(e){return(e=e||this.getCastContext().getCastState())===cast.framework.CastState.NOT_CONNECTED||e===cast.framework.CastState.CONNECTING||e===cast.framework.CastState.CONNECTED}},{key:"openCastMenu",value:function(){var t;this.player.currentSource()&&(t=function(){e.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech()}.bind(this),this.getCastContext().requestSession().then(t,(function(){})))}},{key:"_reloadTech",value:function(e){var t=this.player,s=e&&void 0!==e.currentTime?e.currentTime:t.currentTime(),i=e&&void 0!==e.paused?e.paused:t.paused(),r=t.currentSources();this._resumingSession=!(!e||!e.resumeSession),t.src(r),t.ready(function(){var e=this._resumingSession;this._resumingSession=!1,i?t.pause():t.play(),e||t.currentTime(s||0)}.bind(this))}},{key:"isResumingSession",value:function(){return!!this._resumingSession}},{key:"getCastContext",value:function(){return cast.framework.CastContext.getInstance()}},{key:"getRemotePlayer",value:function(){return this.remotePlayer}},{key:"getRemotePlayerController",value:function(){return this.remotePlayerController}}],[{key:"isChromecastAPIAvailable",value:function(){return window.chrome&&window.chrome.cast&&window.cast}},{key:"isChromecastConnected",value:function(){return e.isChromecastAPIAvailable()&&cast.framework.CastContext.getInstance().getCastState()===cast.framework.CastState.CONNECTED&&e.hasConnected}}]),e}();o(m,"hasConnected",!1),module.exports=m;var _=Object.freeze({__proto__:null}),v=e.getAugmentedNamespace(_),y=function(){function e(){t(this,e),this._el=this._createDOMElement()}return s(e,[{key:"_createDOMElement",value:function(){var e=this._createElement("div","vjs-tech vjs-tech-chromecast"),t=this._createElement("div","vjs-tech-chromecast-poster"),s=this._createElement("img","vjs-tech-chromecast-poster-img"),i=this._createElement("div","vjs-tech-chromecast-title"),r=this._createElement("div","vjs-tech-chromecast-subtitle"),a=this._createElement("div","vjs-tech-chromecast-title-container");return t.appendChild(s),a.appendChild(i),a.appendChild(r),e.appendChild(a),e.appendChild(t),e}},{key:"_createElement",value:function(e,t){var s=document.createElement(e);return s.className=t,s}},{key:"getDOMElement",value:function(){return this._el}},{key:"_findPosterEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-poster")}},{key:"_findPosterImageEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-poster-img")}},{key:"_findTitleEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-title")}},{key:"_findSubtitleEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-subtitle")}},{key:"updatePoster",value:function(e){var t=this._findPosterImageEl();this._poster=e||null,e?(t.setAttribute("src",e),t.classList.remove("vjs-tech-chromecast-poster-img-empty")):(t.removeAttribute("src"),t.classList.add("vjs-tech-chromecast-poster-img-empty"))}},{key:"getPoster",value:function(){return this._poster}},{key:"updateTitle",value:function(e){var t=this._findTitleEl();this._title=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-title-empty")):t.classList.add("vjs-tech-chromecast-title-empty")}},{key:"updateSubtitle",value:function(e){var t=this._findSubtitleEl();this._subtitle=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-subtitle-empty")):t.classList.add("vjs-tech-chromecast-subtitle-empty")}}]),e}();module.exports=y;var g=Object.freeze({__proto__:null});function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var p=v,f=e.getAugmentedNamespace(g);module.exports=function(e){var o=e.getComponent("Tech"),c=function(o){r(h,o);var c,l,u=(c=h,l=C(),function(){var e,t=n(c);if(l){var s=n(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return a(this,e)});function h(s){var r;return t(this,h),(r=u.call(this,s)).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.videojs=e,r._eventListeners=[],r.videojsPlayer=r.videojs(s.playerId),r._chromecastSessionManager=r.videojsPlayer.chromecastSessionManager,r._ui.updatePoster(r.videojsPlayer.poster()),r._remotePlayer=r._chromecastSessionManager.getRemotePlayer(),r._remotePlayerController=r._chromecastSessionManager.getRemotePlayerController(),r._listenToPlayerControllerEvents(),r.on("dispose",r._removeAllEventListeners.bind(i(r))),r._hasPlayedAnyItem=!1,r._requestTitle=s.requestTitleFn||function(){},r._requestSubtitle=s.requestSubtitleFn||function(){},r._requestCustomData=s.requestCustomDataFn||function(){},r._modifyLoadRequestFn=s.modifyLoadRequestFn||function(e){return e},r._initialStartTime=s.startTime||0,r._chromecastSessionManager.isResumingSession&&r._chromecastSessionManager.isResumingSession()?r._adoptCurrentMediaSession():r._playSource(s.source,r._initialStartTime),r.ready(function(){this.setMuted(s.muted)}.bind(i(r))),r}return s(h,[{key:"createEl",value:function(){return this._ui=this._ui||new f,this._ui.getDOMElement()}},{key:"play",value:function(){this.paused()&&(this.ended()&&!this._isMediaLoading?this._playSource(this.videojsPlayer.currentSource(),0):this._remotePlayerController.playOrPause())}},{key:"pause",value:function(){!this.paused()&&this._remotePlayer.canPause&&this._remotePlayerController.playOrPause()}},{key:"paused",value:function(){return this._isAwaitingRemotePlayerSync()?this._adoptedPlayerState===chrome.cast.media.PlayerState.PAUSED:this._remotePlayer.isPaused||this.ended()||null===this._remotePlayer.playerState}},{key:"setSource",value:function(e){this._currentSource&&this._currentSource.src===e.src&&this._currentSource.type===e.type||(this._currentSource=e,this._playSource(e,0))}},{key:"_playSource",value:function(e,t){var s,i=this._getCastSession(),r=new chrome.cast.media.MediaInfo(e.src,e.type),a=this._requestTitle(e),n=this._requestSubtitle(e),o=this.poster(),c=this._requestCustomData(e);this.trigger("waiting"),this._clearSessionTimeout(),r.metadata=new chrome.cast.media.GenericMediaMetadata,r.metadata.metadataType=chrome.cast.media.MetadataType.GENERIC,r.metadata.title=a,r.metadata.subtitle=n,r.streamType=this.videojsPlayer.liveTracker&&this.videojsPlayer.liveTracker.isLive()?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,o&&(r.metadata.images=[{url:o}]),c&&(r.customData=c),this._ui.updateTitle(a),this._ui.updateSubtitle(n),(s=new chrome.cast.media.LoadRequest(r)).autoplay=!0,s.currentTime=t,s=this._modifyLoadRequestFn(s),this._isMediaLoading=!0,this._hasPlayedCurrentItem=!1,i.loadMedia(s).then(function(){var e;this._clearSessionTimeout(),this._hasPlayedAnyItem||this.triggerReady(),this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("play"),this.trigger("playing"),this._hasPlayedAnyItem=!0,this._isMediaLoading=!1,(e=this._getMediaSession())&&e.addUpdateListener(this._onMediaSessionStatusChanged.bind(this))}.bind(this),this._triggerErrorEvent.bind(this))}},{key:"_adoptCurrentMediaSession",value:function(){var e=this._getMediaSession();e?(this._currentSource=this.videojsPlayer.currentSource(),this._isMediaLoading=!1,this._hasPlayedAnyItem=!0,this._hasPlayedCurrentItem=!0,this._initialStartTime=e.getEstimatedTime(),this._hasAdoptedMediaSession=!0,this._adoptedPlayerState=e.playerState,this._adoptedDuration=e.media&&e.media.duration,this._ui.updateTitle(this._requestTitle(this._currentSource)),this._ui.updateSubtitle(this._requestSubtitle(this._currentSource)),this.triggerReady(),this.setTimeout(function(){this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("canplay"),this.trigger("canplaythrough"),e.playerState!==chrome.cast.media.PlayerState.PAUSED?(this.trigger("play"),this.trigger("playing")):this.trigger("pause"),this._triggerTimeUpdateEvent(),this._triggerDurationChangeEvent()}.bind(this),1),e.addUpdateListener(this._onMediaSessionStatusChanged.bind(this))):this._playSource(this._currentSource||this.videojsPlayer.currentSource(),this._initialStartTime)}},{key:"setCurrentTime",value:function(e){var t=this.duration();e>t||!this._remotePlayer.canSeek||(this._remotePlayer.currentTime=Math.min(t-1,e),this._remotePlayerController.seek(),this._triggerTimeUpdateEvent())}},{key:"currentTime",value:function(){return!this._hasPlayedAnyItem||this._isAwaitingRemotePlayerSync()?this._initialStartTime:this._remotePlayer.currentTime}},{key:"_isAwaitingRemotePlayerSync",value:function(){var e=chrome.cast.media.PlayerState;return!!this._hasAdoptedMediaSession&&(this._remotePlayer.playerState!==e.PLAYING&&this._remotePlayer.playerState!==e.PAUSED||(this._hasAdoptedMediaSession=!1,!1))}},{key:"duration",value:function(){return this._hasPlayedAnyItem?this._isAwaitingRemotePlayerSync()&&this._adoptedDuration?this._adoptedDuration:this._remotePlayer.duration:this.videojsPlayer.duration()}},{key:"ended",value:function(){var e=this._getMediaSession();return!(e||!this._hasMediaSessionEnded)||!!e&&e.idleReason===chrome.cast.media.IdleReason.FINISHED}},{key:"volume",value:function(){return this._remotePlayer.volumeLevel}},{key:"setVolume",value:function(e){this._remotePlayer.volumeLevel=e,this._remotePlayerController.setVolumeLevel(),this._triggerVolumeChangeEvent()}},{key:"muted",value:function(){return this._remotePlayer.isMuted}},{key:"setMuted",value:function(e){(this._remotePlayer.isMuted&&!e||!this._remotePlayer.isMuted&&e)&&this._remotePlayerController.muteOrUnmute()}},{key:"poster",value:function(){return this._ui.getPoster()}},{key:"setPoster",value:function(e){this._ui.updatePoster(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return this.videojs.createTimeRange(0,this.duration())}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"playbackRate",value:function(){var e=this._getMediaSession();return e?e.playbackRate:1}},{key:"setPlaybackRate",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"readyState",value:function(){return this._isAwaitingRemotePlayerSync()?4:"IDLE"===this._remotePlayer.playerState||"BUFFERING"===this._remotePlayer.playerState?0:4}},{key:"_listenToPlayerControllerEvents",value:function(){var e=cast.framework.RemotePlayerEventType;this._addEventListener(this._remotePlayerController,e.PLAYER_STATE_CHANGED,this._onPlayerStateChanged,this),this._addEventListener(this._remotePlayerController,e.VOLUME_LEVEL_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.IS_MUTED_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.CURRENT_TIME_CHANGED,this._triggerTimeUpdateEvent,this),this._addEventListener(this._remotePlayerController,e.DURATION_CHANGED,this._triggerDurationChangeEvent,this)}},{key:"_addEventListener",value:function(e,t,s,i){var r;r={target:e,type:t,callback:s,context:i,listener:s.bind(i)},e.addEventListener(t,r.listener),this._eventListeners.push(r)}},{key:"_removeAllEventListeners",value:function(){for(;this._eventListeners.length>0;)this._removeEventListener(this._eventListeners[0]);this._eventListeners=[]}},{key:"_removeEventListener",value:function(e){var t,s=-1;for(e.target.removeEventListener(e.type,e.listener),t=0;t<this._eventListeners.length;t++)if(this._eventListeners[t].target===e.target&&this._eventListeners[t].type===e.type&&this._eventListeners[t].callback===e.callback&&this._eventListeners[t].context===e.context){s=t;break}-1!==s&&this._eventListeners.splice(s,1)}},{key:"_onPlayerStateChanged",value:function(){var e=chrome.cast.media.PlayerState,t=this._remotePlayer.playerState;t===e.PLAYING?(this._hasPlayedCurrentItem=!0,this.trigger("play"),this.trigger("playing")):t===e.PAUSED?this.trigger("pause"):t===e.IDLE&&this.ended()||null===t&&this._hasPlayedCurrentItem?(this._hasPlayedCurrentItem=!1,this._closeSessionOnTimeout(),this.trigger("ended"),this._triggerTimeUpdateEvent()):t===e.BUFFERING&&this.trigger("waiting")}},{key:"_onMediaSessionStatusChanged",value:function(e){this._hasMediaSessionEnded=!!e}},{key:"_closeSessionOnTimeout",value:function(){this._clearSessionTimeout(),this._sessionTimeoutID=setTimeout(function(){var e=this._getCastSession();e&&e.endSession(!0),this._clearSessionTimeout()}.bind(this),1e4)}},{key:"_clearSessionTimeout",value:function(){this._sessionTimeoutID&&(clearTimeout(this._sessionTimeoutID),this._sessionTimeoutID=!1)}},{key:"_getCastContext",value:function(){return this._chromecastSessionManager.getCastContext()}},{key:"_getCastSession",value:function(){return this._getCastContext().getCurrentSession()}},{key:"_getMediaSession",value:function(){var e=this._getCastSession();return e?e.getMediaSession():null}},{key:"_triggerVolumeChangeEvent",value:function(){this.trigger("volumechange")}},{key:"_triggerTimeUpdateEvent",value:function(){this.trigger("timeupdate")}},{key:"_triggerDurationChangeEvent",value:function(){this.trigger("durationchange")}},{key:"_triggerErrorEvent",value:function(){this.trigger("error")}}]),h}(o);c.canPlaySource=function(){return p.isChromecastConnected()},c.isSupported=function(){return p.isChromecastConnected()},e.registerTech("chromecast",c)};var S=Object.freeze({__proto__:null}),E=v;function P(e){e.chromecastSessionManager.openCastMenu()}function b(e,t){!function(e){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:e.receiverAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}(t),function(e){e.chromecastSessionManager||(e.chromecastSessionManager=new E(e))}(e),function(e,t){var s;t.addButtonToControlBar&&!e.controlBar.getChild("chromecastButton")&&(s=e.controlBar.children().length,void 0!==t.buttonPositionIndex&&(s=t.buttonPositionIndex>=0?t.buttonPositionIndex:e.controlBar.children().length+t.buttonPositionIndex),e.controlBar.addChild("chromecastButton",t,s)),e.on("chromecastRequested",P.bind(null,e))}(e,t)}var k=function(){l("CriOS"),l("Android")&&l("Chrome/")&&window.navigator.presentation},T=d,A=e.getAugmentedNamespace(S),L=function(e){e.registerPlugin("chromecast",(function(e){var t=Object.assign({addButtonToControlBar:!0},e||{});this.ready(function(){this.controlBar&&(E.isChromecastAPIAvailable()?b(this,t):function(e,t){var s,i=1;s=setInterval((function(){i>30?clearInterval(s):(E.isChromecastAPIAvailable()&&(clearInterval(s),b(e,t)),i+=1)}),1e3)}(this,t))}.bind(this))}))},D=function(e,t){Object.assign({preloadWebComponents:!1},t).preloadWebComponents&&k(),e=e||window.videojs,T(e),A(e),L(e)},I=c({__proto__:null,default:D},[D]);exports.index=I;
|
package/cjs/index-9ff76281.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./_commonjsHelpers-81c4d214.js"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/get"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf");function o(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(e)}var u=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent};function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}var s=u;module.exports=function(e){var o=function(e){a(d,e);var o,u,b=(o=d,u=c(),function(){var e,t=l(o);if(u){var r=l(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return i(this,e)});function d(e,r){var n;return t(this,d),n=b.call(this,e,r),s()||n.hide(),n._reactToAirPlayAvailableEvents(),r.addAirPlayLabelToButton?(n.el().classList.add("vjs-airplay-button-lg"),n._labelEl=document.createElement("span"),n._labelEl.classList.add("vjs-airplay-button-label"),n._labelEl.textContent=n.localize("AirPlay"),n.el().appendChild(n._labelEl)):n.controlText("Start AirPlay"),n}return r(d,[{key:"buildCSSClass",value:function(){return"vjs-airplay-button "+function(e,t,r,a){var i=n(l(1&a?e.prototype:e),t,r);return 2&a&&"function"==typeof i?function(e){return i.apply(r,e)}:i}(d,"buildCSSClass",this,3)([])}},{key:"handleClick",value:function(){this.player().trigger("airPlayRequested")}},{key:"_getMediaEl",value:function(){return this.player().el().querySelector("video, audio")}},{key:"_reactToAirPlayAvailableEvents",value:function(){var e=this._getMediaEl(),t=this;function r(e){"available"===e.availability?t.show():t.hide()}e&&s()&&(e.addEventListener("webkitplaybacktargetavailabilitychanged",r),this.on("dispose",(function(){e.removeEventListener("webkitplaybacktargetavailabilitychanged",r)})))}}]),d}(e.getComponent("Button"));e.registerComponent("airPlayButton",o)};var b=Object.freeze({__proto__:null}),d=u;function y(e){var t=e.el().querySelector("video, audio");t&&t.webkitShowPlaybackTargetPicker&&t.webkitShowPlaybackTargetPicker()}function f(e,t){e.controlBar&&d()&&(function(e){e.on("airPlayRequested",y.bind(null,e))}(e),function(e,t){var r,n=function(e){return e.controlBar.getChild("airPlayButton")}(e);t.addButtonToControlBar&&!n&&(r=e.controlBar.children().length,void 0!==t.buttonPositionIndex&&(r=t.buttonPositionIndex>=0?t.buttonPositionIndex:e.controlBar.children().length+t.buttonPositionIndex),e.controlBar.addChild("airPlayButton",t,r))}(e,t))}var v=e.getAugmentedNamespace(b),h=function(e){e.registerPlugin("airPlay",(function(e){var t=Object.assign({addButtonToControlBar:!0},e||{});this.ready(f.bind(this,this,t))}))},p=function(e){e=e||window.videojs,v(e),h(e)},g=o({__proto__:null,default:p},[p]);exports.index=g;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}export{e as g};
|
package/esm/index-23afe568.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"webcomponents.js/webcomponents-lite.js";import{g as e}from"./_commonjsHelpers-0307ea52.js";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import i from"@babel/runtime/helpers/assertThisInitialized";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";function l(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(s){if("default"!==s&&!(s in e)){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}}))})),Object.freeze(e)}function c(e){return"string"==typeof window.navigator.userAgent&&window.navigator.userAgent.indexOf(e)>=0}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}module.exports=function(e){var o=e.getComponent("Button"),l=function(e){r(d,e);var l,c,h=(l=d,c=u(),function(){var e,t=n(l);if(c){var s=n(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return a(this,e)});function d(e,s){var r;return t(this,d),r=h.call(this,e,s),e.on("chromecastConnected",r._onChromecastConnected.bind(i(r))),e.on("chromecastDisconnected",r._onChromecastDisconnected.bind(i(r))),e.on("chromecastDevicesAvailable",r._onChromecastDevicesAvailable.bind(i(r))),e.on("chromecastDevicesUnavailable",r._onChromecastDevicesUnavailable.bind(i(r))),e.chromecastSessionManager&&e.chromecastSessionManager.hasAvailableDevices()?r._onChromecastDevicesAvailable():r._onChromecastDevicesUnavailable(),s.addCastLabelToButton?(r.el().classList.add("vjs-chromecast-button-lg"),r._labelEl=document.createElement("span"),r._labelEl.classList.add("vjs-chromecast-button-label"),r._updateCastLabelText(),r.el().appendChild(r._labelEl)):r.controlText("Open Chromecast menu"),r}return s(d,[{key:"buildCSSClass",value:function(){return"vjs-chromecast-button "+(this._isChromecastConnected?"vjs-chromecast-casting-state ":"")+(this.options_.addCastLabelToButton?"vjs-chromecast-button-lg ":"")+o.prototype.buildCSSClass()}},{key:"handleClick",value:function(){this.player().trigger("chromecastRequested")}},{key:"_onChromecastConnected",value:function(){this._isChromecastConnected=!0,this._reloadCSSClasses(),this._updateCastLabelText()}},{key:"_onChromecastDisconnected",value:function(){this._isChromecastConnected=!1,this._reloadCSSClasses(),this._updateCastLabelText()}},{key:"_onChromecastDevicesAvailable",value:function(){this.show()}},{key:"_onChromecastDevicesUnavailable",value:function(){this.hide()}},{key:"_reloadCSSClasses",value:function(){this.el_&&(this.el_.className=this.buildCSSClass())}},{key:"_updateCastLabelText",value:function(){this._labelEl&&(this._labelEl.textContent=this._isChromecastConnected?this.localize("Disconnect Cast"):this.localize("Cast"))}}]),d}(o);e.registerComponent("chromecastButton",l)};var h=e(Object.freeze({__proto__:null})),d=function(){function e(s){t(this,e),this.player=s,this._sessionListener=this._onSessionStateChange.bind(this),this._castListener=this._onCastStateChange.bind(this),this._addCastContextEventListeners(),this._preserveSourceCacheOnMediaSourceAttach(),this._resumeExistingSession(),this.player.on("dispose",this._removeCastContextEventListeners.bind(this)),this._notifyPlayerOfDevicesAvailabilityChange(this.getCastContext().getCastState()),this.remotePlayer=new cast.framework.RemotePlayer,this.remotePlayerController=new cast.framework.RemotePlayerController(this.remotePlayer)}return s(e,[{key:"_addCastContextEventListeners",value:function(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().addEventListener(e,this._sessionListener),this.getCastContext().addEventListener(t,this._castListener)}},{key:"_preserveSourceCacheOnMediaSourceAttach",value:function(){var e=this.player,t=e.handleTechSourceset_;"function"==typeof t&&(e.handleTechSourceset_=function(s){var i=e.currentSource().src;return!e.changingSrc_&&i&&!/^blob:/.test(i)&&/^blob:/.test(s.src)&&(e.lastSource_=null),t.call(e,s)})}},{key:"_removeCastContextEventListeners",value:function(){var e=cast.framework.CastContextEventType.SESSION_STATE_CHANGED,t=cast.framework.CastContextEventType.CAST_STATE_CHANGED;this.getCastContext().removeEventListener(e,this._sessionListener),this.getCastContext().removeEventListener(t,this._castListener)}},{key:"_onSessionStateChange",value:function(e){e.sessionState===cast.framework.SessionState.SESSION_ENDED&&(this.player.trigger("chromecastDisconnected"),this._reloadTech()),e.sessionState===cast.framework.SessionState.SESSION_RESUMED&&this._resumeExistingSession()}},{key:"_resumeExistingSession",value:function(){var t=this.getCastContext().getCurrentSession(),s=t&&t.getMediaSession();!e.hasConnected&&s&&this._isPlayingCurrentSource(s)&&(e.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech({currentTime:s.getEstimatedTime(),paused:s.playerState===chrome.cast.media.PlayerState.PAUSED,resumeSession:!0}))}},{key:"_isPlayingCurrentSource",value:function(e){var t=this.player.currentSource(),s=e.media&&e.media.contentId;return!!(s&&t&&t.src)&&s===t.src}},{key:"_onCastStateChange",value:function(e){this._notifyPlayerOfDevicesAvailabilityChange(e.castState)}},{key:"_notifyPlayerOfDevicesAvailabilityChange",value:function(e){this.hasAvailableDevices(e)?this.player.trigger("chromecastDevicesAvailable"):this.player.trigger("chromecastDevicesUnavailable")}},{key:"hasAvailableDevices",value:function(e){return(e=e||this.getCastContext().getCastState())===cast.framework.CastState.NOT_CONNECTED||e===cast.framework.CastState.CONNECTING||e===cast.framework.CastState.CONNECTED}},{key:"openCastMenu",value:function(){var t;this.player.currentSource()&&(t=function(){e.hasConnected=!0,this.player.trigger("chromecastConnected"),this._reloadTech()}.bind(this),this.getCastContext().requestSession().then(t,(function(){})))}},{key:"_reloadTech",value:function(e){var t=this.player,s=e&&void 0!==e.currentTime?e.currentTime:t.currentTime(),i=e&&void 0!==e.paused?e.paused:t.paused(),r=t.currentSources();this._resumingSession=!(!e||!e.resumeSession),t.src(r),t.ready(function(){var e=this._resumingSession;this._resumingSession=!1,i?t.pause():t.play(),e||t.currentTime(s||0)}.bind(this))}},{key:"isResumingSession",value:function(){return!!this._resumingSession}},{key:"getCastContext",value:function(){return cast.framework.CastContext.getInstance()}},{key:"getRemotePlayer",value:function(){return this.remotePlayer}},{key:"getRemotePlayerController",value:function(){return this.remotePlayerController}}],[{key:"isChromecastAPIAvailable",value:function(){return window.chrome&&window.chrome.cast&&window.cast}},{key:"isChromecastConnected",value:function(){return e.isChromecastAPIAvailable()&&cast.framework.CastContext.getInstance().getCastState()===cast.framework.CastState.CONNECTED&&e.hasConnected}}]),e}();o(d,"hasConnected",!1),module.exports=d;var m=e(Object.freeze({__proto__:null})),_=function(){function e(){t(this,e),this._el=this._createDOMElement()}return s(e,[{key:"_createDOMElement",value:function(){var e=this._createElement("div","vjs-tech vjs-tech-chromecast"),t=this._createElement("div","vjs-tech-chromecast-poster"),s=this._createElement("img","vjs-tech-chromecast-poster-img"),i=this._createElement("div","vjs-tech-chromecast-title"),r=this._createElement("div","vjs-tech-chromecast-subtitle"),a=this._createElement("div","vjs-tech-chromecast-title-container");return t.appendChild(s),a.appendChild(i),a.appendChild(r),e.appendChild(a),e.appendChild(t),e}},{key:"_createElement",value:function(e,t){var s=document.createElement(e);return s.className=t,s}},{key:"getDOMElement",value:function(){return this._el}},{key:"_findPosterEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-poster")}},{key:"_findPosterImageEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-poster-img")}},{key:"_findTitleEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-title")}},{key:"_findSubtitleEl",value:function(){return this._el.querySelector(".vjs-tech-chromecast-subtitle")}},{key:"updatePoster",value:function(e){var t=this._findPosterImageEl();this._poster=e||null,e?(t.setAttribute("src",e),t.classList.remove("vjs-tech-chromecast-poster-img-empty")):(t.removeAttribute("src"),t.classList.add("vjs-tech-chromecast-poster-img-empty"))}},{key:"getPoster",value:function(){return this._poster}},{key:"updateTitle",value:function(e){var t=this._findTitleEl();this._title=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-title-empty")):t.classList.add("vjs-tech-chromecast-title-empty")}},{key:"updateSubtitle",value:function(e){var t=this._findSubtitleEl();this._subtitle=e,e?(t.innerHTML=e,t.classList.remove("vjs-tech-chromecast-subtitle-empty")):t.classList.add("vjs-tech-chromecast-subtitle-empty")}}]),e}();function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}module.exports=_;var y=m,g=e(Object.freeze({__proto__:null}));module.exports=function(e){var o=e.getComponent("Tech"),l=function(o){r(h,o);var l,c,u=(l=h,c=v(),function(){var e,t=n(l);if(c){var s=n(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return a(this,e)});function h(s){var r;return t(this,h),(r=u.call(this,s)).featuresVolumeControl=!0,r.featuresPlaybackRate=!1,r.movingMediaElementInDOM=!1,r.featuresFullscreenResize=!0,r.featuresTimeupdateEvents=!0,r.featuresProgressEvents=!1,r.featuresNativeTextTracks=!1,r.featuresNativeAudioTracks=!1,r.featuresNativeVideoTracks=!1,r.videojs=e,r._eventListeners=[],r.videojsPlayer=r.videojs(s.playerId),r._chromecastSessionManager=r.videojsPlayer.chromecastSessionManager,r._ui.updatePoster(r.videojsPlayer.poster()),r._remotePlayer=r._chromecastSessionManager.getRemotePlayer(),r._remotePlayerController=r._chromecastSessionManager.getRemotePlayerController(),r._listenToPlayerControllerEvents(),r.on("dispose",r._removeAllEventListeners.bind(i(r))),r._hasPlayedAnyItem=!1,r._requestTitle=s.requestTitleFn||function(){},r._requestSubtitle=s.requestSubtitleFn||function(){},r._requestCustomData=s.requestCustomDataFn||function(){},r._modifyLoadRequestFn=s.modifyLoadRequestFn||function(e){return e},r._initialStartTime=s.startTime||0,r._chromecastSessionManager.isResumingSession&&r._chromecastSessionManager.isResumingSession()?r._adoptCurrentMediaSession():r._playSource(s.source,r._initialStartTime),r.ready(function(){this.setMuted(s.muted)}.bind(i(r))),r}return s(h,[{key:"createEl",value:function(){return this._ui=this._ui||new g,this._ui.getDOMElement()}},{key:"play",value:function(){this.paused()&&(this.ended()&&!this._isMediaLoading?this._playSource(this.videojsPlayer.currentSource(),0):this._remotePlayerController.playOrPause())}},{key:"pause",value:function(){!this.paused()&&this._remotePlayer.canPause&&this._remotePlayerController.playOrPause()}},{key:"paused",value:function(){return this._isAwaitingRemotePlayerSync()?this._adoptedPlayerState===chrome.cast.media.PlayerState.PAUSED:this._remotePlayer.isPaused||this.ended()||null===this._remotePlayer.playerState}},{key:"setSource",value:function(e){this._currentSource&&this._currentSource.src===e.src&&this._currentSource.type===e.type||(this._currentSource=e,this._playSource(e,0))}},{key:"_playSource",value:function(e,t){var s,i=this._getCastSession(),r=new chrome.cast.media.MediaInfo(e.src,e.type),a=this._requestTitle(e),n=this._requestSubtitle(e),o=this.poster(),l=this._requestCustomData(e);this.trigger("waiting"),this._clearSessionTimeout(),r.metadata=new chrome.cast.media.GenericMediaMetadata,r.metadata.metadataType=chrome.cast.media.MetadataType.GENERIC,r.metadata.title=a,r.metadata.subtitle=n,r.streamType=this.videojsPlayer.liveTracker&&this.videojsPlayer.liveTracker.isLive()?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,o&&(r.metadata.images=[{url:o}]),l&&(r.customData=l),this._ui.updateTitle(a),this._ui.updateSubtitle(n),(s=new chrome.cast.media.LoadRequest(r)).autoplay=!0,s.currentTime=t,s=this._modifyLoadRequestFn(s),this._isMediaLoading=!0,this._hasPlayedCurrentItem=!1,i.loadMedia(s).then(function(){var e;this._clearSessionTimeout(),this._hasPlayedAnyItem||this.triggerReady(),this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("play"),this.trigger("playing"),this._hasPlayedAnyItem=!0,this._isMediaLoading=!1,(e=this._getMediaSession())&&e.addUpdateListener(this._onMediaSessionStatusChanged.bind(this))}.bind(this),this._triggerErrorEvent.bind(this))}},{key:"_adoptCurrentMediaSession",value:function(){var e=this._getMediaSession();e?(this._currentSource=this.videojsPlayer.currentSource(),this._isMediaLoading=!1,this._hasPlayedAnyItem=!0,this._hasPlayedCurrentItem=!0,this._initialStartTime=e.getEstimatedTime(),this._hasAdoptedMediaSession=!0,this._adoptedPlayerState=e.playerState,this._adoptedDuration=e.media&&e.media.duration,this._ui.updateTitle(this._requestTitle(this._currentSource)),this._ui.updateSubtitle(this._requestSubtitle(this._currentSource)),this.triggerReady(),this.setTimeout(function(){this.trigger("loadstart"),this.trigger("loadeddata"),this.trigger("canplay"),this.trigger("canplaythrough"),e.playerState!==chrome.cast.media.PlayerState.PAUSED?(this.trigger("play"),this.trigger("playing")):this.trigger("pause"),this._triggerTimeUpdateEvent(),this._triggerDurationChangeEvent()}.bind(this),1),e.addUpdateListener(this._onMediaSessionStatusChanged.bind(this))):this._playSource(this._currentSource||this.videojsPlayer.currentSource(),this._initialStartTime)}},{key:"setCurrentTime",value:function(e){var t=this.duration();e>t||!this._remotePlayer.canSeek||(this._remotePlayer.currentTime=Math.min(t-1,e),this._remotePlayerController.seek(),this._triggerTimeUpdateEvent())}},{key:"currentTime",value:function(){return!this._hasPlayedAnyItem||this._isAwaitingRemotePlayerSync()?this._initialStartTime:this._remotePlayer.currentTime}},{key:"_isAwaitingRemotePlayerSync",value:function(){var e=chrome.cast.media.PlayerState;return!!this._hasAdoptedMediaSession&&(this._remotePlayer.playerState!==e.PLAYING&&this._remotePlayer.playerState!==e.PAUSED||(this._hasAdoptedMediaSession=!1,!1))}},{key:"duration",value:function(){return this._hasPlayedAnyItem?this._isAwaitingRemotePlayerSync()&&this._adoptedDuration?this._adoptedDuration:this._remotePlayer.duration:this.videojsPlayer.duration()}},{key:"ended",value:function(){var e=this._getMediaSession();return!(e||!this._hasMediaSessionEnded)||!!e&&e.idleReason===chrome.cast.media.IdleReason.FINISHED}},{key:"volume",value:function(){return this._remotePlayer.volumeLevel}},{key:"setVolume",value:function(e){this._remotePlayer.volumeLevel=e,this._remotePlayerController.setVolumeLevel(),this._triggerVolumeChangeEvent()}},{key:"muted",value:function(){return this._remotePlayer.isMuted}},{key:"setMuted",value:function(e){(this._remotePlayer.isMuted&&!e||!this._remotePlayer.isMuted&&e)&&this._remotePlayerController.muteOrUnmute()}},{key:"poster",value:function(){return this._ui.getPoster()}},{key:"setPoster",value:function(e){this._ui.updatePoster(e)}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return this.videojs.createTimeRange(0,this.duration())}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"playbackRate",value:function(){var e=this._getMediaSession();return e?e.playbackRate:1}},{key:"setPlaybackRate",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"readyState",value:function(){return this._isAwaitingRemotePlayerSync()?4:"IDLE"===this._remotePlayer.playerState||"BUFFERING"===this._remotePlayer.playerState?0:4}},{key:"_listenToPlayerControllerEvents",value:function(){var e=cast.framework.RemotePlayerEventType;this._addEventListener(this._remotePlayerController,e.PLAYER_STATE_CHANGED,this._onPlayerStateChanged,this),this._addEventListener(this._remotePlayerController,e.VOLUME_LEVEL_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.IS_MUTED_CHANGED,this._triggerVolumeChangeEvent,this),this._addEventListener(this._remotePlayerController,e.CURRENT_TIME_CHANGED,this._triggerTimeUpdateEvent,this),this._addEventListener(this._remotePlayerController,e.DURATION_CHANGED,this._triggerDurationChangeEvent,this)}},{key:"_addEventListener",value:function(e,t,s,i){var r;r={target:e,type:t,callback:s,context:i,listener:s.bind(i)},e.addEventListener(t,r.listener),this._eventListeners.push(r)}},{key:"_removeAllEventListeners",value:function(){for(;this._eventListeners.length>0;)this._removeEventListener(this._eventListeners[0]);this._eventListeners=[]}},{key:"_removeEventListener",value:function(e){var t,s=-1;for(e.target.removeEventListener(e.type,e.listener),t=0;t<this._eventListeners.length;t++)if(this._eventListeners[t].target===e.target&&this._eventListeners[t].type===e.type&&this._eventListeners[t].callback===e.callback&&this._eventListeners[t].context===e.context){s=t;break}-1!==s&&this._eventListeners.splice(s,1)}},{key:"_onPlayerStateChanged",value:function(){var e=chrome.cast.media.PlayerState,t=this._remotePlayer.playerState;t===e.PLAYING?(this._hasPlayedCurrentItem=!0,this.trigger("play"),this.trigger("playing")):t===e.PAUSED?this.trigger("pause"):t===e.IDLE&&this.ended()||null===t&&this._hasPlayedCurrentItem?(this._hasPlayedCurrentItem=!1,this._closeSessionOnTimeout(),this.trigger("ended"),this._triggerTimeUpdateEvent()):t===e.BUFFERING&&this.trigger("waiting")}},{key:"_onMediaSessionStatusChanged",value:function(e){this._hasMediaSessionEnded=!!e}},{key:"_closeSessionOnTimeout",value:function(){this._clearSessionTimeout(),this._sessionTimeoutID=setTimeout(function(){var e=this._getCastSession();e&&e.endSession(!0),this._clearSessionTimeout()}.bind(this),1e4)}},{key:"_clearSessionTimeout",value:function(){this._sessionTimeoutID&&(clearTimeout(this._sessionTimeoutID),this._sessionTimeoutID=!1)}},{key:"_getCastContext",value:function(){return this._chromecastSessionManager.getCastContext()}},{key:"_getCastSession",value:function(){return this._getCastContext().getCurrentSession()}},{key:"_getMediaSession",value:function(){var e=this._getCastSession();return e?e.getMediaSession():null}},{key:"_triggerVolumeChangeEvent",value:function(){this.trigger("volumechange")}},{key:"_triggerTimeUpdateEvent",value:function(){this.trigger("timeupdate")}},{key:"_triggerDurationChangeEvent",value:function(){this.trigger("durationchange")}},{key:"_triggerErrorEvent",value:function(){this.trigger("error")}}]),h}(o);l.canPlaySource=function(){return y.isChromecastConnected()},l.isSupported=function(){return y.isChromecastConnected()},e.registerTech("chromecast",l)};var C=m;function p(e){e.chromecastSessionManager.openCastMenu()}function f(e,t){!function(e){cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:e.receiverAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}(t),function(e){e.chromecastSessionManager||(e.chromecastSessionManager=new C(e))}(e),function(e,t){var s;t.addButtonToControlBar&&!e.controlBar.getChild("chromecastButton")&&(s=e.controlBar.children().length,void 0!==t.buttonPositionIndex&&(s=t.buttonPositionIndex>=0?t.buttonPositionIndex:e.controlBar.children().length+t.buttonPositionIndex),e.controlBar.addChild("chromecastButton",t,s)),e.on("chromecastRequested",p.bind(null,e))}(e,t)}var S=function(){c("CriOS"),c("Android")&&c("Chrome/")&&window.navigator.presentation},E=h,P=e(Object.freeze({__proto__:null})),b=function(e){e.registerPlugin("chromecast",(function(e){var t=Object.assign({addButtonToControlBar:!0},e||{});this.ready(function(){this.controlBar&&(C.isChromecastAPIAvailable()?f(this,t):function(e,t){var s,i=1;s=setInterval((function(){i>30?clearInterval(s):(C.isChromecastAPIAvailable()&&(clearInterval(s),f(e,t)),i+=1)}),1e3)}(this,t))}.bind(this))}))},k=function(e,t){Object.assign({preloadWebComponents:!1},t).preloadWebComponents&&S(),e=e||window.videojs,E(e),P(e),b(e)},T=l({__proto__:null,default:k},[k]);export{T as i};
|
package/esm/index-c4656b30.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t}from"./_commonjsHelpers-0307ea52.js";import e from"@babel/runtime/helpers/classCallCheck";import r from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/get";import a from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";function l(t,e){return e.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(r){if("default"!==r&&!(r in t)){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}))})),Object.freeze(t)}var u=function(){return!!window.WebKitPlaybackTargetAvailabilityEvent};function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}var s=u;module.exports=function(t){var l=function(t){a(d,t);var l,u,b=(l=d,u=c(),function(){var t,e=o(l);if(u){var r=o(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return i(this,t)});function d(t,r){var n;return e(this,d),n=b.call(this,t,r),s()||n.hide(),n._reactToAirPlayAvailableEvents(),r.addAirPlayLabelToButton?(n.el().classList.add("vjs-airplay-button-lg"),n._labelEl=document.createElement("span"),n._labelEl.classList.add("vjs-airplay-button-label"),n._labelEl.textContent=n.localize("AirPlay"),n.el().appendChild(n._labelEl)):n.controlText("Start AirPlay"),n}return r(d,[{key:"buildCSSClass",value:function(){return"vjs-airplay-button "+function(t,e,r,a){var i=n(o(1&a?t.prototype:t),e,r);return 2&a&&"function"==typeof i?function(t){return i.apply(r,t)}:i}(d,"buildCSSClass",this,3)([])}},{key:"handleClick",value:function(){this.player().trigger("airPlayRequested")}},{key:"_getMediaEl",value:function(){return this.player().el().querySelector("video, audio")}},{key:"_reactToAirPlayAvailableEvents",value:function(){var t=this._getMediaEl(),e=this;function r(t){"available"===t.availability?e.show():e.hide()}t&&s()&&(t.addEventListener("webkitplaybacktargetavailabilitychanged",r),this.on("dispose",(function(){t.removeEventListener("webkitplaybacktargetavailabilitychanged",r)})))}}]),d}(t.getComponent("Button"));t.registerComponent("airPlayButton",l)};var b=u;function d(t){var e=t.el().querySelector("video, audio");e&&e.webkitShowPlaybackTargetPicker&&e.webkitShowPlaybackTargetPicker()}function f(t,e){t.controlBar&&b()&&(function(t){t.on("airPlayRequested",d.bind(null,t))}(t),function(t,e){var r,n=function(t){return t.controlBar.getChild("airPlayButton")}(t);e.addButtonToControlBar&&!n&&(r=t.controlBar.children().length,void 0!==e.buttonPositionIndex&&(r=e.buttonPositionIndex>=0?e.buttonPositionIndex:t.controlBar.children().length+e.buttonPositionIndex),t.controlBar.addChild("airPlayButton",e,r))}(t,e))}var p=t(Object.freeze({__proto__:null})),y=function(t){t.registerPlugin("airPlay",(function(t){var e=Object.assign({addButtonToControlBar:!0},t||{});this.ready(f.bind(this,this,e))}))},v=function(t){t=t||window.videojs,p(t),y(t)},h=l({__proto__:null,default:v},[v]);export{h as i};
|