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.
@@ -1,4 +1,4 @@
1
- import { S as Scte35Marker, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-cTqIKw_D.cjs';
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, a as StormcloudVideoPlayerConfig, A as AdController } from '../types-cTqIKw_D.cjs';
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 { a as StormcloudVideoPlayerConfig, S as Scte35Marker, A as AdController } from '../types-cTqIKw_D.cjs';
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;
@@ -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() {