@viewlift/player-backup 2.0.229-backup → 2.0.230-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 (179) hide show
  1. package/@viewlift/player-backup/cjs/{autoNextVideo-a96d73b9.js → autoNextVideo-a42585ab.js} +1 -1
  2. package/@viewlift/player-backup/cjs/bundle.css +933 -933
  3. package/@viewlift/player-backup/cjs/{features-e0b20fb8.js → features-f68ce3fb.js} +1 -1
  4. package/@viewlift/player-backup/cjs/{generic-6a2ba5db.js → generic-42df2356.js} +1 -1
  5. package/@viewlift/{player/cjs/index-dc27b685.js → player-backup/cjs/index-04b2530f.js} +1 -1
  6. package/@viewlift/player-backup/cjs/{index-d7f46b96.js → index-90466af0.js} +1 -1
  7. package/@viewlift/player-backup/cjs/{index-f7a6741b.js → index-ae7fa630.js} +1 -1
  8. package/@viewlift/player-backup/cjs/index.js +1 -1
  9. package/@viewlift/player-backup/cjs/{multicamv2-c83f7ed2.js → multicamv2-7d163d9d.js} +1 -1
  10. package/@viewlift/player-backup/cjs/{multicamv2-9990d70f.js → multicamv2-e5f9f991.js} +1 -1
  11. package/@viewlift/{player/cjs/nextEpisodeButton-82932303.js → player-backup/cjs/nextEpisodeButton-f8aacfc8.js} +1 -1
  12. package/@viewlift/player-backup/cjs/{playlist-dd9bd2bd.js → playlist-0cf7efc7.js} +1 -1
  13. package/@viewlift/player-backup/cjs/{series-55942b92.js → series-ba300c8a.js} +1 -1
  14. package/@viewlift/player-backup/cjs/{series-v2-588c92cf.js → series-v2-99b6589c.js} +1 -1
  15. package/@viewlift/{player/cjs/series-v2-8440f095.js → player-backup/cjs/series-v2-f0132e4d.js} +1 -1
  16. package/@viewlift/player-backup/cjs/{skin-77a58b45.js → skin-1d5f75a5.js} +1 -1
  17. package/@viewlift/player-backup/cjs/{skin-b90d17c5.js → skin-657fecd5.js} +1 -1
  18. package/@viewlift/player-backup/cjs/{skin-e7fc7639.js → skin-6d8c7523.js} +1 -1
  19. package/@viewlift/player-backup/cjs/{skin-adabac44.js → skin-9ea5e200.js} +1 -1
  20. package/@viewlift/{player/cjs/skin-7791bfcc.js → player-backup/cjs/skin-b59e6f4b.js} +1 -1
  21. package/@viewlift/player-backup/cjs/{skin-5e45a3fc.js → skin-b8e41049.js} +1 -1
  22. package/@viewlift/player-backup/cjs/{skin-158708bd.js → skin-bae423f5.js} +1 -1
  23. package/@viewlift/player-backup/cjs/{skin-5cd92b41.js → skin-fd0abb21.js} +1 -1
  24. package/@viewlift/player-backup/cjs/{skin-6c0442c4.js → skin-febf5feb.js} +1 -1
  25. package/@viewlift/{player/cjs/util-7bd5a6bc.js → player-backup/cjs/util-1ecaa3aa.js} +1 -1
  26. package/@viewlift/player-backup/cjs/{videoSelector-bdd3458b.js → videoSelector-b063c2fa.js} +1 -1
  27. package/@viewlift/player-backup/cjs/{videoSelector-592002a3.js → videoSelector-c7a8084b.js} +1 -1
  28. package/@viewlift/player-backup/esm/{autoNextVideo-1c43df3b.js → autoNextVideo-562cb118.js} +1 -1
  29. package/@viewlift/player-backup/esm/bundle.css +933 -933
  30. package/@viewlift/{player/esm/features-14645d28.js → player-backup/esm/features-cd2d1ef5.js} +1 -1
  31. package/@viewlift/player-backup/esm/{generic-749be534.js → generic-0d8916dd.js} +1 -1
  32. package/@viewlift/{player/esm/index-962adc0f.js → player-backup/esm/index-6878d5da.js} +1 -1
  33. package/@viewlift/{player/esm/index-2feba524.js → player-backup/esm/index-96695c58.js} +1 -1
  34. package/@viewlift/{player/esm/index-b68f3de7.js → player-backup/esm/index-d4b7f0f1.js} +1 -1
  35. package/@viewlift/player-backup/esm/index.js +1 -1
  36. package/@viewlift/{player/esm/multicamv2-71497045.js → player-backup/esm/multicamv2-73e06f75.js} +1 -1
  37. package/@viewlift/player-backup/esm/{multicamv2-e193da51.js → multicamv2-b4132d34.js} +1 -1
  38. package/@viewlift/{player/esm/nextEpisodeButton-6dfddf32.js → player-backup/esm/nextEpisodeButton-55ba4076.js} +1 -1
  39. package/@viewlift/{player/esm/playlist-495143be.js → player-backup/esm/playlist-18c389e3.js} +1 -1
  40. package/@viewlift/player-backup/esm/{series-9cd0ff8f.js → series-d2127ba9.js} +1 -1
  41. package/@viewlift/player-backup/esm/{series-v2-a9038834.js → series-v2-374d6ad3.js} +1 -1
  42. package/@viewlift/{player/esm/series-v2-6effac8f.js → player-backup/esm/series-v2-45904259.js} +1 -1
  43. package/@viewlift/player-backup/esm/{skin-e665cba3.js → skin-1cf8c85f.js} +1 -1
  44. package/@viewlift/player-backup/esm/{skin-bbb8d8ac.js → skin-386fb496.js} +1 -1
  45. package/@viewlift/player-backup/esm/{skin-8efd151b.js → skin-48674c27.js} +1 -1
  46. package/@viewlift/player-backup/esm/{skin-996aec07.js → skin-57bd5f88.js} +1 -1
  47. package/@viewlift/player-backup/esm/{skin-aa1f01a4.js → skin-68945038.js} +1 -1
  48. package/@viewlift/player-backup/esm/{skin-755ef0cf.js → skin-783bc970.js} +1 -1
  49. package/@viewlift/player-backup/esm/{skin-f927be29.js → skin-a7b78d71.js} +1 -1
  50. package/@viewlift/{player/esm/skin-e36f960c.js → player-backup/esm/skin-bc3198f1.js} +1 -1
  51. package/@viewlift/{player/esm/skin-2af1a28a.js → player-backup/esm/skin-de1aa5f5.js} +1 -1
  52. package/@viewlift/player-backup/esm/{util-cee0891f.js → util-931b842b.js} +1 -1
  53. package/@viewlift/player-backup/esm/{videoSelector-65c51f5e.js → videoSelector-3c767fee.js} +1 -1
  54. package/@viewlift/player-backup/esm/{videoSelector-0cfed08d.js → videoSelector-c45eea40.js} +1 -1
  55. package/@viewlift/player-backup/package.json +1 -1
  56. package/@viewlift/player_legacy/cjs/bundle.css +5 -5
  57. package/@viewlift/player_legacy/esm/bundle.css +5 -5
  58. package/package.json +1 -1
  59. package/@viewlift/player/cjs/autoNextVideo-aebb5b86.js +0 -1
  60. package/@viewlift/player/cjs/bundle.css +0 -2830
  61. package/@viewlift/player/cjs/caption-settings-34ca0188.js +0 -1
  62. package/@viewlift/player/cjs/caption-settings-d1eb3bf6.js +0 -1
  63. package/@viewlift/player/cjs/captions-dbc83a75.js +0 -1
  64. package/@viewlift/player/cjs/chromett-f925fb6c.js +0 -1
  65. package/@viewlift/player/cjs/currentVideoInfo-31d70bec.js +0 -1
  66. package/@viewlift/player/cjs/error-26d5a3c3.js +0 -1
  67. package/@viewlift/player/cjs/features-7c91a868.js +0 -1
  68. package/@viewlift/player/cjs/generic-5bea38c9.js +0 -1
  69. package/@viewlift/player/cjs/helper-a50a8ffc.js +0 -1
  70. package/@viewlift/player/cjs/icons-2609dbe4.js +0 -1
  71. package/@viewlift/player/cjs/index-3f0e537b.js +0 -1
  72. package/@viewlift/player/cjs/index-4905764c.js +0 -1
  73. package/@viewlift/player/cjs/index-a3e9c3fa.js +0 -1
  74. package/@viewlift/player/cjs/index-f292ad41.js +0 -1
  75. package/@viewlift/player/cjs/index.js +0 -1
  76. package/@viewlift/player/cjs/localisation-56e0a999.js +0 -1
  77. package/@viewlift/player/cjs/multicamv2-1efdbdb9.js +0 -1
  78. package/@viewlift/player/cjs/multicamv2-62765979.js +0 -1
  79. package/@viewlift/player/cjs/multicamv2-7a86b517.js +0 -1
  80. package/@viewlift/player/cjs/multicamv2-9b055a51.js +0 -1
  81. package/@viewlift/player/cjs/nextEpisodeButton-b6e6586f.js +0 -1
  82. package/@viewlift/player/cjs/player_instance-fcf6a8fb.js +0 -1
  83. package/@viewlift/player/cjs/playlist-1d71412d.js +0 -1
  84. package/@viewlift/player/cjs/playlist-df87ca90.js +0 -1
  85. package/@viewlift/player/cjs/resolution-f9dcc1b4.js +0 -1
  86. package/@viewlift/player/cjs/resolution-v2-e42e0101.js +0 -1
  87. package/@viewlift/player/cjs/series-9c237975.js +0 -1
  88. package/@viewlift/player/cjs/series-adbda303.js +0 -1
  89. package/@viewlift/player/cjs/series-v2-2105fd89.js +0 -1
  90. package/@viewlift/player/cjs/series-v2-a80f7f84.js +0 -1
  91. package/@viewlift/player/cjs/series-v2-e037e14e.js +0 -1
  92. package/@viewlift/player/cjs/settings-icon-8d364c01.js +0 -1
  93. package/@viewlift/player/cjs/settings-icon-b43f4406.js +0 -1
  94. package/@viewlift/player/cjs/skin-033b83d4.js +0 -1
  95. package/@viewlift/player/cjs/skin-225252ff.js +0 -1
  96. package/@viewlift/player/cjs/skin-37b25d7d.js +0 -1
  97. package/@viewlift/player/cjs/skin-38de8257.js +0 -1
  98. package/@viewlift/player/cjs/skin-3da27707.js +0 -1
  99. package/@viewlift/player/cjs/skin-49515c15.js +0 -1
  100. package/@viewlift/player/cjs/skin-5eee1389.js +0 -1
  101. package/@viewlift/player/cjs/skin-6c9a5185.js +0 -1
  102. package/@viewlift/player/cjs/skin-ba38afdb.js +0 -1
  103. package/@viewlift/player/cjs/skin-ddeeaf13.js +0 -1
  104. package/@viewlift/player/cjs/skin-eb0ecb8c.js +0 -1
  105. package/@viewlift/player/cjs/skin-f5e18b89.js +0 -1
  106. package/@viewlift/player/cjs/skin-fc1e7e52.js +0 -1
  107. package/@viewlift/player/cjs/start-begin-btn-5739a6c0.js +0 -1
  108. package/@viewlift/player/cjs/videoSelector-b63e0a55.js +0 -1
  109. package/@viewlift/player/cjs/videoSelector-b6e03076.js +0 -1
  110. package/@viewlift/player/cjs/videoSelector-d080a65f.js +0 -1
  111. package/@viewlift/player/cjs/videoSelector-fcdf11eb.js +0 -1
  112. package/@viewlift/player/cjs/videojs-dash5.es-ec94e5f4.js +0 -1
  113. package/@viewlift/player/cjs/watch-live-btn-822534d1.js +0 -1
  114. package/@viewlift/player/esm/autoNextVideo-45c813b4.js +0 -1
  115. package/@viewlift/player/esm/bundle.css +0 -2830
  116. package/@viewlift/player/esm/caption-settings-6001af40.js +0 -1
  117. package/@viewlift/player/esm/caption-settings-cb47408f.js +0 -1
  118. package/@viewlift/player/esm/captions-f507e8ee.js +0 -1
  119. package/@viewlift/player/esm/chromett-a3cbb2e1.js +0 -1
  120. package/@viewlift/player/esm/currentVideoInfo-a8a254c2.js +0 -1
  121. package/@viewlift/player/esm/error-2395864b.js +0 -1
  122. package/@viewlift/player/esm/generic-769f7ba2.js +0 -1
  123. package/@viewlift/player/esm/helper-349e076f.js +0 -1
  124. package/@viewlift/player/esm/icons-37daa6b3.js +0 -1
  125. package/@viewlift/player/esm/index-4cc8ac6f.js +0 -1
  126. package/@viewlift/player/esm/index-8e3eab6d.js +0 -1
  127. package/@viewlift/player/esm/index.js +0 -1
  128. package/@viewlift/player/esm/localisation-0bf399a1.js +0 -1
  129. package/@viewlift/player/esm/multicamv2-1fb5149a.js +0 -1
  130. package/@viewlift/player/esm/multicamv2-4f51caf2.js +0 -1
  131. package/@viewlift/player/esm/multicamv2-b7cec0cf.js +0 -1
  132. package/@viewlift/player/esm/nextEpisodeButton-a1556cdf.js +0 -1
  133. package/@viewlift/player/esm/player_instance-34118a5b.js +0 -1
  134. package/@viewlift/player/esm/playlist-7ecf432a.js +0 -1
  135. package/@viewlift/player/esm/resolution-1c59b0f3.js +0 -1
  136. package/@viewlift/player/esm/resolution-v2-705ae275.js +0 -1
  137. package/@viewlift/player/esm/series-041152aa.js +0 -1
  138. package/@viewlift/player/esm/series-becf9249.js +0 -1
  139. package/@viewlift/player/esm/series-v2-6e9853f8.js +0 -1
  140. package/@viewlift/player/esm/series-v2-87343239.js +0 -1
  141. package/@viewlift/player/esm/series-v2-dc3b2cc0.js +0 -1
  142. package/@viewlift/player/esm/settings-icon-1e7b0951.js +0 -1
  143. package/@viewlift/player/esm/settings-icon-1fbc99bc.js +0 -1
  144. package/@viewlift/player/esm/skin-11e8e90b.js +0 -1
  145. package/@viewlift/player/esm/skin-271fa63f.js +0 -1
  146. package/@viewlift/player/esm/skin-273ee9b8.js +0 -1
  147. package/@viewlift/player/esm/skin-2c638dc1.js +0 -1
  148. package/@viewlift/player/esm/skin-3dcba1b2.js +0 -1
  149. package/@viewlift/player/esm/skin-52c3510b.js +0 -1
  150. package/@viewlift/player/esm/skin-5804a5af.js +0 -1
  151. package/@viewlift/player/esm/skin-71be210e.js +0 -1
  152. package/@viewlift/player/esm/skin-b9731ec0.js +0 -1
  153. package/@viewlift/player/esm/skin-d4a4342d.js +0 -1
  154. package/@viewlift/player/esm/skin-e6600a72.js +0 -1
  155. package/@viewlift/player/esm/skin-fbab87d5.js +0 -1
  156. package/@viewlift/player/esm/start-begin-btn-1e096fec.js +0 -1
  157. package/@viewlift/player/esm/util-06603bad.js +0 -1
  158. package/@viewlift/player/esm/videoSelector-7ec3b7b4.js +0 -1
  159. package/@viewlift/player/esm/videoSelector-8e258d45.js +0 -1
  160. package/@viewlift/player/esm/videoSelector-c49f57b3.js +0 -1
  161. package/@viewlift/player/esm/videoSelector-def99d5e.js +0 -1
  162. package/@viewlift/player/esm/videojs-dash5.es-390dd922.js +0 -1
  163. package/@viewlift/player/esm/watch-live-btn-5419f3a7.js +0 -1
  164. package/@viewlift/player/package.json +0 -23
  165. package/@viewlift/player-backup/cjs/index-3eef2a22.js +0 -1
  166. package/@viewlift/player-backup/cjs/nextEpisodeButton-cdcff8ec.js +0 -1
  167. package/@viewlift/player-backup/cjs/series-v2-a6f4b9b9.js +0 -1
  168. package/@viewlift/player-backup/cjs/skin-391418cd.js +0 -1
  169. package/@viewlift/player-backup/cjs/util-7c5a46f3.js +0 -1
  170. package/@viewlift/player-backup/esm/features-465db57c.js +0 -1
  171. package/@viewlift/player-backup/esm/index-9ac54b9b.js +0 -1
  172. package/@viewlift/player-backup/esm/index-ada7d4ee.js +0 -1
  173. package/@viewlift/player-backup/esm/index-c4f3477c.js +0 -1
  174. package/@viewlift/player-backup/esm/multicamv2-644cda07.js +0 -1
  175. package/@viewlift/player-backup/esm/nextEpisodeButton-7dd08b7a.js +0 -1
  176. package/@viewlift/player-backup/esm/playlist-6d62bee9.js +0 -1
  177. package/@viewlift/player-backup/esm/series-v2-4672090b.js +0 -1
  178. package/@viewlift/player-backup/esm/skin-21d3ed15.js +0 -1
  179. package/@viewlift/player-backup/esm/skin-62bf8143.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),r=require("./generic-6a2ba5db.js"),d=require("./currentVideoInfo-31d70bec.js"),s=require("./skin-f5e18b89.js"),c=require("./autoNextVideo-a96d73b9.js"),u=require("./localisation-56e0a999.js");function m(e){var t=v();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-7c5a46f3.js");var p=l.getComponent("Component"),h=function(o){n(v,p);var i=m(v);function v(t){var n,o,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(l=i.call(this,t,a)).playerId=a.playerId,l.seriesData=a.sres,l.videos=a.related.content,l.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,l.currentVideoData=a.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-b6e03076.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(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";s.highlightVideo(e),r.load(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,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.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,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,u,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(s.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||s.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(u=r.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(c,p),l.dom.appendContent(d,c)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,d),s.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=h;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-2609dbe4.js"),r=require("./generic-42df2356.js"),d=require("./currentVideoInfo-31d70bec.js"),s=require("./skin-f5e18b89.js"),c=require("./autoNextVideo-a42585ab.js"),u=require("./localisation-56e0a999.js");function m(e){var t=v();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./player_instance-fcf6a8fb.js"),require("js-cookie"),require("./captions-dbc83a75.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/slicedToArray"),require("@viewlift/comscore/index.js"),require("./util-1ecaa3aa.js");var p=l.getComponent("Component"),h=function(o){n(v,p);var i=m(v);function v(t){var n,o,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,v),(l=i.call(this,t,a)).playerId=a.playerId,l.seriesData=a.sres,l.videos=a.related.content,l.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,l.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,l.currentVideoData=a.res,l.initialiseStructure(),l.loadCSS(),l.autoNext&&(d.setVideoIdx(0),c.autoPlayNext({playerId:l.playerId,content:l.videos,cb:l.cb})),l}return t(v,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-b6e03076.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(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(s.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),s.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),s.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";s.highlightVideo(e),r.load(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,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.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,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var r=l.dom.createEl("div",{className:"video-selector-title",innerHTML:u.getLocalisation("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),c=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,r,u,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(s.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||s.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(r=a.appcmsMain)||void 0===r||null===(u=r.images)||void 0===u?void 0:u.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(c,p),l.dom.appendContent(d,c)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,r),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,d),s.handleDrawerResizing(this.playerId,e)}}]),v}();exports.default=h;
