stormcloud-video-player 0.8.33 → 0.8.35
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 +143 -19
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +143 -19
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +36 -16
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +3 -7
- package/lib/player/AdConfigManager.cjs +36 -1
- package/lib/player/AdConfigManager.cjs.map +1 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.d.cts +1 -1
- package/lib/player/PlayerControls.d.cts +1 -1
- package/lib/player/Scte35CueManager.d.cts +1 -1
- package/lib/player/Scte35Parser.d.cts +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +143 -19
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/player/playerTypes.d.cts +1 -1
- package/lib/players/HlsPlayer.cjs +143 -19
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +143 -19
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +62 -0
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/sdk/pal.cjs +38 -2
- package/lib/sdk/pal.cjs.map +1 -1
- package/lib/{types-CSHvCbhZ.d.cts → types-cTqIKw_D.d.cts} +1 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +143 -19
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -1
- package/lib/utils/browserCompat.cjs +1 -0
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/browserCompat.d.cts +1 -0
- package/lib/utils/devUrl.cjs +102 -0
- package/lib/utils/devUrl.cjs.map +1 -0
- package/lib/utils/devUrl.d.cts +4 -0
- package/lib/utils/tracking.d.cts +1 -1
- package/package.json +1 -1
|
@@ -1291,12 +1291,7 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
1291
1291
|
// ───────────────────────────────────────────────────────────────
|
|
1292
1292
|
// IMA event listeners
|
|
1293
1293
|
// ───────────────────────────────────────────────────────────────
|
|
1294
|
-
|
|
1295
|
-
* Produces the next pod ad-request URL for the current break. Every request
|
|
1296
|
-
* (initial and continuous-fetch top-up) carries pod macros (pmad/pmnd/pmxd,
|
|
1297
|
-
* no ppos); pmxd tracks the remaining break time so top-up pods only ask for
|
|
1298
|
-
* what still fits.
|
|
1299
|
-
*/ key: "nextAdRequestUrl",
|
|
1294
|
+
key: "nextAdRequestUrl",
|
|
1300
1295
|
value: function nextAdRequestUrl(baseVastUrl) {
|
|
1301
1296
|
var remaining = Math.min(this.timing.getWallClockRemainingAdMs(), this.timing.getDurationBudgetRemainingMs());
|
|
1302
1297
|
var breakDurationMs = remaining > 0 ? remaining : void 0;
|
|
@@ -2425,7 +2420,9 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2425
2420
|
if (Math.abs(this.host.video.volume - restoredVolume) > 0.01) {
|
|
2426
2421
|
this.host.video.volume = restoredVolume;
|
|
2427
2422
|
}
|
|
2428
|
-
|
|
2423
|
+
this.host.video.style.visibility = "visible";
|
|
2424
|
+
this.host.video.style.opacity = "1";
|
|
2425
|
+
if (this.host.isLiveStream()) {
|
|
2429
2426
|
var liveSyncPos = this.host.getLiveSyncPosition();
|
|
2430
2427
|
if (liveSyncPos != null && liveSyncPos > this.host.video.currentTime) {
|
|
2431
2428
|
if (this.debug) {
|
|
@@ -2433,16 +2430,39 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2433
2430
|
}
|
|
2434
2431
|
this.host.video.currentTime = liveSyncPos;
|
|
2435
2432
|
}
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2433
|
+
}
|
|
2434
|
+
this.resumeContentPlayback();
|
|
2435
|
+
}
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
key: "resumeContentPlayback",
|
|
2439
|
+
value: function resumeContentPlayback() {
|
|
2440
|
+
var _this = this;
|
|
2441
|
+
var attempt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
2442
|
+
var maxAttempts = 3;
|
|
2443
|
+
if (!this.host.video.paused) {
|
|
2444
|
+
if (this.debug && attempt === 0) {
|
|
2445
|
+
console.log("[StormcloudVideoPlayer] Content video already playing after ads");
|
|
2442
2446
|
}
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2447
|
+
return;
|
|
2448
|
+
}
|
|
2449
|
+
if (this.debug) {
|
|
2450
|
+
console.log("[StormcloudVideoPlayer] Resuming content playback after ads (attempt ".concat(attempt + 1, "/").concat(maxAttempts, ")"));
|
|
2451
|
+
}
|
|
2452
|
+
var playResult = this.host.video.play();
|
|
2453
|
+
if (playResult && typeof playResult.catch === "function") {
|
|
2454
|
+
playResult.catch(function(error) {
|
|
2455
|
+
if (attempt + 1 >= maxAttempts) {
|
|
2456
|
+
if (_this.debug) {
|
|
2457
|
+
console.warn("[StormcloudVideoPlayer] Failed to resume content playback after ads:", error);
|
|
2458
|
+
}
|
|
2459
|
+
return;
|
|
2460
|
+
}
|
|
2461
|
+
var backoffMs = 250 * (attempt + 1);
|
|
2462
|
+
window.setTimeout(function() {
|
|
2463
|
+
_this.resumeContentPlayback(attempt + 1);
|
|
2464
|
+
}, backoffMs);
|
|
2465
|
+
});
|
|
2446
2466
|
}
|
|
2447
2467
|
}
|
|
2448
2468
|
},
|