stormcloud-video-player 0.2.21 → 0.2.22

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.
@@ -540,7 +540,9 @@ function createImaController(video, options) {
540
540
  adsManager.addEventListener(
541
541
  AdEvent.CONTENT_PAUSE_REQUESTED,
542
542
  () => {
543
- console.log("[IMA] Content pause requested");
543
+ console.log(
544
+ "[IMA] Content pause requested - FORCE MUTING main video"
545
+ );
544
546
  if (!(options == null ? void 0 : options.continueLiveStreamDuringAds)) {
545
547
  video.pause();
546
548
  console.log("[IMA] Video paused (VOD mode)");
@@ -550,14 +552,19 @@ function createImaController(video, options) {
550
552
  );
551
553
  }
552
554
  video.muted = true;
555
+ video.volume = 0;
553
556
  adPlaying = true;
554
557
  setAdPlayingFlag(true);
555
558
  emit("content_pause");
556
559
  }
557
560
  );
558
561
  adsManager.addEventListener(AdEvent.STARTED, () => {
559
- console.log("[IMA] Ad started playing");
562
+ console.log(
563
+ "[IMA] Ad started playing - FORCE MUTING main video"
564
+ );
560
565
  setAdPlayingFlag(true);
566
+ video.muted = true;
567
+ video.volume = 0;
561
568
  if (adContainerEl) {
562
569
  adContainerEl.style.pointerEvents = "auto";
563
570
  adContainerEl.style.display = "flex";
@@ -1233,7 +1240,9 @@ function createHlsAdPlayer(contentVideo, options) {
1233
1240
  } else {
1234
1241
  console.log("[HlsAdPlayer] Content continues (Live mode)");
1235
1242
  }
1243
+ console.log("[HlsAdPlayer] FORCE MUTING main video");
1236
1244
  contentVideo.muted = true;
1245
+ contentVideo.volume = 0;
1237
1246
  adPlaying = true;
1238
1247
  setAdPlayingFlag(true);
1239
1248
  if (adVideoElement) {
@@ -3010,7 +3019,7 @@ var StormcloudVideoPlayer = class {
3010
3019
  var _a;
3011
3020
  if (this.config.debugAdTiming) {
3012
3021
  console.log(
3013
- "[StormcloudVideoPlayer] Handling ad pod completion - resuming content"
3022
+ "[StormcloudVideoPlayer] Handling ad pod completion - resuming content and hiding ad layer"
3014
3023
  );
3015
3024
  }
3016
3025
  this.inAdBreak = false;
@@ -3023,11 +3032,14 @@ var StormcloudVideoPlayer = class {
3023
3032
  this.showAds = false;
3024
3033
  this.currentAdIndex = 0;
3025
3034
  this.totalAdsInBreak = 0;
3035
+ this.ima.stop().catch(() => {
3036
+ });
3026
3037
  const originalMutedState = this.ima.getOriginalMutedState();
3027
3038
  this.video.muted = originalMutedState;
3039
+ this.video.volume = originalMutedState ? 0 : 1;
3028
3040
  if (this.config.debugAdTiming) {
3029
3041
  console.log(
3030
- `[StormcloudVideoPlayer] Restored main video mute state to: ${originalMutedState}`
3042
+ `[StormcloudVideoPlayer] Restored main video - muted: ${originalMutedState}, volume: ${this.video.volume}`
3031
3043
  );
3032
3044
  }
3033
3045
  if (!this.shouldContinueLiveStreamDuringAds() && this.video.paused) {