@gcorevideo/player 2.20.3 → 2.20.5

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 (108) hide show
  1. package/assets/error-screen/error_screen.ejs +3 -1
  2. package/dist/core.js +436 -210
  3. package/dist/index.css +1223 -1223
  4. package/dist/index.js +580 -392
  5. package/dist/player.d.ts +10 -0
  6. package/dist/plugins/index.css +754 -754
  7. package/dist/plugins/index.js +122 -163
  8. package/docs/api/player.contextmenupluginsettings.label.md +3 -0
  9. package/docs/api/player.contextmenupluginsettings.md +8 -3
  10. package/docs/api/player.contextmenupluginsettings.preventshowcontextmenu.md +3 -0
  11. package/docs/api/player.contextmenupluginsettings.url.md +3 -0
  12. package/docs/api/player.md +6 -2
  13. package/docs/api/player.multicamera._constructor_.md +3 -0
  14. package/docs/api/player.multicamera.activebyid.md +3 -0
  15. package/docs/api/player.multicamera.attributes.md +3 -0
  16. package/docs/api/player.multicamera.bindevents.md +3 -0
  17. package/docs/api/player.multicamera.events.md +3 -0
  18. package/docs/api/player.multicamera.getcameraslist.md +3 -0
  19. package/docs/api/player.multicamera.getcurrentcamera.md +3 -0
  20. package/docs/api/player.multicamera.md +28 -1
  21. package/docs/api/player.multicamera.name.md +3 -0
  22. package/docs/api/player.multicamera.render.md +3 -0
  23. package/docs/api/player.multicamera.supportedversion.md +3 -0
  24. package/docs/api/player.multicamera.template.md +3 -0
  25. package/docs/api/player.multicamera.unbindevents.md +3 -0
  26. package/docs/api/player.multicamera.version.md +3 -0
  27. package/docs/api/player.volumefadeevents.md +7 -0
  28. package/docs/api/player.zeptoresult.md +1 -0
  29. package/lib/Player.d.ts +5 -3
  30. package/lib/Player.d.ts.map +1 -1
  31. package/lib/Player.js +32 -8
  32. package/lib/internal.types.d.ts +7 -7
  33. package/lib/internal.types.d.ts.map +1 -1
  34. package/lib/playback/BasePlayback.d.ts +11 -0
  35. package/lib/playback/BasePlayback.d.ts.map +1 -0
  36. package/lib/playback/BasePlayback.js +33 -0
  37. package/lib/playback/dash-playback/DashPlayback.d.ts +3 -2
  38. package/lib/playback/dash-playback/DashPlayback.d.ts.map +1 -1
  39. package/lib/playback/dash-playback/DashPlayback.js +7 -7
  40. package/lib/playback/hls-playback/HlsPlayback.d.ts +2 -2
  41. package/lib/playback/hls-playback/HlsPlayback.d.ts.map +1 -1
  42. package/lib/playback/hls-playback/HlsPlayback.js +8 -5
  43. package/lib/playback/utils.d.ts +2 -0
  44. package/lib/playback/utils.d.ts.map +1 -0
  45. package/lib/playback/utils.js +1 -0
  46. package/lib/playback.types.d.ts +10 -3
  47. package/lib/playback.types.d.ts.map +1 -1
  48. package/lib/playback.types.js +3 -3
  49. package/lib/plugins/context-menu/ContextMenu.d.ts +4 -0
  50. package/lib/plugins/context-menu/ContextMenu.d.ts.map +1 -1
  51. package/lib/plugins/context-menu/ContextMenu.js +1 -2
  52. package/lib/plugins/error-screen/ErrorScreen.d.ts +39 -24
  53. package/lib/plugins/error-screen/ErrorScreen.d.ts.map +1 -1
  54. package/lib/plugins/error-screen/ErrorScreen.js +70 -136
  55. package/lib/plugins/media-control/MediaControl.d.ts +1 -1
  56. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  57. package/lib/plugins/media-control/MediaControl.js +7 -5
  58. package/lib/plugins/multi-camera/MultiCamera.d.ts +1 -0
  59. package/lib/plugins/multi-camera/MultiCamera.d.ts.map +1 -1
  60. package/lib/plugins/multi-camera/MultiCamera.js +5 -5
  61. package/lib/plugins/poster/Poster.js +1 -1
  62. package/lib/plugins/seek-time/SeekTime.js +1 -1
  63. package/lib/plugins/share/Share.js +1 -1
  64. package/lib/plugins/source-controller/SourceController.d.ts +2 -1
  65. package/lib/plugins/source-controller/SourceController.d.ts.map +1 -1
  66. package/lib/plugins/source-controller/SourceController.js +12 -6
  67. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts +2 -1
  68. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.d.ts.map +1 -1
  69. package/lib/plugins/spinner-three-bounce/SpinnerThreeBounce.js +19 -3
  70. package/lib/plugins/volume-fade/VolumeFade.d.ts +4 -0
  71. package/lib/plugins/volume-fade/VolumeFade.d.ts.map +1 -1
  72. package/lib/plugins/volume-fade/VolumeFade.js +4 -0
  73. package/lib/testUtils.d.ts +66 -2
  74. package/lib/testUtils.d.ts.map +1 -1
  75. package/lib/testUtils.js +95 -2
  76. package/lib/types.d.ts +9 -1
  77. package/lib/types.d.ts.map +1 -1
  78. package/lib/utils/types.d.ts +1 -0
  79. package/lib/utils/types.d.ts.map +1 -1
  80. package/package.json +2 -2
  81. package/release_notes +297 -0
  82. package/src/Player.ts +103 -48
  83. package/src/__tests__/Player.test.ts +25 -4
  84. package/src/internal.types.ts +86 -79
  85. package/src/playback/BasePlayback.ts +41 -0
  86. package/src/playback/dash-playback/DashPlayback.ts +11 -15
  87. package/src/playback/hls-playback/HlsPlayback.ts +7 -5
  88. package/src/playback/utils.ts +2 -0
  89. package/src/playback.types.ts +11 -3
  90. package/src/plugins/context-menu/ContextMenu.ts +5 -2
  91. package/src/plugins/error-screen/ErrorScreen.ts +121 -195
  92. package/src/plugins/error-screen/__tests__/ErrorScreen.test.ts +113 -0
  93. package/src/plugins/error-screen/__tests__/__snapshots__/ErrorScreen.test.ts.snap +20 -0
  94. package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +32 -57
  95. package/src/plugins/media-control/MediaControl.ts +8 -5
  96. package/src/plugins/multi-camera/MultiCamera.ts +5 -5
  97. package/src/plugins/poster/Poster.ts +1 -1
  98. package/src/plugins/seek-time/SeekTime.ts +1 -1
  99. package/src/plugins/share/Share.ts +1 -1
  100. package/src/plugins/source-controller/SourceController.ts +20 -14
  101. package/src/plugins/source-controller/__tests__/SourceController.test.ts +29 -46
  102. package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +20 -3
  103. package/src/plugins/volume-fade/VolumeFade.ts +4 -0
  104. package/src/testUtils.ts +100 -3
  105. package/src/types.ts +11 -1
  106. package/src/utils/types.ts +1 -0
  107. package/temp/player.api.json +24 -24
  108. package/tsconfig.tsbuildinfo +1 -1