@@ -1 +1 @@
1
- import{s as n,j as t,k as o}from"./currentVideoInfo-a8a254c2.js";import{E as i,T as e}from"./generic-749be534.js";import{a as r}from"./util-cee0891f.js";import{h as s}from"./skin-3dcba1b2.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,(function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then((function(t){s(f,h),n(t.response),f++,p(t)})).catch((function(n){p(n),s(f,h),f++,u=setTimeout((function(){e(h)&&l(f,h,d)}),5e3)}))))}))},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then((function(n){s(f,e),f++,p(n)})).catch((function(t){p(t),setTimeout((function(){s(f,e),f++,n(f,e,r)}),5e3)})))},p=function(n){c&&c(n)};export{m as a,l as s};
1
+ import{s as n,j as t,k as o}from"./currentVideoInfo-a8a254c2.js";import{E as i,T as e}from"./generic-0d8916dd.js";import{a as r}from"./util-931b842b.js";import{h as s}from"./skin-3dcba1b2.js";import{g as a}from"./player_instance-34118a5b.js";var c,u=0,f=0,m=function(m){clearTimeout(u);var d=null==m?void 0:m.content;c=null==m?void 0:m.cb;var h=m.playerId;r(h,(function(){var r=a(h);0!==(null==r?void 0:r.currentTime())&&((f=t())>d.length-1||(o(f+1),i(h,d[f].id).then((function(t){s(f,h),n(t.response),f++,p(t)})).catch((function(n){p(n),s(f,h),f++,u=setTimeout((function(){e(h)&&l(f,h,d)}),5e3)}))))}))},l=function n(t,e,r,a){f=t,t>r.length-1||(o(f+1),i(e,r[t].id).then((function(n){s(f,e),f++,p(n)})).catch((function(t){p(t),setTimeout((function(){s(f,e),f++,n(f,e,r)}),5e3)})))},p=function(n){c&&c(n)};export{m as a,l as s};