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