@@ -32649,7 +32649,7 @@ const volumeOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fil
32649
32649
 
32650
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";
32651
32651
 
32652
- const T$9 = 'plugins.big_mute_button';
32652
+ const T$a = '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.
@@ -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$9} bindEvents`, {
32694
+ trace(`${T$a} 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$9} render`, {
32751
+ trace(`${T$a} render`, {
32752
32752
  el: !!this.$el,
32753
32753
  });
32754
32754
  this.$el.html(BigMuteButton.template());
@@ -35958,7 +35958,7 @@ class ClipsPlugin extends UICorePlugin {
35958
35958
 
35959
35959
  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";
35960
35960
 
35961
- var version$1 = "2.20.3";
35961
+ var version$1 = "2.20.5";
35962
35962
 
35963
35963
  var packages = {
35964
35964
  "node_modules/@clappr/core": {
@@ -36040,7 +36040,7 @@ class ContextMenu extends UIContainerPlugin {
36040
36040
  this._url = this.options.contextMenu.url;
36041
36041
  }
36042
36042
  this.render();
36043
- this.bindEvents();
36043
+ $('body').on('click', this.hideOnBodyClick);
36044
36044
  }
36045
36045
  /**
36046
36046
  * @internal
@@ -36048,7 +36048,6 @@ class ContextMenu extends UIContainerPlugin {
36048
36048
  bindEvents() {
36049
36049
  this.listenTo(this.container, Events$1.CONTAINER_CONTEXTMENU, this.toggleContextMenu);
36050
36050
  this.listenTo(this.container, Events$1.CONTAINER_CLICK, this.hide);
36051
- $('body').on('click', this.hideOnBodyClick);
36052
36051
  }
36053
36052
  /**
36054
36053
  * @internal
@@ -36217,178 +36216,114 @@ class DvrControls extends UICorePlugin {
36217
36216
 
36218
36217
  const reloadIcon = "<svg fill=\"#FFFFFF\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n</svg>";
36219
36218
 
36220
- 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 <div class=\"player-error-screen__reload\" data-error-screen><%= reloadIcon %></div>\n</div>\n";
36219
+ 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";
36221
36220
 
36222
- const TIME_FOR_UPDATE = 10000;
36223
- const MAX_RETRY = 10;
36221
+ const T$9 = 'plugins.error_screen';
36224
36222
  /**
36225
- * Displays a descriptive error in the overlay on top of the player.
36223
+ * Displays an error nicely in the overlay on top of the player.
36226
36224
  * @beta
36227
36225
  */
36228
36226
  class ErrorScreen extends UICorePlugin {
36229
- _retry = 0;
36230
36227
  err = null;
36231
- hideValue = false;
36232
- timeout = null;
36233
- reloadButton = null;
36228
+ /**
36229
+ * @internal
36230
+ */
36234
36231
  get name() {
36235
- return 'error_gplayer';
36232
+ return 'error_screen';
36236
36233
  }
36234
+ /**
36235
+ * @internal
36236
+ */
36237
36237
  get supportedVersion() {
36238
36238
  return { min: CLAPPR_VERSION };
36239
36239
  }
36240
- get template() {
36241
- return tmpl(templateHtml);
36242
- }
36243
- get container() {
36244
- return this.core.activeContainer;
36245
- }
36240
+ static template = tmpl(templateHtml);
36241
+ /**
36242
+ * @internal
36243
+ */
36246
36244
  get attributes() {
36247
36245
  return {
36248
- 'class': 'player-error-screen',
36246
+ class: 'player-error-screen',
36249
36247
  'data-error-screen': '',
36250
36248
  };
36251
36249
  }
36250
+ /**
36251
+ * @internal
36252
+ */
36252
36253
  bindEvents() {
36253
36254
  this.listenTo(this.core, Events$1.ERROR, this.onError);
36254
- this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
36255
- this.listenTo(this.core, 'core:advertisement:start', this.onStartAd);
36256
- this.listenTo(this.core, 'core:advertisement:finish', this.onFinishAd);
36257
- this.listenTo(this.core.mediaControl, Events$1.MEDIACONTROL_CONTAINERCHANGED, this.onContainerChanged);
36258
- }
36259
- onCoreReady() {
36260
- if (this.core.activePlayback) {
36261
- this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
36262
- }
36255
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
36263
36256
  }
36264
36257
  onPlay() {
36265
- this.destroyError();
36258
+ this.unmount();
36266
36259
  }
36267
- destroyError() {
36268
- this._retry = 0;
36260
+ unmount() {
36269
36261
  this.err = null;
36270
- if (this.timeout !== null) {
36271
- clearTimeout(this.timeout);
36272
- this.timeout = null;
36273
- }
36274
- this.$el.hide();
36275
- }
36276
- unBindEvents() {
36277
- // @ts-ignore
36278
- this.stopListening(this.core, 'core:advertisement:start');
36279
- // @ts-ignore
36280
- this.stopListening(this.core, 'core:advertisement:finish');
36281
- // @ts-ignore
36282
- this.stopListening(this.core, Events$1.ERROR);
36262
+ this.$el.empty();
36263
+ // this.$el.hide();
36283
36264
  }
36284
- bindReload() {
36285
- this.reloadButton = this.$el.find('.player-error-screen__reload');
36286
- this.reloadButton && this.reloadButton.on('click', this.reload.bind(this));
36265
+ /**
36266
+ * @internal
36267
+ */
36268
+ get events() {
36269
+ return {
36270
+ 'click .player-error-screen__reload': 'reload',
36271
+ };
36287
36272
  }
36288
36273
  reload() {
36289
- this._retry++;
36290
- this.core.configure({
36291
- ...this.options,
36292
- autoPlay: true
36293
- });
36294
- this.core.activeContainer.mediaControlDisabled = false;
36295
- this.unbindReload();
36296
- }
36297
- unbindReload() {
36298
- this.reloadButton && this.reloadButton.off('click');
36274
+ setTimeout(() => {
36275
+ this.core.configure({
36276
+ reloading: true,
36277
+ source: this.core.options.source,
36278
+ sources: this.core.options.sources,
36279
+ });
36280
+ }, 0);
36299
36281
  }
36300
- onContainerChanged() {
36282
+ onActiveContainerChanged() {
36283
+ trace(`${T$9} onActiveContainerChanged`, {
36284
+ reloading: this.core.options.reloading,
36285
+ });
36301
36286
  this.err = null;
36302
- if (this.core.getPlugin('error_screen')) {
36303
- this.core.getPlugin('error_screen').disable();
36304
- }
36305
- this.unbindReload();
36306
- this.hide();
36307
- }
36308
- onStartAd() {
36309
- this.hideValue = true;
36310
- if (this.err) {
36311
- this.hide();
36312
- }
36313
- }
36314
- onFinishAd() {
36315
- this.hideValue = false;
36316
- if (this.err) {
36317
- this.container.disableMediaControl();
36318
- this.container.stop();
36319
- this.show();
36287
+ this.listenTo(this.core.activeContainer.playback, Events$1.PLAYBACK_PLAY, this.onPlay);
36288
+ if (this.core.options.reloading) {
36289
+ setTimeout(() => {
36290
+ this.core.options.reloading = false;
36291
+ this.unmount();
36292
+ this.core.activeContainer.play({
36293
+ reloading: true,
36294
+ });
36295
+ }, 0);
36320
36296
  }
36321
36297
  }
36322
36298
  onError(err) {
36323
- if (err.level === PlayerError.Levels.FATAL ||
36324
- err.details === 'bufferStalledError' ||
36325
- err.details === 'manifestParsingError') {
36299
+ if (err.UI) {
36300
+ if (this.err) {
36301
+ this.unmount();
36302
+ }
36326
36303
  this.err = {
36327
- title: this.core.i18n.t('no_broadcast'),
36328
- message: '',
36329
- code: '',
36330
- // icon: (this.err.UI && this.err.UI.icon) || '',
36331
- icon: '',
36332
- reloadIcon,
36304
+ title: err.UI.title,
36305
+ message: err.UI.message,
36306
+ code: err.code,
36307
+ icon: err.UI.icon,
36333
36308
  };
36334
- if (this.options.errorScreen?.reloadOnError === false) {
36335
- return;
36336
- }
36337
- if (this.options.errorScreen?.neverStopToRetry) {
36338
- this._retry = 0;
36339
- }
36340
- if (this._retry >= MAX_RETRY) {
36341
- this.drying();
36342
- return;
36343
- }
36344
- const ctp = this.container.getPlugin('click_to_pause_custom');
36345
- const toggleCTP = !!ctp?.enabled;
36346
- if (toggleCTP) {
36347
- // clickToPausePlugin.afterEnabled = true;
36348
- ctp.disable();
36349
- }
36350
- this.timeout = setTimeout(() => {
36351
- if (toggleCTP) {
36352
- ctp.enable();
36353
- }
36354
- this.reload();
36355
- }, TIME_FOR_UPDATE);
36356
- const spinnerPlugin = this.container.getPlugin('spinner');
36357
- if (spinnerPlugin) {
36358
- spinnerPlugin.show(); // TODO remove?
36359
- setTimeout(() => spinnerPlugin.show(), 0);
36360
- }
36361
- }
36362
- }
36363
- drying() {
36364
- const spinnerPlugin = this.container.getPlugin('spinner');
36365
- spinnerPlugin?.hide();
36366
- this._retry = 0;
36367
- if (!this.hideValue) {
36368
- this.container.disableMediaControl();
36369
- this.container.stop();
36370
- this.show();
36371
- }
36372
- }
36373
- show(err) {
36374
- if (err) {
36375
- this.err = err;
36309
+ this.render();
36376
36310
  }
36377
- // TODO use container.disableMediaControl() instead
36378
- this.core.mediaControl.disable();
36379
- this.render();
36380
- this.$el.show();
36381
- }
36382
- hide() {
36383
- this.$el.hide();
36384
36311
  }
36312
+ /**
36313
+ * @internal
36314
+ */
36385
36315
  render() {
36386
36316
  if (!this.err) {
36387
36317
  return this;
36388
36318
  }
36389
- this.$el.html(this.template(this.err));
36390
- this.core.$el.append(this.el);
36391
- this.bindReload();
36319
+ this.$el.html(ErrorScreen.template({
36320
+ ...this.err,
36321
+ reloadIcon: this.options.errorScreen?.noReload ? null : reloadIcon,
36322
+ }));
36323
+ // TODO append to container instead of core?
36324
+ if (!this.el.parentElement) {
36325
+ this.core.$el.append(this.el);
36326
+ }
36392
36327
  return this;
36393
36328
  }
36394
36329
  }
@@ -37587,7 +37522,7 @@ class MediaControl extends UICorePlugin {
37587
37522
  }
37588
37523
  }
37589
37524
  /**
37590
- * Disables the plugin and unmounts its UI
37525
+ * Hides the media control UI
37591
37526
  */
37592
37527
  disable() {
37593
37528
  this.userDisabled = true;
@@ -38275,13 +38210,13 @@ class MediaControl extends UICorePlugin {
38275
38210
  destroy() {
38276
38211
  $(document).unbind('mouseup', this.stopDrag);
38277
38212
  $(document).unbind('mousemove', this.updateDrag);
38213
+ $(document).unbind('touchend', this.stopDrag);
38214
+ $(document).unbind('touchmove', this.updateDrag);
38278
38215
  this.unbindKeyEvents();
38279
- // @ts-ignore
38280
- this.stopListening();
38281
38216
  return super.destroy();
38282
38217
  }
38283
38218
  configure() {
38284
- this.advertisementPlaying ? this.disable() : this.enable();
38219
+ // this.advertisementPlaying ? this.disable() : this.enable()
38285
38220
  this.trigger(Events$1.MEDIACONTROL_OPTIONS_CHANGE);
38286
38221
  }
38287
38222
  /**
@@ -38422,9 +38357,10 @@ const streamsMomentoIcon = "<svg id=\"Слой_1\" data-name=\"Слой 1\" xmln
38422
38357
  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";
38423
38358
 
38424
38359
  const VERSION$3 = '0.0.1';
38425
- const T$7 = 'plugins.media_control_multicamera';
38360
+ const T$7 = 'plugins.multicamera';
38426
38361
  /**
38427
38362
  * The plugin adds support for loading multiple streams and switching between them using the media control UI.
38363
+ * @beta
38428
38364
  */
38429
38365
  class MultiCamera extends UICorePlugin {
38430
38366
  currentCamera = null;
@@ -38433,7 +38369,7 @@ class MultiCamera extends UICorePlugin {
38433
38369
  multicamera = [];
38434
38370
  noActiveStreams = false;
38435
38371
  get name() {
38436
- return 'media_control_multicamera';
38372
+ return 'multicamera';
38437
38373
  }
38438
38374
  get supportedVersion() {
38439
38375
  return { min: CLAPPR_VERSION };
@@ -38672,13 +38608,12 @@ class MultiCamera extends UICorePlugin {
38672
38608
  }
38673
38609
  catch (error) {
38674
38610
  }
38675
- // TODO figure out
38676
- this.core.getPlugin('error_gplayer')?.show({
38611
+ // TODO trigger error instead
38612
+ this.core.getPlugin('error_screen')?.show({
38677
38613
  title: this.core.i18n.t('source_offline'),
38678
38614
  message: '',
38679
38615
  code: '',
38680
38616
  icon: '',
38681
- reloadIcon: '',
38682
38617
  });
38683
38618
  }
38684
38619
  hideError() {
@@ -39139,7 +39074,7 @@ class Poster extends UIContainerPlugin {
39139
39074
  }
39140
39075
  static template = tmpl(posterHTML);
39141
39076
  get shouldRender() {
39142
- if (!this.enabled) {
39077
+ if (!this.enabled || this.options.reloading) {
39143
39078
  return false;
39144
39079
  }
39145
39080
  const showForNoOp = !!this.options.poster?.showForNoOp;
@@ -39370,7 +39305,7 @@ const { formatTime } = Utils;
39370
39305
  */
39371
39306
  class SeekTime extends UICorePlugin {
39372
39307
  get name() {
39373
- return 'media_control_seek_time';
39308
+ return 'seek_time';
39374
39309
  }
39375
39310
  get supportedVersion() {
39376
39311
  return { min: CLAPPR_VERSION };
@@ -39531,7 +39466,7 @@ class Share extends UICorePlugin {
39531
39466
  hide = false;
39532
39467
  container = null;
39533
39468
  get name() {
39534
- return 'media_control_share';
39469
+ return 'share';
39535
39470
  }
39536
39471
  get supportedVersion() {
39537
39472
  return { min: CLAPPR_VERSION };
@@ -39739,15 +39674,15 @@ var PlaybackErrorCode;
39739
39674
  /**
39740
39675
  * An unknown or uncategorised error.
39741
39676
  */
39742
- PlaybackErrorCode[PlaybackErrorCode["Generic"] = 0] = "Generic";
39677
+ PlaybackErrorCode["Generic"] = "GENERIC_ERROR";
39743
39678
  /**
39744
39679
  * The media source is not available. Typically a network error.
39745
39680
  */
39746
- PlaybackErrorCode[PlaybackErrorCode["MediaSourceUnavailable"] = 1] = "MediaSourceUnavailable";
39681
+ PlaybackErrorCode["MediaSourceUnavailable"] = "MEDIA_SOURCE_UNAVAILABLE";
39747
39682
  /**
39748
39683
  * The media source is not accessible due to some protection policy.
39749
39684
  */
39750
- PlaybackErrorCode[PlaybackErrorCode["MediaSourceAccessDenied"] = 3] = "MediaSourceAccessDenied";
39685
+ PlaybackErrorCode["MediaSourceAccessDenied"] = "MEDIA_SOURCE_ACCESS_DENIED";
39751
39686
  })(PlaybackErrorCode || (PlaybackErrorCode = {}));
39752
39687
 
39753
39688
  const spinnerHTML = "<div data-bounce1></div>\n<div data-bounce2></div>\n<div data-bounce3></div>\n";
@@ -39795,6 +39730,7 @@ class SpinnerThreeBounce extends UIContainerPlugin {
39795
39730
  'class': 'spinner-three-bounce'
39796
39731
  };
39797
39732
  }
39733
+ hideTimeout = null;
39798
39734
  showTimeout = null;
39799
39735
  template = tmpl(spinnerHTML);
39800
39736
  hasFatalError = false;
@@ -39848,8 +39784,17 @@ class SpinnerThreeBounce extends UIContainerPlugin {
39848
39784
  /**
39849
39785
  * Shows the spinner
39850
39786
  */
39851
- show() {
39852
- this.showTimeout = setTimeout(() => this.$el.show(), 300);
39787
+ show(delay = 300) {
39788
+ if (this.showTimeout === null) {
39789
+ if (this.hideTimeout !== null) {
39790
+ clearTimeout(this.hideTimeout);
39791
+ this.hideTimeout = null;
39792
+ }
39793
+ this.showTimeout = setTimeout(() => {
39794
+ this.showTimeout = null;
39795
+ this.$el.show();
39796
+ }, delay);
39797
+ }
39853
39798
  }
39854
39799
  /**
39855
39800
  * Hides the spinner
@@ -39859,7 +39804,12 @@ class SpinnerThreeBounce extends UIContainerPlugin {
39859
39804
  clearTimeout(this.showTimeout);
39860
39805
  this.showTimeout = null;
39861
39806
  }
39862
- this.$el.hide();
39807
+ this.hideTimeout = setTimeout(() => {
39808
+ this.hideTimeout = null;
39809
+ if (this.showTimeout === null) {
39810
+ this.$el.hide();
39811
+ }
39812
+ }, 0);
39863
39813
  }
39864
39814
  /**
39865
39815
  * @internal
@@ -39980,10 +39930,14 @@ class SourceController extends CorePlugin {
39980
39930
  */
39981
39931
  bindEvents() {
39982
39932
  super.bindEvents();
39983
- this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, () => this.onReady());
39933
+ this.listenTo(this.core, Events$1.CORE_READY, this.onCoreReady);
39934
+ this.listenTo(this.core, Events$1.CORE_ACTIVE_CONTAINER_CHANGED, this.onActiveContainerChanged);
39984
39935
  }
39985
- onReady() {
39986
- trace(`${T$3} onReady`, {
39936
+ onCoreReady() {
39937
+ this.core.getPlugin('error_screen')?.disable(); // TODO test
39938
+ }
39939
+ onActiveContainerChanged() {
39940
+ trace(`${T$3} onActiveContainerChanged`, {
39987
39941
  retrying: this.active,
39988
39942
  currentSource: this.sourcesList[this.currentSourceIndex],
39989
39943
  });
@@ -39999,7 +39953,7 @@ class SourceController extends CorePlugin {
39999
39953
  this.bindContainerEventListeners();
40000
39954
  if (this.active) {
40001
39955
  this.core.activeContainer?.getPlugin('poster_custom')?.disable();
40002
- spinner?.show();
39956
+ spinner?.show(0);
40003
39957
  }
40004
39958
  }
40005
39959
  bindContainerEventListeners() {
@@ -40016,7 +39970,7 @@ class SourceController extends CorePlugin {
40016
39970
  switch (error.code) {
40017
39971
  case PlaybackErrorCode.MediaSourceUnavailable:
40018
39972
  this.core.activeContainer?.getPlugin('poster_custom')?.disable();
40019
- this.retryPlayback();
39973
+ setTimeout(() => this.retryPlayback(), 0);
40020
39974
  break;
40021
39975
  }
40022
39976
  });
@@ -40043,6 +39997,7 @@ class SourceController extends CorePlugin {
40043
39997
  currentSource: this.sourcesList[this.currentSourceIndex],
40044
39998
  });
40045
39999
  this.active = true;
40000
+ this.core.activeContainer?.getPlugin('spinner')?.show(0);
40046
40001
  this.getNextMediaSource().then((nextSource) => {
40047
40002
  const rnd = RETRY_DELAY_BLUR * Math.random();
40048
40003
  this.sync(() => {
@@ -41174,6 +41129,10 @@ class Thumbnails extends UICorePlugin {
41174
41129
  }
41175
41130
  }
41176
41131
 
41132
+ /**
41133
+ * Events emitted by the VolumeFade plugin.
41134
+ * @beta
41135
+ */
41177
41136
  var VolumeFadeEvents;
41178
41137
  (function (VolumeFadeEvents) {
41179
41138
  VolumeFadeEvents["FADE"] = "core:volume:fade";
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## ContextMenuPluginSettings.label property
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -4,6 +4,11 @@
4
4
 
5
5
  ## ContextMenuPluginSettings interface
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
10
+ The plugin adds a context menu to the player.
11
+
7
12
  **Signature:**
8
13
 
9
14
  ```typescript
