@gcorevideo/player 2.19.7 → 2.19.8

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 (150) hide show
  1. package/dist/core.js +1 -1
  2. package/dist/index.css +474 -474
  3. package/dist/index.js +85 -39
  4. package/dist/player.d.ts +109 -55
  5. package/dist/plugins/index.css +599 -599
  6. package/dist/plugins/index.js +84 -38
  7. package/docs/api/player.bigmutebutton.md +0 -14
  8. package/docs/api/player.levelselector.md +1 -1
  9. package/docs/api/player.md +24 -9
  10. package/docs/api/player.mediacontrol._constructor_.md +5 -2
  11. package/docs/api/player.mediacontrol.attributes.md +3 -0
  12. package/docs/api/player.mediacontrol.bindcontainerevents.md +3 -0
  13. package/docs/api/player.mediacontrol.bindevents.md +3 -0
  14. package/docs/api/player.mediacontrol.container.md +3 -0
  15. package/docs/api/player.mediacontrol.destroy.md +3 -0
  16. package/docs/api/player.mediacontrol.disable.md +3 -0
  17. package/docs/api/player.mediacontrol.disabled.md +3 -0
  18. package/docs/api/player.mediacontrol.disabledcontrolbutton.md +5 -0
  19. package/docs/api/player.mediacontrol.enable.md +3 -0
  20. package/docs/api/player.mediacontrol.enablecontrolbutton.md +5 -0
  21. package/docs/api/player.mediacontrol.events.md +3 -0
  22. package/docs/api/player.mediacontrol.getelement.md +11 -2
  23. package/docs/api/player.mediacontrol.getexternalinterface.md +3 -0
  24. package/docs/api/player.mediacontrol.md +53 -570
  25. package/docs/api/player.mediacontrol.muted.md +5 -0
  26. package/docs/api/player.mediacontrol.name.md +3 -0
  27. package/docs/api/player.mediacontrol.pause.md +5 -0
  28. package/docs/api/player.mediacontrol.play.md +5 -0
  29. package/docs/api/player.mediacontrol.playback.md +3 -0
  30. package/docs/api/player.mediacontrol.render.md +3 -0
  31. package/docs/api/player.mediacontrol.setinitialvolume.md +20 -0
  32. package/docs/api/player.mediacontrol.setmuted.md +3 -0
  33. package/docs/api/player.mediacontrol.setvolume.md +12 -1
  34. package/docs/api/player.mediacontrol.stop.md +5 -0
  35. package/docs/api/player.mediacontrol.supportedversion.md +3 -0
  36. package/docs/api/player.mediacontrol.volume.md +5 -0
  37. package/docs/api/{player.bigmutebutton.unbindevents.md → player.mediacontrolelement.md} +4 -7
  38. package/docs/api/player.subtitles.buttonelement.md +1 -1
  39. package/docs/api/player.subtitles.levelelement.md +1 -1
  40. package/docs/api/player.zeptoresult.md +15 -0
  41. package/lib/index.core.d.ts +1 -0
  42. package/lib/index.core.d.ts.map +1 -1
  43. package/lib/index.core.js +1 -0
  44. package/lib/plugins/big-mute-button/BigMuteButton.d.ts +1 -1
  45. package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
  46. package/lib/plugins/clips/Clips.d.ts +3 -0
  47. package/lib/plugins/clips/Clips.d.ts.map +1 -1
  48. package/lib/plugins/clips/Clips.js +22 -2
  49. package/lib/plugins/kibo/index.d.ts +3 -0
  50. package/lib/plugins/kibo/index.d.ts.map +1 -1
  51. package/lib/plugins/kibo/index.js +3 -0
  52. package/lib/plugins/media-control/MediaControl.d.ts +95 -54
  53. package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
  54. package/lib/plugins/media-control/MediaControl.js +60 -37
  55. package/lib/plugins/subtitles/Subtitles.d.ts +1 -1
  56. package/lib/plugins/subtitles/Subtitles.d.ts.map +1 -1
  57. package/lib/plugins/vast-ads/roll.d.ts +1 -1
  58. package/lib/plugins/vast-ads/roll.d.ts.map +1 -1
  59. package/lib/plugins/vast-ads/rollmanager.d.ts +1 -1
  60. package/lib/plugins/vast-ads/rollmanager.d.ts.map +1 -1
  61. package/lib/types.d.ts.map +1 -1
  62. package/lib/utils/types.d.ts +6 -0
  63. package/lib/utils/types.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/src/index.core.ts +1 -0
  66. package/src/plugins/audio-selector/AudioSelector.ts +1 -1
  67. package/src/plugins/big-mute-button/BigMuteButton.ts +2 -2
  68. package/src/plugins/clappr-nerd-stats/ClapprNerdStats.ts +1 -1
  69. package/src/plugins/clappr-nerd-stats/speedtest/Speedtest.ts +1 -1
  70. package/src/plugins/clappr-stats/ClapprStats.ts +1 -1
  71. package/src/plugins/clips/Clips.ts +29 -3
  72. package/src/plugins/error-screen/ErrorScreen.ts +1 -1
  73. package/src/plugins/favicon/Favicon.ts +1 -1
  74. package/src/plugins/kibo/index.ts +3 -0
  75. package/src/plugins/level-selector/LevelSelector.ts +1 -1
  76. package/src/plugins/level-selector/__tests__/LevelSelector.test.ts +1 -8
  77. package/src/plugins/level-selector/__tests__/__snapshots__/LevelSelector.test.ts.snap +33 -0
  78. package/src/plugins/logo/Logo.ts +1 -1
  79. package/src/plugins/media-control/MediaControl.ts +114 -94
  80. package/src/plugins/multi-camera/MultiCamera.ts +1 -1
  81. package/src/plugins/playback-rate/PlaybackRate.ts +1 -1
  82. package/src/plugins/poster/Poster.ts +1 -1
  83. package/src/plugins/seek-time/SeekTime.ts +1 -1
  84. package/src/plugins/spinner-three-bounce/SpinnerThreeBounce.ts +1 -1
  85. package/src/plugins/subtitles/Subtitles.ts +1 -1
  86. package/src/plugins/thumbnails/Thumbnails.ts +1 -1
  87. package/src/plugins/vast-ads/VastAds.ts +1 -1
  88. package/src/plugins/vast-ads/roll.ts +1 -1
  89. package/src/plugins/vast-ads/rollmanager.ts +1 -1
  90. package/src/plugins/volume-fade/VolumeFade.ts +1 -1
  91. package/src/types.ts +0 -2
  92. package/src/utils/types.ts +6 -0
  93. package/temp/player.api.json +587 -2743
  94. package/tsconfig.tsbuildinfo +1 -1
  95. package/docs/api/player.kibo._constructor_.md +0 -49
  96. package/docs/api/player.kibo.delegate.md +0 -79
  97. package/docs/api/player.kibo.down.md +0 -65
  98. package/docs/api/player.kibo.lastkey.md +0 -51
  99. package/docs/api/player.kibo.lastmodifiersandkey.md +0 -15
  100. package/docs/api/player.kibo.md +0 -137
  101. package/docs/api/player.kibo.off.md +0 -49
  102. package/docs/api/player.kibo.up.md +0 -65
  103. package/docs/api/player.mediacontrol.applybuttonstyle.md +0 -49
  104. package/docs/api/player.mediacontrol.bigplaybutton.md +0 -11
  105. package/docs/api/player.mediacontrol.bindkeyandshow.md +0 -63
  106. package/docs/api/player.mediacontrol.bindkeyevents.md +0 -15
  107. package/docs/api/player.mediacontrol.configure.md +0 -15
  108. package/docs/api/player.mediacontrol.createcachedelements.md +0 -15
  109. package/docs/api/player.mediacontrol.drawdurationandposition.md +0 -15
  110. package/docs/api/player.mediacontrol.ended.md +0 -15
  111. package/docs/api/player.mediacontrol.getsettings.md +0 -15
  112. package/docs/api/player.mediacontrol.getvolumefromuievent.md +0 -49
  113. package/docs/api/player.mediacontrol.hide.md +0 -51
  114. package/docs/api/player.mediacontrol.hidecontrollads.md +0 -15
  115. package/docs/api/player.mediacontrol.hidevolumebar.md +0 -51
  116. package/docs/api/player.mediacontrol.highdefinitionupdate.md +0 -49
  117. package/docs/api/player.mediacontrol.initializeicons.md +0 -15
  118. package/docs/api/player.mediacontrol.isseekenabledforhtml5playback.md +0 -15
  119. package/docs/api/player.mediacontrol.isvisible.md +0 -15
  120. package/docs/api/player.mediacontrol.onactivecontainerchanged.md +0 -15
  121. package/docs/api/player.mediacontrol.onfinishad.md +0 -15
  122. package/docs/api/player.mediacontrol.onstartad.md +0 -15
  123. package/docs/api/player.mediacontrol.ontimeupdate.md +0 -49
  124. package/docs/api/player.mediacontrol.parsecolors.md +0 -15
  125. package/docs/api/player.mediacontrol.renderseekbar.md +0 -15
  126. package/docs/api/player.mediacontrol.resetindicators.md +0 -15
  127. package/docs/api/player.mediacontrol.resetkeepvisible.md +0 -15
  128. package/docs/api/player.mediacontrol.resetuserkeepvisible.md +0 -15
  129. package/docs/api/player.mediacontrol.seek.md +0 -49
  130. package/docs/api/player.mediacontrol.seekrelative.md +0 -49
  131. package/docs/api/player.mediacontrol.setcliptext.md +0 -49
  132. package/docs/api/player.mediacontrol.setkeepvisible.md +0 -15
  133. package/docs/api/player.mediacontrol.setseekpercentage.md +0 -49
  134. package/docs/api/player.mediacontrol.setsvgmask.md +0 -49
  135. package/docs/api/player.mediacontrol.setuserkeepvisible.md +0 -15
  136. package/docs/api/player.mediacontrol.show.md +0 -51
  137. package/docs/api/player.mediacontrol.showvolumebar.md +0 -15
  138. package/docs/api/player.mediacontrol.startseekdrag.md +0 -49
  139. package/docs/api/player.mediacontrol.startvolumedrag.md +0 -49
  140. package/docs/api/player.mediacontrol.stopdrag.md +0 -11
  141. package/docs/api/player.mediacontrol.template.md +0 -11
  142. package/docs/api/player.mediacontrol.togglefullscreen.md +0 -15
  143. package/docs/api/player.mediacontrol.togglemute.md +0 -15
  144. package/docs/api/player.mediacontrol.toggleplaypause.md +0 -15
  145. package/docs/api/player.mediacontrol.toggleplaystop.md +0 -15
  146. package/docs/api/player.mediacontrol.unbindkeyevents.md +0 -15
  147. package/docs/api/player.mediacontrol.updatecursorstyle.md +0 -49
  148. package/docs/api/player.mediacontrol.updatedrag.md +0 -11
  149. package/docs/api/player.mediacontrol.updateprogressbar.md +0 -49
  150. package/src/plugins/types.ts +0 -7
