stormcloud-video-player 0.2.29 → 0.2.30

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.
@@ -653,27 +653,25 @@ function createImaController(video, options) {
653
653
  console.log("[IMA] Content resume requested");
654
654
  adPlaying = false;
655
655
  setAdPlayingFlag(false);
656
- showContentVideo();
657
656
  emit("content_resume");
658
- setTimeout(() => {
659
- const stillInPod = video.dataset.stormcloudAdPlaying === "true";
660
- if (stillInPod) {
661
- console.log(
662
- "[IMA] Still in ad pod - keeping ad container visible"
663
- );
664
- if (adContainerEl) {
665
- adContainerEl.style.display = "flex";
666
- adContainerEl.style.pointerEvents = "auto";
667
- }
668
- hideContentVideo();
669
- }
670
- }, 50);
671
657
  }
672
658
  );
673
659
  adsManager.addEventListener(AdEvent.ALL_ADS_COMPLETED, () => {
674
- console.log("[IMA] All ads completed - notifying parent");
660
+ console.log("[IMA] All ads completed - restoring content");
675
661
  adPlaying = false;
676
662
  setAdPlayingFlag(false);
663
+ showContentVideo();
664
+ if (adContainerEl) {
665
+ adContainerEl.style.pointerEvents = "none";
666
+ adContainerEl.style.display = "none";
667
+ console.log("[IMA] Ad container hidden");
668
+ }
669
+ if (!(options == null ? void 0 : options.continueLiveStreamDuringAds) && video.paused) {
670
+ console.log("[IMA] Resuming content video playback");
671
+ video.play().catch((e) => {
672
+ console.warn("[IMA] Failed to resume content video:", e);
673
+ });
674
+ }
677
675
  emit("all_ads_completed");
678
676
  });
679
677
  console.log("[IMA] Ads manager event listeners attached");