@gcorevideo/player 2.22.8 → 2.22.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.
package/dist/index.js CHANGED
@@ -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.9";
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,6 +49658,7 @@ 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);
49662
49664
  this.listenTo(this.core.activePlayback, PlaybackEvents.PLAYBACK_RATE_CHANGED, this.onPlaybackRateChange);
@@ -49689,6 +49691,7 @@ class PlaybackRate extends UICorePlugin {
49689
49691
  }
49690
49692
  onMetaDataLoaded() {
49691
49693
  trace(`${T$7} onMetaDataLoaded`);
49694
+ this.metadataLoaded = true;
49692
49695
  this.render();
49693
49696
  }
49694
49697
  allRateElements() {
@@ -49710,9 +49713,13 @@ class PlaybackRate extends UICorePlugin {
49710
49713
  }
49711
49714
  }
49712
49715
  shouldMount() {
49713
- if (!this.core.activePlayback) {
49716
+ if (!this.core.activePlayback || !this.metadataLoaded) {
49714
49717
  return false;
49715
49718
  }
49719
+ trace(`${T$7} shouldMount`, {
49720
+ playbackType: this.core.activePlayback.getPlaybackType(),
49721
+ dvrEnabled: this.core.activePlayback.dvrEnabled,
49722
+ });
49716
49723
  if (this.core.activePlayback.getPlaybackType() === Playback.LIVE &&
49717
49724
  !this.core.activePlayback.dvrEnabled) {
49718
49725
  return false;