stormcloud-video-player 0.2.26 → 0.2.27

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.
@@ -3490,6 +3490,26 @@ var StormcloudVideoPlayer = class {
3490
3490
  console.log("[StormcloudVideoPlayer] setMuted called:", muted);
3491
3491
  }
3492
3492
  }
3493
+ setVolume(volume) {
3494
+ const clampedVolume = Math.max(0, Math.min(1, volume));
3495
+ const adPlaying = this.ima.isAdPlaying();
3496
+ if (adPlaying) {
3497
+ this.ima.setAdVolume(clampedVolume);
3498
+ this.ima.updateOriginalMutedState(clampedVolume === 0, clampedVolume);
3499
+ if (this.config.debugAdTiming) {
3500
+ console.log("[StormcloudVideoPlayer] setVolume applied during ad", {
3501
+ volume: clampedVolume
3502
+ });
3503
+ }
3504
+ } else {
3505
+ this.video.volume = clampedVolume;
3506
+ this.video.muted = clampedVolume === 0;
3507
+ this.ima.updateOriginalMutedState(clampedVolume === 0, clampedVolume);
3508
+ if (this.config.debugAdTiming) {
3509
+ console.log("[StormcloudVideoPlayer] setVolume called:", clampedVolume);
3510
+ }
3511
+ }
3512
+ }
3493
3513
  isFullscreen() {
3494
3514
  return !!document.fullscreenElement;
3495
3515
  }