stormcloud-video-player 0.8.11 → 0.8.13
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 +1 -1
- package/lib/index.cjs +11 -12
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +11 -12
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +11 -12
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/players/HlsPlayer.cjs +11 -12
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +11 -12
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/{types-CRd8dgO8.d.cts → types-BM5cceAy.d.cts} +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +11 -12
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -5408,7 +5408,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5408
5408
|
}
|
|
5409
5409
|
this.beginNewAdPod();
|
|
5410
5410
|
this.podAssignedByPrefetch = true;
|
|
5411
|
-
var urlsToPregenerate =
|
|
5411
|
+
var urlsToPregenerate = 1;
|
|
5412
5412
|
var generatedUrls = this.generateVastUrlsWithCorrelators(baseVastUrl, urlsToPregenerate);
|
|
5413
5413
|
this.pendingAdBreak = _object_spread_props(_object_spread({
|
|
5414
5414
|
marker: marker
|
|
@@ -5433,7 +5433,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5433
5433
|
console.log("[PREFETCH] \uD83D\uDD04 Starting ad prefetch for upcoming ad break");
|
|
5434
5434
|
console.log("[PREFETCH] \uD83D\uDCCB Pre-generated ".concat(generatedUrls.length, " VAST URLs"));
|
|
5435
5435
|
}
|
|
5436
|
-
this.startPreloadPool(baseVastUrl, generatedUrls.slice(0,
|
|
5436
|
+
this.startPreloadPool(baseVastUrl, generatedUrls.slice(0, 1), false);
|
|
5437
5437
|
}
|
|
5438
5438
|
},
|
|
5439
5439
|
{
|
|
@@ -5451,6 +5451,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5451
5451
|
{
|
|
5452
5452
|
key: "startPreloadPool",
|
|
5453
5453
|
value: function startPreloadPool(baseVastUrl, initialUrls) {
|
|
5454
|
+
var startLoopImmediately = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
5454
5455
|
if (this.preloadPoolActive) {
|
|
5455
5456
|
if (this.config.debugAdTiming) {
|
|
5456
5457
|
console.log("[PRELOAD-POOL] Already active, skipping duplicate start");
|
|
@@ -5484,7 +5485,11 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5484
5485
|
}
|
|
5485
5486
|
}
|
|
5486
5487
|
}
|
|
5487
|
-
|
|
5488
|
+
if (startLoopImmediately) {
|
|
5489
|
+
this.preloadPoolLoop(baseVastUrl);
|
|
5490
|
+
} else if (this.config.debugAdTiming) {
|
|
5491
|
+
console.log("[PRELOAD-POOL] Pre-break mode: preloaded once, waiting for SCTE start to continue fetching");
|
|
5492
|
+
}
|
|
5488
5493
|
}
|
|
5489
5494
|
},
|
|
5490
5495
|
{
|
|
@@ -5911,21 +5916,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5911
5916
|
currentMuted = this.video.muted;
|
|
5912
5917
|
currentVolume = this.video.volume;
|
|
5913
5918
|
this.adPlayer.updateOriginalMutedState(currentMuted, currentVolume);
|
|
5914
|
-
if (!this.video.muted) {
|
|
5915
|
-
this.video.muted = true;
|
|
5916
|
-
if (this.config.debugAdTiming) {
|
|
5917
|
-
console.log("[StormcloudVideoPlayer] Muted video in handleAdStart");
|
|
5918
|
-
}
|
|
5919
|
-
}
|
|
5920
5919
|
this.inAdBreak = true;
|
|
5921
5920
|
this.currentAdBreakStartWallClockMs = Date.now();
|
|
5922
5921
|
this.adBreakPlayedDurationMs = 0;
|
|
5923
5922
|
this.currentAdIndex = 0;
|
|
5924
5923
|
this.totalAdsInBreak = 0;
|
|
5925
5924
|
this.adPodQueue = [];
|
|
5926
|
-
this.showAds =
|
|
5927
|
-
this.showPlaceholderLayer();
|
|
5928
|
-
this.adPlayer.showPlaceholder();
|
|
5925
|
+
this.showAds = false;
|
|
5929
5926
|
if (this.expectedAdBreakDurationMs == null && adBreakDurationMs != null) {
|
|
5930
5927
|
this.expectedAdBreakDurationMs = adBreakDurationMs;
|
|
5931
5928
|
}
|
|
@@ -6014,6 +6011,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6014
6011
|
this.startContinuousFetching(baseVastUrl);
|
|
6015
6012
|
if (!this.preloadPoolActive) {
|
|
6016
6013
|
this.preloadPoolActive = true;
|
|
6014
|
+
}
|
|
6015
|
+
if (!this.preloadPoolLoopRunning) {
|
|
6017
6016
|
this.preloadPoolLoop(baseVastUrl);
|
|
6018
6017
|
}
|
|
6019
6018
|
return [
|