@viewlift/player-backup 2.0.151-backup → 2.0.152-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.
Files changed (37) hide show
  1. package/cjs/{autoNextVideo-3082f223.js → autoNextVideo-c77ff5db.js} +1 -1
  2. package/cjs/bundle.css +36 -36
  3. package/cjs/{features-dd80199e.js → features-85633418.js} +1 -1
  4. package/cjs/{index-b5f578d6.js → index-4be4e08d.js} +1 -1
  5. package/cjs/{index-82705b41.js → index-86235530.js} +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/{playlist-75a6e6c1.js → playlist-fde40434.js} +1 -1
  8. package/cjs/{series-v2-c1160681.js → series-v2-ad3c675e.js} +1 -1
  9. package/cjs/{series-v2-4559f6e8.js → series-v2-c23122fb.js} +1 -1
  10. package/cjs/{skin-3c1c8945.js → skin-3d24dba4.js} +1 -1
  11. package/cjs/{skin-32b6b0b3.js → skin-54812f5e.js} +1 -1
  12. package/cjs/{skin-195dd829.js → skin-a867a331.js} +1 -1
  13. package/cjs/{skin-3d629626.js → skin-c66f708d.js} +1 -1
  14. package/cjs/{skin-a336b2b2.js → skin-fc1441ae.js} +1 -1
  15. package/cjs/util-13a95346.js +1 -0
  16. package/cjs/{videoSelector-9b34b21c.js → videoSelector-35fa423f.js} +1 -1
  17. package/cjs/{videoSelector-c2810dfa.js → videoSelector-84e18890.js} +1 -1
  18. package/esm/{autoNextVideo-8ee70a87.js → autoNextVideo-97842e84.js} +1 -1
  19. package/esm/bundle.css +36 -36
  20. package/esm/{features-23e01679.js → features-d24c4813.js} +1 -1
  21. package/esm/{index-511b3435.js → index-22eb54fd.js} +1 -1
  22. package/esm/{index-99e2e5e2.js → index-66fa5eb0.js} +1 -1
  23. package/esm/index.js +1 -1
  24. package/esm/{playlist-b3e5e17a.js → playlist-b37fdbad.js} +1 -1
  25. package/esm/{series-v2-16a5cc56.js → series-v2-1bfe998a.js} +1 -1
  26. package/esm/{series-v2-c15365ac.js → series-v2-98d233c7.js} +1 -1
  27. package/esm/{skin-d85ca339.js → skin-073a035c.js} +1 -1
  28. package/esm/{skin-2a689529.js → skin-3c26aca1.js} +1 -1
  29. package/esm/{skin-8a8d4699.js → skin-4d0355f2.js} +1 -1
  30. package/esm/{skin-e1a02993.js → skin-5b67e925.js} +1 -1
  31. package/esm/{skin-f58b5954.js → skin-77258406.js} +1 -1
  32. package/esm/util-dd92c84e.js +1 -0
  33. package/esm/{videoSelector-d59bcf99.js → videoSelector-42ef22c0.js} +1 -1
  34. package/esm/{videoSelector-2e1cc027.js → videoSelector-dc99d591.js} +1 -1
  35. package/package.json +1 -1
  36. package/cjs/util-05fa34cf.js +0 -1
  37. package/esm/util-6c336c54.js +0 -1
