@viewlift/player-backup 2.0.377-backup → 2.0.379-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 (90) hide show
  1. package/cjs/{autoNextVideo-970d7952.js → autoNextVideo-38f45ca1.js} +1 -1
  2. package/cjs/bundle.css +1157 -1140
  3. package/cjs/caption-settings-af7b30a4.js +1 -0
  4. package/cjs/captions-8b889384.js +1 -0
  5. package/cjs/{features-911c3816.js → features-8beda29d.js} +1 -1
  6. package/cjs/generic-0b925a19.js +1 -0
  7. package/cjs/index-22c077d0.js +1 -0
  8. package/cjs/{index-6133b444.js → index-517acf72.js} +1 -1
  9. package/cjs/{index-aa64a6c0.js → index-93ac04ff.js} +1 -1
  10. package/cjs/{index-50f15aa6.js → index-f64ef24d.js} +1 -1
  11. package/cjs/index.js +1 -1
  12. package/cjs/localisation-da6f64c6.js +1 -0
  13. package/cjs/{multicamv2-e88d0dc2.js → multicamv2-2123cc15.js} +1 -1
  14. package/cjs/{multicamv2-f17375d7.js → multicamv2-41a918f4.js} +1 -1
  15. package/cjs/{nextEpisodeButton-551faeb3.js → nextEpisodeButton-c68c6da4.js} +1 -1
  16. package/cjs/{playlist-f0a6659a.js → playlist-8d5202b4.js} +1 -1
  17. package/cjs/resolution-ac7705e6.js +1 -0
  18. package/cjs/{series-47045f7e.js → series-b3b39dd7.js} +1 -1
  19. package/cjs/{series-v2-cf79269e.js → series-v2-3baa5caa.js} +1 -1
  20. package/cjs/{series-v2-5ce609b4.js → series-v2-f31465e3.js} +1 -1
  21. package/cjs/settings-icon-7a519942.js +1 -0
  22. package/cjs/{skin-425c1322.js → skin-6b4fd720.js} +1 -1
  23. package/cjs/{skin-dbff0922.js → skin-8d797b1e.js} +1 -1
  24. package/cjs/{skin-f7c4ead4.js → skin-90c06edf.js} +1 -1
  25. package/cjs/{skin-ebab1e3f.js → skin-a3530077.js} +1 -1
  26. package/cjs/skin-aef6f952.js +1 -0
  27. package/cjs/{skin-237f8d4f.js → skin-d6a48901.js} +1 -1
  28. package/cjs/{skin-c49d50b6.js → skin-e03a88b8.js} +1 -1
  29. package/cjs/{skin-a9a5a925.js → skin-ed4decab.js} +1 -1
  30. package/cjs/{skin-dc3525c7.js → skin-f0bbb76d.js} +1 -1
  31. package/cjs/{skin-3a43f138.js → skin-f8994d41.js} +1 -1
  32. package/cjs/{videoSelector-f4eb61cd.js → videoSelector-1399cc18.js} +1 -1
  33. package/cjs/{videoSelector-607de014.js → videoSelector-2bc8977c.js} +1 -1
  34. package/esm/{autoNextVideo-c9d22cb4.js → autoNextVideo-7dc4b5f9.js} +1 -1
  35. package/esm/bundle.css +1157 -1140
  36. package/esm/caption-settings-cf49bb1b.js +1 -0
  37. package/esm/captions-f011a7d4.js +1 -0
  38. package/esm/{features-8b0d92d7.js → features-048cb801.js} +1 -1
  39. package/esm/generic-759b1422.js +1 -0
  40. package/esm/{index-9f2bf24a.js → index-07f963db.js} +1 -1
  41. package/esm/{index-cef05213.js → index-1577b990.js} +1 -1
  42. package/esm/index-1a5d906c.js +1 -0
  43. package/esm/{index-3addf20e.js → index-3bae4958.js} +1 -1
  44. package/esm/index.js +1 -1
  45. package/esm/localisation-2f1ee38c.js +1 -0
  46. package/esm/{multicamv2-1e925995.js → multicamv2-220833f5.js} +1 -1
  47. package/esm/{multicamv2-1bd7f8c5.js → multicamv2-bd4bf0f5.js} +1 -1
  48. package/esm/{nextEpisodeButton-f1a025e4.js → nextEpisodeButton-ca0a2b98.js} +1 -1
  49. package/esm/{playlist-2012e5ef.js → playlist-2d49901b.js} +1 -1
  50. package/esm/resolution-d9d21f0e.js +1 -0
  51. package/esm/{series-8f854466.js → series-637f67ff.js} +1 -1
  52. package/esm/{series-v2-f28041a6.js → series-v2-7caace2c.js} +1 -1
  53. package/esm/{series-v2-4ada8ab6.js → series-v2-899b6955.js} +1 -1
  54. package/esm/settings-icon-abd55c1e.js +1 -0
  55. package/esm/{skin-85e8dcbb.js → skin-0e9bc166.js} +1 -1
  56. package/esm/{skin-74348872.js → skin-28192217.js} +1 -1
  57. package/esm/{skin-66b334cd.js → skin-2cb9e01a.js} +1 -1
  58. package/esm/{skin-d6417c01.js → skin-2d7f1782.js} +1 -1
  59. package/esm/{skin-7bdb21cf.js → skin-318448f4.js} +1 -1
  60. package/esm/skin-44cb0a24.js +1 -0
  61. package/esm/{skin-30a7f835.js → skin-77259d09.js} +1 -1
  62. package/esm/{skin-c16b40b9.js → skin-7d2af43a.js} +1 -1
  63. package/esm/{skin-30a90635.js → skin-9d2dad58.js} +1 -1
  64. package/esm/{skin-f0b7e11c.js → skin-bcb995db.js} +1 -1
  65. package/esm/src/core/captions.d.ts +10 -0
  66. package/esm/src/helpers/localisation.d.ts +1 -0
  67. package/esm/src/utilities/qualityLabels.d.ts +1 -0
  68. package/esm/{videoSelector-435aa016.js → videoSelector-01d26572.js} +1 -1
  69. package/esm/{videoSelector-48a4e382.js → videoSelector-21c88bd3.js} +1 -1
  70. package/package.json +1 -1
  71. package/cjs/caption-settings-e803e4a6.js +0 -1
  72. package/cjs/captions-abd87121.js +0 -1
  73. package/cjs/generic-118f7ebd.js +0 -1
  74. package/cjs/index-c52abe27.js +0 -1
  75. package/cjs/localisation-56e0a999.js +0 -1
  76. package/cjs/resolution-7b5483dd.js +0 -1
  77. package/cjs/settings-icon-b4612153.js +0 -1
  78. package/cjs/skin-b11e1757.js +0 -1
  79. package/esm/caption-settings-404c4774.js +0 -1
  80. package/esm/captions-8c8e9f2b.js +0 -1
  81. package/esm/generic-6871d7d1.js +0 -1
  82. package/esm/index-18292507.js +0 -1
  83. package/esm/localisation-0bf399a1.js +0 -1
  84. package/esm/resolution-847a299c.js +0 -1
  85. package/esm/settings-icon-c188c46d.js +0 -1
  86. package/esm/skin-be4ea9e2.js +0 -1
  87. package/esm/src/features/dvrStartOver/helpers.test.d.ts +0 -1
  88. package/esm/src/features/dvrStartOver/index.test.d.ts +0 -1
  89. package/esm/src/helpers/playerControlEvents.test.d.ts +0 -1
  90. package/esm/src/utilities/beacon.test.d.ts +0 -1
