@gcorevideo/player 2.22.8 → 2.22.10

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.
package/dist/index.js CHANGED
@@ -42846,7 +42846,7 @@ const DEFAULT_OPTIONS = {
42846
42846
  debug: 'none',
42847
42847
  loop: false,
42848
42848
  mute: false,
42849
- playbackType: 'vod',
42849
+ // playbackType: 'vod',
42850
42850
  priorityTransport: 'dash',
42851
42851
  sources: [],
42852
42852
  strings: {},
@@ -43304,7 +43304,7 @@ class Player {
43304
43304
  }
43305
43305
  }
43306
43306
 
43307
- var version$1 = "2.22.8";
43307
+ var version$1 = "2.22.10";
43308
43308
 
43309
43309
  var packages = {
43310
43310
  "node_modules/@clappr/core": {
@@ -49599,6 +49599,7 @@ class PlaybackRate extends UICorePlugin {
49599
49599
  // Saved when an ad starts to restore after it finishes
49600
49600
  // private prevSelectedRate: string | undefined
49601
49601
  selectedRate = DEFAULT_PLAYBACK_RATE;
49602
+ metadataLoaded = false;
49602
49603
  /**
49603
49604
  * @internal
49604
49605
  */
@@ -49657,8 +49658,10 @@ class PlaybackRate extends UICorePlugin {
49657
49658
  }
49658
49659
  onActiveContainerChange() {
49659
49660
  trace(`${T$7} onActiveContainerChange`);
49661
+ this.metadataLoaded = false;
49660
49662
  this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_STOP, this.onStop);
49661
49663
  this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_PLAY, this.onPlay);
49664
+ this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SETTINGSUPDATE, this.onSettingsUpdate);
49662
49665
  this.listenTo(this.core.activePlayback, PlaybackEvents.PLAYBACK_RATE_CHANGED, this.onPlaybackRateChange);
49663
49666
  this.listenTo(this.core.activeContainer, Events$1.CONTAINER_LOADEDMETADATA, this.onMetaDataLoaded);
49664
49667
  }
@@ -49687,9 +49690,22 @@ class PlaybackRate extends UICorePlugin {
49687
49690
  i18n: this.core.i18n,
49688
49691
  })));
49689
49692
  }
49693
+ onSettingsUpdate() {
49694
+ trace(`${T$7} onSettingsUpdate`, {
49695
+ playbackType: this.core.activePlayback.getPlaybackType(),
49696
+ dvrEnabled: this.core.activePlayback.dvrEnabled,
49697
+ });
49698
+ // this.metadataLoaded = false
49699
+ }
49690
49700
  onMetaDataLoaded() {
49691
- trace(`${T$7} onMetaDataLoaded`);
49692
- this.render();
49701
+ trace(`${T$7} onMetaDataLoaded`, {
49702
+ playbackType: this.core.activePlayback.getPlaybackType(),
49703
+ dvrEnabled: this.core.activePlayback.dvrEnabled,
49704
+ });
49705
+ setTimeout(() => {
49706
+ this.metadataLoaded = true;
49707
+ this.render();
49708
+ }, 0);
49693
49709
  }
49694
49710
  allRateElements() {
49695
49711
  return this.$el.find('#playback-rate-menu li');
@@ -49710,7 +49726,11 @@ class PlaybackRate extends UICorePlugin {
49710
49726
  }
49711
49727
  }
49712
49728
  shouldMount() {
49713
- if (!this.core.activePlayback) {
49729
+ trace(`${T$7} shouldMount`, {
49730
+ playbackType: this.core.activePlayback?.getPlaybackType(),
49731
+ dvrEnabled: this.core.activePlayback?.dvrEnabled,
49732
+ });
49733
+ if (!this.core.activePlayback || !this.metadataLoaded) {
49714
49734
  return false;
49715
49735
  }
49716
49736
  if (this.core.activePlayback.getPlaybackType() === Playback.LIVE &&