stormcloud-video-player 0.8.46 → 0.8.48
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 +209 -88
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +206 -89
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +17 -3
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +1 -0
- package/lib/player/HlsEngine.cjs +22 -3
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +205 -88
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +205 -88
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +205 -88
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +158 -82
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +205 -88
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/browserCompat.cjs +9 -0
- package/lib/utils/browserCompat.cjs.map +1 -1
- package/lib/utils/browserCompat.d.cts +2 -1
- package/package.json +1 -1
|
@@ -2485,6 +2485,14 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2485
2485
|
this.host.video.style.visibility = "visible";
|
|
2486
2486
|
this.host.video.style.opacity = "1";
|
|
2487
2487
|
if (this.host.isLiveStream()) {
|
|
2488
|
+
if (this.host.requiresMediaPipelineResetAfterAds()) {
|
|
2489
|
+
if (this.debug) {
|
|
2490
|
+
console.log("[StormcloudVideoPlayer] Live break end \u2014 hard-reloading stream to reacquire decoder (single-decoder platform)");
|
|
2491
|
+
}
|
|
2492
|
+
this.host.reloadLiveStream();
|
|
2493
|
+
this.monitorLiveResumeStall(this.host.video.currentTime);
|
|
2494
|
+
return;
|
|
2495
|
+
}
|
|
2488
2496
|
var liveSyncPos = this.host.getLiveSyncPosition();
|
|
2489
2497
|
if (liveSyncPos != null && liveSyncPos > this.host.video.currentTime) {
|
|
2490
2498
|
if (this.debug) {
|
|
@@ -2546,9 +2554,10 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2546
2554
|
key: "monitorLiveResumeStall",
|
|
2547
2555
|
value: function monitorLiveResumeStall(resumeBaseline) {
|
|
2548
2556
|
var _this = this;
|
|
2557
|
+
var needsReset = this.host.requiresMediaPipelineResetAfterAds();
|
|
2549
2558
|
var pollIntervalMs = 1e3;
|
|
2550
|
-
var graceMs = 5e3;
|
|
2551
|
-
var recoveryCooldownMs = 5e3;
|
|
2559
|
+
var graceMs = needsReset ? 8e3 : 5e3;
|
|
2560
|
+
var recoveryCooldownMs = needsReset ? 7e3 : 5e3;
|
|
2552
2561
|
var maxRecoveries = 3;
|
|
2553
2562
|
var maxMonitorMs = 45e3;
|
|
2554
2563
|
var startTime = Date.now();
|
|
@@ -2662,7 +2671,12 @@ var AdBreakOrchestrator = /*#__PURE__*/ function() {
|
|
|
2662
2671
|
if (canRecover) {
|
|
2663
2672
|
recoveries++;
|
|
2664
2673
|
lastRecoveryAt = Date.now();
|
|
2665
|
-
if (
|
|
2674
|
+
if (needsReset) {
|
|
2675
|
+
if (_this.debug) {
|
|
2676
|
+
console.warn("[StormcloudVideoPlayer] Content still wedged after ad break — hard-reloading live stream (recovery ".concat(recoveries, "/").concat(maxRecoveries, ") — ").concat(_this.describeVideoState()));
|
|
2677
|
+
}
|
|
2678
|
+
_this.host.reloadLiveStream();
|
|
2679
|
+
} else if (recoveries === 1) {
|
|
2666
2680
|
if (_this.debug) {
|
|
2667
2681
|
console.warn("[StormcloudVideoPlayer] Content wedged after ad break — calling recoverMediaError() (recovery ".concat(recoveries, "/").concat(maxRecoveries, ") — ").concat(_this.describeVideoState()));
|
|
2668
2682
|
}
|