stormcloud-video-player 0.8.42 → 0.8.44
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 +172 -20
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +172 -20
- package/lib/index.js.map +1 -1
- package/lib/player/AdBreakOrchestrator.cjs +132 -20
- package/lib/player/AdBreakOrchestrator.cjs.map +1 -1
- package/lib/player/AdBreakOrchestrator.d.cts +3 -1
- package/lib/player/AdConfigManager.d.cts +1 -1
- package/lib/player/AdTimingService.d.cts +1 -1
- package/lib/player/HlsEngine.cjs +29 -0
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/HlsEngine.d.cts +3 -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 +172 -20
- 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 +172 -20
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.d.cts +1 -1
- package/lib/players/index.cjs +172 -20
- package/lib/players/index.cjs.map +1 -1
- package/lib/sdk/hlsAdPlayer.d.cts +1 -1
- package/lib/types-iDjS8f_7.d.cts +133 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +172 -20
- 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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as Scte35Marker, S as StormcloudVideoPlayerConfig, A as AdController } from '../types-iDjS8f_7.cjs';
|
|
2
2
|
import { AdTimingService } from './AdTimingService.cjs';
|
|
3
3
|
import { AdConfigManager } from './AdConfigManager.cjs';
|
|
4
4
|
import { Scte35CueManager } from './Scte35CueManager.cjs';
|
|
@@ -17,6 +17,7 @@ interface AdBreakOrchestratorHost {
|
|
|
17
17
|
isLiveStream(): boolean;
|
|
18
18
|
getLiveSyncPosition(): number | undefined;
|
|
19
19
|
restartHlsLoad(position: number): void;
|
|
20
|
+
reloadLiveStream(): void;
|
|
20
21
|
generatePodVastUrl(baseUrl: string, breakDurationMs?: number): string;
|
|
21
22
|
}
|
|
22
23
|
declare class AdBreakOrchestrator {
|
|
@@ -60,6 +61,7 @@ declare class AdBreakOrchestrator {
|
|
|
60
61
|
private showPlaceholderAndWaitForAds;
|
|
61
62
|
handleAdPodComplete(): void;
|
|
62
63
|
private getBufferedAhead;
|
|
64
|
+
private describeVideoState;
|
|
63
65
|
private monitorLiveResumeStall;
|
|
64
66
|
private resumeContentPlayback;
|
|
65
67
|
handleAdFailure(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as AdBreak,
|
|
1
|
+
import { b as AdBreak, S as StormcloudVideoPlayerConfig, A as AdController } from '../types-iDjS8f_7.cjs';
|
|
2
2
|
import { PalNonceManager } from '../sdk/pal.cjs';
|
|
3
3
|
import { VastConsentSignals } from '../utils/vastMacros.cjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as StormcloudVideoPlayerConfig, a as Scte35Marker, A as AdController } from '../types-iDjS8f_7.cjs';
|
|
2
2
|
|
|
3
3
|
interface AdTimingCallbacks {
|
|
4
4
|
onAdStopTimerFired(): void;
|
package/lib/player/HlsEngine.cjs
CHANGED
|
@@ -1032,6 +1032,7 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
1032
1032
|
this.isLiveStream = false;
|
|
1033
1033
|
this.nativeHlsMode = false;
|
|
1034
1034
|
this.videoSrcProtection = null;
|
|
1035
|
+
this.reloadingLiveStream = false;
|
|
1035
1036
|
this.bufferedSegmentsCount = 0;
|
|
1036
1037
|
this.shouldAutoplayAfterBuffering = false;
|
|
1037
1038
|
this.hasInitialBufferCompleted = false;
|
|
@@ -1165,6 +1166,7 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
1165
1166
|
_state.sent();
|
|
1166
1167
|
_state.label = 3;
|
|
1167
1168
|
case 3:
|
|
1169
|
+
this.reloadingLiveStream = false;
|
|
1168
1170
|
return [
|
|
1169
1171
|
2
|
|
1170
1172
|
];
|
|
@@ -1509,6 +1511,33 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
1509
1511
|
}
|
|
1510
1512
|
}
|
|
1511
1513
|
},
|
|
1514
|
+
{
|
|
1515
|
+
key: "reloadLiveStream",
|
|
1516
|
+
value: function reloadLiveStream() {
|
|
1517
|
+
var hls = this.hls;
|
|
1518
|
+
if (!hls) {
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
if (this.debug) {
|
|
1522
|
+
console.log("[StormcloudVideoPlayer] Hard-reloading live stream (detach \u2192 reset video \u2192 re-attach)");
|
|
1523
|
+
}
|
|
1524
|
+
try {
|
|
1525
|
+
this.reloadingLiveStream = true;
|
|
1526
|
+
hls.stopLoad();
|
|
1527
|
+
hls.detachMedia();
|
|
1528
|
+
try {
|
|
1529
|
+
this.video.removeAttribute("src");
|
|
1530
|
+
this.video.load();
|
|
1531
|
+
} catch (unused) {}
|
|
1532
|
+
hls.attachMedia(this.video);
|
|
1533
|
+
} catch (error) {
|
|
1534
|
+
this.reloadingLiveStream = false;
|
|
1535
|
+
if (this.debug) {
|
|
1536
|
+
console.warn("[StormcloudVideoPlayer] Failed to hard-reload live stream:", error);
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1512
1541
|
{
|
|
1513
1542
|
key: "destroy",
|
|
1514
1543
|
value: function destroy() {
|