stormcloud-video-player 0.5.8 → 0.5.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.
@@ -3194,6 +3194,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3194
3194
  _this.activeAdRequestToken = null;
3195
3195
  _this.showAds = false;
3196
3196
  if (!_this.inAdBreak) {
3197
+ if (_this.config.debugAdTiming) {
3198
+ console.log("[StormcloudVideoPlayer] content_resume: break already ended (e.g. by CUE-IN or handleAdPodComplete), skipping next-ad path");
3199
+ }
3197
3200
  return;
3198
3201
  }
3199
3202
  _this.consecutiveFailures = 0;
@@ -3206,6 +3209,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3206
3209
  if (remaining > 500) {
3207
3210
  _this.tryNextAvailableAdWithRateLimit();
3208
3211
  } else {
3212
+ if (_this.config.debugAdTiming) {
3213
+ console.log("[StormcloudVideoPlayer] content_resume: remaining time too low to try next ad, ending ad pod");
3214
+ }
3209
3215
  _this.handleAdPodComplete();
3210
3216
  }
3211
3217
  });
@@ -3670,9 +3676,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3670
3676
  activeAdRequest: this.activeAdRequestToken !== null
3671
3677
  });
3672
3678
  }
3673
- if (adPlaying || remaining > 1e3 && hasQueuedAds) {
3679
+ if (adPlaying || remaining > 500) {
3674
3680
  if (this.config.debugAdTiming) {
3675
- console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active");
3681
+ console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active or time remaining");
3676
3682
  }
3677
3683
  return;
3678
3684
  }