@@ -1 +1 @@
1
- import{g as l,p as e,e as i}from"./skin-2a3ee818.js";import{e as n}from"./features-8b0d92d7.js";import{g as o}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-6871d7d1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./renditions-28891b91.js";var t='<svg xmlns="http://www.w3.org/2000/svg" style="display:none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',r='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function s(s,u){var a=l(s);a.addClass("skin_cn_news"),a.toggleClass("vjs-cn-news-vod",!(null!=u&&u.liveVideo)),function(n,r){var s,u,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(s=c.el().firstChild)&&void 0!==s?s:null),null===(u=c.controlBar)||void 0===u||u.removeChild("VolumePanel"),null===(a=c.controlBar)||void 0===a||a.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",(function(){return r.setAttributeNS(null,"href","#vjs-icon-pause")})),l.on("pause",(function(){return r.setAttributeNS(null,"href","#vjs-icon-play")}))})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=i(t,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",(function(){var e=l.muted()||0===l.volume();r.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")}))}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;i(t,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;i(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};r(),l.textTracks().on("change",r)}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,"#vjs-icon-fullscreen");l.on("fullscreenchange",(function(){null==r||r.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var t,r,s=n.el().querySelector(".vjs-seek-to-live-text"),u=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;s&&(s.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?u:a)};v(),l.on("timeupdate",v),null===(t=l.liveTracker)||void 0===t||null===(r=t.on)||void 0===r||r.call(t,"liveedgechange",v),n.on("click",(function(){if(l.paused())try{l.play()}catch(l){}}))}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?t.style.display="none":(t.style.display="flex",r&&(r.innerText=(s=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),u=Math.floor(s/3600),a=Math.floor(s%3600/60),v=Math.floor(s%60),c=function(l){return String(l).padStart(2,"0")},0===u?"".concat(c(a),":").concat(c(v)):"".concat(c(u),":").concat(c(a),":").concat(c(v)))));var s,u,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(s,u),function(l,e){var i,o,t,s,u=(null==e||null===(i=e.res)||void 0===i?void 0:i.contentType)||"video",a=(null==e||null===(o=e.res)||void 0===o||null===(t=o[u])||void 0===t||null===(s=t.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(s,u)}export{s as initialiseSkin};
1
+ import{g as l,p as e,e as i}from"./skin-2a3ee818.js";import{e as n}from"./features-048cb801.js";import{g as o}from"./localisation-2f1ee38c.js";import"@babel/runtime/helpers/toConsumableArray";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-759b1422.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./renditions-28891b91.js";var t='<svg xmlns="http://www.w3.org/2000/svg" style="display:none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M7 14H5V19H10V17H7V14ZM5 10H7V7H10V5H5V10ZM17 17H14V19H19V14H17V17ZM14 5V7H17V10H19V5H14Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume" viewBox="0 0 24 24">\n <path d="M3 9.00047V15.0005H7L12 20.0005V4.00047L7 9.00047H3ZM16.5 12.0005C16.5 10.2305 15.48 8.71047 14 7.97047V16.0205C15.48 15.2905 16.5 13.7705 16.5 12.0005ZM14 3.23047V5.29047C16.89 6.15047 19 8.83047 19 12.0005C19 15.1705 16.89 17.8505 14 18.7105V20.7705C18.01 19.8605 21 16.2805 21 12.0005C21 7.72047 18.01 4.14047 14 3.23047Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-pip" viewBox="0 0 24 24">\n <path d="M19 7H11V13H19V7ZM21 3H3C1.9 3 1 3.9 1 5V19C1 20.1 1.9 20.98 3 20.98H21C22.1 20.98 23 20.1 23 19V5C23 3.9 22.1 3 21 3ZM21 19.01H3V4.98H21V19.01Z" fill="white"/>\n </symbol>\n <symbol id="vjs-icon-captions" viewBox="0 0 18 16">\n <path d="M16.5 1.5V14.5H1.5V1.5H16.5ZM16 0H2C0.89 0 0 0.9 0 2V14C0 15.1 0.89 16 2 16H16C17.1 16 18 15.1 18 14V2C18 0.9 17.1 0 16 0ZM8 7H6.5V6.5H4.5V9.5H6.5V9H8V10C8 10.55 7.55 11 7 11H4C3.45 11 3 10.55 3 10V6C3 5.45 3.45 5 4 5H7C7.55 5 8 5.45 8 6V7ZM15 7H13.5V6.5H11.5V9.5H13.5V9H15V10C15 10.55 14.55 11 14 11H11C10.45 11 10 10.55 10 10V6C10 5.45 10.45 5 11 5H14C14.55 5 15 5.45 15 6V7Z" fill="white"/>\n </symbol>\n </defs>\n</svg>',r='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M11.99 5V1L6.98999 6L11.99 11V7C15.3 7 17.99 9.69 17.99 13C17.99 16.31 15.3 19 11.99 19C8.67999 19 5.98999 16.31 5.98999 13H3.98999C3.98999 17.42 7.56999 21 11.99 21C16.41 21 19.99 17.42 19.99 13C19.99 8.58 16.41 5 11.99 5Z" fill="white"/>\n<path d="M10.89 16H10.04V12.74L9.03003 13.05V12.36L10.8 11.73H10.89V16Z" fill="white"/>\n<path d="M15.17 14.24C15.17 14.56 15.14 14.84 15.07 15.06C15 15.28 14.9 15.48 14.78 15.63C14.66 15.78 14.5 15.89 14.33 15.96C14.16 16.03 13.96 16.06 13.74 16.06C13.52 16.06 13.33 16.03 13.15 15.96C12.97 15.89 12.82 15.78 12.69 15.63C12.56 15.48 12.46 15.29 12.39 15.06C12.32 14.83 12.28 14.56 12.28 14.24V13.5C12.28 13.18 12.31 12.9 12.38 12.68C12.45 12.46 12.55 12.26 12.67 12.11C12.79 11.96 12.95 11.85 13.12 11.78C13.29 11.71 13.49 11.68 13.71 11.68C13.93 11.68 14.12 11.71 14.3 11.78C14.48 11.85 14.63 11.96 14.76 12.11C14.89 12.26 14.99 12.45 15.06 12.68C15.13 12.91 15.17 13.18 15.17 13.5V14.24ZM14.32 13.38C14.32 13.19 14.31 13.03 14.28 12.9C14.25 12.77 14.21 12.67 14.16 12.59C14.11 12.51 14.05 12.45 13.97 12.42C13.89 12.39 13.81 12.37 13.72 12.37C13.63 12.37 13.54 12.39 13.47 12.42C13.4 12.45 13.33 12.51 13.28 12.59C13.23 12.67 13.19 12.77 13.16 12.9C13.13 13.03 13.12 13.19 13.12 13.38V14.35C13.12 14.54 13.13 14.7 13.16 14.83C13.19 14.96 13.23 15.07 13.28 15.15C13.33 15.23 13.39 15.29 13.47 15.32C13.55 15.35 13.63 15.37 13.72 15.37C13.81 15.37 13.9 15.35 13.97 15.32C14.04 15.29 14.11 15.23 14.16 15.15C14.21 15.07 14.25 14.96 14.27 14.83C14.29 14.7 14.31 14.54 14.31 14.35V13.38H14.32Z" fill="white"/>\n</svg>';function s(s,u){var a=l(s);a.addClass("skin_cn_news"),a.toggleClass("vjs-cn-news-vod",!(null!=u&&u.liveVideo)),function(n,r){var s,u,a,v,c=l(n);if(!c)return;if(c.el().insertBefore(e(t),null!==(s=c.el().firstChild)&&void 0!==s?s:null),null===(u=c.controlBar)||void 0===u||u.removeChild("VolumePanel"),null===(a=c.controlBar)||void 0===a||a.addChild("VolumePanel",{inline:!0},1),!(null!==(v=c.controlBar)&&void 0!==v&&v.getChild("PictureInPictureToggle"))){var d,C,p=null===(d=c.controlBar)||void 0===d?void 0:d.getChild("FullscreenToggle"),m=p?c.controlBar.children().indexOf(p):void 0;null===(C=c.controlBar)||void 0===C||C.addChild("PictureInPictureToggle",{},m)}(function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PlayToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,l.paused()?"#vjs-icon-play":"#vjs-icon-pause");l.on("play",(function(){return r.setAttributeNS(null,"href","#vjs-icon-pause")})),l.on("pause",(function(){return r.setAttributeNS(null,"href","#vjs-icon-play")}))})(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("VolumePanel"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-mute-control .vjs-icon-placeholder");if(!t)return;var r=i(t,l.muted()?"#vjs-icon-mute":"#vjs-icon-volume");l.on("volumechange",(function(){var e=l.muted()||0===l.volume();r.setAttributeNS(null,"href",e?"#vjs-icon-mute":"#vjs-icon-volume")}))}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("PictureInPictureToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.querySelector(".vjs-icon-placeholder"))||null;if(!t)return;i(t,"#vjs-icon-pip")}(c),function(l){var e,n,o=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("SubsCapsButton"))||void 0===n?void 0:n.el())||null,t=null==o?void 0:o.querySelector(".vjs-icon-placeholder");if(!t)return;i(t,"#vjs-icon-captions");var r=function(){for(var e=l.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}o.classList.toggle("vjs-cc-on",i)};r(),l.textTracks().on("change",r)}(c),function(l){var e,n,o,t=(null==l||null===(e=l.controlBar)||void 0===e||null===(n=e.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o?void 0:o.firstChild)||null;if(!t)return;var r=i(t,"#vjs-icon-fullscreen");l.on("fullscreenchange",(function(){null==r||r.setAttributeNS(null,"href",l.isFullscreen()?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}(c),function(l,e){var i,n=null==l||null===(i=l.controlBar)||void 0===i?void 0:i.getChild("SeekToLive");if(n){var t,r,s=n.el().querySelector(".vjs-seek-to-live-text"),u=o("liveText")||"LIVE",a=o("goLiveText")||"GO LIVE",v=function(){var e,i;s&&(s.textContent=null!==(e=l.liveTracker)&&void 0!==e&&null!==(i=e.atLiveEdge)&&void 0!==i&&i.call(e)?u:a)};v(),l.on("timeupdate",v),null===(t=l.liveTracker)||void 0===t||null===(r=t.on)||void 0===r||r.call(t,"liveedgechange",v),n.on("click",(function(){if(l.paused())try{l.play()}catch(l){}}))}if(null!=e&&e.liveVideo&&null!=e&&e.liveui&&l.liveTracker){var c=function(){return function(l){var e,i,n,o,t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(!t)return;var r=t.querySelector(".vjs-remaining-time-display");null!==(n=l.liveTracker)&&void 0!==n&&null!==(o=n.atLiveEdge)&&void 0!==o&&o.call(n)?t.style.display="none":(t.style.display="flex",r&&(r.innerText=(s=function(l){var e=l.seekable();return e&&e.length>0?Math.max(0,e.end(0)-l.currentTime()):0}(l),u=Math.floor(s/3600),a=Math.floor(s%3600/60),v=Math.floor(s%60),c=function(l){return String(l).padStart(2,"0")},0===u?"".concat(c(a),":").concat(c(v)):"".concat(c(u),":").concat(c(a),":").concat(c(v)))));var s,u,a,v,c}(l)};l.liveTracker.on("liveedgechange",c),l.on("timeupdate",c)}}(c,r)}(s,u),function(l,e){var i,o,t,s,u=(null==e||null===(i=e.res)||void 0===i?void 0:i.contentType)||"video",a=(null==e||null===(o=e.res)||void 0===o||null===(t=o[u])||void 0===t||null===(s=t.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;(null!=e&&e.liveui||a)&&n(l,"CN_NEWS",r)}(s,u)}export{s as initialiseSkin};
@@ -1 +1 @@
1
- import{g as l,d as e,e as i,f as n,k as o,l as t,m as r,n as s}from"./features-8b0d92d7.js";import{e as a}from"./icons-f9c8be77.js";import{g as u,p as d,e as v}from"./skin-2a3ee818.js";import{g as C}from"./renditions-28891b91.js";import"./captions-8c8e9f2b.js";import{a as c,b as p}from"./index-3addf20e.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{r as h}from"./relatedVideosManager-93533a90.js";import{e as m,ag as f,q as b}from"./generic-6871d7d1.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./playerControlEvents-26580023.js";import"./autoNextVideo-c9d22cb4.js";import"./index-cef05213.js";import"@babel/runtime/helpers/typeof";import"./manager-d812dea7.js";import"axios";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function g(g,B){u(g).addClass("skin_mini"),function(e,i){var n=u(e);n&&n.on("loadeddata",(function(){var n,o,t,r,s,a,u,d,v,p;(null===(n=C(e))||void 0===n?void 0:n.length)>0&&0!=(null==i||null===(o=i.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(e,i);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=i&&null!==(s=i.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(u=a.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(v=d.features)&&void 0!==v&&v.auto_play||m)||null!=i&&i.liveVideo){if(!(null!=i&&i.liveVideo||null!=i&&null!==(p=i.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe((function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(e,i),f&&f())}))}}else c(e,i)}))}(g,B),function(l,e){var i,n,o,t,r,s,a,C,c,p,h,m,f,b,g,B,y,L,j=u(l);null===(i=j.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=j.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var w=null===(o=j.controlBar)||void 0===o?void 0:o.getChild("ProgressControl"),E=document.createElement("div");E.className="custom-spaced-progress-bar",w&&E.append(w.el());null===(t=j.controlBar)||void 0===t||null===(r=t.el())||void 0===r||r.append(E);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>';j.el().insertBefore(d(V),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var x=(null==j||null===(a=j.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="16px",x.style.width="16px";var M=v(x,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),j.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==j||null===(p=j.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(k){k.style.height="24px",k.style.width="24px";var S=v(k,"#vjs-icon-fullscreen");j.on("fullscreenchange",(function(){var l=j.isFullscreen_;null==S||S.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var Z=(null==j||null===(f=j.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(Z){var A=Z.querySelector(".vjs-mute-control .vjs-icon-placeholder");A.classList.add("vjs-svg-icon"),A.style.height="24px",A.style.width="24px";var T=v(A,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",(function(l){var e=j.volume();0==e||j.muted()?T.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?T.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?T.setAttributeNS(null,"href","#vjs-icon-volume2"):T.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var N=(null==j||null===(g=j.controlBar)||void 0===g||null===(B=g.getChild("PictureInPictureToggle"))||void 0===B?void 0:B.el())||null;if(N){var P=null==N?void 0:N.querySelector(".vjs-icon-placeholder");P.style.height="25px",P.style.width="25px";var H=v(P,"#vjs-icon-pip");j.on("enterpictureinpicture",(function(){H.setAttributeNS(null,"href","#vjs-icon-pip")}))}var _=(null==j||null===(y=j.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(_){var q=_.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");q.classList.add("vjs-svg-icon"),q.style.height="29px",q.style.width="29px";var I=v(q,"#vjs-icon-caps");I.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",(function(l){for(var e=j.textTracks(),i=!1,n=0;n<e.length;n++){var o=e[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){i=!0;break}}i?I.setAttributeNS(null,"href","#vjs-icon-captions"):I.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}j&&null!=e&&e.liveVideo&&null!=e&&e.liveui&&(j.liveTracker.on("liveedgechange",(function(){R(j)})),j.on("timeupdate",(function(){R(j)})));function O(l){var e=Math.floor(l/3600),i=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===e?"".concat(o(i),":").concat(o(n)):"".concat(o(e),":").concat(o(i),":").concat(o(n))}function D(l){var e=l.seekable();if(e&&e.length>0){var i=e.end(0);return Math.max(0,i-l.currentTime())}return 0}function R(l){var e,i,n=l.liveTracker.atLiveEdge(),o=D(l),t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=O(o)))}}}(g,B),function(l,d){var v,C,c,p,g,B,y,L,j=(null==d||null===(v=d.res)||void 0===v||null===(C=v.video)||void 0===C?void 0:C.isSSAIEnabled)||!1,w=(null==d?void 0:d.skin_settings)||{};null==w||w.slowMoBtn;var E=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};null!=w&&w.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=w&&w.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&i(l,"VL_ONE",a());n(l,d);var V,x=h.get();(null==x||null===(p=x.content)||void 0===p?void 0:p.length)>0&&o(l,x);V=h.subscribe((function(e){var i,n,t=u(l);(null==t||null===(i=t.controlBar)||void 0===i||!i.getChild("videoSelector"))&&(null==e||null===(n=e.content)||void 0===n?void 0:n.length)>0&&(o(l,e),V&&V())})),(null==d||null===(g=d.streams)||void 0===g?void 0:g.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(B=d.playlist)||void 0===B||null===(y=B.content)||void 0===y?void 0:y.length)>0&&r(l,null==d?void 0:d.playlist);null!=d&&null!==(L=d.series)&&void 0!==L&&L.enable&&s(l,d);if("MEDIA_TAILOR"==(null==E?void 0:E.vodAdSticherProvider)&&null!=E&&E.vodAdClientSideTracking&&j){var M,k=null;if(null!=d&&null!==(M=d.series)&&void 0!==M&&M.enable){var S,Z,A,T=null===(S=m())||void 0===S||null===(Z=S.video)||void 0===Z||null===(A=Z.gist)||void 0===A?void 0:A.id,N=b(),P=(null==N?void 0:N.get(T))||{t:0,p:0},H=P.t;P.p<95&&(k=H)}else{var _=d.watchHistoryResumeTime;d.watchedPercentage<95&&(k=_)}f(l,k)}}(g,B),p(g,B)}export{g as initialiseSkin};
1
+ import{g as l,d as e,e as i,f as n,k as o,l as t,m as r,n as s}from"./features-048cb801.js";import{e as a}from"./icons-f9c8be77.js";import{g as u,p as d,e as v}from"./skin-2a3ee818.js";import{g as C}from"./renditions-28891b91.js";import"./captions-f011a7d4.js";import{a as c,b as p}from"./index-3bae4958.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{r as h}from"./relatedVideosManager-93533a90.js";import{e as m,ag as f,q as b}from"./generic-759b1422.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-2f1ee38c.js";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"./manager-d812dea7.js";import"./autoNextVideo-7dc4b5f9.js";import"./index-1577b990.js";import"axios";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";function g(g,B){u(g).addClass("skin_mini"),function(e,i){var n=u(e);n&&n.on("loadeddata",(function(){var n,o,t,r,s,a,u,d,v,p;(null===(n=C(e))||void 0===n?void 0:n.length)>0&&0!=(null==i||null===(o=i.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(e,i);var m=(null===(t=h.get())||void 0===t||null===(r=t.content)||void 0===r?void 0:r.length)>0;if(!(null!=i&&null!==(s=i.series)&&void 0!==s&&s.enable||null!==(a=window)&&void 0!==a&&null!==(u=a.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(v=d.features)&&void 0!==v&&v.auto_play||m)||null!=i&&i.liveVideo){if(!(null!=i&&i.liveVideo||null!=i&&null!==(p=i.series)&&void 0!==p&&p.enable)){var f;f=h.subscribe((function(l){var n;(null==l||null===(n=l.content)||void 0===n?void 0:n.length)>0&&(c(e,i),f&&f())}))}}else c(e,i)}))}(g,B),function(l,e){var i,n,o,t,r,s,a,C,c,p,h,m,f,b,g,B,y,L,j=u(l);null===(i=j.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=j.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var w=null===(o=j.controlBar)||void 0===o?void 0:o.getChild("ProgressControl"),E=document.createElement("div");E.className="custom-spaced-progress-bar",w&&E.append(w.el());null===(t=j.controlBar)||void 0===t||null===(r=t.el())||void 0===r||r.append(E);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>';j.el().insertBefore(d(V),null!==(s=j.el().firstChild)&&void 0!==s?s:null);var x=(null==j||null===(a=j.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="16px",x.style.width="16px";var M=v(x,j.paused()?"#vjs-icon-play":"#vjs-icon-pause");j.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),j.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==j||null===(p=j.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(k){k.style.height="24px",k.style.width="24px";var S=v(k,"#vjs-icon-fullscreen");j.on("fullscreenchange",(function(){var l=j.isFullscreen_;null==S||S.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var Z=(null==j||null===(f=j.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(Z){var A=Z.querySelector(".vjs-mute-control .vjs-icon-placeholder");A.classList.add("vjs-svg-icon"),A.style.height="24px",A.style.width="24px";var T=v(A,j.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");j.on("volumechange",(function(l){var e=j.volume();0==e||j.muted()?T.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?T.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?T.setAttributeNS(null,"href","#vjs-icon-volume2"):T.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var N=(null==j||null===(g=j.controlBar)||void 0===g||null===(B=g.getChild("PictureInPictureToggle"))||void 0===B?void 0:B.el())||null;if(N){var P=null==N?void 0:N.querySelector(".vjs-icon-placeholder");P.style.height="25px",P.style.width="25px";var H=v(P,"#vjs-icon-pip");j.on("enterpictureinpicture",(function(){H.setAttributeNS(null,"href","#vjs-icon-pip")}))}var _=(null==j||null===(y=j.controlBar)||void 0===y||null===(L=y.getChild("SubsCapsButton"))||void 0===L?void 0:L.el())||null;if(_){var q=_.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");q.classList.add("vjs-svg-icon"),q.style.height="29px",q.style.width="29px";var I=v(q,"#vjs-icon-caps");I.setAttributeNS(null,"href","#vjs-icon-captions-off"),j.textTracks().on("change",(function(l){for(var e=j.textTracks(),i=!1,n=0;n<e.length;n++){var o=e[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){i=!0;break}}i?I.setAttributeNS(null,"href","#vjs-icon-captions"):I.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}j&&null!=e&&e.liveVideo&&null!=e&&e.liveui&&(j.liveTracker.on("liveedgechange",(function(){R(j)})),j.on("timeupdate",(function(){R(j)})));function O(l){var e=Math.floor(l/3600),i=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===e?"".concat(o(i),":").concat(o(n)):"".concat(o(e),":").concat(o(i),":").concat(o(n))}function D(l){var e=l.seekable();if(e&&e.length>0){var i=e.end(0);return Math.max(0,i-l.currentTime())}return 0}function R(l){var e,i,n=l.liveTracker.atLiveEdge(),o=D(l),t=null==l||null===(e=l.controlBar)||void 0===e||null===(i=e.remainingTimeDisplay)||void 0===i?void 0:i.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=O(o)))}}}(g,B),function(l,d){var v,C,c,p,g,B,y,L,j=(null==d||null===(v=d.res)||void 0===v||null===(C=v.video)||void 0===C?void 0:C.isSSAIEnabled)||!1,w=(null==d?void 0:d.skin_settings)||{};null==w||w.slowMoBtn;var E=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};null!=w&&w.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=w&&w.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&i(l,"VL_ONE",a());n(l,d);var V,x=h.get();(null==x||null===(p=x.content)||void 0===p?void 0:p.length)>0&&o(l,x);V=h.subscribe((function(e){var i,n,t=u(l);(null==t||null===(i=t.controlBar)||void 0===i||!i.getChild("videoSelector"))&&(null==e||null===(n=e.content)||void 0===n?void 0:n.length)>0&&(o(l,e),V&&V())})),(null==d||null===(g=d.streams)||void 0===g?void 0:g.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(B=d.playlist)||void 0===B||null===(y=B.content)||void 0===y?void 0:y.length)>0&&r(l,null==d?void 0:d.playlist);null!=d&&null!==(L=d.series)&&void 0!==L&&L.enable&&s(l,d);if("MEDIA_TAILOR"==(null==E?void 0:E.vodAdSticherProvider)&&null!=E&&E.vodAdClientSideTracking&&j){var M,k=null;if(null!=d&&null!==(M=d.series)&&void 0!==M&&M.enable){var S,Z,A,T=null===(S=m())||void 0===S||null===(Z=S.video)||void 0===Z||null===(A=Z.gist)||void 0===A?void 0:A.id,N=b(),P=(null==N?void 0:N.get(T))||{t:0,p:0},H=P.t;P.p<95&&(k=H)}else{var _=d.watchHistoryResumeTime;d.watchedPercentage<95&&(k=_)}f(l,k)}}(g,B),p(g,B)}export{g as initialiseSkin};
@@ -10,3 +10,13 @@ export function addCaptions(playerId?: string, subTitles?: string): void;
10
10
  export function enableCaptions(playerId: any, trackId: any): void;
11
11
  export function disableCaptions(playerId: any, trackId: any): void;
12
12
  export function syncTtmlDisplay(playerId: any): void;
13
+ /**
14
+ * Resolves the label shown for a caption track, preferring config.localisation.caption overrides.
15
+ * Overrides are keyed by track label or language code; a label match wins over a language match.
16
+ * @param {string} label
17
+ * @param {string} [language]
18
+ * @returns {string}
19
+ */
20
+ export function resolveCaptionLabel(label: string, language?: string): string;
21
+ export function resolveTrackCaptionLabel(track: any): string;
22
+ export function resolveCaptionOffLabel(): any;
@@ -1,2 +1,3 @@
1
1
  export function setLocalisation(map: any): void;
2
+ export function resolveLocalisation(config: any): any;
2
3
  export function getLocalisation(key: any): any;
@@ -1,3 +1,4 @@
1
1
  export function resolveHeightQualityLabel(height: any): any;
2
2
  export function resolveAutoQualityLabel(): any;
3
3
  export function resolveEnhancedBitrateLabel(): any;
4
+ export function getQualityLabelsMap(): any;
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{Y as d,ad as c}from"./generic-6871d7d1.js";import{m,j as u,s as p,k as v,l as h}from"./skin-2a3ee818.js";import{a as f,u as b}from"./autoNextVideo-c9d22cb4.js";import{g as y}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-cef05213.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(I,E);var N,j,k=(N=I,j=C(),function(){var e,t=a(N);if(j){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function I(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(i=k.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe((function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,b(i.videos),i._refreshList()})),i}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,l=this,s=r.dom.createEl("div",{className:"video -".concat(e)}),u=r.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=r.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),d(l.playerId,l.videos[e].id).then((function(e){l.cb&&l.cb(e)})).catch((function(e){l.cb&&l.cb(e)}))};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.fallbackImage)),p.alt="No Thumbnail Available",u.append(p);var v=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return r.dom.appendContent(s,u),r.dom.appendContent(s,v),s}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){r.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)r.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var r=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",p(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),r.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),v(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(s())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),l=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,a,s,p=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){c(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),d(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",v.append(h);var f=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(p,v),r.dom.appendContent(p,f),r.dom.appendContent(u,p),r.dom.appendContent(l,u)},v=0;v<this.videos.length;v++)p(v);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,l),h(this.playerId,e)}}]),I}();export{N as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as l,g as s}from"./icons-f9c8be77.js";import{Y as d,ad as c}from"./generic-759b1422.js";import{m,j as u,s as p,k as v,l as h}from"./skin-2a3ee818.js";import{a as f,u as b}from"./autoNextVideo-7dc4b5f9.js";import{g as y}from"./localisation-2f1ee38c.js";import{r as g}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-1577b990.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=r.getComponent("Component"),N=function(){n(I,E);var N,j,k=(N=I,j=C(),function(){var e,t=a(N);if(j){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function I(t){var o,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,I),(i=k.call(this,t,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=a.related.content,i.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),f({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe((function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,b(i.videos),i._refreshList()})),i}return t(I,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,a,l=this,s=r.dom.createEl("div",{className:"video -".concat(e)}),u=r.dom.createEl("div",{className:"recommended -".concat(e)});u.setAttribute("video-idx",e),u.onclick=function(){c(e+1);for(var t=r.dom.$$(".recommended"),o=0;o<t.length;o++)t[o].style.border="none";m(e),d(l.playerId,l.videos[e].id).then((function(e){l.cb&&l.cb(e)})).catch((function(e){l.cb&&l.cb(e)}))};var p=document.createElement("img");p.className="related-thumbnail-image",p.src="".concat((null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.fallbackImage)),p.alt="No Thumbnail Available",u.append(p);var v=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(a=this.videos[e])||void 0===a?void 0:a.title)||"")});return r.dom.appendContent(s,u),r.dom.appendContent(s,v),s}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){r.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)r.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var r=o(a(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(I,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",p(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var i=window.getComputedStyle(n,null).getPropertyValue("height");o.style.height="".concat(i),r.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o),v(this.playerId,o)}}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(s())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:y("relatedVideoTitle")||"Recommended"}),l=r.dom.createEl("div",{className:"video-selector-content"}),u=r.dom.createEl("div",{className:"video-container"}),p=function(e){var o,n,i,a,s,p=r.dom.createEl("div",{className:"video -".concat(e)}),v=r.dom.createEl("div",{className:"recommended -".concat(e)});v.setAttribute("video-idx",e),v.onclick=function(){c(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";m(e),d(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.fallbackImage)),h.alt="No Thumbnail Available",v.append(h);var f=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(s=t.videos[e])||void 0===s?void 0:s.title)||"")});r.dom.appendContent(p,v),r.dom.appendContent(p,f),r.dom.appendContent(u,p),r.dom.appendContent(l,u)},v=0;v<this.videos.length;v++)p(v);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,l),h(this.playerId,e)}}]),I}();export{N as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as s,g as d}from"./icons-f9c8be77.js";import{Y as r,ad as c}from"./generic-6871d7d1.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-2a3ee818.js";import{a as y,u as f}from"./autoNextVideo-c9d22cb4.js";import{g as E}from"./localisation-0bf399a1.js";import{r as g}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-8c8e9f2b.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-cef05213.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(j,I);var N,x,k=(N=j,x=C(),function(){var e,t=l(N);if(x){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function j(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=k.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe((function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,f(i.videos),i._refreshList()})),i}return t(j,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,s,d,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(s=l.images)||void 0===s?void 0:s.placeholderCover)),h.alt="".concat((null==this||null===(d=this.videos[e])||void 0===d||null===(r=d.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(j,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",ariaExpanded:!1,innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-89c7f4d2.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"}),n=a.dom.$(".video-selector-icon",this.el());n.onclick=function(){var i,l;null!==(i=o.classList)&&void 0!==i&&i.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o),e.handleTabIndexSelector(),null===(l=e.titleEl)||void 0===l||l.focus(),n.setAttribute("aria-expanded",!0)):(o.classList.add("hidden"),t.classList.remove("open"),n.setAttribute("aria-expanded",!1))};var i=document.getElementById(this.playerId);if(i){var l=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(l),a.dom.appendContent(t,o),i.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))}},{key:"handleTabIndexSelector",value:function(){var e,t,o;this.titleEl&&(this.titleEl.tabIndex=0),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o,n;this.titleEl&&(this.titleEl.tabIndex=-1),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1),null!==(t=document.getElementsByClassName("video-selector-icon"))&&void 0!==t&&t[0]&&document.getElementsByClassName("video-selector-icon")[0].setAttribute("aria-expanded",!1);for(var i=document.getElementsByClassName("video-accessibility"),l=(null==i||null===(o=i[0])||void 0===o||null===(n=o.children)||void 0===n?void 0:n.length)||0,a=0;a<l;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("button",{className:"video-selector-cross-icon",ariaLabel:"close video selector",type:"button",tabIndex:-1,innerHTML:"".concat(d())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=E("relatedVideoTitle")||"Recommended",s=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});s.setAttribute("role","heading"),s.setAttribute("aria-level","2"),this.titleEl=s;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,l,s,d,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("button",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.images)||void 0===d?void 0:d.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),b.setAttribute("aria-hidden","true"),h.append(b);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,y),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(n,s),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,r),b(this.playerId,e)}}]),j}();export{N as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{f as s,g as d}from"./icons-f9c8be77.js";import{Y as r,ad as c}from"./generic-759b1422.js";import{i as m,j as u,s as v,k as p,h,l as b}from"./skin-2a3ee818.js";import{a as y,u as f}from"./autoNextVideo-7dc4b5f9.js";import{g as E}from"./localisation-2f1ee38c.js";import{r as g}from"./relatedVideosManager-93533a90.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./manager-d812dea7.js";import"./browser-02f174cf.js";import"md5";import"js-cookie";import"./captions-f011a7d4.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./playerControlEvents-26580023.js";import"@viewlift/comscore/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"./index-1577b990.js";function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var I=a.getComponent("Component"),N=function(){n(j,I);var N,x,k=(N=j,x=C(),function(){var e,t=l(N);if(x){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function j(t){var o,n,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,j),(i=k.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(o=l.related)||void 0===o?void 0:o.cb)||null,i.autoNext=(null==l||null===(n=l.related)||void 0===n?void 0:n.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(c(0),y({playerId:i.playerId,content:i.videos,cb:i.cb})),i._unsubRelated=g.subscribe((function(e){var t;i.videos=(null==e?void 0:e.content)||i.videos,i.cb=null!==(t=null==e?void 0:e.cb)&&void 0!==t?t:i.cb,f(i.videos),i._refreshList()})),i}return t(j,[{key:"_buildVideoItem",value:function(e){var t,o,n,i,l,s,d,r,c,u=this,v=a.dom.createEl("div",{className:"video -".concat(e)}),p=a.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(this.videos[e].title),type:"button",tabIndex:-1});p.setAttribute("video-idx",e),p.onkeydown=function(t){"Enter"===t.key&&u.loadVideoAssetById(e)},p.onclick=function(){u.loadVideoAssetById(e)};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat(m(null==this||null===(t=this.videos)||void 0===t||null===(o=t[e])||void 0===o?void 0:o.img)||m(null===(n=window)||void 0===n||null===(i=n.app_data)||void 0===i||null===(l=i.appcmsMain)||void 0===l||null===(s=l.images)||void 0===s?void 0:s.placeholderCover)),h.alt="".concat((null==this||null===(d=this.videos[e])||void 0===d||null===(r=d.title)||void 0===r?void 0:r.trim().split(/\s+/).slice(0,2).join(" "))||""),p.append(h);var b=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==this||null===(c=this.videos[e])||void 0===c?void 0:c.title)||"")});return a.dom.appendContent(v,p),a.dom.appendContent(v,b),v}},{key:"_refreshList",value:function(){var e=this.el().querySelector(".video-container");if(e){a.dom.emptyEl(e);for(var t=0;t<this.videos.length;t++)a.dom.appendContent(e,this._buildVideoItem(t))}}},{key:"dispose",value:function(){this._unsubRelated&&this._unsubRelated(),function(e,t,n,i){var a=o(l(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof a?function(e){return a.apply(n,e)}:a}(j,"dispose",this,3)([])}},{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"video-selector-icon",title:"video selector",ariaExpanded:!1,innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-89c7f4d2.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"video-selection-container hidden"}),n=a.dom.$(".video-selector-icon",this.el());n.onclick=function(){var i,l;null!==(i=o.classList)&&void 0!==i&&i.contains("hidden")?(u(),o.classList.remove("hidden"),t.classList.add("open"),v(e.playerId,o),e.handleTabIndexSelector(),null===(l=e.titleEl)||void 0===l||l.focus(),n.setAttribute("aria-expanded",!0)):(o.classList.add("hidden"),t.classList.remove("open"),n.setAttribute("aria-expanded",!1))};var i=document.getElementById(this.playerId);if(i){var l=window.getComputedStyle(i,null).getPropertyValue("height");o.style.height="".concat(l),a.dom.appendContent(t,o),i.style.overflow="hidden",this.addFunctionality(o),p(this.playerId,o)}}},{key:"loadVideoAssetById",value:function(e){var t=this;c(e+1);for(var o=a.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";h(e),r(this.playerId,this.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))}},{key:"handleTabIndexSelector",value:function(){var e,t,o;this.titleEl&&(this.titleEl.tabIndex=0),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var n=document.getElementsByClassName("video-accessibility"),i=(null==n||null===(t=n[0])||void 0===t||null===(o=t.children)||void 0===o?void 0:o.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,o,n;this.titleEl&&(this.titleEl.tabIndex=-1),null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1),null!==(t=document.getElementsByClassName("video-selector-icon"))&&void 0!==t&&t[0]&&document.getElementsByClassName("video-selector-icon")[0].setAttribute("aria-expanded",!1);for(var i=document.getElementsByClassName("video-accessibility"),l=(null==i||null===(o=i[0])||void 0===o||null===(n=o.children)||void 0===n?void 0:n.length)||0,a=0;a<l;a++)document.getElementsByClassName("recommended -".concat(a))&&(document.getElementsByClassName("recommended -".concat(a))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"video-selector-head"}),i=a.dom.createEl("button",{className:"video-selector-cross-icon",ariaLabel:"close video selector",type:"button",tabIndex:-1,innerHTML:"".concat(d())});i.onkeydown=function(n){"Enter"===n.key&&(e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),t.handleCloseTabIndex()};var l=E("relatedVideoTitle")||"Recommended",s=a.dom.createEl("div",{className:"video-selector-title",innerHTML:l,ariaLabel:l,tabIndex:-1});s.setAttribute("role","heading"),s.setAttribute("aria-level","2"),this.titleEl=s;for(var r=a.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=a.dom.createEl("div",{className:"video-container video-accessibility"}),u=function(e){var o,n,i,l,s,d,u,v,p=a.dom.createEl("div",{className:"video -".concat(e)}),h=a.dom.createEl("button",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(o){"Enter"===o.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var b=document.createElement("img");b.className="related-thumbnail-image",b.src="".concat(m(null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||m(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(s=l.appcmsMain)||void 0===s||null===(d=s.images)||void 0===d?void 0:d.placeholderCover)),b.alt="".concat((null==t||null===(u=t.videos[e])||void 0===u?void 0:u.title.trim().split(/\s+/).slice(0,2).join(" "))||""),b.setAttribute("aria-hidden","true"),h.append(b);var y=a.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});a.dom.appendContent(p,h),a.dom.appendContent(p,y),a.dom.appendContent(c,p),a.dom.appendContent(r,c)},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(n,s),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,r),b(this.playerId,e)}}]),j}();export{N as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "2.0.377-backup",
3
+ "version": "2.0.379-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 e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),r=require("./icons-437e83c9.js"),c=require("./captions-abd87121.js"),l=require("./skin-55634dc6.js");function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}require("@babel/runtime/helpers/toConsumableArray");var d=i.getComponent("Component"),p=function(){n(v,d);var p,u,m=(p=v,u=s(),function(){var e,t=o(p);if(u){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function v(t){var n,a,o,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(i=m.call(this,t,r)).playerId=r.playerId,i.seriesData=r.sres,i.currentVideoData=r.res,i.initialiseStructure(),i.loadCSS(),null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important"),i}return t(v,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"caption-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"caption-selector-icon",innerHTML:"".concat(r.CaptionsSvgV2())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./caption-settings-67212c17.js")})).then((function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=c.getCaptions(this.playerId);null==t||t.map((function(t){return c.disableCaptions(e.playerId,t.id)}));var n=this.el(),a=i.dom.createEl("div",{className:"caption-selection-container hidden"});i.dom.$(".caption-selector-icon",this.el()).onclick=function(){var t;null!==(t=a.classList)&&void 0!==t&&t.contains("hidden")?(l.closeOpenDrawers(),a.classList.remove("hidden"),n.classList.add("open"),a.style.right="0px",l.setUpdatedElHeight(e.playerId,a)):(a.classList.add("hidden"),n.classList.remove("open"),a.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var r=window.getComputedStyle(o,null).getPropertyValue("height");a.style.height="".concat(r),i.dom.appendContent(n,a),o.style.overflow="hidden",this.addFunctionality(a),l.detectOrientationChange(this.playerId,a)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=i.dom.createEl("div",{className:"caption-selector-head"}),a=i.dom.createEl("div",{className:"caption-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var o=i.dom.createEl("div",{className:"caption-selector-title",innerHTML:"Captions"}),c=i.dom.createEl("div",{className:"caption-selector-content"}),s=i.dom.createEl("div",{className:"caption-container"}),d=this.createLanguageContanier();i.dom.appendContent(s,d),i.dom.appendContent(n,a),i.dom.appendContent(n,o),i.dom.appendContent(e,n),i.dom.appendContent(e,c),i.dom.appendContent(c,s),l.handleDrawerResizing(this.playerId,e)}},{key:"createLanguageContanier",value:function(){var e=this,t=i.dom.createEl("div",{className:"caption-language-container"}),n=i.dom.createEl("div",{className:"caption-language-container-title",innerHTML:"Language"});i.dom.appendContent(t,n);var a=document.createElement("label");a.setAttribute("for","radio-off"),a.className="caption-language-holder";var o=document.createElement("div");o.className="caption",o.innerHTML="Off";var r=i.dom.createEl("input",{className:"radio - off",id:"radio-off",name:"language-radio",checked:"true"});r.setAttribute("type","radio"),r.onchange=function(t){var n,a,o;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(a=n[0])||void 0===a||null===(o=a.style)||void 0===o||o.setProperty("display","none","important")),c.getCaptions(e.playerId).map((function(t){return c.disableCaptions(e.playerId,t.id)}))},i.dom.appendContent(a,r),i.dom.appendContent(a,o),i.dom.appendContent(t,a);for(var l=c.getCaptions(this.playerId),s=function(n){var a,o=document.createElement("label");o.className="caption-language-holder",o.setAttribute("for","language-radio-".concat(n));var r=document.createElement("div");r.className="caption - ".concat(n),r.textContent=null==l||null===(a=l[n])||void 0===a?void 0:a.label;var s=i.dom.createEl("input",{className:"radio - ".concat(n),id:"language-radio-".concat(n),name:"language-radio"});s.onchange=function(t){c.enableCaptions(e.playerId,l[n].id)},s.setAttribute("type","radio"),i.dom.appendContent(o,s),i.dom.appendContent(o,r),i.dom.appendContent(t,o)},d=0;d<l.length;d++)s(d);return t}},{key:"createFontSizeContainer",value:function(){var e=i.dom.createEl("div",{className:"caption-font-container"}),t=i.dom.createEl("div",{className:"caption-font-container-title",innerHTML:"Font Size"});i.dom.appendContent(e,t);for(var n=[{size:14},{size:18},{size:24}],a=0;a<n.length;a++){var o,r=document.createElement("label");r.className="caption-font-holder",r.setAttribute("for","font".concat(a));var c=document.createElement("div");c.className="fontsize - ".concat(a),c.textContent=(null==n||null===(o=n[a])||void 0===o?void 0:o.size)+"pt";var l=i.dom.createEl("input",{className:"radio - ".concat(a),id:"font".concat(a),name:"font-size-radio",size:"".concat(n[a].size),checked:"".concat(a==n.length-1)});l.setAttribute("type","radio"),l.onchange=function(e){var t=e.target.size;if(document.getElementById("caption-size")){document.getElementById("caption-size").textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}")}else{var n=document.createElement("style");n.textContent=".vjs-text-track-cue{font-size:".concat(t,"px !important}"),n.id="caption-size",document.head.append(n)}},i.dom.appendContent(r,l),i.dom.appendContent(r,c),i.dom.appendContent(e,r)}return e}}]),v}();exports.default=p;
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("video.js"),n=require("./skin-55634dc6.js"),a={en:"English",eng:"English",es:"Spanish",spa:"Spanish",fr:"French",fre:"French",fra:"French",de:"German",ger:"German",deu:"German",pt:"Portuguese",por:"Portuguese",it:"Italian",ita:"Italian",nl:"Dutch",nld:"Dutch",dut:"Dutch",ru:"Russian",rus:"Russian",zh:"Chinese",zho:"Chinese",chi:"Chinese",ja:"Japanese",jpn:"Japanese",ko:"Korean",kor:"Korean",ar:"Arabic",ara:"Arabic",hi:"Hindi",hin:"Hindi",sv:"Swedish",swe:"Swedish",no:"Norwegian",nor:"Norwegian",da:"Danish",dan:"Danish",fi:"Finnish",fin:"Finnish",pl:"Polish",pol:"Polish",tr:"Turkish",tur:"Turkish",el:"Greek",ell:"Greek",gre:"Greek",he:"Hebrew",heb:"Hebrew",th:"Thai",tha:"Thai",vi:"Vietnamese",vie:"Vietnamese",id:"Indonesian",ind:"Indonesian",ms:"Malay",msa:"Malay",may:"Malay",cs:"Czech",ces:"Czech",cze:"Czech",sk:"Slovak",slk:"Slovak",slo:"Slovak",hu:"Hungarian",hun:"Hungarian",ro:"Romanian",ron:"Romanian",rum:"Romanian",uk:"Ukrainian",ukr:"Ukrainian"},r=function(e){return e&&a[e.trim().toLowerCase()]||e},i=t.getComponent("TextTrackMenuItem");if(i&&!i.prototype.__vlLanguageLabelPatched){var o=i.prototype.localize;i.prototype.localize=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return o.call.apply(o,[this,r(e)].concat(n))},i.prototype.__vlLanguageLabelPatched=!0}exports.addCaptions=function(e,t){var a=n.getPlayer(e);a.remoteTextTracks().tracks_.map((function(e){a.removeRemoteTextTrack(e)})),t.map((function(e){a.addRemoteTextTrack({src:e.url,srclang:e.srclang,label:r(e.label||(null==e?void 0:e.language))})}))},exports.disableCaptions=function(e,t){for(var a=n.getPlayer(e).textTracks(),r=0;r<a.length;r++){var i=a[r];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.enableCaptions=function(e,t){var a,r,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(a=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===a||null===(r=a[0])||void 0===r||null===(i=r.style)||void 0===i||i.setProperty("display","flex"));for(var o=n.getPlayer(e).textTracks(),s=0;s<o.length;s++){var l=o[s];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=t||(l.mode="showing")}},exports.getCaptions=function(e){var t,a=n.getPlayer(e),r=null==a||null===(t=a.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind}));return function(){var e,t=null===(e=document)||void 0===e?void 0:e.querySelector(".vjs-texttrack-settings"),n=null==t?void 0:t.querySelector(".vjs-control-text");t&&n&&(n.textContent="opens captions settings");var a=document.querySelectorAll(".vjs-subtitles-menu-item");(null==a?void 0:a.length)>0&&a.forEach((function(e,t){var n=e.querySelector(".vjs-menu-item-text");"en"==n.textContent?n.setAttribute("aria-label","English"):"es"==n.textContent?n.setAttribute("aria-label","Espanol"):n.setAttribute("aria-label",n.textContent)}))}(),r||[]},exports.removeCaptions=function(e){var t=n.getPlayer(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},exports.removeDuplicateCaptions=function(t){var a,r,i=n.getPlayer(t);if(i){var o=e((null===(a=i.textTracks())||void 0===a?void 0:a.tracks_)||[]).filter((function(e){return"subtitles"===e.kind||"captions"===e.kind})),s=new Set((null===(r=i.remoteTextTracks())||void 0===r?void 0:r.tracks_)||[]),l=new Map;o.forEach((function(e){var t="".concat(e.kind,"|").concat(e.language||"","|").concat(e.label||"");l.has(t)||l.set(t,[]),l.get(t).push(e)})),l.forEach((function(e){if(!(e.length<2)){var t=e.find((function(e){return"showing"===e.mode}))||e[0];e.forEach((function(e){e!==t&&s.has(e)&&i.removeRemoteTextTrack(e)}))}}))}},exports.syncTtmlDisplay=function(e){var t,a=n.getPlayer(e),r=null==a||null===(t=a.el())||void 0===t?void 0:t.querySelector(".vjs-text-track-display-ttml");r&&(Array.from(a.textTracks()).some((function(e){return("captions"===e.kind||"subtitles"===e.kind)&&"showing"===e.mode}))?r.style.setProperty("display","flex"):(r.style.setProperty("display","none","important"),r.innerHTML=""))};