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.
@@ -692,27 +692,25 @@ function createImaController(video, options) {
692
692
  console.log("[IMA] Content resume requested");
693
693
  adPlaying = false;
694
694
  setAdPlayingFlag(false);
695
- showContentVideo();
696
695
  emit("content_resume");
697
- setTimeout(() => {
698
- const stillInPod = video.dataset.stormcloudAdPlaying === "true";
699
- if (stillInPod) {
700
- console.log(
701
- "[IMA] Still in ad pod - keeping ad container visible"
702
- );
703
- if (adContainerEl) {
704
- adContainerEl.style.display = "flex";
705
- adContainerEl.style.pointerEvents = "auto";
706
- }
707
- hideContentVideo();
708
- }
709
- }, 50);
710
696
  }
711
697
  );
712
698
  adsManager.addEventListener(AdEvent.ALL_ADS_COMPLETED, () => {
713
- console.log("[IMA] All ads completed - notifying parent");
699
+ console.log("[IMA] All ads completed - restoring content");
714
700
  adPlaying = false;
715
701
  setAdPlayingFlag(false);
702
+ showContentVideo();
703
+ if (adContainerEl) {
704
+ adContainerEl.style.pointerEvents = "none";
705
+ adContainerEl.style.display = "none";
706
+ console.log("[IMA] Ad container hidden");
707
+ }
708
+ if (!(options == null ? void 0 : options.continueLiveStreamDuringAds) && video.paused) {
709
+ console.log("[IMA] Resuming content video playback");
710
+ video.play().catch((e) => {
711
+ console.warn("[IMA] Failed to resume content video:", e);
712
+ });
713
+ }
716
714
  emit("all_ads_completed");
717
715
  });
718
716
  console.log("[IMA] Ads manager event listeners attached");