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.
@@ -3246,6 +3246,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3246
3246
  _this.activeAdRequestToken = null;
3247
3247
  _this.showAds = false;
3248
3248
  if (!_this.inAdBreak) {
3249
+ if (_this.config.debugAdTiming) {
3250
+ console.log("[StormcloudVideoPlayer] content_resume: break already ended (e.g. by CUE-IN or handleAdPodComplete), skipping next-ad path");
3251
+ }
3249
3252
  return;
3250
3253
  }
3251
3254
  _this.consecutiveFailures = 0;
@@ -3258,6 +3261,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3258
3261
  if (remaining > 500) {
3259
3262
  _this.tryNextAvailableAdWithRateLimit();
3260
3263
  } else {
3264
+ if (_this.config.debugAdTiming) {
3265
+ console.log("[StormcloudVideoPlayer] content_resume: remaining time too low to try next ad, ending ad pod");
3266
+ }
3261
3267
  _this.handleAdPodComplete();
3262
3268
  }
3263
3269
  });
@@ -3722,9 +3728,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3722
3728
  activeAdRequest: this.activeAdRequestToken !== null
3723
3729
  });
3724
3730
  }
3725
- if (adPlaying || remaining > 1e3 && hasQueuedAds) {
3731
+ if (adPlaying || remaining > 500) {
3726
3732
  if (this.config.debugAdTiming) {
3727
- console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active");
3733
+ console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active or time remaining");
3728
3734
  }
3729
3735
  return;
3730
3736
  }