stormcloud-video-player 0.2.22 → 0.2.23

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.
@@ -541,6 +541,18 @@ function createImaController(video, options) {
541
541
  adPlaying = false;
542
542
  setAdPlayingFlag(false);
543
543
  emit("content_resume");
544
+ setTimeout(() => {
545
+ const stillInPod = video.dataset.stormcloudAdPlaying === "true";
546
+ if (stillInPod) {
547
+ console.log(
548
+ "[IMA] Still in ad pod - keeping ad container visible (black screen)"
549
+ );
550
+ if (adContainerEl) {
551
+ adContainerEl.style.display = "flex";
552
+ adContainerEl.style.pointerEvents = "auto";
553
+ }
554
+ }
555
+ }, 50);
544
556
  }
545
557
  );
546
558
  adsManager.addEventListener(AdEvent.ALL_ADS_COMPLETED, () => {
@@ -1090,6 +1102,18 @@ function createHlsAdPlayer(contentVideo, options) {
1090
1102
  adPlaying = false;
1091
1103
  setAdPlayingFlag(false);
1092
1104
  emit("content_resume");
1105
+ setTimeout(() => {
1106
+ const stillInPod = contentVideo.dataset.stormcloudAdPlaying === "true";
1107
+ if (stillInPod) {
1108
+ console.log(
1109
+ "[HlsAdPlayer] Still in ad pod - keeping ad container visible (black screen)"
1110
+ );
1111
+ if (adContainerEl) {
1112
+ adContainerEl.style.display = "flex";
1113
+ adContainerEl.style.pointerEvents = "auto";
1114
+ }
1115
+ }
1116
+ }, 50);
1093
1117
  }
1094
1118
  function handleAdError() {
1095
1119
  console.log("[HlsAdPlayer] Handling ad error");
@@ -2148,6 +2172,9 @@ var StormcloudVideoPlayer = class {
2148
2172
  if (remaining > 500 && this.adPodQueue.length > 0) {
2149
2173
  const next = this.adPodQueue.shift();
2150
2174
  this.currentAdIndex++;
2175
+ this.video.dataset.stormcloudAdPlaying = "true";
2176
+ this.video.muted = true;
2177
+ this.video.volume = 0;
2151
2178
  if (this.config.debugAdTiming) {
2152
2179
  console.log(
2153
2180
  `[StormcloudVideoPlayer] Playing next ad in pod (${this.currentAdIndex}/${this.totalAdsInBreak}) - main video stays muted, ad layer stays visible`