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