stormcloud-video-player 0.8.28 → 0.8.29
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 +23 -14
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +23 -14
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +23 -14
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +1 -0
- package/lib/player/StormcloudVideoPlayer.cjs +23 -14
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +23 -14
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +23 -14
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +23 -14
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ declare class AdBreakOrchestrator {
|
|
|
47
47
|
private get debug();
|
|
48
48
|
private get analyticsContext();
|
|
49
49
|
private get optimizedPodsEnabled();
|
|
50
|
+
private nextAdRequestUrl;
|
|
50
51
|
attachImaEventListeners(): void;
|
|
51
52
|
recreateAdController(): void;
|
|
52
53
|
clearPendingAdBreak(): void;
|
|
@@ -7102,6 +7102,17 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7102
7102
|
return this.host.config.optimizedPods !== false;
|
|
7103
7103
|
}
|
|
7104
7104
|
},
|
|
7105
|
+
{
|
|
7106
|
+
key: "nextAdRequestUrl",
|
|
7107
|
+
value: function nextAdRequestUrl(baseVastUrl) {
|
|
7108
|
+
if (this.optimizedPodsEnabled) {
|
|
7109
|
+
var remaining = Math.min(this.timing.getWallClockRemainingAdMs(), this.timing.getDurationBudgetRemainingMs());
|
|
7110
|
+
var breakDurationMs = remaining > 0 ? remaining : void 0;
|
|
7111
|
+
return this.host.generatePodVastUrl(baseVastUrl, breakDurationMs);
|
|
7112
|
+
}
|
|
7113
|
+
return this.host.generateVastUrls(baseVastUrl, 1)[0];
|
|
7114
|
+
}
|
|
7115
|
+
},
|
|
7105
7116
|
{
|
|
7106
7117
|
key: "attachImaEventListeners",
|
|
7107
7118
|
value: function attachImaEventListeners() {
|
|
@@ -7271,7 +7282,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7271
7282
|
// ───────────────────────────────────────────────────────────────
|
|
7272
7283
|
function handleAdStart(_marker) {
|
|
7273
7284
|
return _async_to_generator(function() {
|
|
7274
|
-
var scheduled, tags, baseVastUrl, adBreakDurationMs, mode, currentMuted, currentVolume, podPlayed, firstAdUrl, usePreloadedAd, preloadedController, preloaded,
|
|
7285
|
+
var scheduled, tags, baseVastUrl, adBreakDurationMs, mode, currentMuted, currentVolume, podPlayed, firstAdUrl, usePreloadedAd, preloadedController, preloaded, adPlayer, preservedMuted, preservedVolume, adVolume, adPlayer1, adVolume1, error, fallbackPreloaded, ap, adVolume2, fallbackError;
|
|
7275
7286
|
return _ts_generator(this, function(_state) {
|
|
7276
7287
|
switch(_state.label){
|
|
7277
7288
|
case 0:
|
|
@@ -7363,8 +7374,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7363
7374
|
if (this.debug) {
|
|
7364
7375
|
console.log("[CONTINUOUS-FETCH] Generating new ad URLs...");
|
|
7365
7376
|
}
|
|
7366
|
-
|
|
7367
|
-
firstAdUrl = firstAdUrlArray[0];
|
|
7377
|
+
firstAdUrl = this.nextAdRequestUrl(baseVastUrl);
|
|
7368
7378
|
this.adRequestQueue = [];
|
|
7369
7379
|
}
|
|
7370
7380
|
if (!firstAdUrl) {
|
|
@@ -7421,11 +7431,13 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7421
7431
|
preloadedController.resume();
|
|
7422
7432
|
this.timing.consecutiveFailures = 0;
|
|
7423
7433
|
this.startContinuousFetching(baseVastUrl);
|
|
7424
|
-
if (!this.
|
|
7425
|
-
this.preloadPool.active
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
this.preloadPool.
|
|
7434
|
+
if (!this.optimizedPodsEnabled) {
|
|
7435
|
+
if (!this.preloadPool.active) {
|
|
7436
|
+
this.preloadPool.active = true;
|
|
7437
|
+
}
|
|
7438
|
+
if (!this.preloadPool.isLoopRunning) {
|
|
7439
|
+
this.preloadPool.preloadPoolLoop(baseVastUrl);
|
|
7440
|
+
}
|
|
7429
7441
|
}
|
|
7430
7442
|
return [
|
|
7431
7443
|
4,
|
|
@@ -7485,7 +7497,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7485
7497
|
case 11:
|
|
7486
7498
|
this.timing.consecutiveFailures = 0;
|
|
7487
7499
|
this.startContinuousFetching(baseVastUrl);
|
|
7488
|
-
if (!this.preloadPool.active) {
|
|
7500
|
+
if (!this.optimizedPodsEnabled && !this.preloadPool.active) {
|
|
7489
7501
|
this.preloadPool.startPreloadPool(baseVastUrl, []);
|
|
7490
7502
|
}
|
|
7491
7503
|
return [
|
|
@@ -7550,7 +7562,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7550
7562
|
this.swapToPreloadedAdPlayer(fallbackPreloaded.adController);
|
|
7551
7563
|
this.timing.consecutiveFailures = 0;
|
|
7552
7564
|
this.startContinuousFetching(baseVastUrl);
|
|
7553
|
-
if (!this.preloadPool.active) {
|
|
7565
|
+
if (!this.optimizedPodsEnabled && !this.preloadPool.active) {
|
|
7554
7566
|
this.preloadPool.active = true;
|
|
7555
7567
|
this.preloadPool.preloadPoolLoop(baseVastUrl);
|
|
7556
7568
|
}
|
|
@@ -7700,9 +7712,6 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7700
7712
|
if (podCount === 1) {
|
|
7701
7713
|
this.continuousFetchingActive = true;
|
|
7702
7714
|
this.startContinuousFetching(baseVastUrl);
|
|
7703
|
-
if (!this.preloadPool.active) {
|
|
7704
|
-
this.preloadPool.startPreloadPool(baseVastUrl, []);
|
|
7705
|
-
}
|
|
7706
7715
|
}
|
|
7707
7716
|
return [
|
|
7708
7717
|
2,
|
|
@@ -7843,7 +7852,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
7843
7852
|
"continue"
|
|
7844
7853
|
];
|
|
7845
7854
|
case 2:
|
|
7846
|
-
newAdUrl = _this.
|
|
7855
|
+
newAdUrl = _this.nextAdRequestUrl(baseVastUrl);
|
|
7847
7856
|
if (!(!newAdUrl || _this.timing.failedVastUrls.has(newAdUrl) || _this.timing.isUrlInCooldown(newAdUrl))) return [
|
|
7848
7857
|
3,
|
|
7849
7858
|
4
|