@gcorevideo/player 2.20.7 → 2.20.9

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 (218) hide show
  1. package/dist/core.js +54 -25
  2. package/dist/index.css +1184 -1184
  3. package/dist/index.js +298 -267
  4. package/dist/player.d.ts +178 -126
  5. package/dist/plugins/index.css +841 -841
  6. package/dist/plugins/index.js +192 -192
  7. package/docs/api/player.bottomgear.md +14 -0
  8. package/docs/api/player.bottomgear.refresh.md +20 -0
  9. package/docs/api/player.clapprnerdstats.md +1 -1
  10. package/docs/api/player.clapprstats.exportmetrics.md +1 -1
  11. package/docs/api/player.clapprstats.md +1 -15
  12. package/docs/api/player.clapprstats.setupdatemetrics.md +2 -0
  13. package/docs/api/player.clipsplugin.md +1 -1
  14. package/docs/api/player.clipspluginsettings.md +5 -2
  15. package/docs/api/player.clipspluginsettings.text.md +3 -0
  16. package/docs/api/{player.errorscreen.bindevents.md → player.containerpluginconstructor.md} +7 -6
  17. package/docs/api/{player.errorscreen.render.md → player.corepluginconstructor.md} +7 -6
  18. package/docs/api/player.errordesc.md +28 -0
  19. package/docs/api/player.errorscreen.md +1 -220
  20. package/docs/api/{player.errorscreen.hide.md → player.errorscreenpluginsettings.md} +7 -7
  21. package/docs/api/player.levelselector.md +3 -9
  22. package/docs/api/player.levelselectorpluginsettings.labels.md +24 -0
  23. package/docs/api/player.levelselectorpluginsettings.md +79 -0
  24. package/docs/api/player.levelselectorpluginsettings.restrictresolution.md +16 -0
  25. package/docs/api/player.md +93 -16
  26. package/docs/api/{player.errorscreen.container.md → player.mediacontrol.currentseekpos.md} +3 -3
  27. package/docs/api/player.mediacontrol.disable.md +1 -1
  28. package/docs/api/player.mediacontrol.md +23 -2
  29. package/docs/api/{player.gearevents.md → player.mediacontrolevents.md} +4 -4
  30. package/docs/api/player.multicamera.md +1 -29
  31. package/docs/api/player.playbackerror.md +19 -0
  32. package/docs/api/{player.errorscreen.supportedversion.md → player.playbackerror.ui.md} +7 -4
  33. package/docs/api/player.playbackerrorcode.md +3 -3
  34. package/docs/api/{player.errorscreen.show.md → player.playbackrate._constructor_.md} +7 -11
  35. package/docs/api/player.playbackrate.md +35 -2
  36. package/docs/api/player.player.registerplugin.md +2 -2
  37. package/docs/api/player.player.unregisterplugin.md +2 -2
  38. package/docs/api/player.playerpluginconstructor.md +17 -0
  39. package/docs/api/player.share.attributes.md +3 -0
  40. package/docs/api/player.share.bindevents.md +3 -0
  41. package/docs/api/player.share.canshowshare.md +3 -0
  42. package/docs/api/player.share.events.md +3 -0
  43. package/docs/api/player.share.hideshare.md +3 -0
  44. package/docs/api/player.share.initializeicons.md +3 -0
  45. package/docs/api/player.share.md +40 -1
  46. package/docs/api/player.share.name.md +3 -0
  47. package/docs/api/player.share.onshareembedclick.md +3 -0
  48. package/docs/api/player.share.onsharefb.md +3 -0
  49. package/docs/api/player.share.onsharehide.md +3 -0
  50. package/docs/api/player.share.onsharelinkclick.md +3 -0
  51. package/docs/api/player.share.onshareshow.md +3 -0
  52. package/docs/api/player.share.onsharetw.md +3 -0
  53. package/docs/api/player.share.render.md +3 -0
  54. package/docs/api/player.share.showshare.md +3 -0
  55. package/docs/api/player.share.supportedversion.md +3 -0
  56. package/docs/api/player.share.template.md +3 -0
  57. package/docs/api/player.share.unbindevents.md +3 -0
  58. package/docs/api/player.skiptime.attributes.md +3 -0
  59. package/docs/api/player.skiptime.bindevents.md +3 -0
  60. package/docs/api/player.skiptime.container.md +3 -0
  61. package/docs/api/player.skiptime.events.md +3 -0
  62. package/docs/api/player.skiptime.handlerewindclicks.md +3 -0
  63. package/docs/api/player.skiptime.md +30 -1
  64. package/docs/api/player.skiptime.name.md +3 -0
  65. package/docs/api/player.skiptime.render.md +3 -0
  66. package/docs/api/player.skiptime.setback.md +3 -0
  67. package/docs/api/player.skiptime.setforward.md +3 -0
  68. package/docs/api/player.skiptime.setmidclick.md +3 -0
  69. package/docs/api/player.skiptime.supportedversion.md +3 -0
  70. package/docs/api/player.skiptime.template.md +3 -0
  71. package/docs/api/player.skiptime.togglefullscreen.md +3 -0
  72. package/docs/api/player.spinnerevents.md +4 -1
  73. package/docs/api/player.spinnerthreebounce.hide.md +1 -1
  74. package/docs/api/player.spinnerthreebounce.md +7 -5
  75. package/docs/api/player.spinnerthreebounce.show.md +40 -2
  76. package/docs/api/player.telemetry.md +1 -1
  77. package/docs/api/player.telemetrypluginsettings.md +1 -1
  78. package/docs/api/{player.errorscreen.unbindevents.md → player.telemetrysendfn.md} +6 -6
  79. package/lib/Player.d.ts +13 -4
  80. package/lib/Player.d.ts.map +1 -1
  81. package/lib/Player.js +17 -12
  82. package/lib/index.core.d.ts +0 -1
  83. package/lib/index.core.d.ts.map +1 -1
  84. package/lib/index.core.js +0 -1
  85. package/lib/index.plugins.d.ts +0 -1
  86. package/lib/index.plugins.d.ts.map +1 -1
  87. package/lib/index.plugins.js +0 -1
  88. package/lib/playback/BasePlayback.d.ts +5 -0
  89. package/lib/playback/BasePlayback.d.ts.map +1 -1
  90. package/lib/playback/BasePlayback.js +8 -0
  91. package/lib/playback/HTML5Video.d.ts +4 -0
  92. package/lib/playback/HTML5Video.d.ts.map +1 -0
  93. package/lib/playback/HTML5Video.js +3 -0
  94. package/lib/playback/dash-playback/DashPlayback.d.ts +1 -0
  95. package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
  96. package/lib/playback/dash-playback/DashPlayback.js +6 -2
  97. package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
  98. package/lib/playback/hls-playback/HlsPlayback.js +1 -1
  99. package/lib/playback/index.d.ts.map +1 -1
  100. package/lib/playback/index.js +2 -0
  101. package/lib/playback/types.d.ts +9 -0
  102. package/lib/playback/types.d.ts.map +1 -0
  103. package/lib/playback/types.js +9 -0
  104. package/lib/plugins/bottom-gear/BottomGear.d.ts +7 -12
  105. package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
  106. package/lib/plugins/bottom-gear/BottomGear.js +5 -14
  107. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.d.ts +1 -1
  108. package/lib/plugins/clappr-nerd-stats/ClapprNerdStats.js +3 -3
  109. package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.d.ts.map +1 -1
  110. package/lib/plugins/clappr-nerd-stats/speedtest/Speedtest.js +8 -8
  111. package/lib/plugins/clappr-stats/ClapprStats.d.ts +4 -5
  112. package/lib/plugins/clappr-stats/ClapprStats.d.ts.map +1 -1
  113. package/lib/plugins/clappr-stats/ClapprStats.js +4 -3
  114. package/lib/plugins/clips/Clips.d.ts +3 -2
  115. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  116. package/lib/plugins/clips/Clips.js +1 -1
  117. package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
  118. package/lib/plugins/dvr-controls/DvrControls.d.ts +4 -3
  119. package/lib/plugins/dvr-controls/DvrControls.d.ts.map +1 -1
  120. package/lib/plugins/dvr-controls/DvrControls.js +30 -18
  121. package/lib/plugins/error-screen/ErrorScreen.d.ts +12 -1
  122. package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
  123. package/lib/plugins/error-screen/ErrorScreen.js +1 -1
  124. package/lib/plugins/index.d.ts +0 -1
  125. package/lib/plugins/index.d.ts.map +1 -1
  126. package/lib/plugins/index.js +0 -1
  127. package/lib/plugins/kibo/index.d.ts +0 -3
  128. package/lib/plugins/kibo/index.d.ts.map +1 -1
  129. package/lib/plugins/kibo/index.js +0 -3
  130. package/lib/plugins/level-selector/LevelSelector.d.ts +8 -4
  131. package/lib/plugins/level-selector/LevelSelector.d.ts.map +1 -1
  132. package/lib/plugins/level-selector/LevelSelector.js +16 -7
  133. package/lib/plugins/media-control/MediaControl.d.ts +5 -4
  134. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  135. package/lib/plugins/media-control/MediaControl.js +8 -6
  136. package/lib/plugins/multi-camera/MultiCamera.d.ts +3 -11
  137. package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
  138. package/lib/plugins/multi-camera/MultiCamera.js +1 -1
  139. package/lib/plugins/playback-rate/PlaybackRate.d.ts +11 -10
  140. package/lib/plugins/playback-rate/PlaybackRate.d.ts.map +1 -1
  141. package/lib/plugins/playback-rate/PlaybackRate.js +83 -91
  142. package/lib/plugins/poster/Poster.js +2 -2
  143. package/lib/plugins/share/Share.d.ts +2 -1
  144. package/lib/plugins/share/Share.d.ts.map +1 -1
  145. package/lib/plugins/share/Share.js +2 -1
  146. package/lib/plugins/skip-time/SkipTime.d.ts +2 -1
  147. package/lib/plugins/skip-time/SkipTime.d.ts.map +1 -1
  148. package/lib/plugins/skip-time/SkipTime.js +2 -1
  149. package/lib/plugins/source-controller/SourceController.js +3 -3
  150. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +6 -3
  151. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
  152. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +6 -3
  153. package/lib/plugins/telemetry/Telemetry.d.ts +2 -3
  154. package/lib/plugins/telemetry/Telemetry.d.ts.map +1 -1
  155. package/lib/plugins/telemetry/Telemetry.js +1 -1
  156. package/lib/plugins/vast-ads/VastAds.d.ts.map +1 -1
  157. package/lib/plugins/vast-ads/VastAds.js +3 -3
  158. package/lib/plugins/vast-ads/roll.d.ts +1 -1
  159. package/lib/plugins/vast-ads/roll.d.ts.map +1 -1
  160. package/lib/plugins/vast-ads/rollmanager.d.ts +1 -1
  161. package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -1
  162. package/lib/plugins/vast-ads/rollmanager.js +2 -2
  163. package/lib/types.d.ts +21 -5
  164. package/lib/types.d.ts.map +1 -1
  165. package/lib/utils/types.d.ts +0 -6
  166. package/lib/utils/types.d.ts.map +1 -1
  167. package/package.json +1 -1
  168. package/src/Player.ts +18 -16
  169. package/src/index.core.ts +0 -1
  170. package/src/index.plugins.ts +0 -1
  171. package/src/playback/BasePlayback.ts +12 -4
  172. package/src/playback/HTML5Video.ts +3 -0
  173. package/src/playback/dash-playback/DashPlayback.ts +15 -11
  174. package/src/playback/hls-playback/HlsPlayback.ts +7 -11
  175. package/src/playback/index.ts +2 -1
  176. package/src/playback/types.ts +9 -0
  177. package/src/plugins/audio-selector/AudioSelector.ts +1 -1
  178. package/src/plugins/big-mute-button/BigMuteButton.ts +1 -1
  179. package/src/plugins/bottom-gear/BottomGear.ts +7 -16
  180. package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +5 -5
  181. package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +184 -187
  182. package/src/plugins/clappr-stats/ClapprStats.ts +5 -4
  183. package/src/plugins/clips/Clips.ts +4 -3
  184. package/src/plugins/context-menu/ContextMenu.ts +0 -2
  185. package/src/plugins/dvr-controls/DvrControls.ts +90 -56
  186. package/src/plugins/error-screen/ErrorScreen.ts +12 -1
  187. package/src/plugins/favicon/Favicon.ts +1 -1
  188. package/src/plugins/index.ts +0 -1
  189. package/src/plugins/kibo/index.ts +0 -3
  190. package/src/plugins/level-selector/LevelSelector.ts +24 -10
  191. package/src/plugins/logo/Logo.ts +1 -1
  192. package/src/plugins/media-control/MediaControl.ts +13 -10
  193. package/src/plugins/multi-camera/MultiCamera.ts +4 -4
  194. package/src/plugins/playback-rate/PlaybackRate.ts +90 -106
  195. package/src/plugins/poster/Poster.ts +3 -3
  196. package/src/plugins/seek-time/SeekTime.ts +1 -1
  197. package/src/plugins/share/Share.ts +2 -1
  198. package/src/plugins/skip-time/SkipTime.ts +2 -1
  199. package/src/plugins/source-controller/SourceController.ts +3 -3
  200. package/src/plugins/source-controller/__tests__/SourceController.test.ts +2 -2
  201. package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +6 -3
  202. package/src/plugins/subtitles/Subtitles.ts +1 -1
  203. package/src/plugins/telemetry/Telemetry.ts +2 -2
  204. package/src/plugins/thumbnails/Thumbnails.ts +1 -1
  205. package/src/plugins/vast-ads/VastAds.ts +5 -4
  206. package/src/plugins/vast-ads/roll.ts +2 -1
  207. package/src/plugins/vast-ads/rollmanager.ts +3 -3
  208. package/src/types.ts +24 -5
  209. package/src/utils/types.ts +0 -8
  210. package/temp/player.api.json +540 -576
  211. package/tsconfig.tsbuildinfo +1 -1
  212. package/assets/playback-rate/playback-rate-selector.ejs +0 -9
  213. package/docs/api/player.clapprstats.onbitrate.md +0 -52
  214. package/docs/api/player.errorscreen.attributes.md +0 -17
  215. package/docs/api/player.errorscreen.name.md +0 -14
  216. package/docs/api/player.errorscreen.template.md +0 -14
  217. package/docs/api/player.multicamera.getcameraslist.md +0 -18
  218. package/docs/api/player.multicamera.getcurrentcamera.md +0 -18
