stormcloud-video-player 0.8.46 → 0.8.47
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 +157 -35
- 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 +154 -36
- 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 +153 -35
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +153 -35
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +153 -35
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.cjs +106 -29
- package/lib/sdk/hlsAdPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +153 -35
- 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
|
@@ -19,6 +19,7 @@ interface AdBreakOrchestratorHost {
|
|
|
19
19
|
restartHlsLoad(position: number): void;
|
|
20
20
|
reloadLiveStream(): void;
|
|
21
21
|
recoverMediaError(): void;
|
|
22
|
+
requiresMediaPipelineResetAfterAds(): boolean;
|
|
22
23
|
generatePodVastUrl(baseUrl: string, breakDurationMs?: number): string;
|
|
23
24
|
}
|
|
24
25
|
declare class AdBreakOrchestrator {
|
package/lib/player/HlsEngine.cjs
CHANGED
|
@@ -1529,30 +1529,49 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
1529
1529
|
{
|
|
1530
1530
|
key: "reloadLiveStream",
|
|
1531
1531
|
value: function reloadLiveStream() {
|
|
1532
|
+
var _this = this;
|
|
1532
1533
|
var hls = this.hls;
|
|
1533
1534
|
if (!hls) {
|
|
1534
1535
|
return;
|
|
1535
1536
|
}
|
|
1536
1537
|
if (this.debug) {
|
|
1537
|
-
console.log("[StormcloudVideoPlayer] Hard-reloading live stream (
|
|
1538
|
+
console.log("[StormcloudVideoPlayer] Hard-reloading live stream (destroy hls \u2192 reset video \u2192 fresh setupHls)");
|
|
1538
1539
|
}
|
|
1539
1540
|
try {
|
|
1540
1541
|
this.reloadingLiveStream = true;
|
|
1541
1542
|
hls.stopLoad();
|
|
1542
1543
|
hls.detachMedia();
|
|
1544
|
+
hls.destroy();
|
|
1545
|
+
this.hls = void 0;
|
|
1543
1546
|
try {
|
|
1544
1547
|
this.video.removeAttribute("src");
|
|
1545
1548
|
this.video.load();
|
|
1546
1549
|
} catch (error) {
|
|
1547
1550
|
console.warn("[StormcloudVideoPlayer] video.load() threw after src removal:", error);
|
|
1548
1551
|
}
|
|
1549
|
-
hls.attachMedia(this.video);
|
|
1550
1552
|
} catch (error) {
|
|
1551
1553
|
this.reloadingLiveStream = false;
|
|
1554
|
+
this.hls = void 0;
|
|
1552
1555
|
if (this.debug) {
|
|
1553
|
-
console.warn("[StormcloudVideoPlayer] Failed to hard-reload
|
|
1556
|
+
console.warn("[StormcloudVideoPlayer] Failed to tear down during hard-reload:", error);
|
|
1554
1557
|
}
|
|
1558
|
+
return;
|
|
1555
1559
|
}
|
|
1560
|
+
var recreateDelayMs = 600;
|
|
1561
|
+
window.setTimeout(function() {
|
|
1562
|
+
if (_this.hls) {
|
|
1563
|
+
_this.reloadingLiveStream = false;
|
|
1564
|
+
return;
|
|
1565
|
+
}
|
|
1566
|
+
try {
|
|
1567
|
+
_this.setupHls();
|
|
1568
|
+
} catch (error) {
|
|
1569
|
+
_this.reloadingLiveStream = false;
|
|
1570
|
+
if (_this.debug) {
|
|
1571
|
+
console.warn("[StormcloudVideoPlayer] Failed to rebuild pipeline during hard-reload:", error);
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
}, recreateDelayMs);
|
|
1556
1575
|
}
|
|
1557
1576
|
},
|
|
1558
1577
|
{
|