package/dist/index.js CHANGED
@@ -42865,7 +42865,7 @@ class Player {
42865
42865
  }
42866
42866
  }
42867
42867
 
42868
- var version$1 = "2.19.7";
42868
+ var version$1 = "2.19.8";
42869
42869
 
42870
42870
  var packages = {
42871
42871
  "node_modules/@clappr/core": {
@@ -46238,6 +46238,7 @@ class ClipsPlugin extends UICorePlugin {
46238
46238
  duration = 0;
46239
46239
  durationGetting = false;
46240
46240
  _oldContainer;
46241
+ svgMask = null;
46241
46242
  get name() {
46242
46243
  return 'clips';
46243
46244
  }
@@ -46289,7 +46290,7 @@ class ClipsPlugin extends UICorePlugin {
46289
46290
  }
46290
46291
  for (const value of this.clips.values()) {
46291
46292
  if (event.current >= value.start && event.current < value.end) {
46292
- this.core.mediaControl.setClipText(value.text);
46293
+ this.setClipText(value.text);
46293
46294
  break;
46294
46295
  }
46295
46296
  }
@@ -46336,7 +46337,26 @@ class ClipsPlugin extends UICorePlugin {
46336
46337
  });
46337
46338
  svg += `<rect x="${finishValue}" y="0" width="${widthOfSeek - finishValue}" height="30"/>\n`;
46338
46339
  svg += '</clipPath>' + '</defs>' + '</svg>';
46340
+ this.setSVGMask(svg);
46341
+ }
46342
+ setSVGMask(svg) {
46339
46343
  this.core.mediaControl.setSVGMask(svg);
46344
+ if (this.svgMask) {
46345
+ this.svgMask.remove();
46346
+ }
46347
+ const $seekBarContainer = this.core.mediaControl.getElement('seekBarContainer');
46348
+ if ($seekBarContainer?.get(0)) {
46349
+ $seekBarContainer.addClass('clips');
46350
+ }
46351
+ this.svgMask = $(svg);
46352
+ $seekBarContainer?.append(this.svgMask);
46353
+ }
46354
+ setClipText(text) {
46355
+ const $clipText = this.core.mediaControl.getElement('clipText');
46356
+ if ($clipText && text) {
46357
+ $clipText.show();
46358
+ $clipText.text(`${text}`);
46359
+ }
46340
46360
  }
46341
46361
  }
