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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
|
-
import { S as StormcloudVideoPlayerConfig } from '../types-
|
|
2
|
+
import { S as StormcloudVideoPlayerConfig } from '../types-BM5cceAy.cjs';
|
|
3
3
|
|
|
4
4
|
interface HlsPlayerProps extends StormcloudVideoPlayerConfig {
|
|
5
5
|
onMount?: (player: any) => void;
|
package/lib/players/index.cjs
CHANGED
|
@@ -5213,7 +5213,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5213
5213
|
}
|
|
5214
5214
|
this.beginNewAdPod();
|
|
5215
5215
|
this.podAssignedByPrefetch = true;
|
|
5216
|
-
var urlsToPregenerate =
|
|
5216
|
+
var urlsToPregenerate = 1;
|
|
5217
5217
|
var generatedUrls = this.generateVastUrlsWithCorrelators(baseVastUrl, urlsToPregenerate);
|
|
5218
5218
|
this.pendingAdBreak = _object_spread_props(_object_spread({
|
|
5219
5219
|
marker: marker
|
|
@@ -5238,7 +5238,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5238
5238
|
console.log("[PREFETCH] \uD83D\uDD04 Starting ad prefetch for upcoming ad break");
|
|
5239
5239
|
console.log("[PREFETCH] \uD83D\uDCCB Pre-generated ".concat(generatedUrls.length, " VAST URLs"));
|
|
5240
5240
|
}
|
|
5241
|
-
this.startPreloadPool(baseVastUrl, generatedUrls.slice(0,
|
|
5241
|
+
this.startPreloadPool(baseVastUrl, generatedUrls.slice(0, 1), false);
|
|
5242
5242
|
}
|
|
5243
5243
|
},
|
|
5244
5244
|
{
|
|
@@ -5256,6 +5256,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5256
5256
|
{
|
|
5257
5257
|
key: "startPreloadPool",
|
|
5258
5258
|
value: function startPreloadPool(baseVastUrl, initialUrls) {
|
|
5259
|
+
var startLoopImmediately = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
5259
5260
|
if (this.preloadPoolActive) {
|
|
5260
5261
|
if (this.config.debugAdTiming) {
|
|
5261
5262
|
console.log("[PRELOAD-POOL] Already active, skipping duplicate start");
|
|
@@ -5289,7 +5290,11 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5289
5290
|
}
|
|
5290
5291
|
}
|
|
5291
5292
|
}
|
|
5292
|
-
|
|
5293
|
+
if (startLoopImmediately) {
|
|
5294
|
+
this.preloadPoolLoop(baseVastUrl);
|
|
5295
|
+
} else if (this.config.debugAdTiming) {
|
|
5296
|
+
console.log("[PRELOAD-POOL] Pre-break mode: preloaded once, waiting for SCTE start to continue fetching");
|
|
5297
|
+
}
|
|
5293
5298
|
}
|
|
5294
5299
|
},
|
|
5295
5300
|
{
|
|
@@ -5716,21 +5721,13 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5716
5721
|
currentMuted = this.video.muted;
|
|
5717
5722
|
currentVolume = this.video.volume;
|
|
5718
5723
|
this.adPlayer.updateOriginalMutedState(currentMuted, currentVolume);
|
|
5719
|
-
if (!this.video.muted) {
|
|
5720
|
-
this.video.muted = true;
|
|
5721
|
-
if (this.config.debugAdTiming) {
|
|
5722
|
-
console.log("[StormcloudVideoPlayer] Muted video in handleAdStart");
|
|
5723
|
-
}
|
|
5724
|
-
}
|
|
5725
5724
|
this.inAdBreak = true;
|
|
5726
5725
|
this.currentAdBreakStartWallClockMs = Date.now();
|
|
5727
5726
|
this.adBreakPlayedDurationMs = 0;
|
|
5728
5727
|
this.currentAdIndex = 0;
|
|
5729
5728
|
this.totalAdsInBreak = 0;
|
|
5730
5729
|
this.adPodQueue = [];
|
|
5731
|
-
this.showAds =
|
|
5732
|
-
this.showPlaceholderLayer();
|
|
5733
|
-
this.adPlayer.showPlaceholder();
|
|
5730
|
+
this.showAds = false;
|
|
5734
5731
|
if (this.expectedAdBreakDurationMs == null && adBreakDurationMs != null) {
|
|
5735
5732
|
this.expectedAdBreakDurationMs = adBreakDurationMs;
|
|
5736
5733
|
}
|
|
@@ -5819,6 +5816,8 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5819
5816
|
this.startContinuousFetching(baseVastUrl);
|
|
5820
5817
|
if (!this.preloadPoolActive) {
|
|
5821
5818
|
this.preloadPoolActive = true;
|
|
5819
|
+
}
|
|
5820
|
+
if (!this.preloadPoolLoopRunning) {
|
|
5822
5821
|
this.preloadPoolLoop(baseVastUrl);
|
|
5823
5822
|
}
|
|
5824
5823
|
return [
|