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.
@@ -580,6 +580,18 @@ function createImaController(video, options) {
580
580
  adPlaying = false;
581
581
  setAdPlayingFlag(false);
582
582
  emit("content_resume");
583
+ setTimeout(() => {
584
+ const stillInPod = video.dataset.stormcloudAdPlaying === "true";
585
+ if (stillInPod) {
586
+ console.log(
587
+ "[IMA] Still in ad pod - keeping ad container visible (black screen)"
588
+ );
589
+ if (adContainerEl) {
590
+ adContainerEl.style.display = "flex";
591
+ adContainerEl.style.pointerEvents = "auto";
592
+ }
593
+ }
594
+ }, 50);
583
595
  }
584
596
  );
585
597
  adsManager.addEventListener(AdEvent.ALL_ADS_COMPLETED, () => {
@@ -1129,6 +1141,18 @@ function createHlsAdPlayer(contentVideo, options) {
1129
1141
  adPlaying = false;
1130
1142
  setAdPlayingFlag(false);
1131
1143
  emit("content_resume");
1144
+ setTimeout(() => {
1145
+ const stillInPod = contentVideo.dataset.stormcloudAdPlaying === "true";
1146
+ if (stillInPod) {
1147
+ console.log(
1148
+ "[HlsAdPlayer] Still in ad pod - keeping ad container visible (black screen)"
1149
+ );
1150
+ if (adContainerEl) {
1151
+ adContainerEl.style.display = "flex";
1152
+ adContainerEl.style.pointerEvents = "auto";
1153
+ }
1154
+ }
1155
+ }, 50);
1132
1156
  }
1133
1157
  function handleAdError() {
1134
1158
  console.log("[HlsAdPlayer] Handling ad error");
@@ -2187,6 +2211,9 @@ var StormcloudVideoPlayer = class {
2187
2211
  if (remaining > 500 && this.adPodQueue.length > 0) {
2188
2212
  const next = this.adPodQueue.shift();
2189
2213
  this.currentAdIndex++;
2214
+ this.video.dataset.stormcloudAdPlaying = "true";
2215
+ this.video.muted = true;
2216
+ this.video.volume = 0;
2190
2217
  if (this.config.debugAdTiming) {
2191
2218
  console.log(
2192
2219
  `[StormcloudVideoPlayer] Playing next ad in pod (${this.currentAdIndex}/${this.totalAdsInBreak}) - main video stays muted, ad layer stays visible`