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