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.
package/lib/index.cjs CHANGED
@@ -3401,6 +3401,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3401
3401
  _this.activeAdRequestToken = null;
3402
3402
  _this.showAds = false;
3403
3403
  if (!_this.inAdBreak) {
3404
+ if (_this.config.debugAdTiming) {
3405
+ console.log("[StormcloudVideoPlayer] content_resume: break already ended (e.g. by CUE-IN or handleAdPodComplete), skipping next-ad path");
3406
+ }
3404
3407
  return;
3405
3408
  }
3406
3409
  _this.consecutiveFailures = 0;
@@ -3413,6 +3416,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3413
3416
  if (remaining > 500) {
3414
3417
  _this.tryNextAvailableAdWithRateLimit();
3415
3418
  } else {
3419
+ if (_this.config.debugAdTiming) {
3420
+ console.log("[StormcloudVideoPlayer] content_resume: remaining time too low to try next ad, ending ad pod");
3421
+ }
3416
3422
  _this.handleAdPodComplete();
3417
3423
  }
3418
3424
  });
@@ -3877,9 +3883,9 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
3877
3883
  activeAdRequest: this.activeAdRequestToken !== null
3878
3884
  });
3879
3885
  }
3880
- if (adPlaying || remaining > 1e3 && hasQueuedAds) {
3886
+ if (adPlaying || remaining > 500) {
3881
3887
  if (this.config.debugAdTiming) {
3882
- console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active");
3888
+ console.log("[StormcloudVideoPlayer] Ignoring premature SCTE-35 end marker - ads still active or time remaining");
3883
3889
  }
3884
3890
  return;
3885
3891
  }