@@ -48,7 +53,7 @@ string
48
53
 
49
54
  </td><td>
50
55
 
51
- _(Optional)_
56
+ **_(BETA)_** _(Optional)_
52
57
 
53
58
 
54
59
  </td></tr>
@@ -67,7 +72,7 @@ boolean
67
72
 
68
73
  </td><td>
69
74
 
70
- _(Optional)_
75
+ **_(BETA)_** _(Optional)_
71
76
 
72
77
 
73
78
  </td></tr>
@@ -86,7 +91,7 @@ string
86
91
 
87
92
  </td><td>
88
93
 
89
- _(Optional)_
94
+ **_(BETA)_** _(Optional)_
90
95
 
91
96
 
92
97
  </td></tr>
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## ContextMenuPluginSettings.preventShowContextMenu property
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## ContextMenuPluginSettings.url property
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -195,7 +195,7 @@ Description
195
195
 
196
196
  </td><td>
197
197
 
198
- The plugin adds support for loading multiple streams and switching between them using the media control UI.
198
+ **_(BETA)_** The plugin adds support for loading multiple streams and switching between them using the media control UI.
199
199
 
200
200
 
201
201
  </td></tr>
@@ -419,6 +419,8 @@ Custom events emitted by the plugin
419
419
 
420
420
  </td><td>
421
421
 
422
+ **_(BETA)_** Events emitted by the VolumeFade plugin.
423
+
422
424
 
423
425
  </td></tr>
424
426
  </tbody></table>
@@ -480,6 +482,8 @@ Configuration options
480
482
 
481
483
  </td><td>
482
484
 
485
+ **_(BETA)_** The plugin adds a context menu to the player.
486
+
483
487
 
484
488
  </td></tr>
485
489
  <tr><td>
@@ -891,7 +895,7 @@ Description
891
895
 
892
896
  </td><td>
893
897
 
894
- **_(BETA)_**
898
+ **_(BETA)_** [Zepto query result](https://zeptojs.com/#$())
895
899
 
896
900
 
897
901
  </td></tr>
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## MultiCamera.(constructor)
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  Constructs a new instance of the `MultiCamera` class
8
11
 
9
12
  **Signature:**
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## MultiCamera.activeById() method
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## MultiCamera.attributes property
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## MultiCamera.bindEvents() method
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript
@@ -4,6 +4,9 @@
4
4
 
5
5
  ## MultiCamera.events property
6
6
 
7
+ > This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
8
+ >
9
+
7
10
  **Signature:**
8
11
 
9
12
  ```typescript