46342
46362
 
@@ -47019,6 +47039,9 @@ class GoogleAnalytics extends ContainerPlugin {
47019
47039
  /* eslint-disable */
47020
47040
  // Kibo is released under the MIT License. Copyright (c) 2013 marquete.
47021
47041
  // see https://github.com/marquete/kibo
47042
+ /**
47043
+ * @internal
47044
+ */
47022
47045
  class Kibo {
47023
47046
  element;
47024
47047
  lastKeyCode = -1;
@@ -47715,9 +47738,14 @@ const fullscreenOnIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
47715
47738
  // Copyright 2014 Globo.com Player authors. All rights reserved.
47716
47739
  // Use of this source code is governed by a BSD-style
47717
47740
  // license that can be found in the LICENSE file.
47718
- /**
47719
- * The MediaControl is responsible for displaying the Player controls.
47720
- */
47741
+ const LEFT_ORDER = [
47742
+ 'playpause',
47743
+ 'playstop',
47744
+ 'live',
47745
+ 'volume',
47746
+ 'position',
47747
+ 'duration',
47748
+ ];
47721
47749
  const { Config, Fullscreen, formatTime: formatTime$1, extend, removeArrayItem } = Utils;
47722
47750
  function orderByOrderPattern(arr, order) {
47723
47751
  const arrWithoutDuplicates = [...new Set(arr)];
@@ -47725,6 +47753,13 @@ function orderByOrderPattern(arr, order) {
47725
47753
  const rest = arrWithoutDuplicates.filter((item) => !order.includes(item));
47726
47754
  return [...ordered, ...rest];
47727
47755
  }
47756
+ /**
47757
+ * The MediaControl is responsible for displaying the Player controls.
47758
+ * @beta
47759
+ * @remarks
47760
+ * This plugin provides a foundation for developing a media controls UI via additional plugins.
47761
+ * The methods exposed are to be used by the other plugins that extend the media control UI.
47762
+ */
47728
47763
  class MediaControl extends UICorePlugin {
47729
47764
  advertisementPlaying = false;
47730
47765
  buttonsColor = null;
@@ -47777,6 +47812,7 @@ class MediaControl extends UICorePlugin {
47777
47812
  $volumeBarScrubber = null;
47778
47813
  $volumeContainer = null;
47779
47814
  $volumeIcon = null;
47815
+ template = tmpl(mediaControlHTML);
47780
47816
  get name() {
47781
47817
  return 'media_control';
47782
47818
  }
@@ -47828,14 +47864,17 @@ class MediaControl extends UICorePlugin {
47828
47864
  'mouseleave .media-control-layer[data-controls]': 'resetUserKeepVisible',
47829
47865
  };
47830
47866
  }
47831
- get template() {
47832
- return tmpl(mediaControlHTML);
47833
- }
47867
+ /**
47868
+ * Current volume
47869
+ */
47834
47870
  get volume() {
47835
47871
  return this.container && this.container.isReady
47836
47872
  ? this.container.volume
47837
47873
  : this.intendedVolume;
47838
47874
  }
47875
+ /**
47876
+ * Muted state
47877
+ */
47839
47878
  get muted() {
47840
47879
  return this.volume === 0;
47841
47880
  }
@@ -47930,15 +47969,27 @@ class MediaControl extends UICorePlugin {
47930
47969
  this.bindKeyEvents();
47931
47970
  this.show();
47932
47971
  }
47972
+ /**
47973
+ * Start the playback
47974
+ */
47933
47975
  play() {
47934
47976
  this.container && this.container.play();
47935
47977
  }
47978
+ /**
47979
+ * Pause the playback
47980
+ */
47936
47981
  pause() {
47937
47982
  this.container && this.container.pause();
47938
47983
  }
47984
+ /**
47985
+ * Stop the playback
47986
+ */
47939
47987
  stop() {
47940
47988
  this.container && this.container.stop();
47941
47989
  }
47990
+ /**
47991
+ * Set the initial volume, which is preserved when playback is interrupted by an advertisement
47992
+ */
47942
47993
  setInitialVolume() {
47943
47994
  const initialVolume = this.persistConfig ? Config.restore('volume') : 100;
47944
47995
  const options = (this.container && this.container.options) || this.options;
@@ -48138,6 +48189,13 @@ class MediaControl extends UICorePlugin {
48138
48189
  toggleMute() {
48139
48190
  this.setVolume(this.muted ? 100 : 0);
48140
48191
  }
48192
+ /**
48193
+ * Set the volume
48194
+ * @param value - The volume value
48195
+ * @param isInitialVolume - save as the initial volume
48196
+ * @remarks
48197
+ * Initial volume can be restored later
48198
+ */
48141
48199
  setVolume(value, isInitialVolume = false) {
48142
48200
  value = Math.min(100, Math.max(value, 0));
48143
48201
  // this will hold the intended volume
@@ -48358,14 +48416,6 @@ class MediaControl extends UICorePlugin {
48358
48416
  default: [],
48359
48417
  right: [],
48360
48418
  });
48361
- const LEFT_ORDER = [
48362
- 'playpause',
48363
- 'playstop',
48364
- 'live',
48365
- 'volume',
48366
- 'position',
48367
- 'duration',
48368
- ];
48369
48419
  newSettings.left = orderByOrderPattern([...newSettings.left, 'clipsText', 'volume'], LEFT_ORDER);
48370
48420
  newSettings.right = [
48371
48421
  'fullscreen',
@@ -48432,12 +48482,20 @@ class MediaControl extends UICorePlugin {
48432
48482
  this.resetIndicators();
48433
48483
  this.initializeIcons();
48434
48484
  }
48485
+ /**
48486
+ * Get a media control element DOM node
48487
+ * @param name - The name of the media control element
48488
+ * @returns The DOM node to render the media control element
48489
+ */
48435
48490
  getElement(name) {
48436
48491
  switch (name) {
48492
+ case 'clipText':
48493
+ return this.$clipText;
48437
48494
  case 'pip':
48438
48495
  return this.$pip;
48496
+ case 'seekBarContainer':
48497
+ return this.$seekBarContainer;
48439
48498
  }
48440
- return null;
48441
48499
  }
48442
48500
  resetIndicators() {
48443
48501
  assert.ok(this.$duration && this.$position, 'duration and position elements must be present');
@@ -48636,9 +48694,6 @@ class MediaControl extends UICorePlugin {
48636
48694
  this.trigger(Events$1.MEDIACONTROL_RENDERED);
48637
48695
  return this;
48638
48696
  }
48639
- get bigPlayButton() {
48640
- return playIcon;
48641
- }
48642
48697
  handleFullScreenOnBtn() {
48643
48698
  this.trigger(Events$1.MEDIACONTROL_FULLSCREEN, this.name);
48644
48699
  this.container.fullscreen();
@@ -48656,37 +48711,24 @@ class MediaControl extends UICorePlugin {
48656
48711
  }
48657
48712
  this.resetUserKeepVisible();
48658
48713
  }
48714
+ // TODO manage by the ads plugin
48659
48715
  onStartAd() {
48660
48716
  this.advertisementPlaying = true;
48661
48717
  this.disable();
48662
48718
  }
48719
+ // TODO manage by the ads plugin
48663
48720
  onFinishAd() {
48664
48721
  this.advertisementPlaying = false;
48665
48722
  this.enable();
48666
48723
  }
48667
- setClipText(txt) {
48668
- if (this.$clipText && txt) {
48669
- this.$clipTextContainer?.show();
48670
- this.$clipText.text(`${txt}`);
48671
- }
48672
- }
48724
+ // TODO remove
48673
48725
  hideControllAds() {
48674
48726
  if (this.container.advertisement &&
48675
48727
  this.container.advertisement.type !== 'idle') {
48676
48728
  this.hide();
48677
48729
  }
48678
48730
  }
48679
- setSVGMask(svg) {
48680
- if (this.svgMask) {
48681
- this.svgMask.remove();
48682
- }
48683
- if (this.$seekBarContainer?.get(0)) {
48684
- this.$seekBarContainer.addClass('clips');
48685
- }
48686
- this.svgMask = $(svg);
48687
- this.$seekBarContainer?.append(this.svgMask);
48688
- }
48689
- // https://bugs.chromium.org/p/chromium/issues/detail?id=109212
48731
+ // TODO
48690
48732
  setMuted(value) {
48691
48733
  this.container.options.mute = value;
48692
48734
  }
@@ -48702,13 +48744,17 @@ class MediaControl extends UICorePlugin {
48702
48744
  }
48703
48745
  return 0;
48704
48746
  }
48705
- //Решают проблему, когда нам не нужно, чтобы с помощью контролов человек мог запускать
48706
- // или останавливать поток, контролы, которыми он управляет не должны работать
48747
+ /**
48748
+ * Enable the control button
48749
+ */
48707
48750
  enableControlButton() {
48708
48751
  this.disabledClickableList.forEach((element) => {
48709
48752
  element.el.css({ 'pointer-events': element.pointerEventValue });
48710
48753
  });
48711
48754
  }
48755
+ /**
48756
+ * Disable the control button
48757
+ */
48712
48758
  disabledControlButton() {
48713
48759
  this.disabledClickableList.forEach((element) => {
48714
48760
  element.el.css({ 'pointer-events': 'none' });
package/dist/player.d.ts CHANGED
@@ -18,7 +18,6 @@ import { CorePlugin } from '@clappr/core';
18
18
  import { Events } from 'hls.js';
19
19
  import { Logger } from '@gcorevideo/utils';
20
20
  import { LogTracer } from '@gcorevideo/utils';
21
- import { Player as Player_2 } from '@clappr/core';
22
21
  import { reportError as reportError_2 } from '@gcorevideo/utils';
23
22
  import { SentryTracer } from '@gcorevideo/utils';
24
23
  import { setTracer } from '@gcorevideo/utils';
@@ -93,7 +92,7 @@ export declare class BigMuteButton extends UICorePlugin {
93
92
  'click .big-mute-icon-wrapper': string;
94
93
  };
95
94
  bindEvents(): void;
96
- unBindEvents(): void;
95
+ private unBindEvents;
97
96
  private onCoreReady;
98
97
  private onContainerVolume;
99
98
  private onContainerStart;
@@ -268,6 +267,7 @@ export declare class ClipsPlugin extends UICorePlugin {
268
267
  private duration;
269
268
  private durationGetting;
270
269
  private _oldContainer;
270
+ private svgMask;
271
271
  get name(): string;
272
272
  get attributes(): {
273
273
  class: string;
@@ -282,6 +282,8 @@ export declare class ClipsPlugin extends UICorePlugin {
282
282
  private parseClips;
283
283
  getText(time: number): string;
284
284
  makeSvg(duration: number): void;
285
+ private setSVGMask;
286
+ private setClipText;
285
287
  }
286
288
 
287
289
  /**
@@ -467,6 +469,9 @@ export declare class GoogleAnalytics extends ContainerPlugin {
467
469
 
468
470
  declare type KeyboardEventHandler = (e: KeyboardEvent) => boolean | undefined;
469
471
 
472
+ /**
473
+ * @internal
474
+ */
470
475
  export declare class Kibo {
471
476
  private element;
472
477
  private lastKeyCode;
@@ -506,7 +511,6 @@ export declare type LangTag = string;
506
511
  *
507
512
  * - `labels`: The labels to show in the level selector. [vertical resolution]: string
508
513
  * - `restrictResolution`: The maximum resolution to allow in the level selector.
509
- * - `title`: The title to show in the level selector.
510
514
  *
511
515
  * @example
512
516
  * ```ts
@@ -552,7 +556,6 @@ export declare class LevelSelector extends UICorePlugin {
552
556
  private get maxLevel();
553
557
  private fillLevels;
554
558
  private makeLevelsLabels;
555
- private findLevelBy;
556
559
  private onLevelSelect;
557
560
  private goBack;
558
561
  private setLevel;
@@ -599,6 +602,13 @@ export declare class Logo extends UIContainerPlugin {
599
602
 
600
603
  export { LogTracer }
601
604
 
605
+ /**
606
+ * The MediaControl is responsible for displaying the Player controls.
607
+ * @beta
608
+ * @remarks
609
+ * This plugin provides a foundation for developing a media controls UI via additional plugins.
610
+ * The methods exposed are to be used by the other plugins that extend the media control UI.
611
+ */
602
612
  export declare class MediaControl extends UICorePlugin {
603
613
  private advertisementPlaying;
604
614
  private buttonsColor;
@@ -651,6 +661,7 @@ export declare class MediaControl extends UICorePlugin {
651
661
  private $volumeBarScrubber;
652
662
  private $volumeContainer;
653
663
  private $volumeIcon;
664
+ private readonly template;
654
665
  get name(): string;
655
666
  get supportedVersion(): {
656
667
  min: string;
@@ -689,10 +700,15 @@ export declare class MediaControl extends UICorePlugin {
689
700
  'mouseenter .media-control-layer[data-controls]': string;
690
701
  'mouseleave .media-control-layer[data-controls]': string;
691
702
  };
692
- get template(): any;
703
+ /**
704
+ * Current volume
705
+ */
693
706
  get volume(): any;
707
+ /**
708
+ * Muted state
709
+ */
694
710
  get muted(): boolean;
695
- constructor(core: Player_2);
711
+ constructor(core: Core);
696
712
  getExternalInterface(): {
697
713
  setVolume: (value: number, isInitialVolume?: boolean) => void;
698
714
  getVolume: () => any;
@@ -701,10 +717,22 @@ export declare class MediaControl extends UICorePlugin {
701
717
  bindContainerEvents(): void;
702
718
  disable(): void;
703
719
  enable(): void;
720
+ /**
721
+ * Start the playback
722
+ */
704
723
  play(): void;
724
+ /**
725
+ * Pause the playback
726
+ */
705
727
  pause(): void;
728
+ /**
729
+ * Stop the playback
730
+ */
706
731
  stop(): void;
707
- private setInitialVolume;
732
+ /**
733
+ * Set the initial volume, which is preserved when playback is interrupted by an advertisement
734
+ */
735
+ setInitialVolume(): void;
708
736
  private onVolumeChanged;
709
737
  private onLoadedMetadataOnVideoTag;
710
738
  private updateVolumeUI;
@@ -714,66 +742,84 @@ export declare class MediaControl extends UICorePlugin {
714
742
  private onVolumeClick;
715
743
  private mousemoveOnVolumeBar;
716
744
  private playerResize;
717
- togglePlayPause(): boolean;
718
- togglePlayStop(): void;
719
- startSeekDrag(event: MouseEvent): void;
720
- startVolumeDrag(event: MouseEvent): void;
721
- stopDrag: (event: MouseEvent) => void;
722
- updateDrag: (event: MouseEvent | TouchEvent) => void;
723
- getVolumeFromUIEvent(event: MouseEvent | TouchEvent): number;
724
- toggleMute(): void;
745
+ private togglePlayPause;
746
+ private togglePlayStop;
747
+ private startSeekDrag;
748
+ private startVolumeDrag;
749
+ private stopDrag;
750
+ private updateDrag;
751
+ private getVolumeFromUIEvent;
752
+ private toggleMute;
753
+ /**
754
+ * Set the volume
755
+ * @param value - The volume value
756
+ * @param isInitialVolume - save as the initial volume
757
+ * @remarks
758
+ * Initial volume can be restored later
759
+ */
725
760
  setVolume(value: number, isInitialVolume?: boolean): void;
726
- toggleFullscreen(): void;
727
- onActiveContainerChanged(): void;
728
- showVolumeBar(): void;
729
- hideVolumeBar(timeout?: number): void;
730
- ended(): void;
731
- updateProgressBar(progress: TimeProgress): void;
732
- onTimeUpdate(timeProgress: TimeProgress): void;
733
- renderSeekBar(): void;
734
- drawDurationAndPosition(): void;
735
- seek(event: MouseEvent): false | undefined;
736
- setKeepVisible(): void;
737
- resetKeepVisible(): void;
738
- setUserKeepVisible(): void;
739
- resetUserKeepVisible(): void;
740
- isVisible(): boolean;
741
- show(event?: MouseEvent): void;
742
- hide(delay?: number): void;
743
- updateCursorStyle(showing: boolean): void;
761
+ private toggleFullscreen;
762
+ private onActiveContainerChanged;
763
+ private showVolumeBar;
764
+ private hideVolumeBar;
765
+ private ended;
766
+ private updateProgressBar;
767
+ private onTimeUpdate;
768
+ private renderSeekBar;
769
+ private drawDurationAndPosition;
770
+ private seek;
771
+ private setKeepVisible;
772
+ private resetKeepVisible;
773
+ private setUserKeepVisible;
774
+ private resetUserKeepVisible;
775
+ private isVisible;
776
+ private show;
777
+ private hide;
778
+ private updateCursorStyle;
744
779
  private settingsUpdate;
745
- getSettings(): any;
746
- highDefinitionUpdate(isHD: boolean): void;
747
- createCachedElements(): void;
780
+ private getSettings;
781
+ private highDefinitionUpdate;
782
+ private createCachedElements;
783
+ /**
784
+ * Get a media control element DOM node
785
+ * @param name - The name of the media control element
786
+ * @returns The DOM node to render the media control element
787
+ */
748
788
  getElement(name: MediaControlElement): ZeptoResult | null;
749
- resetIndicators(): void;
750
- initializeIcons(): void;
751
- setSeekPercentage(value: number): void;
752
- seekRelative(delta: number): void;
753
- bindKeyAndShow(key: string, callback: () => boolean | undefined): void;
754
- bindKeyEvents(): void;
755
- unbindKeyEvents(): void;
756
- parseColors(): void;
757
- applyButtonStyle(element: ZeptoResult | undefined): void;
789
+ private resetIndicators;
790
+ private initializeIcons;
791
+ private setSeekPercentage;
792
+ private seekRelative;
793
+ private bindKeyAndShow;
794
+ private bindKeyEvents;
795
+ private unbindKeyEvents;
796
+ private parseColors;
797
+ private applyButtonStyle;
758
798
  destroy(): UIObject;
759
- configure(): void;
799
+ private configure;
760
800
  render(): this;
761
- get bigPlayButton(): any;
762
801
  private handleFullScreenOnBtn;
763
- onStartAd(): void;
764
- onFinishAd(): void;
765
- setClipText(txt: unknown): void;
766
- hideControllAds(): void;
767
- setSVGMask(svg: string): void;
802
+ private onStartAd;
803
+ private onFinishAd;
804
+ private hideControllAds;
768
805
  setMuted(value: boolean): void;
769
806
  private static getPageX;
770
807
  private static getPageY;
808
+ /**
809
+ * Enable the control button
810
+ */
771
811
  enableControlButton(): void;
812
+ /**
813
+ * Disable the control button
814
+ */
772
815
  disabledControlButton(): void;
773
- isSeekEnabledForHtml5Playback(): any;
816
+ private isSeekEnabledForHtml5Playback;
774
817
  }
775
818
 
776
- declare type MediaControlElement = 'pip';
819
+ /**
820
+ * @beta
821
+ */
822
+ export declare type MediaControlElement = 'clipText' | 'pip' | 'seekBarContainer';
777
823
 
778
824
  declare type MediaSourceInfo = {
779
825
  live: boolean;
@@ -1827,6 +1873,11 @@ export declare type TimeProgress = TimePosition & {
1827
1873
  start: number;
1828
1874
  };
1829
1875
 
1876
+ /**
1877
+ * @internal
1878
+ */
1879
+ export declare type TimerId = ReturnType<typeof setTimeout>;
1880
+
1830
1881
  /**
1831
1882
  * For the plugin development
1832
1883
  * @beta
@@ -1918,6 +1969,9 @@ export declare enum VolumeFadeEvents {
1918
1969
  FADE = "core:volume:fade"
1919
1970
  }
1920
1971
 
1921
- declare type ZeptoResult = ReturnType<typeof $>;
1972
+ /**
1973
+ * @beta
1974
+ */
1975
+ export declare type ZeptoResult = ReturnType<typeof $>;
1922
1976
 
1923
1977
  export { }