stormcloud-video-player 0.5.26 → 0.5.27

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.
@@ -4351,7 +4351,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4351
4351
  case 0:
4352
4352
  _this = this;
4353
4353
  durSec = (_marker_durationSeconds = marker.durationSeconds) !== null && _marker_durationSeconds !== void 0 ? _marker_durationSeconds : 60;
4354
- estimatedCount = Math.min(4, Math.max(1, Math.ceil(durSec / 30)));
4354
+ estimatedCount = Math.min(4, Math.max(1, Math.ceil(durSec / 20)));
4355
4355
  if (this.config.debugAdTiming) {
4356
4356
  console.log("[PREFETCH] Firing ".concat(estimatedCount, " parallel bid request(s) for ").concat(durSec, "s break"));
4357
4357
  }
@@ -4523,6 +4523,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4523
4523
  if (bids.length > 0) {
4524
4524
  _this.consecutiveFailures = 0;
4525
4525
  _this.pendingNextAdBids = bids;
4526
+ _this.totalAdsInBreak = Math.max(_this.totalAdsInBreak, _this.currentAdIndex + _this.preloadedTokens.length + 1);
4526
4527
  if (_this.config.debugAdTiming) {
4527
4528
  console.log("[CONTINUOUS-FETCH] Pre-fetched next ad stored as pending");
4528
4529
  }
@@ -4662,6 +4663,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4662
4663
  17
4663
4664
  ];
4664
4665
  _this.pendingNextAdBids = bids2;
4666
+ _this.totalAdsInBreak = Math.max(_this.totalAdsInBreak, _this.currentAdIndex + _this.preloadedTokens.length + 1);
4665
4667
  if (_this.config.debugAdTiming) {
4666
4668
  console.log("[CONTINUOUS-FETCH] Next ad response stored (ad currently playing or in transition)");
4667
4669
  }
@@ -4815,7 +4817,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
4815
4817
  this.inAdBreak = true;
4816
4818
  this.currentAdBreakStartWallClockMs = Date.now();
4817
4819
  this.currentAdIndex = 0;
4818
- this.totalAdsInBreak = 1;
4820
+ this.totalAdsInBreak = Math.max(1, this.preloadedTokens.length);
4819
4821
  this.adPodQueue = [];
4820
4822
  if (!this.config.disableFiller) this.showAds = true;
4821
4823
  if (adBreakDurationMs != null) {
@@ -5040,6 +5042,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5040
5042
  3
5041
5043
  ];
5042
5044
  this.pendingNextAdBids = bids;
5045
+ this.totalAdsInBreak = Math.max(this.totalAdsInBreak, this.currentAdIndex + this.preloadedTokens.length);
5043
5046
  return [
5044
5047
  3,
5045
5048
  5