@@ -1 +1 @@
1
- import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-23e01679.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-d5091b86.js";import{g as d}from"./resolution-1c59b0f3.js";import{a as v,i as c,b as p}from"./index-99e2e5e2.js";import{O as h,d as m}from"./generic-cfba14b3.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"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-8ee70a87.js";import"./util-6c336c54.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&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-9fece9a0.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(e,i){var n=C(e);n&&n.on("loadeddata",(function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)}))}(f,b),function(l,e){var i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j,g=C(l);null===(i=g.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=g.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var E=null===(t=g.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),w=document.createElement("div");w.className="custom-spaced-progress-bar",E&&w.append(E.el());null===(o=g.controlBar)||void 0===o||null===(s=o.el())||void 0===s||s.append(w);var V='<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\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>';g.el().insertBefore(a(V),null!==(r=g.el().firstChild)&&void 0!==r?r:null);var x=(null==g||null===(d=g.controlBar)||void 0===d||null===(v=d.getChild("PlayToggle"))||void 0===v||null===(c=v.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var M=u(x,g.paused()?"#vjs-icon-play":"#vjs-icon-pause");g.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),g.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==g||null===(p=g.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(k){k.style.height="24px",k.style.width="24px";var Z=u(k,"#vjs-icon-fullscreen");g.on("fullscreenchange",(function(){var l=g.isFullscreen_;null==Z||Z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var S=(null==g||null===(f=g.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(S){var N=S.querySelector(".vjs-mute-control .vjs-icon-placeholder");N.classList.add("vjs-svg-icon"),N.style.height="24px",N.style.width="24px";var A=u(N,g.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");g.on("volumechange",(function(l){var e=g.volume();console.log(e,g.muted()),0==e||g.muted()?A.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?A.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?A.setAttributeNS(null,"href","#vjs-icon-volume2"):A.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var _=(null==g||null===(B=g.controlBar)||void 0===B||null===(y=B.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(_){var H=null==_?void 0:_.querySelector(".vjs-icon-placeholder");H.style.height="16px",H.style.width="25px";var P=u(H,"#vjs-icon-pip");g.on("enterpictureinpicture",(function(){P.setAttributeNS(null,"href","#vjs-icon-pip")}))}var T=(null==g||null===(L=g.controlBar)||void 0===L||null===(j=L.getChild("SubsCapsButton"))||void 0===j?void 0:j.el())||null;if(T){var I=T.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");I.classList.add("vjs-svg-icon"),I.style.height="16px",I.style.width="29px";var O=u(I,"#vjs-icon-caps");O.setAttributeNS(null,"href","#vjs-icon-captions-off"),g.textTracks().on("change",(function(l){for(var e=g.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?O.setAttributeNS(null,"href","#vjs-icon-captions"):O.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
1
+ import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-d24c4813.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-d5091b86.js";import{g as d}from"./resolution-1c59b0f3.js";import{a as v,i as c,b as p}from"./index-66fa5eb0.js";import{O as h,d as m}from"./generic-cfba14b3.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"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-97842e84.js";import"./util-dd92c84e.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&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-9fece9a0.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(e,i){var n=C(e);n&&n.on("loadeddata",(function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)}))}(f,b),function(l,e){var i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j,g=C(l);null===(i=g.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=g.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var E=null===(t=g.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),w=document.createElement("div");w.className="custom-spaced-progress-bar",E&&w.append(E.el());null===(o=g.controlBar)||void 0===o||null===(s=o.el())||void 0===s||s.append(w);var V='<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\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>';g.el().insertBefore(a(V),null!==(r=g.el().firstChild)&&void 0!==r?r:null);var x=(null==g||null===(d=g.controlBar)||void 0===d||null===(v=d.getChild("PlayToggle"))||void 0===v||null===(c=v.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var M=u(x,g.paused()?"#vjs-icon-play":"#vjs-icon-pause");g.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),g.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==g||null===(p=g.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(k){k.style.height="24px",k.style.width="24px";var Z=u(k,"#vjs-icon-fullscreen");g.on("fullscreenchange",(function(){var l=g.isFullscreen_;null==Z||Z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var S=(null==g||null===(f=g.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(S){var N=S.querySelector(".vjs-mute-control .vjs-icon-placeholder");N.classList.add("vjs-svg-icon"),N.style.height="24px",N.style.width="24px";var A=u(N,g.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");g.on("volumechange",(function(l){var e=g.volume();console.log(e,g.muted()),0==e||g.muted()?A.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?A.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?A.setAttributeNS(null,"href","#vjs-icon-volume2"):A.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var _=(null==g||null===(B=g.controlBar)||void 0===B||null===(y=B.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(_){var H=null==_?void 0:_.querySelector(".vjs-icon-placeholder");H.style.height="16px",H.style.width="25px";var P=u(H,"#vjs-icon-pip");g.on("enterpictureinpicture",(function(){P.setAttributeNS(null,"href","#vjs-icon-pip")}))}var T=(null==g||null===(L=g.controlBar)||void 0===L||null===(j=L.getChild("SubsCapsButton"))||void 0===j?void 0:j.el())||null;if(T){var I=T.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");I.classList.add("vjs-svg-icon"),I.style.height="16px",I.style.width="29px";var O=u(I,"#vjs-icon-caps");O.setAttributeNS(null,"href","#vjs-icon-captions-off"),g.textTracks().on("change",(function(l){for(var e=g.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?O.setAttributeNS(null,"href","#vjs-icon-captions"):O.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
@@ -1 +1 @@
1
- import{h as e,d as n,e as o,o as t,p as l,q as r,r as i,s as a}from"./features-23e01679.js";import{g as s}from"./player_instance-34118a5b.js";import{a as d,i as u,b as c}from"./index-99e2e5e2.js";import{O as v,Q as p,R as m,S as f,c as y,N as h,T as b}from"./generic-cfba14b3.js";import"videojs-contrib-quality-menu";import{i as g,r as w}from"./index-511b3435.js";import{c as k}from"./helper-349e076f.js";import{c as S,a as j,b as E}from"./currentVideoInfo-a8a254c2.js";import I from"video.js";import C from"@babel/runtime/helpers/toConsumableArray";import T from"@babel/runtime/helpers/asyncToGenerator";import A from"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"js-cookie";import{t as B}from"./skin-d5091b86.js";import"axios";import{c as x,d as L}from"./icons-37daa6b3.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"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"./autoNextVideo-8ee70a87.js";import"./util-6c336c54.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-f507e8ee.js";import"video.js/dist/video-js.min.css";function M(n,o){var t=s(n);t&&(t.on("loadeddata",(function(){var e,l,r,i,a,c=k(o),p=S();t.qualityLevels()&&t.qualityLevels().length&&function(e){var n=s(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(l=window)&&void 0!==l&&null!==(r=l.app_data)&&void 0!==r&&null!==(i=r.appcmsMain)&&void 0!==i&&null!==(a=i.features)&&void 0!==a&&a.auto_play)||null!=o&&o.liveVideo||d(n,o),null!=o&&o.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||u(n),c&&p&&p.length?g(n):w()})),t.one("play",(function(){var o,t,l,r;null!==(o=window)&&void 0!==o&&null!==(t=o.customData)&&void 0!==t&&t.iframeOverlayUrl&&e(n,null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r?void 0:r.iframeOverlayUrl)})))}function _(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return N(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?N(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var t=0,l=function(){};return{s:l,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){a=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(a)throw r}}}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=Array(n);o<n;o++)t[o]=e[o];return t}function O(){return O=T(A.mark((function e(n){var o,t,l,r,i,a,d,u,c,v,y,h,b,g,w,k,S,j,E,I,x,L,M,N,O,D,P,V;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:V=function(e,o,t,l,r){var i=s(n);if(!i.seeking()){o.startTimeInSeconds,o.durationInSeconds,Math.floor(i.currentTime());var a,d=_(t);try{for(d.s();!(a=d.n()).done;){var u,c,v,p=a.value,m=p.eventType,y=p.beaconUrls,h=p.startTimeInSeconds,b=p.startTime,g=p.durationInSeconds,w=h||0,k=y,S=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,j="".concat(w,"_").concat(m),E=O.get("pod-".concat(r))||[];if(console.warn(e,w,"map:",m,"condition1:",e>=w,"map:",O),e>=w&&e<=w+D&&!E.includes(j)){E.push(j),O.set("pod-".concat(r),E);try{P(m,o,k,i)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,o)}if("function"==typeof S)try{var I,C={eventType:m,startTimeInSeconds:h,startTime:b,durationInSeconds:g,ad:null==o||null===(I=o.ads)||void 0===I?void 0:I[l],adIndex:l};S({adsData:C}),f(n,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},P=function(e,n,o,t){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),null==o||o.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},N=function(e){var n=Math.floor(e/60),o=Math.floor(e%60);return"".concat(n,":").concat(o.toString().padStart(2,"0"))},h=function(){y&&clearInterval(y)},c=m.get(),v=s(n),y=null,v.one("loadeddata",(function(){y=setInterval((function(){c&&!v.paused()&&M(c)}),4e3)})),v.on("sourceset",(function(e){console.log(e,"sourceset")})),v.on("dispose",(function(){h()})),b=new Map,g=new Map,w=-1,k=null,S=(null===(o=document)||void 0===o||null===(t=o.getElementsByClassName("tvProviderImage"))||void 0===t?void 0:t[0])||null,j=(null==v||null===(l=v.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,E=(null==v||null===(r=v.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,I=(null==v||null===(i=v.el())||void 0===i||null===(a=i.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===a?void 0:a[0])||null,x=(null==v||null===(d=v.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===u?void 0:u[0])||null,L=!1,M=function(){var e=T(A.mark((function e(o){var t,l,r,i,a,d,u,c,v,m,f,y,h,T,M,_,O,D;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new URL(o),k&&i.searchParams.append("nextToken",k),e.next=4,fetch(i.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:if(d=e.sent,u=d.avails,c=d.nextToken||null,k=c,v=[],m=s(n),f=m.controlBar.progressControl,y=f.seekBar.el(),null===(t=document)||void 0===t||t.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),u.map((function(e,n){var o,t;v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(t=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===t?void 0:t[0])||[]})})),null!=v&&v.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),window.adsQueueList=v),console.log(v,"data"),v.forEach((function(e){var n=e.markerPositionInSeconds,o=e.ads,t=m.duration();if(!(n>t||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(l,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(l,"%"),r.style.pointerEvents="none",y.appendChild(r)}})),L||(T=null===(h=document.getElementsByClassName("ssai-ad-container"))||void 0===h?void 0:h[0])&&(T.style.display="none"),!L||!m._timeUpdateHandler){e.next=23;break}return e.abrupt("return");case 23:m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=B((function(){var e=m.currentTime();if(e!==w){w=e;for(var n=function(){var n=v[o],t=n.startTimeInSeconds,l=n.durationInSeconds,r=n.ads,i=t+l;if(e>=t-1.2&&e<=i+1.2){L=!!(e>=t&&e<=i&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>i&&b.set(t,!0),p.disable(),S&&S.classList.add("vjs-hidden"),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),x&&(x.style.pointerEvents="none",x.classList.add("vjs-hidden")),j&&(j.el().style.pointerEvents="none",j.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var a=e-t,s=0,d=0,u=0;u<r.length;u++){var c,m=null==r||null===(c=r[u])||void 0===c?void 0:c.durationInSeconds;if(a<s+m){d=u;break}s+=m}r[d];var y=Math.max(0,l-a),h=Math.round(y);M.style.display="block",D.textContent="".concat(d+1," of ").concat(r.length," • ").concat(N(h));var w=[];return null==r||r.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));w.push.apply(w,C(n))})),Array.isArray(r)&&0==(null==r?void 0:r.length)&&w.push(null==n?void 0:n.podSlotImpressionBeacon),V(e,n,w,d,o),"break"}g.delete(t)},o=0;o<v.length;o++){if("break"===n())break}L||(M.style.display="none",f.el().classList.remove("hide-progress-bar"),j&&(j.el().style.pointerEvents="auto",j.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),S&&S.classList.remove("vjs-hidden"),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),x&&(x.style.pointerEvents="auto",x.classList.remove("vjs-hidden")),p.enable())}}),1e3),m.on("timeupdate",m._timeUpdateHandler),null===(l=document)||void 0===l||null===(r=l.querySelectorAll(".ssai-ad-container"))||void 0===r||r.forEach((function(e){return null==e?void 0:e.remove()})),(M=document.createElement("div")).className="ssai-ad-container",(_=document.createElement("div")).className="sponsored-adbox",(O=document.createElement("div")).className="sponsored-text",O.textContent="Sponsored Ad",_.append(O),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(_),M.append(D),m.el().appendChild(M);case 42:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=new Map,D=2.5;case 23:case"end":return e.stop()}}),e)}))),O.apply(this,arguments)}function D(e,d){s(e).addClass("skin_vlone"),M(e,d),function(e,s){var d,u,v,p,m,f,g,w,S,I,C,T,A,B,M,_=(null==s?void 0:s.liveVideo)||!1,N=(null==s||null===(d=s.res)||void 0===d||null===(u=d.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,D=y(null==s?void 0:s.res,e)||{};D.src;var P=(null==s?void 0:s.skin_settings)||{};k(s),null!=P&&P.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&n(e,"VL_ONE",x());(null!=P&&P.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&o(e,"VL_ONE",L());(null==s||null===(v=s.relatedVideos)||void 0===v||null===(p=v.content)||void 0===p?void 0:p.length)>0&&t(e,null==s?void 0:s.relatedVideos);null!=s&&null!==(m=s.series)&&void 0!==m&&m.enable&&l(e,s);(null==s||null===(f=s.streams)||void 0===f?void 0:f.length)>1&&r(e,null==s?void 0:s.streams);if(c(e,s),h(e,s),"MEDIA_TAILOR"==(null===(g=window)||void 0===g||null===(w=g.app_data)||void 0===w||null===(S=w.appcmsMain)||void 0===S||null===(I=S.adsConfig)||void 0===I?void 0:I.vodAdSticherProvider)&&null!==(C=window)&&void 0!==C&&null!==(T=C.app_data)&&void 0!==T&&null!==(A=T.appcmsMain)&&void 0!==A&&null!==(B=A.adsConfig)&&void 0!==B&&B.vodAdClientSideTracking&&N)if(_)!function(e){O.apply(this,arguments)}(e);else{var V,U=null;if(null!=s&&null!==(V=s.series)&&void 0!==V&&V.enable){var q,H,R,Q,F,G=null===(q=j())||void 0===q||null===(H=q.video)||void 0===H||null===(R=H.gist)||void 0===R?void 0:R.id,$=E(),z=(null==$?void 0:$.get(G))||{t:0,p:0},J=z.t,K=z.p;"function"==typeof(null===(Q=window)||void 0===Q||null===(F=Q.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:J}),K<95&&(U=J)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(U=W)}b(e,U)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(M=s.dvrConfig)&&void 0!==M&&M.enable&&(i(e,s),a(e,s))}(e,d),P(e,d)}var P=function(e,n){var o,t,l,r,i,a,d,u,c,v,p,m,f=s(e),y=(null==n?void 0:n.theme)||{},h=I.dom.$(".vjs-play-progress"),b=I.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(o=window)||void 0===o||null===(t=o.app_data)||void 0===t||null===(l=t.appcmsMain)||void 0===l||null===(r=l.brand)||void 0===r||null===(i=r.cta)||void 0===i||null===(a=i.primary)||void 0===a?void 0:a.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.brand)||void 0===v||null===(p=v.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var g=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&h&&(h.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&g&&(g.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&b&&(b.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{D as initialiseSkin};
1
+ import{h as e,d as n,e as o,o as t,p as l,q as r,r as i,s as a}from"./features-d24c4813.js";import{g as s}from"./player_instance-34118a5b.js";import{a as d,i as u,b as c}from"./index-66fa5eb0.js";import{O as v,Q as p,R as m,S as f,c as y,N as h,T as b}from"./generic-cfba14b3.js";import"videojs-contrib-quality-menu";import{i as g,r as w}from"./index-22eb54fd.js";import{c as k}from"./helper-349e076f.js";import{c as S,a as j,b as E}from"./currentVideoInfo-a8a254c2.js";import I from"video.js";import C from"@babel/runtime/helpers/toConsumableArray";import T from"@babel/runtime/helpers/asyncToGenerator";import A from"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"js-cookie";import{t as B}from"./skin-d5091b86.js";import"axios";import{c as x,d as L}from"./icons-37daa6b3.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"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"./autoNextVideo-97842e84.js";import"./util-dd92c84e.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-f507e8ee.js";import"video.js/dist/video-js.min.css";function M(n,o){var t=s(n);t&&(t.on("loadeddata",(function(){var e,l,r,i,a,c=k(o),p=S();t.qualityLevels()&&t.qualityLevels().length&&function(e){var n=s(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(l=window)&&void 0!==l&&null!==(r=l.app_data)&&void 0!==r&&null!==(i=r.appcmsMain)&&void 0!==i&&null!==(a=i.features)&&void 0!==a&&a.auto_play)||null!=o&&o.liveVideo||d(n,o),null!=o&&o.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||u(n),c&&p&&p.length?g(n):w()})),t.one("play",(function(){var o,t,l,r;null!==(o=window)&&void 0!==o&&null!==(t=o.customData)&&void 0!==t&&t.iframeOverlayUrl&&e(n,null===(l=window)||void 0===l||null===(r=l.customData)||void 0===r?void 0:r.iframeOverlayUrl)})))}function _(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return N(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?N(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var t=0,l=function(){};return{s:l,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){a=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(a)throw r}}}}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,t=Array(n);o<n;o++)t[o]=e[o];return t}function O(){return O=T(A.mark((function e(n){var o,t,l,r,i,a,d,u,c,v,y,h,b,g,w,k,S,j,E,I,x,L,M,N,O,D,P,V;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:V=function(e,o,t,l,r){var i=s(n);if(!i.seeking()){o.startTimeInSeconds,o.durationInSeconds,Math.floor(i.currentTime());var a,d=_(t);try{for(d.s();!(a=d.n()).done;){var u,c,v,p=a.value,m=p.eventType,y=p.beaconUrls,h=p.startTimeInSeconds,b=p.startTime,g=p.durationInSeconds,w=h||0,k=y,S=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,j="".concat(w,"_").concat(m),E=O.get("pod-".concat(r))||[];if(console.warn(e,w,"map:",m,"condition1:",e>=w,"map:",O),e>=w&&e<=w+D&&!E.includes(j)){E.push(j),O.set("pod-".concat(r),E);try{P(m,o,k,i)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,o)}if("function"==typeof S)try{var I,C={eventType:m,startTimeInSeconds:h,startTime:b,durationInSeconds:g,ad:null==o||null===(I=o.ads)||void 0===I?void 0:I[l],adIndex:l};S({adsData:C}),f(n,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},P=function(e,n,o,t){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(t.currentTime())),"AD_POD:",n),null==o||o.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},N=function(e){var n=Math.floor(e/60),o=Math.floor(e%60);return"".concat(n,":").concat(o.toString().padStart(2,"0"))},h=function(){y&&clearInterval(y)},c=m.get(),v=s(n),y=null,v.one("loadeddata",(function(){y=setInterval((function(){c&&!v.paused()&&M(c)}),4e3)})),v.on("sourceset",(function(e){console.log(e,"sourceset")})),v.on("dispose",(function(){h()})),b=new Map,g=new Map,w=-1,k=null,S=(null===(o=document)||void 0===o||null===(t=o.getElementsByClassName("tvProviderImage"))||void 0===t?void 0:t[0])||null,j=(null==v||null===(l=v.controlBar)||void 0===l?void 0:l.getChild("videoSelector"))||null,E=(null==v||null===(r=v.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,I=(null==v||null===(i=v.el())||void 0===i||null===(a=i.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===a?void 0:a[0])||null,x=(null==v||null===(d=v.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===u?void 0:u[0])||null,L=!1,M=function(){var e=T(A.mark((function e(o){var t,l,r,i,a,d,u,c,v,m,f,y,h,T,M,_,O,D;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new URL(o),k&&i.searchParams.append("nextToken",k),e.next=4,fetch(i.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:if(d=e.sent,u=d.avails,c=d.nextToken||null,k=c,v=[],m=s(n),f=m.controlBar.progressControl,y=f.seekBar.el(),null===(t=document)||void 0===t||t.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),u.map((function(e,n){var o,t;v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(t=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===t?void 0:t[0])||[]})})),null!=v&&v.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),window.adsQueueList=v),console.log(v,"data"),v.forEach((function(e){var n=e.markerPositionInSeconds,o=e.ads,t=m.duration();if(!(n>t||Array.isArray(o)&&0==(null==o?void 0:o.length))){var l=n/t*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(l,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(l,"%"),r.style.pointerEvents="none",y.appendChild(r)}})),L||(T=null===(h=document.getElementsByClassName("ssai-ad-container"))||void 0===h?void 0:h[0])&&(T.style.display="none"),!L||!m._timeUpdateHandler){e.next=23;break}return e.abrupt("return");case 23:m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=B((function(){var e=m.currentTime();if(e!==w){w=e;for(var n=function(){var n=v[o],t=n.startTimeInSeconds,l=n.durationInSeconds,r=n.ads,i=t+l;if(e>=t-1.2&&e<=i+1.2){L=!!(e>=t&&e<=i&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>i&&b.set(t,!0),p.disable(),S&&S.classList.add("vjs-hidden"),I&&(I.style.pointerEvents="none",I.classList.add("vjs-hidden")),x&&(x.style.pointerEvents="none",x.classList.add("vjs-hidden")),j&&(j.el().style.pointerEvents="none",j.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var a=e-t,s=0,d=0,u=0;u<r.length;u++){var c,m=null==r||null===(c=r[u])||void 0===c?void 0:c.durationInSeconds;if(a<s+m){d=u;break}s+=m}r[d];var y=Math.max(0,l-a),h=Math.round(y);M.style.display="block",D.textContent="".concat(d+1," of ").concat(r.length," • ").concat(N(h));var w=[];return null==r||r.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));w.push.apply(w,C(n))})),Array.isArray(r)&&0==(null==r?void 0:r.length)&&w.push(null==n?void 0:n.podSlotImpressionBeacon),V(e,n,w,d,o),"break"}g.delete(t)},o=0;o<v.length;o++){if("break"===n())break}L||(M.style.display="none",f.el().classList.remove("hide-progress-bar"),j&&(j.el().style.pointerEvents="auto",j.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),S&&S.classList.remove("vjs-hidden"),I&&(I.style.pointerEvents="auto",I.classList.remove("vjs-hidden")),x&&(x.style.pointerEvents="auto",x.classList.remove("vjs-hidden")),p.enable())}}),1e3),m.on("timeupdate",m._timeUpdateHandler),null===(l=document)||void 0===l||null===(r=l.querySelectorAll(".ssai-ad-container"))||void 0===r||r.forEach((function(e){return null==e?void 0:e.remove()})),(M=document.createElement("div")).className="ssai-ad-container",(_=document.createElement("div")).className="sponsored-adbox",(O=document.createElement("div")).className="sponsored-text",O.textContent="Sponsored Ad",_.append(O),(D=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(_),M.append(D),m.el().appendChild(M);case 42:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=new Map,D=2.5;case 23:case"end":return e.stop()}}),e)}))),O.apply(this,arguments)}function D(e,d){s(e).addClass("skin_vlone"),M(e,d),function(e,s){var d,u,v,p,m,f,g,w,S,I,C,T,A,B,M,_=(null==s?void 0:s.liveVideo)||!1,N=(null==s||null===(d=s.res)||void 0===d||null===(u=d.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,D=y(null==s?void 0:s.res,e)||{};D.src;var P=(null==s?void 0:s.skin_settings)||{};k(s),null!=P&&P.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&n(e,"VL_ONE",x());(null!=P&&P.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&o(e,"VL_ONE",L());(null==s||null===(v=s.relatedVideos)||void 0===v||null===(p=v.content)||void 0===p?void 0:p.length)>0&&t(e,null==s?void 0:s.relatedVideos);null!=s&&null!==(m=s.series)&&void 0!==m&&m.enable&&l(e,s);(null==s||null===(f=s.streams)||void 0===f?void 0:f.length)>1&&r(e,null==s?void 0:s.streams);if(c(e,s),h(e,s),"MEDIA_TAILOR"==(null===(g=window)||void 0===g||null===(w=g.app_data)||void 0===w||null===(S=w.appcmsMain)||void 0===S||null===(I=S.adsConfig)||void 0===I?void 0:I.vodAdSticherProvider)&&null!==(C=window)&&void 0!==C&&null!==(T=C.app_data)&&void 0!==T&&null!==(A=T.appcmsMain)&&void 0!==A&&null!==(B=A.adsConfig)&&void 0!==B&&B.vodAdClientSideTracking&&N)if(_)!function(e){O.apply(this,arguments)}(e);else{var V,U=null;if(null!=s&&null!==(V=s.series)&&void 0!==V&&V.enable){var q,H,R,Q,F,G=null===(q=j())||void 0===q||null===(H=q.video)||void 0===H||null===(R=H.gist)||void 0===R?void 0:R.id,$=E(),z=(null==$?void 0:$.get(G))||{t:0,p:0},J=z.t,K=z.p;"function"==typeof(null===(Q=window)||void 0===Q||null===(F=Q.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:J}),K<95&&(U=J)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(U=W)}b(e,U)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(M=s.dvrConfig)&&void 0!==M&&M.enable&&(i(e,s),a(e,s))}(e,d),P(e,d)}var P=function(e,n){var o,t,l,r,i,a,d,u,c,v,p,m,f=s(e),y=(null==n?void 0:n.theme)||{},h=I.dom.$(".vjs-play-progress"),b=I.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(o=window)||void 0===o||null===(t=o.app_data)||void 0===t||null===(l=t.appcmsMain)||void 0===l||null===(r=l.brand)||void 0===r||null===(i=r.cta)||void 0===i||null===(a=i.primary)||void 0===a?void 0:a.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.brand)||void 0===v||null===(p=v.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var g=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&h&&(h.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&g&&(g.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&b&&(b.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{D as initialiseSkin};
@@ -0,0 +1 @@
1
+ import n from"@babel/runtime/helpers/typeof";import{a as t,v as e}from"./currentVideoInfo-a8a254c2.js";import{g as o}from"./player_instance-34118a5b.js";var a=!1,i=function(n,t,e){var a=o(n);a?t>=0&&t<=a.duration()?(e({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),a.currentTime(t)):e({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):e("Cannot find player with id: '".concat(n,"'"))},r=function(n,i){var r=o(n);r?(r.on("ended",(function(){return a=!0})),r.on("timeupdate",(function(){if(!r.paused()&&a){var n,o,c=null===(n=t())||void 0===n||null===(o=n.video)||void 0===o?void 0:o.id;e.get(c)?(e.clear(),i(),e.set(c)):(e.clear(),e.set(c)),a=!1}}))):i("Cannot find player with id: '".concat(n,"'"))},c=function(n,t){var e=o(n);if(!e)return"Cannot find player with id: '".concat(n,"'");try{return e.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(n){return"Error: ".concat(n)}},u=function(n,t){var e=o(n);e?e.on("timeupdate",(function(){return t(e.currentTime())})):t("Cannot find player with id: '".concat(n,"'"))},l=function(n,t){var e=o(n);e?e.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(n,"'"))},s=function(n){var t=o(n);return t?t.duration():"Cannot find player with id: '".concat(n,"'")};function d(){var t=function(n,t){var e=o(n);if(!e)throw"Cannot find player with id: '".concat(n,"'");if("function"!=typeof t)throw"Callback function (cb) is missing or not a function";return e};return{onPlay:function(n,e){t(n,e).on("play",(function(){return e()}))},onPause:function(n,e){t(n,e).on("pause",(function(){return e()}))},onMute:function(n,e){var o=t(n,e);o.on("volumechange",(function(){o.muted()?e({muted:!0}):e({muted:!1})}))},onPictureInPictureChange:function(n,e){var o=t(n,e);o.on("enterpictureinpicture",(function(){e({pip:!0})})),o.on("leavepictureinpicture",(function(){e({pip:!1})}))},onFullScreenChange:function(n,e){var o=t(n,e);o.on("fullscreenchange",(function(n){o.isFullscreen_?e({isFullscreen:!0}):e({isFullscreen:!1})}))},onSetVolume:function(n,e){var o=t(n,e);o.on("volumechange",(function(){var n=100*o.volume().toFixed(2);o.muted()?e({vol:0}):e({vol:n})}))},onSeeked:function(n,e){var o=t(n,e);o.on("seeked",(function(){e({seeked:o.currentTime()})}))},onSubtitleEnable:function(n,e){var o=t(n,e);o.textTracks().on("change",(function(n){console.log(o.textTracks());var t=o.textTracks().tracks_.filter((function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode}));t.length>0&&e({enabled:t[0]})}))},onDisableSubtitles:function(n,e){var o=t(n,e);o.textTracks().on("change",(function(n){var t,a;console.log(o.textTracks()),(null==o||null===(t=o.textTracks())||void 0===t||null===(a=t.tracks_)||void 0===a?void 0:a.every((function(n){return"showing"!=n.mode})))&&e({captions_disabled:!0})}))},onSubtitleCueChange:function(e,o){var a=t(e,o);a.on("loadeddata",(function(){var t,e,i,r,c,u=a.textTracks();"object"==n(a.dash)&&null!=a.dash&&a.dash.mediaPlayer.on(null===(e=window)||void 0===e||null===(i=e.dashjs)||void 0===i||null===(r=i.MediaPlayer)||void 0===r||null===(c=r.events)||void 0===c?void 0:c.CAPTION_RENDERED,(function(n){o(n)}));for(var l=0;l<u.length;l++){var s=u[l];"metadata"===s.kind&&(s.mode="hidden",t=s)}t&&t.addEventListener("cuechange",(function(){var n=t.activeCues;if(n&&n.length>0)for(var e=0;e<n.length;e++){var a=n[e];o(a)}else console.log("no active cue at this moment")}))}))}}}export{l as a,c as b,r as c,s as g,u as o,d as p,i as s};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as l,e as s}from"./icons-37daa6b3.js";import{C as d}from"./generic-cfba14b3.js";import{k as r}from"./currentVideoInfo-a8a254c2.js";import{g as c,s as m,j as u,h as v,k as p,i as h}from"./skin-d5091b86.js";import{a as y}from"./autoNextVideo-8ee70a87.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-6c336c54.js";import"@babel/runtime/helpers/typeof";function f(e){var t=C();return function(){var o,a=i(e);if(t){var l=i(this).constructor;o=Reflect.construct(a,arguments,l)}else o=a.apply(this,arguments);return n(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var g=a.getComponent("Component"),E=function(n){o(C,g);var i=f(C);function C(t){var o,n,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(a=i.call(this,t,l)).playerId=l.playerId,a.seriesData=l.sres,a.videos=l.related.content,a.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=l.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(r(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(C,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),d(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;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;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);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))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",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()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,m,u,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},p.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title)||"")});a.dom.appendContent(v,p),a.dom.appendContent(v,b),a.dom.appendContent(r,v),a.dom.appendContent(d,r)},m=0;m<this.videos.length;m++)c(m);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),p(this.playerId,e)}}]),C}();export{E as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as l,e as s}from"./icons-37daa6b3.js";import{C as d}from"./generic-cfba14b3.js";import{k as r}from"./currentVideoInfo-a8a254c2.js";import{g as c,s as m,j as u,h as v,k as p,i as h}from"./skin-d5091b86.js";import{a as y}from"./autoNextVideo-97842e84.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-dd92c84e.js";import"@babel/runtime/helpers/typeof";function f(e){var t=C();return function(){var o,a=i(e);if(t){var l=i(this).constructor;o=Reflect.construct(a,arguments,l)}else o=a.apply(this,arguments);return n(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var g=a.getComponent("Component"),E=function(n){o(C,g);var i=f(C);function C(t){var o,n,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,C),(a=i.call(this,t,l)).playerId=l.playerId,a.seriesData=l.sres,a.videos=l.related.content,a.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=l.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(r(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(C,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(l())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-def99d5e.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;e.handleTabIndexSelector(),null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),m(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"))};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),u(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;r(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),d(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;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;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);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))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",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()};for(var l=a.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),r=a.dom.createEl("div",{className:"video-container video-accessibility"}),c=function(e){var o,n,i,l,s,c,m,u,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},p.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(h(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||h(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(c=s.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(y);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title)||"")});a.dom.appendContent(v,p),a.dom.appendContent(v,b),a.dom.appendContent(r,v),a.dom.appendContent(d,r)},m=0;m<this.videos.length;m++)c(m);a.dom.appendContent(n,l),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),p(this.playerId,e)}}]),C}();export{E 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/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-cfba14b3.js";import{k as d}from"./currentVideoInfo-a8a254c2.js";import{g as c,s as m,j as p,k as u,l as v}from"./skin-d5091b86.js";import{a as h}from"./autoNextVideo-8ee70a87.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-6c336c54.js";import"@babel/runtime/helpers/typeof";function b(e){var t=y();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=a.getComponent("Component"),C=function(n){o(y,g);var i=b(y);function y(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.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=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(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),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(p,u),a.dom.appendContent(p,f),a.dom.appendContent(m,p),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)p(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),y}();export{C as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-cfba14b3.js";import{k as d}from"./currentVideoInfo-a8a254c2.js";import{g as c,s as m,j as p,k as u,l as v}from"./skin-d5091b86.js";import{a as h}from"./autoNextVideo-97842e84.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./util-dd92c84e.js";import"@babel/runtime/helpers/typeof";function b(e){var t=y();return function(){var o,a=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(a,arguments,r)}else o=a.apply(this,arguments);return n(this,o)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var g=a.getComponent("Component"),C=function(n){o(y,g);var i=b(y);function y(t){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(a=i.call(this,t,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(d(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(r())});return a.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=a.dom.createEl("div",{className:"video-selection-container hidden"});a.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(c(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",m(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),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var r=a.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),c=a.dom.createEl("div",{className:"video-selector-content"}),m=a.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,r,l,p=a.dom.createEl("div",{className:"video -".concat(e)}),u=a.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){d(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";v(e),s(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r?void 0:r.fallbackImage)),h.alt="No Thumbnail Available",u.append(h);var f=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(l=t.videos[e])||void 0===l?void 0:l.title)||"")});a.dom.appendContent(p,u),a.dom.appendContent(p,f),a.dom.appendContent(m,p),a.dom.appendContent(c,m)},h=0;h<this.videos.length;h++)p(h);a.dom.appendContent(n,i),a.dom.appendContent(n,r),a.dom.appendContent(e,n),a.dom.appendContent(e,c),u(this.playerId,e)}}]),y}();export{C as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "2.0.151-backup",
3
+ "version": "2.0.152-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "types": "dist/@viewlift/player/esm/index.d.ts",
6
6
  "amdName": "_playerCore",
@@ -1 +0,0 @@
1
- "use strict";var n=require("@babel/runtime/helpers/typeof"),e=require("./currentVideoInfo-31d70bec.js"),t=require("./player_instance-fcf6a8fb.js"),o=!1;exports.getVideoDuration=function(n){var e=t.getPlayer(n);return e?e.duration():"Cannot find player with id: '".concat(n,"'")},exports.onReplay=function(n,i){var a=t.getPlayer(n);a?(a.on("ended",(function(){return o=!0})),a.on("timeupdate",(function(){if(o){var n,t,a=null===(n=e.getCurrentVideo())||void 0===n||null===(t=n.video)||void 0===t?void 0:t.id;e.videoReplayTracker.get(a)&&(e.videoReplayTracker.clear(),i(),e.videoReplayTracker.set(a)),o=!1}}))):i("Cannot find player with id: '".concat(n,"'"))},exports.onTimeUpdate=function(n,e){var o=t.getPlayer(n);o?o.on("timeupdate",(function(){return e(o.currentTime())})):e("Cannot find player with id: '".concat(n,"'"))},exports.onVideoEnded=function(n,e){var o=t.getPlayer(n);o?o.on("ended",(function(){return e(!0)})):e("Cannot find player with id: '".concat(n,"'"))},exports.playerEvents=function(){var e=function(n,e){var o=t.getPlayer(n);if(!o)throw"Cannot find player with id: '".concat(n,"'");if("function"!=typeof e)throw"Callback function (cb) is missing or not a function";return o};return{onPlay:function(n,t){e(n,t).on("play",(function(){return t()}))},onPause:function(n,t){e(n,t).on("pause",(function(){return t()}))},onMute:function(n,t){var o=e(n,t);o.on("volumechange",(function(){o.muted()?t({muted:!0}):t({muted:!1})}))},onPictureInPictureChange:function(n,t){var o=e(n,t);o.on("enterpictureinpicture",(function(){t({pip:!0})})),o.on("leavepictureinpicture",(function(){t({pip:!1})}))},onFullScreenChange:function(n,t){var o=e(n,t);o.on("fullscreenchange",(function(n){o.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})}))},onSetVolume:function(n,t){var o=e(n,t);o.on("volumechange",(function(){var n=100*o.volume().toFixed(2);o.muted()?t({vol:0}):t({vol:n})}))},onSeeked:function(n,t){var o=e(n,t);o.on("seeked",(function(){t({seeked:o.currentTime()})}))},onSubtitleEnable:function(n,t){var o=e(n,t);o.textTracks().on("change",(function(n){console.log(o.textTracks());var e=o.textTracks().tracks_.filter((function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode}));e.length>0&&t({enabled:e[0]})}))},onDisableSubtitles:function(n,t){var o=e(n,t);o.textTracks().on("change",(function(n){var e,i;console.log(o.textTracks()),(null==o||null===(e=o.textTracks())||void 0===e||null===(i=e.tracks_)||void 0===i?void 0:i.every((function(n){return"showing"!=n.mode})))&&t({captions_disabled:!0})}))},onSubtitleCueChange:function(t,o){var i=e(t,o);i.on("loadeddata",(function(){var e,t,a,r,c,u=i.textTracks();"object"==n(i.dash)&&null!=i.dash&&i.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(a=t.dashjs)||void 0===a||null===(r=a.MediaPlayer)||void 0===r||null===(c=r.events)||void 0===c?void 0:c.CAPTION_RENDERED,(function(n){o(n)}));for(var l=0;l<u.length;l++){var d=u[l];"metadata"===d.kind&&(d.mode="hidden",e=d)}e&&e.addEventListener("cuechange",(function(){var n=e.activeCues;if(n&&n.length>0)for(var t=0;t<n.length;t++){var i=n[t];o(i)}else console.log("no active cue at this moment")}))}))}}},exports.seekToTimeStamp=function(n,e,o){var i=t.getPlayer(n);i?e>=0&&e<=i.duration()?(o({status:!0,msg:"Successfully seeked to timestamp : ".concat(e)}),i.currentTime(e)):o({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):o("Cannot find player with id: '".concat(n,"'"))},exports.setPlaybackSpeed=function(n,e){var o=t.getPlayer(n);if(!o)return"Cannot find player with id: '".concat(n,"'");try{return o.playbackRate(e),"Playback speed set to ".concat(e,"x")}catch(n){return"Error: ".concat(n)}};
@@ -1 +0,0 @@
1
- import n from"@babel/runtime/helpers/typeof";import{a as t,v as e}from"./currentVideoInfo-a8a254c2.js";import{g as o}from"./player_instance-34118a5b.js";var i=!1,a=function(n,t,e){var i=o(n);i?t>=0&&t<=i.duration()?(e({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),i.currentTime(t)):e({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):e("Cannot find player with id: '".concat(n,"'"))},r=function(n,a){var r=o(n);r?(r.on("ended",(function(){return i=!0})),r.on("timeupdate",(function(){if(i){var n,o,r=null===(n=t())||void 0===n||null===(o=n.video)||void 0===o?void 0:o.id;e.get(r)&&(e.clear(),a(),e.set(r)),i=!1}}))):a("Cannot find player with id: '".concat(n,"'"))},c=function(n,t){var e=o(n);if(!e)return"Cannot find player with id: '".concat(n,"'");try{return e.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(n){return"Error: ".concat(n)}},u=function(n,t){var e=o(n);e?e.on("timeupdate",(function(){return t(e.currentTime())})):t("Cannot find player with id: '".concat(n,"'"))},l=function(n,t){var e=o(n);e?e.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(n,"'"))},s=function(n){var t=o(n);return t?t.duration():"Cannot find player with id: '".concat(n,"'")};function d(){var t=function(n,t){var e=o(n);if(!e)throw"Cannot find player with id: '".concat(n,"'");if("function"!=typeof t)throw"Callback function (cb) is missing or not a function";return e};return{onPlay:function(n,e){t(n,e).on("play",(function(){return e()}))},onPause:function(n,e){t(n,e).on("pause",(function(){return e()}))},onMute:function(n,e){var o=t(n,e);o.on("volumechange",(function(){o.muted()?e({muted:!0}):e({muted:!1})}))},onPictureInPictureChange:function(n,e){var o=t(n,e);o.on("enterpictureinpicture",(function(){e({pip:!0})})),o.on("leavepictureinpicture",(function(){e({pip:!1})}))},onFullScreenChange:function(n,e){var o=t(n,e);o.on("fullscreenchange",(function(n){o.isFullscreen_?e({isFullscreen:!0}):e({isFullscreen:!1})}))},onSetVolume:function(n,e){var o=t(n,e);o.on("volumechange",(function(){var n=100*o.volume().toFixed(2);o.muted()?e({vol:0}):e({vol:n})}))},onSeeked:function(n,e){var o=t(n,e);o.on("seeked",(function(){e({seeked:o.currentTime()})}))},onSubtitleEnable:function(n,e){var o=t(n,e);o.textTracks().on("change",(function(n){console.log(o.textTracks());var t=o.textTracks().tracks_.filter((function(n){return("subtitles"===n.kind||"captions"===n.kind)&&"showing"===n.mode}));t.length>0&&e({enabled:t[0]})}))},onDisableSubtitles:function(n,e){var o=t(n,e);o.textTracks().on("change",(function(n){var t,i;console.log(o.textTracks()),(null==o||null===(t=o.textTracks())||void 0===t||null===(i=t.tracks_)||void 0===i?void 0:i.every((function(n){return"showing"!=n.mode})))&&e({captions_disabled:!0})}))},onSubtitleCueChange:function(e,o){var i=t(e,o);i.on("loadeddata",(function(){var t,e,a,r,c,u=i.textTracks();"object"==n(i.dash)&&null!=i.dash&&i.dash.mediaPlayer.on(null===(e=window)||void 0===e||null===(a=e.dashjs)||void 0===a||null===(r=a.MediaPlayer)||void 0===r||null===(c=r.events)||void 0===c?void 0:c.CAPTION_RENDERED,(function(n){o(n)}));for(var l=0;l<u.length;l++){var s=u[l];"metadata"===s.kind&&(s.mode="hidden",t=s)}t&&t.addEventListener("cuechange",(function(){var n=t.activeCues;if(n&&n.length>0)for(var e=0;e<n.length;e++){var i=n[e];o(i)}else console.log("no active cue at this moment")}))}))}}}export{l as a,c as b,r as c,s as g,u as o,d as p,a as s};