@@ -31427,7 +31427,7 @@ function timelineConfig() {
31427
31427
  // export const CLAPPR_VERSION: string = process.env.CLAPPR_VERSION || '0.11.3';
31428
31428
  const CLAPPR_VERSION = '0.11.3';
31429
31429
 
31430
- const pluginHtml$8 = "<button data-track-selector-button class='gcore-skin-button-color'>\n <span class='audio-text'><%= title %></span> <span class=\"audio-arrow\"></span>\n</button>\n<ul class='gcore-skin-bg-color'>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li>\n <a href=\"#\" class='gcore-skin-text-color' data-track-selector-select=\"<%= tracks[i].id %>\">\n <%= tracks[i].label || tracks[i].name %>\n </a>\n </li>\n <% }; %>\n</ul>\n";
31430
+ const pluginHtml$7 = "<button data-track-selector-button class='gcore-skin-button-color'>\n <span class='audio-text'><%= title %></span> <span class=\"audio-arrow\"></span>\n</button>\n<ul class='gcore-skin-bg-color'>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li>\n <a href=\"#\" class='gcore-skin-text-color' data-track-selector-select=\"<%= tracks[i].id %>\">\n <%= tracks[i].label || tracks[i].name %>\n </a>\n </li>\n <% }; %>\n</ul>\n";
31431
31431
 
31432
31432
  const audioArrow = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"9px\" height=\"6px\" viewBox=\"0 0 9 6\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->\n <title>quality-arrow</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"quality-arrow\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <path\n d=\"M5.07079194,5.78553848 C4.91457318,5.94277844 4.70551573,6.00941824 4.50028717,5.99893557 C4.2950586,6.00941824 4.08676693,5.94277844 3.92978239,5.78553848 L0.221118462,1.2997069 C-0.0737061539,1.00469478 -0.0737061539,0.526236029 0.221118462,0.231972666 C0.515177299,-0.0630394586 1.23500883,0.00734414472 1.64852907,0.00734414472 L7.77475484,0.00734414472 C8.21201421,0.00734414472 8.48539703,-0.0630394586 8.77945587,0.231972666 C9.07351471,0.526236029 9.07351471,1.00469478 8.77945587,1.2997069 L5.07079194,5.78553848 Z\"\n fill=\"#FFFFFE\"></path>\n </g>\n</svg>\n";
31433
31433
 
@@ -32366,7 +32366,7 @@ class AudioSelector extends UICorePlugin {
32366
32366
  static get version() {
32367
32367
  return VERSION$6;
32368
32368
  }
32369
- static template = tmpl(pluginHtml$8);
32369
+ static template = tmpl(pluginHtml$7);
32370
32370
  /**
32371
32371
  * @internal
32372
32372
  */
@@ -32647,9 +32647,9 @@ function trace(msg, data = {}) {
32647
32647
 
32648
32648
  const volumeOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M5.50025 8.00025C4.67125 8.00025 4.00025 8.67225 4.00025 9.50025V14.5003C4.00025 15.3283 4.67125 16.0003 5.50025 16.0003H7.24824C7.65024 16.0003 8.03627 16.1613 8.31727 16.4483L12.5443 20.7413C12.7083 20.9073 12.9262 20.9963 13.1492 20.9963C13.2572 20.9963 13.3672 20.9763 13.4722 20.9333C13.7932 20.8013 14.0003 20.4923 14.0003 20.1462V16.3283C14.0003 16.1963 13.9473 16.0683 13.8543 15.9753L6.02528 8.14625C5.93228 8.05325 5.80425 8.00025 5.67225 8.00025H5.50025ZM14.0003 3.85426C14.0003 3.50826 13.7932 3.19927 13.4722 3.06727C13.1502 2.93627 12.7873 3.01226 12.5443 3.25926L9.33827 6.51527C9.14627 6.71127 9.14626 7.02625 9.34126 7.22025L13.5733 11.4522C13.7313 11.6102 14.0003 11.4982 14.0003 11.2752V3.85426ZM20.8543 20.8543C20.7563 20.9513 20.6283 21.0003 20.5003 21.0003C20.3723 21.0003 20.2442 20.9513 20.1462 20.8543L3.14625 3.85426C2.95125 3.65826 2.95125 3.34225 3.14625 3.14625C3.34225 2.95125 3.65826 2.95125 3.85426 3.14625L20.8543 20.1462C21.0493 20.3422 21.0493 20.6583 20.8543 20.8543Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
32649
32649
 
32650
- const pluginHtml$7 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon></div>\n</div>\n";
32650
+ const pluginHtml$6 = "<div class=\"big-mute-icon-wrapper\" data-big-mute>\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon></div>\n</div>\n";
32651
32651
 
32652
- const T$a = 'plugins.big_mute_button';
32652
+ const T$c = 'plugins.big_mute_button';
32653
32653
  // TODO rewrite as a container plugin
32654
32654
  /**
32655
32655
  * Displays a big mute button over the video when it's muted.
@@ -32673,7 +32673,7 @@ class BigMuteButton extends UICorePlugin {
32673
32673
  get supportedVersion() {
32674
32674
  return { min: CLAPPR_VERSION };
32675
32675
  }
32676
- static template = tmpl(pluginHtml$7);
32676
+ static template = tmpl(pluginHtml$6);
32677
32677
  /**
32678
32678
  * @internal
32679
32679
  */
@@ -32691,7 +32691,7 @@ class BigMuteButton extends UICorePlugin {
32691
32691
  this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
32692
32692
  this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
32693
32693
  this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
32694
- trace(`${T$a} bindEvents`, {
32694
+ trace(`${T$c} bindEvents`, {
32695
32695
  mediacontrol: !!this.core.mediaControl,
32696
32696
  });
32697
32697
  this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_RENDERED, this.mediaControlRendered);
@@ -32748,7 +32748,7 @@ class BigMuteButton extends UICorePlugin {
32748
32748
  */
32749
32749
  render() {
32750
32750
  if (this.shouldRender()) {
32751
- trace(`${T$a} render`, {
32751
+ trace(`${T$c} render`, {
32752
32752
  el: !!this.$el,
32753
32753
  });
32754
32754
  this.$el.html(BigMuteButton.template());
@@ -32787,7 +32787,7 @@ class BigMuteButton extends UICorePlugin {
32787
32787
  }
32788
32788
  }
32789
32789
 
32790
- const pluginHtml$6 = "<div class=\"media-control-gear\" data-<%= name %>>\n <button type=\"button\" class=\"button-gear gplayer-lite-btn gcore-skin-button-color\" data-gear-button=\"-1\">\n <span class=\"gear-icon\"><%= icon %></span>\n </button>\n <div class=\"gear-wrapper gcore-skin-bg-color\">\n <ul class=\"gear-options-list\">\n <% items.forEach(function (gear) { %>\n <li data-<%= gear %>></li>\n <% }); %>\n </ul>\n </div>\n</div>\n";
32790
+ const pluginHtml$5 = "<div class=\"media-control-gear\" data-<%= name %>>\n <button type=\"button\" class=\"button-gear gplayer-lite-btn gcore-skin-button-color\" data-gear-button=\"-1\">\n <span class=\"gear-icon\"><%= icon %></span>\n </button>\n <div class=\"gear-wrapper gcore-skin-bg-color\">\n <ul class=\"gear-options-list\">\n <% items.forEach(function (gear) { %>\n <li data-<%= gear %>></li>\n <% }); %>\n </ul>\n </div>\n</div>\n";
32791
32791
 
32792
32792
  const gearIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_660_1503)\">\n <path\n d=\"M19.14 12.94C19.18 12.64 19.2 12.33 19.2 12C19.2 11.68 19.18 11.36 19.13 11.06L21.16 9.47999C21.34 9.33999 21.39 9.06999 21.28 8.86999L19.36 5.54999C19.24 5.32999 18.99 5.25999 18.77 5.32999L16.38 6.28999C15.88 5.90999 15.35 5.58999 14.76 5.34999L14.4 2.80999C14.36 2.56999 14.16 2.39999 13.92 2.39999H10.08C9.83999 2.39999 9.64999 2.56999 9.60999 2.80999L9.24999 5.34999C8.65999 5.58999 8.11999 5.91999 7.62999 6.28999L5.23999 5.32999C5.01999 5.24999 4.76999 5.32999 4.64999 5.54999L2.73999 8.86999C2.61999 9.07999 2.65999 9.33999 2.85999 9.47999L4.88999 11.06C4.83999 11.36 4.79999 11.69 4.79999 12C4.79999 12.31 4.81999 12.64 4.86999 12.94L2.83999 14.52C2.65999 14.66 2.60999 14.93 2.71999 15.13L4.63999 18.45C4.75999 18.67 5.00999 18.74 5.22999 18.67L7.61999 17.71C8.11999 18.09 8.64999 18.41 9.23999 18.65L9.59999 21.19C9.64999 21.43 9.83999 21.6 10.08 21.6H13.92C14.16 21.6 14.36 21.43 14.39 21.19L14.75 18.65C15.34 18.41 15.88 18.09 16.37 17.71L18.76 18.67C18.98 18.75 19.23 18.67 19.35 18.45L21.27 15.13C21.39 14.91 21.34 14.66 21.15 14.52L19.14 12.94ZM12 15.6C10.02 15.6 8.39999 13.98 8.39999 12C8.39999 10.02 10.02 8.39999 12 8.39999C13.98 8.39999 15.6 10.02 15.6 12C15.6 13.98 13.98 15.6 12 15.6Z\"\n fill=\"#C9C9C9\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_660_1503\">\n <rect width=\"24\" height=\"24\" fill=\"white\"/>\n </clipPath>\n </defs>\n</svg>\n";
32793
32793
 
@@ -32796,9 +32796,6 @@ const gearHdIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\
32796
32796
  /* eslint-disable */
32797
32797
  // Kibo is released under the MIT License. Copyright (c) 2013 marquete.
32798
32798
  // see https://github.com/marquete/kibo
32799
- /**
32800
- * @internal
32801
- */
32802
32799
  class Kibo {
32803
32800
  element;
32804
32801
  lastKeyCode = -1;
@@ -33096,7 +33093,7 @@ function orderByOrderPattern(arr, order) {
33096
33093
  return [...ordered, ...rest];
33097
33094
  }
33098
33095
  /**
33099
- * The MediaControl provides a foundation for developing custom media controls UI.
33096
+ * PLUGIN that provides a foundation for developing custom media controls UI.
33100
33097
  * @beta
33101
33098
  * @remarks
33102
33099
  * The methods exposed are to be used by the other plugins that extend the media control UI.
@@ -33113,7 +33110,7 @@ class MediaControl extends UICorePlugin {
33113
33110
  buttonsColor = null;
33114
33111
  currentDurationValue = 0;
33115
33112
  currentPositionValue = 0;
33116
- currentSeekBarPercentage = null;
33113
+ currentSeekBarPercentage = 0;
33117
33114
  disabledClickableList = [];
33118
33115
  displayedDuration = null;
33119
33116
  displayedPosition = null;
@@ -33178,14 +33175,14 @@ class MediaControl extends UICorePlugin {
33178
33175
  }
33179
33176
  /**
33180
33177
  * @internal
33181
- * @deprecated
33178
+ * @deprecated Use core.activeContainer directly
33182
33179
  */
33183
33180
  get container() {
33184
33181
  return this.core.activeContainer;
33185
33182
  }
33186
33183
  /**
33187
33184
  * @internal
33188
- * @deprecated
33185
+ * @deprecated Use core.activePlayback directly
33189
33186
  */
33190
33187
  get playback() {
33191
33188
  return this.core.activePlayback;
@@ -33231,6 +33228,9 @@ class MediaControl extends UICorePlugin {
33231
33228
  'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible',
33232
33229
  };
33233
33230
  }
33231
+ get currentSeekPos() {
33232
+ return this.currentSeekBarPercentage;
33233
+ }
33234
33234
  /**
33235
33235
  * Current volume [0..100]
33236
33236
  */
@@ -33590,8 +33590,7 @@ class MediaControl extends UICorePlugin {
33590
33590
  this.changeTogglePlay();
33591
33591
  this.bindContainerEvents();
33592
33592
  this.settingsUpdate();
33593
- this.core.activeContainer &&
33594
- this.core.activeContainer.trigger(Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.core.activeContainer.isDvrInUse());
33593
+ this.core.activeContainer.trigger(Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.core.activeContainer.isDvrInUse());
33595
33594
  // TODO test
33596
33595
  if (this.core.activeContainer.mediaControlDisabled) {
33597
33596
  this.disable();
@@ -34157,17 +34156,6 @@ MediaControl.extend = function (properties) {
34157
34156
  };
34158
34157
 
34159
34158
  const VERSION$5 = '2.19.12';
34160
- /**
34161
- * Custom events emitted by the plugin
34162
- * @beta
34163
- */
34164
- var GearEvents;
34165
- (function (GearEvents) {
34166
- /**
34167
- * Emitted when the gear menu is rendered
34168
- */
34169
- GearEvents["MEDIACONTROL_GEAR_RENDERED"] = "mediacontrol:gear:rendered";
34170
- })(GearEvents || (GearEvents = {}));
34171
34159
  /**
34172
34160
  * Adds the gear button that triggers extra options menu on the right side of the {@link MediaControl | media control} UI
34173
34161
  * @beta
@@ -34198,7 +34186,7 @@ class BottomGear extends UICorePlugin {
34198
34186
  static get version() {
34199
34187
  return VERSION$5;
34200
34188
  }
34201
- static template = tmpl(pluginHtml$6);
34189
+ static template = tmpl(pluginHtml$5);
34202
34190
  /**
34203
34191
  * @internal
34204
34192
  */
@@ -34223,7 +34211,6 @@ class BottomGear extends UICorePlugin {
34223
34211
  const mediaControl = this.core.getPlugin('media_control');
34224
34212
  assert(mediaControl, 'media_control plugin is required');
34225
34213
  this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
34226
- this.listenTo(this.core, 'gear:refresh', this.refresh); // TODO use direct plugin method call
34227
34214
  this.listenTo(mediaControl, Events$1.MEDIACONTROL_RENDERED, this.render);
34228
34215
  this.listenTo(mediaControl, Events$1.MEDIACONTROL_HIDE, this.hide); // TODO mediacontrol show as well
34229
34216
  }
@@ -34266,11 +34253,14 @@ class BottomGear extends UICorePlugin {
34266
34253
  const icon = this.isHd ? gearHdIcon : gearIcon;
34267
34254
  this.$el.html(BottomGear.template({ icon, items }));
34268
34255
  mediaControl.getElement('gear')?.html(this.el);
34269
- this.core.trigger('gear:rendered'); // @deprecated
34270
- mediaControl.trigger(GearEvents.MEDIACONTROL_GEAR_RENDERED); // TODO drop
34271
34256
  mediaControl.trigger(MediaControlEvents.MEDIACONTROL_GEAR_RENDERED);
34272
34257
  return this;
34273
34258
  }
34259
+ /**
34260
+ * Re-renders the gear menu.
34261
+ * It fires the {@link MediaControlEvents.MEDIACONTROL_GEAR_RENDERED | MEDIACONTROL_GEAR_RENDERED} event,
34262
+ * which the plugins that attach to the gear menu can listen to to re-render themselves.
34263
+ */
34274
34264
  refresh() {
34275
34265
  this.render();
34276
34266
  this.$el.find('.gear-wrapper').show();
@@ -35930,7 +35920,7 @@ class Speedtest {
35930
35920
  this._state = 1;
35931
35921
  }
35932
35922
  if (this._state !== 1) {
35933
- throw 'You can\'t add a server after server selection';
35923
+ throw "You can't add a server after server selection";
35934
35924
  }
35935
35925
  this._settings.mpot = true;
35936
35926
  this._serverList.push(server);
@@ -35949,7 +35939,7 @@ class Speedtest {
35949
35939
  setSelectedServer(server) {
35950
35940
  this._checkServerDefinition(server);
35951
35941
  if (this._state === 3) {
35952
- throw 'You can\'t select a server while the test is running';
35942
+ throw "You can't select a server while the test is running";
35953
35943
  }
35954
35944
  this._selectedServer = server;
35955
35945
  this._state = 2;
@@ -35963,7 +35953,7 @@ class Speedtest {
35963
35953
  throw 'Server already selected';
35964
35954
  }
35965
35955
  if (this._state >= 3) {
35966
- throw 'You can\'t select a server while the test is running';
35956
+ throw "You can't select a server while the test is running";
35967
35957
  }
35968
35958
  }
35969
35959
  if (this._selectServerCalled) {
@@ -35973,7 +35963,7 @@ class Speedtest {
35973
35963
  this._selectServerCalled = true;
35974
35964
  }
35975
35965
  /*this function goes through a list of servers. For each server, the ping is measured, then the server with the function result is called with the best server, or null if all the servers were down.
35976
- */
35966
+ */
35977
35967
  const select = (serverList, result) => {
35978
35968
  //pings the specified URL, then calls the function result. Result will receive a parameter which is either the time it took to ping the URL, or -1 if something went wrong.
35979
35969
  const PING_TIMEOUT = 2000;
@@ -36071,7 +36061,7 @@ class Speedtest {
36071
36061
  }
36072
36062
  result(bestServer);
36073
36063
  };
36074
- serverList.forEach(server => {
36064
+ serverList.forEach((server) => {
36075
36065
  checkServer(server, done);
36076
36066
  });
36077
36067
  if (i === serverList.length) {
@@ -36160,12 +36150,12 @@ class Speedtest {
36160
36150
  if (typeof this._originalExtra !== 'undefined') {
36161
36151
  this._settings.telemetry_extra = JSON.stringify({
36162
36152
  server: this._selectedServer.name,
36163
- extra: this._originalExtra
36153
+ extra: this._originalExtra,
36164
36154
  });
36165
36155
  }
36166
36156
  else {
36167
36157
  this._settings.telemetry_extra = JSON.stringify({
36168
- server: this._selectedServer.name
36158
+ server: this._selectedServer.name,
36169
36159
  });
36170
36160
  }
36171
36161
  }
@@ -36175,7 +36165,7 @@ class Speedtest {
36175
36165
  }
36176
36166
  abort() {
36177
36167
  if (this._state < 3) {
36178
- throw new Error('You cannot abort a test that\'s not started yet');
36168
+ throw new Error("You cannot abort a test that's not started yet");
36179
36169
  }
36180
36170
  if (this._state < 4) {
36181
36171
  this.worker?.postMessage('abort');
@@ -36345,7 +36335,7 @@ function rankConnectionSpeed(dlSpeed) {
36345
36335
  return 0;
36346
36336
  }
36347
36337
 
36348
- const pluginHtml$5 = "<% general = metrics.general %>\n<% counters = metrics.counters %>\n<% timers = metrics.timers %>\n<% extra = metrics.extra %>\n<% custom = metrics.custom %>\n\n<div class=\"stats-box\">\n <div class=\"stats-box-top\">\n <a class=\"close-button gplayer-lite-btn\" data-close-button>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <g clip-path=\"url(#clip0_184_1489)\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.41376 6.00013L13.7068 -0.292872C14.0978 -0.683872 14.0978 -1.31587 13.7068 -1.70687C13.3158 -2.09787 12.6838 -2.09787 12.2928 -1.70687L5.99976 4.58613L-0.293238 -1.70687C-0.684238 -2.09787 -1.31624 -2.09787 -1.70724 -1.70687C-2.09824 -1.31587 -2.09824 -0.683872 -1.70724 -0.292872L4.58576 6.00013L-1.70724 12.2931C-2.09824 12.6841 -2.09824 13.3161 -1.70724 13.7071C-1.51224 13.9021 -1.25624 14.0001 -1.00024 14.0001C-0.744238 14.0001 -0.488238 13.9021 -0.293238 13.7071L5.99976 7.41413L12.2928 13.7071C12.4878 13.9021 12.7438 14.0001 12.9998 14.0001C13.2558 14.0001 13.5118 13.9021 13.7068 13.7071C14.0978 13.3161 14.0978 12.6841 13.7068 12.2931L7.41376 6.00013Z\"\n fill=\"white\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_184_1489\">\n <rect width=\"12\" height=\"12\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </a>\n </div>\n <div class=\"stats-box-main\">\n <ul>\n <li class=\"title\"><span>General</span></li>\n <li>\n Display resolution:\n <div><span><%= general.displayResolution %></span></div>\n </li>\n <li>\n Volume:\n <div><span><%= general.volume %></span></div>\n </li>\n <li>\n Connection speed:\n <div><span id=\"dlText\"><%= custom.connectionSpeed %></span> Mbps</div>\n </li>\n <li class=\"canvas-wrapper\">\n <canvas id=\"speedTestCanvas\" width=\"190\" height=\"20\"></canvas>\n </li>\n <li>\n Ping:\n <div><span id=\"pingText\"><%= custom.ping %></span> ms</div>\n </li>\n <li>\n Jitter:\n <div><span id=\"jitterText\"><%= custom.jitter %></span> ms</div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Counters</span></li>\n <li>\n Plays:\n <div><span><%= counters.play %></span></div>\n </li>\n <li>\n Pauses:\n <div><span><%= counters.pause %></span></div>\n </li>\n <li>\n Errors:\n <div><span><%= counters.error %></span></div>\n </li>\n <li>\n Bufferings:\n <div><span><%= counters.buffering %></span></div>\n </li>\n <li>\n Decoded frames:\n <div><span><%= counters.decodedFrames %></span></div>\n </li>\n <li>\n Dropped frames:\n <div><span><%= counters.droppedFrames %></span></div>\n </li>\n <li>\n Frames per second:\n <div><span><%= counters.fps %></span></div>\n </li>\n <li>\n Bitrate changes:\n <div><span><%= counters.changeLevel %></span></div>\n </li>\n <li>\n Seeks:\n <div><span><%= counters.seek %></span></div>\n </li>\n <li>\n Fullscreen:\n <div><span><%= counters.fullscreen %></span></div>\n </li>\n <li>\n DVR seeks:\n <div><span><%= counters.dvrUsage %></span></div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Timers</span></li>\n <li>\n Startup time:\n <div><span><%= timers.startup %></span></div>\n </li>\n <li>\n Watching time:\n <div><span><%= timers.watch %></span></div>\n </li>\n <li>\n Pause time:\n <div><span><%= timers.pause %></span></div>\n </li>\n <li>\n Buffering time:\n <div><span><%= timers.buffering %></span></div>\n </li>\n <li>\n Session time:\n <div><span><%= timers.session %></span></div>\n </li>\n <!-- <li>-->\n <!-- Latency:-->\n <!-- <div><span><%= timers.latency %></span></div>-->\n <!-- </li>-->\n </ul>\n\n <ul>\n <li class=\"title\"><span>Extra</span></li>\n <li>\n Playback:\n <div><span><%= extra.playbackName %></span></div>\n </li>\n <li>\n Playback type:\n <div><span><%= extra.playbackType %></span></div>\n </li>\n <li>\n Buffer size:\n <div><span><%= extra.buffersize %></span></div>\n </li>\n <li>\n Video duration:\n <div><span><%= extra.duration %></span></div>\n </li>\n <li>\n Current time:\n <div><span><%= extra.currentTime %></span></div>\n </li>\n <li>\n Bitrate weighted mean:\n <div><span><%= extra.bitrateWeightedMean %></span></div>\n </li>\n <li>\n Bitrate most used:\n <div><span><%= extra.bitrateMostUsed %></span></div>\n </li>\n <li>\n % Watched:\n <div><span><%= extra.watchedPercentage %></span></div>\n </li>\n <li>\n % Buffering:\n <div><span><%= extra.bufferingPercentage %></span></div>\n </li>\n </ul>\n </div>\n <div class=\"speedtest-summary\">\n <div class=\"speedtest-summary-header\">Your internet quality summary</div>\n <div class=\"speedtest-summary-block\">\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">VOD: <%= custom.vodQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"vod\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">Live: <%= custom.liveQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"live\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-footer\">\n <!-- <a class=\"speedtest-footer-about-link\" href=\"\" target=\"_blank\">I am not a nerd, what's this all about?</a>-->\n <button class=\"gplayer-lite-btn speedtest-btn speedtest-footer-refresh\" data-refresh-button type=\"button\">\n <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\">\n <path\n d=\"M6.03968 0.124998C3.64268 0.124998 1.67268 1.9565 1.48068 4.2915H1.00018C0.925833 4.29146 0.853156 4.31353 0.791378 4.35489C0.729601 4.39625 0.681511 4.45503 0.653218 4.52378C0.624925 4.59253 0.617705 4.66814 0.632476 4.74101C0.647248 4.81387 0.683343 4.88069 0.736177 4.933L1.57618 5.766C1.64641 5.83561 1.74129 5.87467 1.84018 5.87467C1.93906 5.87467 2.03395 5.83561 2.10418 5.766L2.94418 4.933C2.99701 4.88069 3.03311 4.81387 3.04788 4.74101C3.06265 4.66814 3.05543 4.59253 3.02714 4.52378C2.99884 4.45503 2.95075 4.39625 2.88898 4.35489C2.8272 4.31353 2.75452 4.29146 2.68018 4.2915H2.23368C2.42368 2.376 4.05268 0.874998 6.03968 0.874998C6.6948 0.873639 7.33932 1.04039 7.91158 1.35931C8.48384 1.67822 8.9647 2.13863 9.30818 2.6965C9.33331 2.73978 9.36686 2.7776 9.40684 2.80771C9.44682 2.83783 9.49243 2.85963 9.54097 2.87184C9.58951 2.88405 9.64001 2.88643 9.68948 2.87881C9.73895 2.8712 9.7864 2.85377 9.82902 2.82753C9.87165 2.80129 9.90859 2.76679 9.93767 2.72605C9.96675 2.68531 9.98739 2.63916 9.99835 2.59032C10.0093 2.54148 10.0104 2.49095 10.0015 2.44168C9.99264 2.39242 9.974 2.34544 9.94668 2.3035C9.53615 1.63664 8.96146 1.08621 8.27752 0.704805C7.59359 0.323402 6.82277 0.123774 6.03968 0.124998ZM10.4207 4.2335C10.3505 4.16419 10.2558 4.12532 10.1572 4.12532C10.0585 4.12532 9.96386 4.16419 9.89368 4.2335L9.05018 5.0665C8.9972 5.11874 8.96096 5.18557 8.94608 5.25847C8.93119 5.33137 8.93833 5.40705 8.96658 5.47588C8.99483 5.54472 9.04292 5.60359 9.10473 5.64501C9.16654 5.68644 9.23927 5.70853 9.31368 5.7085H9.76318C9.57218 7.6235 7.93768 9.125 5.94118 9.125C5.28399 9.12683 4.63729 8.96035 4.06269 8.64141C3.48808 8.32247 3.00473 7.86169 2.65868 7.303C2.63281 7.26107 2.59893 7.22465 2.55899 7.19582C2.51904 7.16699 2.47381 7.14631 2.42587 7.13495C2.37793 7.1236 2.32823 7.1218 2.27959 7.12966C2.23096 7.13752 2.18435 7.15488 2.14243 7.18075C2.05776 7.233 1.99731 7.31674 1.97438 7.41355C1.95146 7.51037 1.96793 7.61233 2.02018 7.697C2.43345 8.36457 3.01076 8.91521 3.69713 9.29647C4.38349 9.67772 5.15604 9.87689 5.94118 9.875C8.34518 9.875 10.3237 8.045 10.5162 5.7085H11.0002C11.0746 5.70853 11.1473 5.68644 11.2091 5.64501C11.2709 5.60359 11.319 5.54472 11.3473 5.47588C11.3755 5.40705 11.3827 5.33137 11.3678 5.25847C11.3529 5.18557 11.3167 5.11874 11.2637 5.0665L10.4207 4.2335Z\"\n fill=\"white\"/>\n </svg>\n Refresh\n </button>\n </div>\n</div>\n";
36338
+ const pluginHtml$4 = "<% general = metrics.general %>\n<% counters = metrics.counters %>\n<% timers = metrics.timers %>\n<% extra = metrics.extra %>\n<% custom = metrics.custom %>\n\n<div class=\"stats-box\">\n <div class=\"stats-box-top\">\n <a class=\"close-button gplayer-lite-btn\" data-close-button>\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n <g clip-path=\"url(#clip0_184_1489)\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M7.41376 6.00013L13.7068 -0.292872C14.0978 -0.683872 14.0978 -1.31587 13.7068 -1.70687C13.3158 -2.09787 12.6838 -2.09787 12.2928 -1.70687L5.99976 4.58613L-0.293238 -1.70687C-0.684238 -2.09787 -1.31624 -2.09787 -1.70724 -1.70687C-2.09824 -1.31587 -2.09824 -0.683872 -1.70724 -0.292872L4.58576 6.00013L-1.70724 12.2931C-2.09824 12.6841 -2.09824 13.3161 -1.70724 13.7071C-1.51224 13.9021 -1.25624 14.0001 -1.00024 14.0001C-0.744238 14.0001 -0.488238 13.9021 -0.293238 13.7071L5.99976 7.41413L12.2928 13.7071C12.4878 13.9021 12.7438 14.0001 12.9998 14.0001C13.2558 14.0001 13.5118 13.9021 13.7068 13.7071C14.0978 13.3161 14.0978 12.6841 13.7068 12.2931L7.41376 6.00013Z\"\n fill=\"white\"/>\n </g>\n <defs>\n <clipPath id=\"clip0_184_1489\">\n <rect width=\"12\" height=\"12\" fill=\"white\"/>\n </clipPath>\n </defs>\n </svg>\n </a>\n </div>\n <div class=\"stats-box-main\">\n <ul>\n <li class=\"title\"><span>General</span></li>\n <li>\n Display resolution:\n <div><span><%= general.displayResolution %></span></div>\n </li>\n <li>\n Volume:\n <div><span><%= general.volume %></span></div>\n </li>\n <li>\n Connection speed:\n <div><span id=\"dlText\"><%= custom.connectionSpeed %></span> Mbps</div>\n </li>\n <li class=\"canvas-wrapper\">\n <canvas id=\"speedTestCanvas\" width=\"190\" height=\"20\"></canvas>\n </li>\n <li>\n Ping:\n <div><span id=\"pingText\"><%= custom.ping %></span> ms</div>\n </li>\n <li>\n Jitter:\n <div><span id=\"jitterText\"><%= custom.jitter %></span> ms</div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Counters</span></li>\n <li>\n Plays:\n <div><span><%= counters.play %></span></div>\n </li>\n <li>\n Pauses:\n <div><span><%= counters.pause %></span></div>\n </li>\n <li>\n Errors:\n <div><span><%= counters.error %></span></div>\n </li>\n <li>\n Bufferings:\n <div><span><%= counters.buffering %></span></div>\n </li>\n <li>\n Decoded frames:\n <div><span><%= counters.decodedFrames %></span></div>\n </li>\n <li>\n Dropped frames:\n <div><span><%= counters.droppedFrames %></span></div>\n </li>\n <li>\n Frames per second:\n <div><span><%= counters.fps %></span></div>\n </li>\n <li>\n Bitrate changes:\n <div><span><%= counters.changeLevel %></span></div>\n </li>\n <li>\n Seeks:\n <div><span><%= counters.seek %></span></div>\n </li>\n <li>\n Fullscreen:\n <div><span><%= counters.fullscreen %></span></div>\n </li>\n <li>\n DVR seeks:\n <div><span><%= counters.dvrUsage %></span></div>\n </li>\n </ul>\n\n <ul>\n <li class=\"title\"><span>Timers</span></li>\n <li>\n Startup time:\n <div><span><%= timers.startup %></span></div>\n </li>\n <li>\n Watching time:\n <div><span><%= timers.watch %></span></div>\n </li>\n <li>\n Pause time:\n <div><span><%= timers.pause %></span></div>\n </li>\n <li>\n Buffering time:\n <div><span><%= timers.buffering %></span></div>\n </li>\n <li>\n Session time:\n <div><span><%= timers.session %></span></div>\n </li>\n <!-- <li>-->\n <!-- Latency:-->\n <!-- <div><span><%= timers.latency %></span></div>-->\n <!-- </li>-->\n </ul>\n\n <ul>\n <li class=\"title\"><span>Extra</span></li>\n <li>\n Playback:\n <div><span><%= extra.playbackName %></span></div>\n </li>\n <li>\n Playback type:\n <div><span><%= extra.playbackType %></span></div>\n </li>\n <li>\n Buffer size:\n <div><span><%= extra.buffersize %></span></div>\n </li>\n <li>\n Video duration:\n <div><span><%= extra.duration %></span></div>\n </li>\n <li>\n Current time:\n <div><span><%= extra.currentTime %></span></div>\n </li>\n <li>\n Bitrate weighted mean:\n <div><span><%= extra.bitrateWeightedMean %></span></div>\n </li>\n <li>\n Bitrate most used:\n <div><span><%= extra.bitrateMostUsed %></span></div>\n </li>\n <li>\n % Watched:\n <div><span><%= extra.watchedPercentage %></span></div>\n </li>\n <li>\n % Buffering:\n <div><span><%= extra.bufferingPercentage %></span></div>\n </li>\n </ul>\n </div>\n <div class=\"speedtest-summary\">\n <div class=\"speedtest-summary-header\">Your internet quality summary</div>\n <div class=\"speedtest-summary-block\">\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">VOD: <%= custom.vodQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"vod\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-summary-subblock\">\n <div class=\"speedtest-summary-subblock-content\">\n <div class=\"speedtest-quality\">\n <div class=\"speedtest-quality-header\">Live: <%= custom.liveQuality %></div>\n <div class=\"speedtest-quality-content\" data-streaming-type=\"live\">\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n <div class=\"speedtest-quality-content-item\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"speedtest-footer\">\n <!-- <a class=\"speedtest-footer-about-link\" href=\"\" target=\"_blank\">I am not a nerd, what's this all about?</a>-->\n <button class=\"gplayer-lite-btn speedtest-btn speedtest-footer-refresh\" data-refresh-button type=\"button\">\n <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\">\n <path\n d=\"M6.03968 0.124998C3.64268 0.124998 1.67268 1.9565 1.48068 4.2915H1.00018C0.925833 4.29146 0.853156 4.31353 0.791378 4.35489C0.729601 4.39625 0.681511 4.45503 0.653218 4.52378C0.624925 4.59253 0.617705 4.66814 0.632476 4.74101C0.647248 4.81387 0.683343 4.88069 0.736177 4.933L1.57618 5.766C1.64641 5.83561 1.74129 5.87467 1.84018 5.87467C1.93906 5.87467 2.03395 5.83561 2.10418 5.766L2.94418 4.933C2.99701 4.88069 3.03311 4.81387 3.04788 4.74101C3.06265 4.66814 3.05543 4.59253 3.02714 4.52378C2.99884 4.45503 2.95075 4.39625 2.88898 4.35489C2.8272 4.31353 2.75452 4.29146 2.68018 4.2915H2.23368C2.42368 2.376 4.05268 0.874998 6.03968 0.874998C6.6948 0.873639 7.33932 1.04039 7.91158 1.35931C8.48384 1.67822 8.9647 2.13863 9.30818 2.6965C9.33331 2.73978 9.36686 2.7776 9.40684 2.80771C9.44682 2.83783 9.49243 2.85963 9.54097 2.87184C9.58951 2.88405 9.64001 2.88643 9.68948 2.87881C9.73895 2.8712 9.7864 2.85377 9.82902 2.82753C9.87165 2.80129 9.90859 2.76679 9.93767 2.72605C9.96675 2.68531 9.98739 2.63916 9.99835 2.59032C10.0093 2.54148 10.0104 2.49095 10.0015 2.44168C9.99264 2.39242 9.974 2.34544 9.94668 2.3035C9.53615 1.63664 8.96146 1.08621 8.27752 0.704805C7.59359 0.323402 6.82277 0.123774 6.03968 0.124998ZM10.4207 4.2335C10.3505 4.16419 10.2558 4.12532 10.1572 4.12532C10.0585 4.12532 9.96386 4.16419 9.89368 4.2335L9.05018 5.0665C8.9972 5.11874 8.96096 5.18557 8.94608 5.25847C8.93119 5.33137 8.93833 5.40705 8.96658 5.47588C8.99483 5.54472 9.04292 5.60359 9.10473 5.64501C9.16654 5.68644 9.23927 5.70853 9.31368 5.7085H9.76318C9.57218 7.6235 7.93768 9.125 5.94118 9.125C5.28399 9.12683 4.63729 8.96035 4.06269 8.64141C3.48808 8.32247 3.00473 7.86169 2.65868 7.303C2.63281 7.26107 2.59893 7.22465 2.55899 7.19582C2.51904 7.16699 2.47381 7.14631 2.42587 7.13495C2.37793 7.1236 2.32823 7.1218 2.27959 7.12966C2.23096 7.13752 2.18435 7.15488 2.14243 7.18075C2.05776 7.233 1.99731 7.31674 1.97438 7.41355C1.95146 7.51037 1.96793 7.61233 2.02018 7.697C2.43345 8.36457 3.01076 8.91521 3.69713 9.29647C4.38349 9.67772 5.15604 9.87689 5.94118 9.875C8.34518 9.875 10.3237 8.045 10.5162 5.7085H11.0002C11.0746 5.70853 11.1473 5.68644 11.2091 5.64501C11.2709 5.60359 11.319 5.54472 11.3473 5.47588C11.3755 5.40705 11.3827 5.33137 11.3678 5.25847C11.3529 5.18557 11.3167 5.11874 11.2637 5.0665L10.4207 4.2335Z\"\n fill=\"white\"/>\n </svg>\n Refresh\n </button>\n </div>\n</div>\n";
36349
36339
 
36350
36340
  const buttonHtml$3 = "<button class='nerd-button gplayer-lite-btn gcore-skin-text-color gear-option'>\n <span class=\"stats-icon\"></span>\n <span>Statistics</span>\n</button>\n";
36351
36341
 
@@ -36420,7 +36410,7 @@ const drawSummary = (customMetrics, vodContainer, liveContainer) => {
36420
36410
  };
36421
36411
  // const T = 'plugins.clappr_nerd_stats';
36422
36412
  /**
36423
- * Displays useful network-related statistics.
36413
+ * PLUGIN that displays useful network-related statistics.
36424
36414
  * @beta
36425
36415
  *
36426
36416
  * @remarks
@@ -36460,7 +36450,7 @@ class ClapprNerdStats extends UICorePlugin {
36460
36450
  get supportedVersion() {
36461
36451
  return { min: CLAPPR_VERSION };
36462
36452
  }
36463
- static template = tmpl(pluginHtml$5);
36453
+ static template = tmpl(pluginHtml$4);
36464
36454
  /**
36465
36455
  * @internal
36466
36456
  */
@@ -36514,7 +36504,7 @@ class ClapprNerdStats extends UICorePlugin {
36514
36504
  const mediaControl = this.core.getPlugin('media_control');
36515
36505
  assert(mediaControl, 'media_control plugin is required');
36516
36506
  this.listenToOnce(this.core, Events$1.CORE_READY, this.init);
36517
- this.listenTo(mediaControl, GearEvents.MEDIACONTROL_GEAR_RENDERED, this.addToBottomGear);
36507
+ this.listenTo(mediaControl, MediaControlEvents.MEDIACONTROL_GEAR_RENDERED, this.addToBottomGear);
36518
36508
  }
36519
36509
  init() {
36520
36510
  this.container = this.core.activeContainer;
@@ -36676,7 +36666,7 @@ function newMetrics() {
36676
36666
  // TODO: fix
36677
36667
  const updateMetrics = () => { };
36678
36668
  /**
36679
- * Collects useful statistics about playback performance.
36669
+ * PLIGIN that collects useful statistics about playback performance.
36680
36670
  * @beta
36681
36671
  * @remarks
36682
36672
  * This plugin does not render anything and is supposed to be extended or used together with other plugins that actually render something.
@@ -36739,9 +36729,10 @@ class ClapprStats extends ContainerPlugin {
36739
36729
  }
36740
36730
  /**
36741
36731
  * Registers a callback to receive the metrics.
36742
- * @param updateMetricsFn
36732
+ * @param updateMetricsFn - The callback to receive the metrics
36743
36733
  */
36744
36734
  setUpdateMetrics(updateMetricsFn) {
36735
+ // TODO use events instead
36745
36736
  this.updateFn = updateMetricsFn;
36746
36737
  }
36747
36738
  _defaultReport(metrics) {
@@ -36789,7 +36780,7 @@ class ClapprStats extends ContainerPlugin {
36789
36780
  }
36790
36781
  /**
36791
36782
  * Returns the collected metrics.
36792
- * @returns The collected metrics
36783
+ * @returns Currently collected metrics
36793
36784
  */
36794
36785
  exportMetrics() {
36795
36786
  return structuredClone(this.metrics);
@@ -37099,7 +37090,7 @@ class ClickToPause extends ContainerPlugin {
37099
37090
  }
37100
37091
 
37101
37092
  /**
37102
- * Adds a behavior of showing a text over the seekbar to indicate the current clip.
37093
+ * PLUGIN that shows text over the seekbar to indicate the current clip.
37103
37094
  * @beta
37104
37095
  * @remarks
37105
37096
  * Depends on:
@@ -37255,7 +37246,7 @@ class ClipsPlugin extends UICorePlugin {
37255
37246
 
37256
37247
  const templateHtml$1 = "<ul class=\"context-menu-list\">\n <% if(options) { %>\n <% for (var i = 0; i < options.length; i++) { %>\n <li class=\"context-menu-list-item <%= options[i].class %>\"\n data-<%= options[i].name %>><%= options[i].label %></li>\n <% } %>\n <% } %>\n</ul>\n";
37257
37248
 
37258
- var version$1 = "2.20.7";
37249
+ var version$1 = "2.20.9";
37259
37250
 
37260
37251
  var packages = {
37261
37252
  "node_modules/@clappr/core": {
@@ -37390,8 +37381,10 @@ class ContextMenu extends UIContainerPlugin {
37390
37381
 
37391
37382
  const dvrHTML = "<div class=\"live-info\"><%= live %></div>\n<button type=\"button\" class=\"live-button\" aria-label=\"<%= backToLive %>\"><%= backToLive %></button>\n";
37392
37383
 
37384
+ const T$b = 'plugins.dvr_controls';
37393
37385
  /**
37394
- * Adds the DVR controls to the media control UI
37386
+ * PLUGIN that adds the DVR controls to the media control UI
37387
+ *
37395
37388
  * @beta
37396
37389
  *
37397
37390
  * @remarks
@@ -37399,7 +37392,7 @@ const dvrHTML = "<div class=\"live-info\"><%= live %></div>\n<button type=\"butt
37399
37392
  *
37400
37393
  * - {@link MediaControl}
37401
37394
  *
37402
- * The plugin renders the live stream indicator and the DVR seek bar, if DVR is enabled, in the media control UI.
37395
+ * The plugin renders live stream indicator and the DVR seek bar, if DVR is enabled, in the media control UI.
37403
37396
  */
37404
37397
  class DvrControls extends UICorePlugin {
37405
37398
  static template = tmpl(dvrHTML);
@@ -37420,7 +37413,7 @@ class DvrControls extends UICorePlugin {
37420
37413
  */
37421
37414
  get events() {
37422
37415
  return {
37423
- 'click .live-button': 'click'
37416
+ 'click .live-button': 'click',
37424
37417
  };
37425
37418
  }
37426
37419
  /**
@@ -37428,8 +37421,8 @@ class DvrControls extends UICorePlugin {
37428
37421
  */
37429
37422
  get attributes() {
37430
37423
  return {
37431
- 'class': 'dvr-controls',
37432
- 'data-dvr-controls': ''
37424
+ class: 'dvr-controls',
37425
+ 'data-dvr-controls': '',
37433
37426
  };
37434
37427
  }
37435
37428
  constructor(core) {
@@ -37448,23 +37441,22 @@ class DvrControls extends UICorePlugin {
37448
37441
  }
37449
37442
  bindContainerEvents() {
37450
37443
  this.listenToOnce(this.core.activeContainer, Events$1.CONTAINER_TIMEUPDATE, this.render);
37451
- this.listenTo(this.core.activeContainer, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.dvrChanged);
37444
+ this.listenTo(this.core.activeContainer, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDvrChanged);
37452
37445
  }
37453
- dvrChanged(dvrEnabled) {
37446
+ onDvrChanged(dvrEnabled) {
37454
37447
  if (this.core.getPlaybackType() !== Playback.LIVE) {
37455
37448
  return;
37456
37449
  }
37457
37450
  this.settingsUpdate();
37458
37451
  this.core.mediaControl.$el.addClass('live');
37459
37452
  if (dvrEnabled) {
37460
- this.core.mediaControl.$playbackRate.removeClass('playbackrate-enable');
37453
+ // TODO
37461
37454
  this.core.mediaControl.$el
37462
37455
  .addClass('dvr')
37463
37456
  .find('.media-control-indicator[data-position], .media-control-indicator[data-duration]')
37464
37457
  .hide();
37465
37458
  }
37466
37459
  else {
37467
- this.core.mediaControl.$playbackRate.addClass('playbackrate-enable');
37468
37460
  this.core.mediaControl.$el.removeClass('dvr');
37469
37461
  }
37470
37462
  }
@@ -37489,24 +37481,31 @@ class DvrControls extends UICorePlugin {
37489
37481
  this.bindEvents();
37490
37482
  }
37491
37483
  shouldRender() {
37492
- const useDvrControls = this.core.options.useDvrControls === undefined || !!this.core.options.useDvrControls;
37484
+ const useDvrControls = this.core.options.useDvrControls === undefined ||
37485
+ !!this.core.options.useDvrControls;
37493
37486
  return useDvrControls && this.core.getPlaybackType() === Playback.LIVE;
37494
37487
  }
37495
37488
  /**
37496
37489
  * @internal
37497
37490
  */
37498
37491
  render() {
37492
+ trace(`${T$b} render`, {
37493
+ dvrEnabled: this.core.activePlayback?.dvrEnabled,
37494
+ });
37495
+ if (!this.shouldRender()) {
37496
+ return this;
37497
+ }
37499
37498
  this.$el.html(DvrControls.template({
37500
37499
  live: this.core.i18n.t('live'),
37501
- backToLive: this.core.i18n.t('back_to_live')
37500
+ backToLive: this.core.i18n.t('back_to_live'),
37502
37501
  }));
37503
- if (this.shouldRender()) {
37504
- const mediaControl = this.core.getPlugin('media_control');
37505
- assert(mediaControl, 'media_control plugin is required');
37506
- // TODO don't tap into the $el directly
37507
- mediaControl.$el.addClass('live');
37508
- mediaControl.$('.media-control-left-panel[data-media-control]').append(this.$el);
37509
- }
37502
+ const mediaControl = this.core.getPlugin('media_control');
37503
+ assert(mediaControl, 'media_control plugin is required');
37504
+ // TODO don't tap into the $el directly
37505
+ mediaControl.$el.addClass('live');
37506
+ mediaControl
37507
+ .$('.media-control-left-panel[data-media-control]')
37508
+ .append(this.$el);
37510
37509
  return this;
37511
37510
  }
37512
37511
  }
@@ -37515,9 +37514,9 @@ const reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" wi
37515
37514
 
37516
37515
  const templateHtml = "<div class=\"player-error-screen__content\" data-error-screen>\n <% if (icon) { %>\n <div class=\"player-error-screen__icon\" data-error-screen><%= icon %></div>\n <% } %>\n <div class=\"player-error-screen__title\" data-error-screen><%= title %></div>\n <% if (message) { %>\n <div class=\"player-error-screen__message\" data-error-screen><%= message %></div>\n <% } %>\n <% if (code) { %>\n <div class=\"player-error-screen__code\" data-error-screen>Error code: <%= code %></div>\n <% } %>\n <% if (reloadIcon) { %>\n <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n <% } %>\n</div>\n";
37517
37516
 
37518
- const T$9 = 'plugins.error_screen';
37517
+ const T$a = 'plugins.error_screen';
37519
37518
  /**
37520
- * Displays an error nicely in the overlay on top of the player.
37519
+ * PLUGIN that displays errors nicely in the overlay on top of the player.
37521
37520
  * @beta
37522
37521
  */
37523
37522
  class ErrorScreen extends UICorePlugin {
@@ -37576,7 +37575,7 @@ class ErrorScreen extends UICorePlugin {
37576
37575
  }, 0);
37577
37576
  }
37578
37577
  onActiveContainerChanged() {
37579
- trace(`${T$9} onActiveContainerChanged`, {
37578
+ trace(`${T$a} onActiveContainerChanged`, {
37580
37579
  reloading: this.core.options.reloading,
37581
37580
  });
37582
37581
  this.err = null;
@@ -37859,10 +37858,10 @@ const arrowLeftIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fil
37859
37858
 
37860
37859
  const checkIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\"\n d=\"M20.5793 4.19296C20.1216 3.86696 19.4777 3.96396 19.1424 4.40896L9.37295 17.3809L4.81634 12.107C4.45222 11.683 3.80218 11.6289 3.36709 11.9839C2.932 12.3389 2.87543 12.97 3.2416 13.393L8.64165 19.643C8.83708 19.869 9.12506 20 9.42849 20C9.4398 20 9.45114 20 9.46246 19.999C9.77926 19.989 10.0724 19.838 10.2586 19.59L20.8015 5.58996C21.1368 5.14496 21.0371 4.51896 20.5793 4.19296Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
37861
37860
 
37862
- const T$8 = 'plugins.level_selector';
37861
+ const T$9 = 'plugins.level_selector';
37863
37862
  const VERSION$4 = '2.19.4';
37864
37863
  /**
37865
- * A {@link MediaControl | media control} plugin that provides a UI to control the quality level of the playback.
37864
+ * PLUGIN that provides a UI to select the desired quality level of the playback.
37866
37865
  * @beta
37867
37866
  *
37868
37867
  * @remarks
@@ -37872,9 +37871,7 @@ const VERSION$4 = '2.19.4';
37872
37871
  *
37873
37872
  * - {@link BottomGear}
37874
37873
  *
37875
- * The plugin is rendered as an item in the gear menu.
37876
- *
37877
- * When clicked, it shows a list of quality levels to choose from.
37874
+ * The plugin is rendered as an item in the gear menu, which, when clicked, shows a list of quality levels to choose from.
37878
37875
  *
37879
37876
  * Configuration options - {@link LevelSelectorPluginSettings}
37880
37877
  *
@@ -37936,9 +37933,16 @@ class LevelSelector extends UICorePlugin {
37936
37933
  * @internal
37937
37934
  */
37938
37935
  bindEvents() {
37936
+ this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
37937
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.bindPlaybackEvents);
37938
+ }
37939
+ onCoreReady() {
37939
37940
  const mediaControl = this.core.getPlugin('media_control');
37940
37941
  assert(mediaControl, 'media_control plugin is required');
37941
- this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.bindPlaybackEvents);
37942
+ this.listenTo(mediaControl, MediaControlEvents.MEDIACONTROL_GEAR_RENDERED, this.onGearRendered);
37943
+ }
37944
+ onGearRendered() {
37945
+ this.deferRender();
37942
37946
  }
37943
37947
  bindPlaybackEvents() {
37944
37948
  this.removeAuto = false;
@@ -37959,7 +37963,7 @@ class LevelSelector extends UICorePlugin {
37959
37963
  }
37960
37964
  onStop() {
37961
37965
  this.listenToOnce(this.core.activePlayback, Events$1.PLAYBACK_PLAY, () => {
37962
- trace(`${T$8} on PLAYBACK_PLAY after stop`, {
37966
+ trace(`${T$9} on PLAYBACK_PLAY after stop`, {
37963
37967
  selectedLevelId: this.selectedLevelId,
37964
37968
  });
37965
37969
  if (this.core.activePlayback.getPlaybackType() === 'live') {
@@ -38056,8 +38060,9 @@ class LevelSelector extends UICorePlugin {
38056
38060
  }
38057
38061
  goBack() {
38058
38062
  this.isOpen = false;
38059
- this.core.trigger('gear:refresh');
38060
- this.deferRender();
38063
+ setTimeout(() => {
38064
+ this.core.getPlugin('bottom_gear').refresh();
38065
+ }, 0);
38061
38066
  }
38062
38067
  setLevel(index) {
38063
38068
  this.selectedLevelId = index;
@@ -38114,7 +38119,7 @@ class LevelSelector extends UICorePlugin {
38114
38119
  this.highlightCurrentLevel();
38115
38120
  }
38116
38121
  highlightCurrentLevel() {
38117
- trace(`${T$8} highlightCurrentLevel`, {
38122
+ trace(`${T$9} highlightCurrentLevel`, {
38118
38123
  selectedLevelId: this.selectedLevelId,
38119
38124
  });
38120
38125
  this.allLevelElements().removeClass('current');
@@ -38355,7 +38360,7 @@ class Logo extends UIContainerPlugin {
38355
38360
  }
38356
38361
  }
38357
38362
 
38358
- const pluginHtml$4 = "<button data-multicamera-button class='gcore-skin-button-color'>\n <span class=\"multicamera-icon\"></span>\n</button>\n\n<ul class=\"gcore-skin-bg-color\">\n <% for (var i = 0; i < streams.length; i++) { %>\n <% if(!streams[i].live && multisources_mode === 'only_live') { %>\n <% continue; %>\n <% } %>\n <li>\n <div class=\"multicamera-item\" data-multicamera-selector-live=\"<%= streams[i].live %>\"\n data-multicamera-selector-select=\"<%= streams[i].id %>\">\n <div class=\"multicamera-screenshot\">\n <% if (streams[i].screenshot) { %>\n <img src=\"<%= streams[i].screenshot %>\" alt=\"<%= streams[i].title %>\"/>\n <% } %>\n </div>\n <div class=\"multicamera-text gcore-skin-text-color\">\n <% if (streams[i].title) { %>\n <div class=\"multicamera-title gcore-skin-text-color\"><%= streams[i].title %></div>\n <% } %>\n <% if (streams[i].description) { %>\n <div class=\"multicamera-description gcore-skin-text-color\"><%= streams[i].description %></div>\n <% } %>\n </div>\n </div>\n </li>\n <% } %>\n</ul>\n";
38363
+ const pluginHtml$3 = "<button data-multicamera-button class='gcore-skin-button-color'>\n <span class=\"multicamera-icon\"></span>\n</button>\n\n<ul class=\"gcore-skin-bg-color\">\n <% for (var i = 0; i < streams.length; i++) { %>\n <% if(!streams[i].live && multisources_mode === 'only_live') { %>\n <% continue; %>\n <% } %>\n <li>\n <div class=\"multicamera-item\" data-multicamera-selector-live=\"<%= streams[i].live %>\"\n data-multicamera-selector-select=\"<%= streams[i].id %>\">\n <div class=\"multicamera-screenshot\">\n <% if (streams[i].screenshot) { %>\n <img src=\"<%= streams[i].screenshot %>\" alt=\"<%= streams[i].title %>\"/>\n <% } %>\n </div>\n <div class=\"multicamera-text gcore-skin-text-color\">\n <% if (streams[i].title) { %>\n <div class=\"multicamera-title gcore-skin-text-color\"><%= streams[i].title %></div>\n <% } %>\n <% if (streams[i].description) { %>\n <div class=\"multicamera-description gcore-skin-text-color\"><%= streams[i].description %></div>\n <% } %>\n </div>\n </div>\n </li>\n <% } %>\n</ul>\n";
38359
38364
 
38360
38365
  const streamsIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <path fill=\"#FFF\" fill-rule=\"nonzero\" d=\"M24 1.5v13a1.5 1.5 0 0 1-1.5 1.5h-1a.5.5 0 0 1-.5-.5v-10A2.5 2.5 0 0 0 18.5 3h-14a.5.5 0 0 1-.5-.5v-1A1.5 1.5 0 0 1 5.5 0h17A1.5 1.5 0 0 1 24 1.5M12.724 12.447l-5 2.5a.505.505 0 0 1-.487-.021A.503.503 0 0 1 7 14.5v-5c0-.173.09-.334.237-.426a.505.505 0 0 1 .487-.021l5 2.5a.5.5 0 0 1 0 .894M18.5 4h-17C.673 4 0 4.673 0 5.5v13c0 .827.673 1.5 1.5 1.5h17c.827 0 1.5-.673 1.5-1.5v-13c0-.827-.673-1.5-1.5-1.5\"/>\n</svg>\n";
38361
38366
 
@@ -38364,9 +38369,9 @@ const streamsMomentoIcon = "<svg id=\"Слой_1\" data-name=\"Слой 1\" xmln
38364
38369
  const streamsWhiteNightsIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"50\" height=\"50\" viewBox=\"0 0 50 50\">\n <defs>\n <clipPath id=\"clip-Icon\">\n <rect width=\"50\" height=\"50\"/>\n </clipPath>\n </defs>\n <g id=\"Icon\" clip-path=\"url(#clip-Icon)\">\n <g id=\"icon2\" transform=\"translate(-0.041 0)\">\n <path id=\"Контур_77\" data-name=\"Контур 77\" d=\"M6.493,13v8.266h6.275V19.74H8.31V17.714h4.006V16.3H8.31V14.53h4.365V13Zm7.5,0v8.266h1.7V15.732h.023l3.438,5.534h1.818V13h-1.7v5.545h-.023L15.8,13Z\" fill=\"#fff\"/>\n <path id=\"Контур_76\" data-name=\"Контур 76\" d=\"M29.949,29.1V26.774H31.94a1.4,1.4,0,0,1,.938.272,1.1,1.1,0,0,1,.313.874,1.155,1.155,0,0,1-.313.9,1.375,1.375,0,0,1-.938.278ZM28.132,25.36v8.266h1.817V30.4h1.818a1.353,1.353,0,0,1,.984.3,1.637,1.637,0,0,1,.394.949c.046.333.079.681.1,1.042a3.2,3.2,0,0,0,.185.938h1.819a1.218,1.218,0,0,1-.191-.423,3.611,3.611,0,0,1-.093-.527c-.019-.185-.033-.367-.041-.544s-.016-.332-.023-.463a5.052,5.052,0,0,0-.087-.625,2.109,2.109,0,0,0-.2-.573,1.586,1.586,0,0,0-.359-.451,1.414,1.414,0,0,0-.556-.284v-.023a1.926,1.926,0,0,0,1-.81,2.494,2.494,0,0,0,.307-1.262,2.308,2.308,0,0,0-.165-.88,2.128,2.128,0,0,0-.486-.724,2.3,2.3,0,0,0-.764-.492,2.67,2.67,0,0,0-1-.179ZM43.506,30.5V25.36H41.689V30.5a2.065,2.065,0,0,1-.37,1.36,1.7,1.7,0,0,1-1.343.434,2.086,2.086,0,0,1-.886-.156,1.283,1.283,0,0,1-.758-.978,3.748,3.748,0,0,1-.058-.66V25.36H36.456V30.5a3.16,3.16,0,0,0,.92,2.5,3.807,3.807,0,0,0,2.6.81,3.82,3.82,0,0,0,2.593-.816,3.132,3.132,0,0,0,.937-2.492Z\" fill=\"#fff\"/>\n <path id=\"Контур_80\" data-name=\"Контур 80\" d=\"M22.646,31.2H4.689a4.505,4.505,0,0,1-4.5-4.5V8.5A4.505,4.505,0,0,1,4.689,4h18.2a4.505,4.505,0,0,1,4.5,4.5v8.445l-.893.1a3.184,3.184,0,0,0-2.846,3.177V30.5l-.465.7ZM4.689,6a2.5,2.5,0,0,0-2.5,2.5V26.7a2.5,2.5,0,0,0,2.5,2.5H21.65V20.22a5.18,5.18,0,0,1,3.739-4.992V8.5a2.5,2.5,0,0,0-2.5-2.5Z\" fill=\"#fff\"/>\n <path id=\"Контур_81\" data-name=\"Контур 81\" d=\"M30.127,47.884a1,1,0,0,1-1-1V43.267H26.846a5.206,5.206,0,0,1-5.2-5.2V20.222a5.206,5.206,0,0,1,5.2-5.2H44.692a5.206,5.206,0,0,1,5.2,5.2V38.068a5.206,5.206,0,0,1-5.2,5.2H35.058l-4.216,4.316A1,1,0,0,1,30.127,47.884ZM26.846,17.022a3.2,3.2,0,0,0-3.2,3.2V38.067a3.2,3.2,0,0,0,3.2,3.2h3.281a1,1,0,0,1,1,1v2.162l2.8-2.86a1,1,0,0,1,.715-.3H44.692a3.2,3.2,0,0,0,3.2-3.2V20.222a3.2,3.2,0,0,0-3.2-3.2Z\" fill=\"#fff\"/>\n </g>\n </g>\n</svg>\n";
38365
38370
 
38366
38371
  const VERSION$3 = '0.0.1';
38367
- const T$7 = 'plugins.multicamera';
38372
+ const T$8 = 'plugins.multicamera';
38368
38373
  /**
38369
- * The plugin adds support for loading multiple streams and switching between them using the media control UI.
38374
+ * PLUGIN that adds support for loading multiple streams and switching between them using the media control UI.
38370
38375
  * @beta
38371
38376
  */
38372
38377
  class MultiCamera extends UICorePlugin {
@@ -38385,7 +38390,7 @@ class MultiCamera extends UICorePlugin {
38385
38390
  return VERSION$3;
38386
38391
  }
38387
38392
  get template() {
38388
- return tmpl(pluginHtml$4);
38393
+ return tmpl(pluginHtml$3);
38389
38394
  }
38390
38395
  get attributes() {
38391
38396
  return {
@@ -38636,7 +38641,7 @@ class MultiCamera extends UICorePlugin {
38636
38641
  // TODO figure out what this does
38637
38642
  playbackOptions.recycleVideo = Browser.isMobile;
38638
38643
  this.currentCamera = this.findElementById(id) ?? null;
38639
- trace(`${T$7} changeById`, { currentCamera: this.currentCamera, multicamera: this.multicamera });
38644
+ trace(`${T$8} changeById`, { currentCamera: this.currentCamera, multicamera: this.multicamera });
38640
38645
  if (!this.currentCamera) {
38641
38646
  return;
38642
38647
  }
@@ -38652,7 +38657,7 @@ class MultiCamera extends UICorePlugin {
38652
38657
  // TODO remove?
38653
38658
  // for html5 playback:
38654
38659
  this.options.dvrEnabled = this.currentCamera.dvr;
38655
- trace(`${T$7} changeById`, { currentCamera: this.currentCamera });
38660
+ trace(`${T$8} changeById`, { currentCamera: this.currentCamera });
38656
38661
  // TODO
38657
38662
  this.core.configure({
38658
38663
  playback: playbackOptions,
@@ -38710,7 +38715,7 @@ const pipIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"no
38710
38715
  const buttonHtml$1 = "<button class=\"gplayer-lite-btn gcore-skin-button-color\">\n <span><%= pipIcon %></span>\n</button>\n";
38711
38716
 
38712
38717
  const VERSION$2 = '0.0.1';
38713
- const T$6 = `plugins.pip`;
38718
+ const T$7 = `plugins.pip`;
38714
38719
  /**
38715
38720
  * Enables picture in picture mode.
38716
38721
  * @beta
@@ -38784,7 +38789,7 @@ class PictureInPicture extends UICorePlugin {
38784
38789
  }
38785
38790
  }
38786
38791
  requestPictureInPicture() {
38787
- trace(`${T$6} requestPictureInPicture`, {
38792
+ trace(`${T$7} requestPictureInPicture`, {
38788
38793
  videoElement: !!this.videoElement,
38789
38794
  });
38790
38795
  this.videoElement.requestPictureInPicture();
@@ -38794,14 +38799,22 @@ class PictureInPicture extends UICorePlugin {
38794
38799
  }
38795
38800
  }
38796
38801
 
38797
- const pluginHtml$3 = "<button class=\"gcore-skin-button-color\" data-playback-rate-button>\n <span><%= title %></span>\n</button>\n<ul>\n <% for (var i = 0; i < playbackRates.length; i++) { %>\n <li data-playback-rate-select=\"<%= playbackRates[i].value %>\"><a\n data-playback-rate-a=\"<%= playbackRates[i].value %>\" href=\"#\"><%= playbackRates[i].label %></a></li>\n <% }; %>\n</ul>\n";
38798
-
38799
38802
  const buttonHtml = "<button class='gplayer-lite-btn gcore-skin-text-color gear-option'>\n <span class=\"gear-option_speed-icon\"><%= speedIcon %></span>\n <span>Playback speed</span>\n <span class=\"gear-option_arrow-right-icon\"><%= arrowRightIcon %></span>\n <span class='gear-option_value'><%= title %></span>\n</button>\n";
38800
38803
 
38801
38804
  const listHtml = "<button class=\"gplayer-lite-btn go-back gcore-skin-text-color\">\n <span class=\"arrow-left-icon\"><%= arrowLeftIcon %></span>\n Playback speed\n</button>\n<ul class=\"gear-sub-menu\">\n <% for (var i = playbackRates.length - 1; i >= 0; i--) { %>\n <li>\n <a href=\"#\" class='gear-sub-menu_btn gcore-skin-text-color' data-rate=\"<%= playbackRates[i].value %>\">\n <span class=\"check-icon\"><%= checkIcon %></span>\n <%= playbackRates[i].label %>\n </a>\n </li>\n <% } %>\n</ul>\n";
38802
38805
 
38803
38806
  const speedIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.9854 23.9999C11.4272 23.9999 10.9571 23.5293 10.9571 22.9704C10.9571 22.4115 11.4272 21.9409 11.9854 21.9409C17.4492 21.9409 21.9143 17.4704 21.9143 11.9999C21.9143 6.52948 17.4492 2.05899 11.9854 2.05899C11.4272 2.05899 10.9571 1.58836 10.9571 1.02949C10.9571 0.470625 11.4272 0 11.9854 0C18.5949 0 24 5.38224 24 12.0291C24 18.6766 18.5949 24 11.9854 24V23.9999ZM10.2227 17.853L17.4785 13.4413C18.0072 13.1178 18.301 12.5885 18.301 11.9707C18.301 11.353 17.9779 10.8237 17.4785 10.5002L10.2227 6.08852C9.69405 5.76499 9.01826 5.76499 8.4896 6.05919C7.96094 6.35338 7.60828 6.94157 7.60828 7.5591V16.3824C7.60828 17.0002 7.93142 17.5883 8.4896 17.8824C8.75393 18.0294 9.04779 18.1177 9.34139 18.1177C9.63523 18.1177 9.95838 18.0294 10.2227 17.853V17.853ZM15.9216 11.9707L9.66457 15.7647V8.17661L15.9216 11.9707ZM8.22516 22.3529C8.4602 21.8236 8.25447 21.2058 7.7258 20.9705C7.19714 20.7353 6.69755 20.4413 6.2277 20.0882C5.75764 19.7646 5.11137 19.8822 4.78824 20.3235C4.46509 20.7941 4.58251 21.4412 5.02327 21.7647C5.58146 22.1764 6.19819 22.5293 6.81519 22.8235C6.96211 22.8824 7.10903 22.9117 7.25574 22.9117C7.66699 22.941 8.04893 22.7057 8.22513 22.3528L8.22516 22.3529ZM3.58381 19.0882C4.05387 18.7647 4.17127 18.1177 3.84814 17.647C3.52502 17.1764 3.23115 16.6765 2.99635 16.1471C2.76132 15.6178 2.14456 15.4118 1.6157 15.6472C1.08704 15.8825 0.881306 16.5 1.11634 17.0295C1.41018 17.6472 1.7626 18.2648 2.14459 18.8236C2.35032 19.1178 2.67325 19.2646 2.99638 19.2646C3.20191 19.2942 3.40763 19.2353 3.58384 19.0882L3.58381 19.0882ZM1.14563 13.9707C1.70382 13.9118 2.14435 13.4118 2.08576 12.853C2.05645 12.5588 2.05645 12.2648 2.05645 11.9706C2.05645 11.6764 2.05645 11.4117 2.08576 11.1178C2.14456 10.5589 1.70381 10.059 1.14563 10.0001C0.587439 9.94122 0.0881057 10.3825 0.0293019 10.9414C1.96979e-07 11.2942 0 11.6178 0 11.9709C0 12.3237 0.0293018 12.6768 0.0588091 13.0297C0.117618 13.5589 0.558169 13.9709 1.08706 13.9709C1.08686 13.9707 1.11636 13.9707 1.14567 13.9707L1.14563 13.9707ZM2.96687 7.79432C3.2019 7.26502 3.49553 6.76482 3.81866 6.2944C4.1418 5.82377 4.02439 5.17672 3.55432 4.8532C3.08427 4.52967 2.438 4.64722 2.11486 5.11786C1.73292 5.67672 1.38047 6.2942 1.08661 6.91193C0.851579 7.44123 1.08661 8.05897 1.58597 8.29426C1.73289 8.35314 1.87981 8.38247 2.02652 8.38247C2.40888 8.41181 2.7906 8.1767 2.96686 7.7943L2.96687 7.79432ZM6.22757 3.85328C6.69762 3.52974 7.19696 3.23554 7.69635 2.97089C8.22501 2.73558 8.43074 2.11807 8.19571 1.58857C7.96068 1.05927 7.34392 0.85329 6.81505 1.08861C6.19806 1.3828 5.58128 1.73565 5.02314 2.14741C4.55308 2.47094 4.43568 3.11797 4.78811 3.5886C4.99384 3.8828 5.31676 4.02969 5.6399 4.02969C5.84583 4.05902 6.05135 4.00014 6.22757 3.85325V3.85328Z\"\n fill=\"#C9C9C9\"/>\n</svg>\n";
38804
38807
 
38808
+ var PlaybackEvents;
38809
+ (function (PlaybackEvents) {
38810
+ /**
38811
+ * Emitted when the playback rate changes.
38812
+ * Payload:
38813
+ * - playbackRate number
38814
+ */
38815
+ PlaybackEvents["PLAYBACK_RATE_CHANGED"] = "playback:rate-changed";
38816
+ })(PlaybackEvents || (PlaybackEvents = {}));
38817
+
38805
38818
  const DEFAULT_PLAYBACK_RATES = [
38806
38819
  { value: '0.5', label: '0.5x' },
38807
38820
  { value: '0.75', label: '0.75x' },
@@ -38812,10 +38825,9 @@ const DEFAULT_PLAYBACK_RATES = [
38812
38825
  { value: '2.0', label: '2x' }
38813
38826
  ];
38814
38827
  const DEFAULT_PLAYBACK_RATE = '1.0';
38815
- // TODO
38816
- const MEDIACONTROL_PLAYBACKRATE = 'playbackRate';
38828
+ const T$6 = 'plugins.playback_rate';
38817
38829
  /**
38818
- * Allows changing the playback speed of the video.
38830
+ * PLUGIN that allows changing the playback speed of the video.
38819
38831
  * @beta
38820
38832
  *
38821
38833
  * @remarks
@@ -38825,12 +38837,13 @@ const MEDIACONTROL_PLAYBACKRATE = 'playbackRate';
38825
38837
  *
38826
38838
  * - {@link BottomGear | bottom_gear}
38827
38839
  *
38828
- * It renders a button in the gear menu, which opens a dropdown with the available playback rates.
38840
+ * It renders a button in the gear menu, which opens a dropdown with the options to change the playback rate.
38829
38841
  */
38830
38842
  class PlaybackRate extends UICorePlugin {
38831
- currentPlayback = null;
38832
38843
  playbackRates = DEFAULT_PLAYBACK_RATES;
38844
+ // Saved when an ad starts to restore after it finishes
38833
38845
  prevSelectedRate;
38846
+ rendered = false;
38834
38847
  selectedRate = DEFAULT_PLAYBACK_RATE;
38835
38848
  /**
38836
38849
  * @internal
@@ -38844,9 +38857,13 @@ class PlaybackRate extends UICorePlugin {
38844
38857
  get supportedVersion() {
38845
38858
  return { min: CLAPPR_VERSION };
38846
38859
  }
38847
- static template = tmpl(pluginHtml$3);
38848
38860
  static buttonTemplate = tmpl(buttonHtml);
38849
38861
  static listTemplate = tmpl(listHtml);
38862
+ constructor(core) {
38863
+ super(core);
38864
+ this.playbackRates = core.options.playbackRate?.options || DEFAULT_PLAYBACK_RATES;
38865
+ this.selectedRate = core.options.playbackRate?.defaultValue || DEFAULT_PLAYBACK_RATE;
38866
+ }
38850
38867
  /**
38851
38868
  * @internal
38852
38869
  */
@@ -38870,27 +38887,33 @@ class PlaybackRate extends UICorePlugin {
38870
38887
  * @internal
38871
38888
  */
38872
38889
  bindEvents() {
38873
- this.listenTo(this.core, 'gear:rendered', this.render);
38874
- // TODO this.core.getPlugin('media_control'), bottom_gear
38875
- this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_CONTAINERCHANGED, this.reload);
38876
- this.listenTo(this.core.mediaControl, MEDIACONTROL_PLAYBACKRATE, this.updatePlaybackRate);
38877
- this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
38878
- this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
38879
- if (this.core.activeContainer) {
38880
- this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_BUFFERFULL, this.updateLiveStatus);
38881
- }
38882
- if (this.currentPlayback) {
38883
- this.listenTo(this.currentPlayback, Events$1.PLAYBACK_STOP, this.onStop);
38884
- this.listenTo(this.currentPlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
38885
- // TODO import dash playback events
38886
- this.listenTo(this.currentPlayback, 'dash:playback-rate-changed', this.onDashRateChange);
38887
- }
38890
+ this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
38891
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChange);
38888
38892
  }
38889
- unBindEvents() {
38890
- this.stopListening(this.core, 'gear:rendered', this.render);
38891
- this.stopListening(this.core.mediaControl, Events$1.MEDIACONTROL_CONTAINERCHANGED, this.reload);
38892
- this.stopListening(this.core, 'core:advertisement:start', this.onStartAd);
38893
- this.stopListening(this.core, 'core:advertisement:finish', this.onFinishAd);
38893
+ onCoreReady() {
38894
+ const mediaControl = this.core.getPlugin('media_control');
38895
+ assert(mediaControl, 'media_control plugin is required');
38896
+ const gear = this.core.getPlugin('bottom_gear');
38897
+ assert(gear, 'bottom_gear plugin is required');
38898
+ this.listenTo(mediaControl, MediaControlEvents.MEDIACONTROL_GEAR_RENDERED, this.onGearRendered);
38899
+ }
38900
+ onActiveContainerChange() {
38901
+ this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
38902
+ this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
38903
+ this.listenTo(this.core.activePlayback, PlaybackEvents.PLAYBACK_RATE_CHANGED, this.onPlaybackRateChange);
38904
+ this.listenTo(this.core.activeContainer, Events$1.CONTAINER_PLAYBACKDVRSTATECHANGED, this.onDvrStateChanged);
38905
+ }
38906
+ onGearRendered() {
38907
+ trace(`${T$6} onGearRendered`, {
38908
+ rendered: this.rendered,
38909
+ });
38910
+ this.rendered = false;
38911
+ this.render();
38912
+ }
38913
+ onDvrStateChanged(dvrEnabled) {
38914
+ if (dvrEnabled) {
38915
+ this.render();
38916
+ }
38894
38917
  }
38895
38918
  allRateElements() {
38896
38919
  return this.$('ul.gear-sub-menu li');
@@ -38898,68 +38921,49 @@ class PlaybackRate extends UICorePlugin {
38898
38921
  rateElement(rate = "1") {
38899
38922
  return this.$(`ul.gear-sub-menu a[data-rate="${rate}"]`).parent();
38900
38923
  }
38901
- onDashRateChange() {
38902
- // TODO consider removing
38903
- this.currentPlayback._dash?.setPlaybackRate(this.selectedRate);
38904
- }
38905
- updateLiveStatus() {
38906
- if (this.core.getPlaybackType() === Playback.LIVE) {
38907
- if (this.core.mediaControl.currentSeekBarPercentage <= 98.9) {
38908
- this.core.mediaControl.$playbackRate.removeClass('playbackrate-enable');
38909
- this.core.mediaControl.$el.addClass('dvr');
38910
- return;
38911
- }
38912
- this.updatePlaybackRate(DEFAULT_PLAYBACK_RATE);
38913
- this.core.mediaControl.$playbackRate.addClass('playbackrate-enable');
38914
- this.core.mediaControl.$el.removeClass('dvr');
38924
+ onPlaybackRateChange(playbackRate) {
38925
+ const selectedRate = parseInt(this.selectedRate, 10);
38926
+ if (playbackRate !== selectedRate) {
38927
+ this.core.activePlayback?.setPlaybackRate(selectedRate);
38915
38928
  }
38916
38929
  }
38917
- reload() {
38918
- this.unBindEvents();
38919
- this.bindEvents();
38920
- }
38921
38930
  shouldRender() {
38922
38931
  if (!this.core.activeContainer) {
38923
38932
  return false;
38924
38933
  }
38925
- this.currentPlayback = this.core.activePlayback;
38926
- return !(this.currentPlayback?.tagName !== 'video' && this.currentPlayback?.tagName !== 'audio');
38934
+ if (this.core.getPlaybackType() === Playback.LIVE && !this.core.activePlayback.dvrEnabled) {
38935
+ return false;
38936
+ }
38937
+ return 'setPlaybackRate' in this.core.activePlayback;
38927
38938
  }
38928
38939
  /**
38929
38940
  * @internal
38930
38941
  */
38931
38942
  render() {
38932
- const container = this.core.activeContainer;
38933
- if (this.core.getPlaybackType() === Playback.LIVE && !container.isDvrEnabled()) {
38943
+ trace(`${T$6} render`, {
38944
+ rendered: this.rendered,
38945
+ shouldRender: this.shouldRender(),
38946
+ });
38947
+ if (!this.shouldRender()) {
38934
38948
  return this;
38935
38949
  }
38936
- const cfg = this.core.options.playbackRateConfig || {};
38937
- if (!this.playbackRates) {
38938
- this.playbackRates = cfg.options || DEFAULT_PLAYBACK_RATES;
38939
- }
38940
- if (!this.selectedRate) {
38941
- this.selectedRate = cfg.defaultValue || DEFAULT_PLAYBACK_RATE;
38942
- }
38943
- if (this.shouldRender()) {
38944
- const button = PlaybackRate.buttonTemplate({
38945
- title: this.getTitle(),
38946
- speedIcon,
38947
- arrowRightIcon,
38948
- });
38949
- this.$el.html(button);
38950
- // if (this.core.getPlaybackType() === Playback.LIVE) {
38951
- // this.core.mediaControl.$playbackRate.addClass('playbackrate-enable');
38952
- // }
38953
- // this.core.mediaControl.$playbackRate.append(this.el);
38954
- this.core.mediaControl.$el?.find('.gear-options-list [data-rate]').html(this.el);
38955
- // this.updateText();
38950
+ if (this.rendered) {
38951
+ return this;
38956
38952
  }
38953
+ const button = PlaybackRate.buttonTemplate({
38954
+ title: this.getTitle(),
38955
+ speedIcon,
38956
+ arrowRightIcon,
38957
+ });
38958
+ this.$el.html(button);
38959
+ this.core.getPlugin('bottom_gear')?.getElement('rate')?.html(this.el);
38960
+ this.rendered = true;
38957
38961
  return this;
38958
38962
  }
38959
38963
  onStartAd() {
38960
38964
  this.prevSelectedRate = this.selectedRate;
38961
- this.setSelectedRate('1.0');
38962
- this.listenToOnce(this.currentPlayback, Events$1.PLAYBACK_PLAY, this.onFinishAd);
38965
+ this.resetPlaybackRate();
38966
+ this.listenToOnce(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onFinishAd);
38963
38967
  }
38964
38968
  onFinishAd() {
38965
38969
  if (this.prevSelectedRate) {
@@ -38967,16 +38971,16 @@ class PlaybackRate extends UICorePlugin {
38967
38971
  }
38968
38972
  }
38969
38973
  onPlay() {
38970
- if (!this.core.mediaControl.$el.hasClass('dvr')) {
38971
- if (this.core.getPlaybackType() === Playback.LIVE) {
38972
- this.updatePlaybackRate(DEFAULT_PLAYBACK_RATE);
38973
- this.core.mediaControl.$playbackRate.addClass('playbackrate-enable');
38974
- }
38974
+ if (this.core.getPlaybackType() === Playback.LIVE && !this.core.activePlayback.dvrEnabled) {
38975
+ this.resetPlaybackRate();
38975
38976
  }
38976
38977
  else {
38977
38978
  this.setSelectedRate(this.selectedRate);
38978
38979
  }
38979
38980
  }
38981
+ resetPlaybackRate() {
38982
+ this.setSelectedRate(DEFAULT_PLAYBACK_RATE);
38983
+ }
38980
38984
  onStop() {
38981
38985
  }
38982
38986
  onRateSelect(event) {
@@ -38994,30 +38998,21 @@ class PlaybackRate extends UICorePlugin {
38994
38998
  arrowLeftIcon,
38995
38999
  checkIcon,
38996
39000
  }));
38997
- this.core.mediaControl.$el?.find('.gear-wrapper').html(this.el);
39001
+ this.core.getPlugin('bottom_gear')?.setContent(this.el);
38998
39002
  this.highlightCurrentRate();
38999
39003
  }
39000
39004
  goBack() {
39001
- this.core.trigger('gear:refresh');
39002
- }
39003
- updatePlaybackRate(rate) {
39004
- this.setSelectedRate(rate);
39005
+ setTimeout(() => {
39006
+ this.core.getPlugin('bottom_gear').refresh();
39007
+ }, 0);
39005
39008
  }
39006
39009
  setSelectedRate(rate) {
39007
39010
  // Set <video playbackRate="..."
39008
- this.core.$el.find('video,audio').get(0).playbackRate = rate;
39011
+ this.core.activePlayback?.setPlaybackRate(rate);
39009
39012
  this.selectedRate = rate;
39010
- // TODO
39011
- // Player.player.trigger('playbackRateChanged', rate);
39012
39013
  }
39013
39014
  getTitle() {
39014
- let title = this.selectedRate;
39015
- this.playbackRates.forEach((r) => {
39016
- if (r.value === this.selectedRate) {
39017
- title = r.label;
39018
- }
39019
- });
39020
- return title;
39015
+ return this.playbackRates.find((r) => r.value === this.selectedRate)?.label || this.selectedRate;
39021
39016
  }
39022
39017
  highlightCurrentRate() {
39023
39018
  this.allRateElements().removeClass('current');
@@ -39033,7 +39028,7 @@ const posterHTML = "<div class=\"play-wrapper\" data-poster></div>\n";
39033
39028
  //Copyright 2014 Globo.com Player authors. All rights reserved.
39034
39029
  // Use of this source code is governed by a BSD-style
39035
39030
  // license that can be found in the LICENSE file.
39036
- const T$5 = 'plugins.poster_custom';
39031
+ const T$5 = 'plugins.poster';
39037
39032
  /**
39038
39033
  * Displays a poster image in the background and a big play button on top when playback is stopped
39039
39034
  * @beta
@@ -39071,7 +39066,7 @@ class Poster extends UIContainerPlugin {
39071
39066
  * @internal
39072
39067
  */
39073
39068
  get name() {
39074
- return 'poster_custom';
39069
+ return 'poster';
39075
39070
  }
39076
39071
  /**
39077
39072
  * @internal
@@ -39467,7 +39462,8 @@ const fbIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"32px\"
39467
39462
  const twIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"32px\" height=\"32px\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <!-- Generator: Sketch 49 (51002) - http://www.bohemiancoding.com/sketch -->\n <title>twitter</title>\n <desc>Created with Sketch.</desc>\n <defs></defs>\n <g id=\"twitter\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\" id=\"Shape\">\n <path d=\"M32,30 C32,31.104 31.104,32 30,32 L2,32 C0.896,32 0,31.104 0,30 L0,2 C0,0.896 0.896,0 2,0 L30,0 C31.104,0 32,0.896 32,2 L32,30 Z\" fill=\"#55ACEE\"></path>\n <path class=\"icon-hover\" d=\"M25.987,9.894 C25.251,10.216 24.462,10.431 23.63,10.529 C24.48,10.031 25.13,9.24 25.436,8.298 C24.644,8.759 23.766,9.095 22.831,9.276 C22.083,8.491 21.017,8 19.838,8 C17.572,8 15.738,9.807 15.738,12.038 C15.738,12.352 15.774,12.663 15.842,12.96 C12.435,12.788 9.413,11.181 7.39,8.739 C7.038,9.336 6.834,10.029 6.834,10.771 C6.834,12.17 7.56,13.406 8.658,14.131 C7.987,14.109 7.354,13.928 6.802,13.625 C6.801,13.642 6.801,13.659 6.801,13.677 C6.801,15.632 8.215,17.266 10.091,17.637 C9.748,17.727 9.386,17.779 9.01,17.779 C8.746,17.779 8.49,17.755 8.24,17.707 C8.76,19.311 10.274,20.478 12.068,20.512 C10.67,21.594 8.9,22.24 6.979,22.24 C6.649,22.24 6.321,22.222 6,22.184 C7.814,23.329 9.971,23.997 12.287,23.997 C19.828,23.997 23.953,17.843 23.953,12.506 C23.953,12.333 23.948,12.156 23.941,11.985 C24.741,11.414 25.438,10.703 25.987,9.894 Z\" fill=\"#FFFFFF\"></path>\n </g>\n </g>\n</svg>";
39468
39463
 
39469
39464
  /**
39470
- * The plugin adds a share button to the media control UI.
39465
+ * PLUGIN that adds a share button to the media control UI.
39466
+ * @beta
39471
39467
  */
39472
39468
  class Share extends UICorePlugin {
39473
39469
  hide = false;
@@ -39587,7 +39583,8 @@ class Share extends UICorePlugin {
39587
39583
  const pluginHtml$1 = "<div class=\"skip-container\" data-skip-container>\n <div class=\"skip-item\" data-skip-left>\n </div>\n <div class=\"skip-item\" data-skip-mid>\n </div>\n <div class=\"skip-item\" data-skip-right>\n </div>\n</div>\n";
39588
39584
 
39589
39585
  /**
39590
- * The plugin adds skip controls to the media control UI.
39586
+ * PLUGIN that adds skip controls to the media control UI.
39587
+ * @beta
39591
39588
  */
39592
39589
  class SkipTime extends UICorePlugin {
39593
39590
  get name() {
@@ -39700,6 +39697,7 @@ const spinnerHTML = "<div data-bounce1></div>\n<div data-bounce2></div>\n<div da
39700
39697
  const T$4 = 'plugins.spinner';
39701
39698
  /**
39702
39699
  * Custom events emitted by the plugin
39700
+ * @beta
39703
39701
  */
39704
39702
  var SpinnerEvents;
39705
39703
  (function (SpinnerEvents) {
@@ -39710,10 +39708,12 @@ var SpinnerEvents;
39710
39708
  SpinnerEvents["SYNC"] = "plugins:spinner:sync";
39711
39709
  })(SpinnerEvents || (SpinnerEvents = {}));
39712
39710
  /**
39713
- * Shows a pending operation indicator when playback is buffering or in other appropriate cases
39711
+ * PLUGIN that shows a pending operation indicator when playback is buffering or in a similar state
39714
39712
  * @beta
39715
39713
  * @remarks
39716
- * The plugin emits
39714
+ * Events emitted- {@link SpinnerEvents}
39715
+ * Other plugins can use {@link SpinnerThreeBounce.show | show} and {@link SpinnerThreeBounce.hide | hide} methods to
39716
+ * implement custom pending/progress indication scenarios.
39717
39717
  */
39718
39718
  class SpinnerThreeBounce extends UIContainerPlugin {
39719
39719
  userShown = false;
@@ -39791,7 +39791,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
39791
39791
  /**
39792
39792
  * Shows the spinner.
39793
39793
  *
39794
- * When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce#hide} is called
39794
+ * When called, the spinner will not hide (due to its built-in logic) until {@link SpinnerThreeBounce.hide} is called
39795
39795
  */
39796
39796
  show(delay = 300) {
39797
39797
  this.userShown = true;
@@ -39968,7 +39968,7 @@ class SourceController extends CorePlugin {
39968
39968
  }
39969
39969
  this.bindContainerEventListeners();
39970
39970
  if (this.active) {
39971
- this.core.activeContainer?.getPlugin('poster_custom')?.disable();
39971
+ this.core.activeContainer?.getPlugin('poster')?.disable();
39972
39972
  spinner?.show(0);
39973
39973
  }
39974
39974
  }
@@ -39989,7 +39989,7 @@ class SourceController extends CorePlugin {
39989
39989
  }
39990
39990
  switch (error.code) {
39991
39991
  case PlaybackErrorCode.MediaSourceUnavailable:
39992
- this.core.activeContainer?.getPlugin('poster_custom')?.disable();
39992
+ this.core.activeContainer?.getPlugin('poster')?.disable();
39993
39993
  this.retryPlayback();
39994
39994
  break;
39995
39995
  }
@@ -40001,7 +40001,7 @@ class SourceController extends CorePlugin {
40001
40001
  });
40002
40002
  if (this.active) {
40003
40003
  this.reset();
40004
- this.core.activeContainer?.getPlugin('poster_custom')?.enable();
40004
+ this.core.activeContainer?.getPlugin('poster')?.enable();
40005
40005
  this.core.activeContainer?.getPlugin('spinner')?.hide();
40006
40006
  }
40007
40007
  });
@@ -40432,7 +40432,7 @@ var TelemetryEvent;
40432
40432
  TelemetryEvent[TelemetryEvent["Stall"] = 4] = "Stall";
40433
40433
  })(TelemetryEvent || (TelemetryEvent = {}));
40434
40434
  /**
40435
- * Collects and reports the performance statistics.
40435
+ * PLUGIN that collects and reports the performance statistics.
40436
40436
  * @beta
40437
40437
  * @remarks
40438
40438
  * This plugin is experimental and its API is likely to change.
@@ -41251,4 +41251,4 @@ class VolumeFade extends UICorePlugin {
41251
41251
  }
41252
41252
  }
41253
41253
 
41254
- export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DvrControls, ErrorScreen, Favicon, GearEvents, GoogleAnalytics, Kibo, LevelSelector, Logo, MediaControl, MediaControlEvents, MultiCamera, PictureInPicture, PlaybackRate, Poster, SeekTime, Share, SkipTime, SourceController, SpinnerEvents, SpinnerThreeBounce, Subtitles, Telemetry, TelemetryEvent, Thumbnails, VolumeFade, VolumeFadeEvents };
41254
+ export { AudioSelector, BigMuteButton, BottomGear, ClapprNerdStats, ClapprStats, ClickToPause, ClipsPlugin, ContextMenu, DvrControls, ErrorScreen, Favicon, GoogleAnalytics, LevelSelector, Logo, MediaControl, MediaControlEvents, MultiCamera, PictureInPicture, PlaybackRate, Poster, SeekTime, Share, SkipTime, SourceController, SpinnerEvents, SpinnerThreeBounce, Subtitles, Telemetry, TelemetryEvent, Thumbnails, VolumeFade, VolumeFadeEvents };