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.
- package/dist/stormcloud-vp.min.js +2 -2
- package/lib/index.cjs +16 -4
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +16 -4
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +16 -4
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +16 -4
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +16 -4
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +2 -0
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/ima.cjs +9 -2
- package/lib/sdk/ima.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +16 -4
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -498,7 +498,9 @@ function createImaController(video, options) {
|
|
|
498
498
|
adsManager.addEventListener(
|
|
499
499
|
AdEvent.CONTENT_PAUSE_REQUESTED,
|
|
500
500
|
() => {
|
|
501
|
-
console.log(
|
|
501
|
+
console.log(
|
|
502
|
+
"[IMA] Content pause requested - FORCE MUTING main video"
|
|
503
|
+
);
|
|
502
504
|
if (!(options == null ? void 0 : options.continueLiveStreamDuringAds)) {
|
|
503
505
|
video.pause();
|
|
504
506
|
console.log("[IMA] Video paused (VOD mode)");
|
|
@@ -508,14 +510,19 @@ function createImaController(video, options) {
|
|
|
508
510
|
);
|
|
509
511
|
}
|
|
510
512
|
video.muted = true;
|
|
513
|
+
video.volume = 0;
|
|
511
514
|
adPlaying = true;
|
|
512
515
|
setAdPlayingFlag(true);
|
|
513
516
|
emit("content_pause");
|
|
514
517
|
}
|
|
515
518
|
);
|
|
516
519
|
adsManager.addEventListener(AdEvent.STARTED, () => {
|
|
517
|
-
console.log(
|
|
520
|
+
console.log(
|
|
521
|
+
"[IMA] Ad started playing - FORCE MUTING main video"
|
|
522
|
+
);
|
|
518
523
|
setAdPlayingFlag(true);
|
|
524
|
+
video.muted = true;
|
|
525
|
+
video.volume = 0;
|
|
519
526
|
if (adContainerEl) {
|
|
520
527
|
adContainerEl.style.pointerEvents = "auto";
|
|
521
528
|
adContainerEl.style.display = "flex";
|
|
@@ -1191,7 +1198,9 @@ function createHlsAdPlayer(contentVideo, options) {
|
|
|
1191
1198
|
} else {
|
|
1192
1199
|
console.log("[HlsAdPlayer] Content continues (Live mode)");
|
|
1193
1200
|
}
|
|
1201
|
+
console.log("[HlsAdPlayer] FORCE MUTING main video");
|
|
1194
1202
|
contentVideo.muted = true;
|
|
1203
|
+
contentVideo.volume = 0;
|
|
1195
1204
|
adPlaying = true;
|
|
1196
1205
|
setAdPlayingFlag(true);
|
|
1197
1206
|
if (adVideoElement) {
|
|
@@ -2968,7 +2977,7 @@ var StormcloudVideoPlayer = class {
|
|
|
2968
2977
|
var _a;
|
|
2969
2978
|
if (this.config.debugAdTiming) {
|
|
2970
2979
|
console.log(
|
|
2971
|
-
"[StormcloudVideoPlayer] Handling ad pod completion - resuming content"
|
|
2980
|
+
"[StormcloudVideoPlayer] Handling ad pod completion - resuming content and hiding ad layer"
|
|
2972
2981
|
);
|
|
2973
2982
|
}
|
|
2974
2983
|
this.inAdBreak = false;
|
|
@@ -2981,11 +2990,14 @@ var StormcloudVideoPlayer = class {
|
|
|
2981
2990
|
this.showAds = false;
|
|
2982
2991
|
this.currentAdIndex = 0;
|
|
2983
2992
|
this.totalAdsInBreak = 0;
|
|
2993
|
+
this.ima.stop().catch(() => {
|
|
2994
|
+
});
|
|
2984
2995
|
const originalMutedState = this.ima.getOriginalMutedState();
|
|
2985
2996
|
this.video.muted = originalMutedState;
|
|
2997
|
+
this.video.volume = originalMutedState ? 0 : 1;
|
|
2986
2998
|
if (this.config.debugAdTiming) {
|
|
2987
2999
|
console.log(
|
|
2988
|
-
`[StormcloudVideoPlayer] Restored main video
|
|
3000
|
+
`[StormcloudVideoPlayer] Restored main video - muted: ${originalMutedState}, volume: ${this.video.volume}`
|
|
2989
3001
|
);
|
|
2990
3002
|
}
|
|
2991
3003
|
if (!this.shouldContinueLiveStreamDuringAds() && this.video.paused) {
|