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.
package/lib/index.cjs CHANGED
@@ -717,27 +717,25 @@ function createImaController(video, options) {
717
717
  console.log("[IMA] Content resume requested");
718
718
  adPlaying = false;
719
719
  setAdPlayingFlag(false);
720
- showContentVideo();
721
720
  emit("content_resume");
722
- setTimeout(() => {
723
- const stillInPod = video.dataset.stormcloudAdPlaying === "true";
724
- if (stillInPod) {
725
- console.log(
726
- "[IMA] Still in ad pod - keeping ad container visible"
727
- );
728
- if (adContainerEl) {
729
- adContainerEl.style.display = "flex";
730
- adContainerEl.style.pointerEvents = "auto";
731
- }
732
- hideContentVideo();
733
- }
734
- }, 50);
735
721
  }
736
722
  );
737
723
  adsManager.addEventListener(AdEvent.ALL_ADS_COMPLETED, () => {
738
- console.log("[IMA] All ads completed - notifying parent");
724
+ console.log("[IMA] All ads completed - restoring content");
739
725
  adPlaying = false;
740
726
  setAdPlayingFlag(false);
727
+ showContentVideo();
728
+ if (adContainerEl) {
729
+ adContainerEl.style.pointerEvents = "none";
730
+ adContainerEl.style.display = "none";
731
+ console.log("[IMA] Ad container hidden");
732
+ }
733
+ if (!(options == null ? void 0 : options.continueLiveStreamDuringAds) && video.paused) {
734
+ console.log("[IMA] Resuming content video playback");
735
+ video.play().catch((e) => {
736
+ console.warn("[IMA] Failed to resume content video:", e);
737
+ });
738
+ }
741
739
  emit("all_ads_completed");
742
740
  });
743
741
  console.log("[IMA] Ads manager event listeners attached");