@codenkay/video-nsgplayer-core 5.0.0 → 5.2.0
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/CHANGELOG.md +17 -0
- package/README.md +11 -8
- package/dist/index.cjs +134 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -5
- package/dist/index.d.ts +56 -5
- package/dist/index.js +131 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -58,6 +58,12 @@ type PlaybackCredentialConfig = {
|
|
|
58
58
|
getSource: (context: PlaybackSourceContext) => Promise<PlaybackSource>;
|
|
59
59
|
refreshSource?: (context: PlaybackSourceContext) => Promise<PlaybackSource>;
|
|
60
60
|
refreshBeforeExpiryMs?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Rotate the playback token on this cadence without restarting the loader.
|
|
63
|
+
* The working player refreshes every 45 seconds and applies the new token
|
|
64
|
+
* on the next media request.
|
|
65
|
+
*/
|
|
66
|
+
refreshIntervalMs?: number;
|
|
61
67
|
renewMaxRetries?: number;
|
|
62
68
|
renewBackoffMs?: number;
|
|
63
69
|
authRecoveryCoalesceMs?: number;
|
|
@@ -134,8 +140,24 @@ type StreamingConfig = {
|
|
|
134
140
|
enableWorker?: boolean;
|
|
135
141
|
lowLatencyMode?: boolean;
|
|
136
142
|
backBufferLength?: number;
|
|
143
|
+
/** Target forward buffer, in seconds. */
|
|
144
|
+
maxBufferLength?: number;
|
|
145
|
+
/** Upper forward buffer while bandwidth is spare, in seconds. */
|
|
146
|
+
maxMaxBufferLength?: number;
|
|
147
|
+
/** Forward buffer cap, in bytes. */
|
|
148
|
+
maxBufferSize?: number;
|
|
137
149
|
fatalRecoveryLimit?: number;
|
|
138
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* Same-origin BFF proxy for playlists, segments, and keys.
|
|
153
|
+
* The playback API rejects the browser Origin and does not send CORS
|
|
154
|
+
* headers, so cross-origin media URLs must be rewritten before fetch.
|
|
155
|
+
* The builder is not called for URLs that are already on the page origin.
|
|
156
|
+
*/
|
|
157
|
+
mediaProxyUrlBuilder?: (ctx: {
|
|
158
|
+
url: string;
|
|
159
|
+
videoId?: string;
|
|
160
|
+
}) => string;
|
|
139
161
|
/**
|
|
140
162
|
* Same-origin BFF proxy for `enc.key` (preferred in production when the
|
|
141
163
|
* server IP is allowlisted by the CDN / Cloudflare).
|
|
@@ -205,6 +227,7 @@ type PlayerConfig = Required<{
|
|
|
205
227
|
streaming: {
|
|
206
228
|
engine: "hls";
|
|
207
229
|
hls: Required<NonNullable<StreamingConfig["hls"]>>;
|
|
230
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
208
231
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
209
232
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
210
233
|
keyProxyMaxFailures?: StreamingConfig["keyProxyMaxFailures"];
|
|
@@ -289,7 +312,12 @@ type PlayerEventMap = {
|
|
|
289
312
|
};
|
|
290
313
|
|
|
291
314
|
declare const PLAYBACK_RATES: readonly [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
292
|
-
|
|
315
|
+
/**
|
|
316
|
+
* Rotate the playback token on this cadence. The loader keeps its buffer
|
|
317
|
+
* and applies the new token on the next media request.
|
|
318
|
+
*/
|
|
319
|
+
declare const DEFAULT_PLAYBACK_REFRESH_INTERVAL_MS = 45000;
|
|
320
|
+
declare const PACKAGE_VERSION = "5.2.0";
|
|
293
321
|
declare const DEFAULT_PLAYER_BEHAVIOR: Required<PlayerBehaviorConfig>;
|
|
294
322
|
declare const DEFAULT_CONTROLS: Required<ControlsConfig>;
|
|
295
323
|
declare const DEFAULT_THEME: Required<ThemeConfig>;
|
|
@@ -320,6 +348,7 @@ type PlayerConfigPartial = Partial<{
|
|
|
320
348
|
streaming: {
|
|
321
349
|
engine?: "hls";
|
|
322
350
|
hls?: Partial<PlayerConfig["streaming"]["hls"]>;
|
|
351
|
+
mediaProxyUrlBuilder?: PlayerConfig["streaming"]["mediaProxyUrlBuilder"];
|
|
323
352
|
keyProxyUrlBuilder?: PlayerConfig["streaming"]["keyProxyUrlBuilder"];
|
|
324
353
|
getKeyAccessToken?: PlayerConfig["streaming"]["getKeyAccessToken"];
|
|
325
354
|
keyProxyMaxFailures?: PlayerConfig["streaming"]["keyProxyMaxFailures"];
|
|
@@ -440,6 +469,7 @@ type HlsEngineOptions = {
|
|
|
440
469
|
startPosition?: number;
|
|
441
470
|
volume?: number;
|
|
442
471
|
videoId?: string;
|
|
472
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
443
473
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
444
474
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
445
475
|
keyProxyMaxFailures?: StreamingConfig["keyProxyMaxFailures"];
|
|
@@ -447,6 +477,9 @@ type HlsEngineOptions = {
|
|
|
447
477
|
enableWorker: boolean;
|
|
448
478
|
lowLatencyMode: boolean;
|
|
449
479
|
backBufferLength: number;
|
|
480
|
+
maxBufferLength: number;
|
|
481
|
+
maxMaxBufferLength: number;
|
|
482
|
+
maxBufferSize: number;
|
|
450
483
|
fatalRecoveryLimit: number;
|
|
451
484
|
};
|
|
452
485
|
logger: Logger;
|
|
@@ -480,7 +513,13 @@ declare class HlsEngine {
|
|
|
480
513
|
private applyStartPositionAndAutoplay;
|
|
481
514
|
private bindMediaEvents;
|
|
482
515
|
updateAuthParams(): void;
|
|
483
|
-
|
|
516
|
+
private playbackRequestUrl;
|
|
517
|
+
/**
|
|
518
|
+
* Auth params are already on the shared store, so the next request uses
|
|
519
|
+
* the new token. Restart the loader only after a real auth failure.
|
|
520
|
+
* A proactive refresh must not abort the buffered segments.
|
|
521
|
+
*/
|
|
522
|
+
resumeAfterAuthRenew(restart?: boolean): void;
|
|
484
523
|
setQuality(selection: QualitySelection): void;
|
|
485
524
|
getQuality(): QualitySelection;
|
|
486
525
|
getQualities(): HlsQualityLevel[];
|
|
@@ -624,13 +663,14 @@ type RefreshManagerOptions = {
|
|
|
624
663
|
authManager: AuthManager;
|
|
625
664
|
sourceManager: PlaybackSourceManager;
|
|
626
665
|
refreshBeforeExpiryMs: number;
|
|
666
|
+
refreshIntervalMs?: number;
|
|
627
667
|
renewMaxRetries: number;
|
|
628
668
|
renewBackoffMs: number;
|
|
629
669
|
coalesceMs: number;
|
|
630
670
|
logger: Logger;
|
|
631
671
|
isDestroyed: () => boolean;
|
|
632
|
-
onRenewing?: () => void;
|
|
633
|
-
onRenewed?: (expiresAt: number) => void;
|
|
672
|
+
onRenewing?: (reason: RefreshReason) => void;
|
|
673
|
+
onRenewed?: (expiresAt: number, reason: RefreshReason) => void;
|
|
634
674
|
onFatal?: (message: string) => void;
|
|
635
675
|
};
|
|
636
676
|
/**
|
|
@@ -640,6 +680,7 @@ type RefreshManagerOptions = {
|
|
|
640
680
|
declare class RefreshManager {
|
|
641
681
|
private readonly options;
|
|
642
682
|
private timer;
|
|
683
|
+
private intervalTimer;
|
|
643
684
|
private coalesceTimer;
|
|
644
685
|
private inFlight;
|
|
645
686
|
private consecutiveFailures;
|
|
@@ -650,6 +691,8 @@ declare class RefreshManager {
|
|
|
650
691
|
requestRenew(reason?: RefreshReason): void;
|
|
651
692
|
stop(): void;
|
|
652
693
|
private schedule;
|
|
694
|
+
/** Rotate the token on a fixed cadence. The loader reads the store live. */
|
|
695
|
+
private armInterval;
|
|
653
696
|
private renew;
|
|
654
697
|
}
|
|
655
698
|
|
|
@@ -716,6 +759,7 @@ type HlsModuleLike = object;
|
|
|
716
759
|
declare const KEY_PROXY_MAX_FAILURES = 2;
|
|
717
760
|
type AuthParamsLoaderOptions = {
|
|
718
761
|
videoId?: string;
|
|
762
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
719
763
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
720
764
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
721
765
|
/** Override max BFF key failures before permanent browser fallback (default 2). */
|
|
@@ -737,6 +781,13 @@ declare function rewriteHlsRequestUrl(rawUrl: string, store: AuthParamsStore, op
|
|
|
737
781
|
*/
|
|
738
782
|
declare function createAuthParamsLoader(HlsModule: HlsModuleLike, store: AuthParamsStore, options?: AuthParamsLoaderOptions): HlsLoaderConstructor;
|
|
739
783
|
|
|
784
|
+
/**
|
|
785
|
+
* True for legacy `/hls-web-live/` playlists and current `/live/` playlists.
|
|
786
|
+
* A same-origin proxy URL is live when its `url` query points at one of those paths.
|
|
787
|
+
*/
|
|
788
|
+
declare function isLivePlaylistUrl(value: string): boolean;
|
|
789
|
+
declare function isSameOriginHttpUrl(value: string, baseOrigin: string): boolean;
|
|
790
|
+
|
|
740
791
|
declare function redactValue(key: string, value: unknown, seen?: WeakSet<object>, depth?: number): unknown;
|
|
741
792
|
/**
|
|
742
793
|
* Redacts sensitive fields. Cycle-safe and depth-capped.
|
|
@@ -744,4 +795,4 @@ declare function redactValue(key: string, value: unknown, seen?: WeakSet<object>
|
|
|
744
795
|
*/
|
|
745
796
|
declare function redactObject(obj: Record<string, unknown>, seen?: WeakSet<object>, depth?: number): Record<string, unknown>;
|
|
746
797
|
|
|
747
|
-
export { type AccessibilityConfig, type AnalyticsConfig, type AuthConfig, AuthManager, AuthParamsStore, type AuthToken, type AuthTokenProviderContext, type BufferedRange, type ControlsConfig, type CreateVideoPlayerOptions, DEFAULT_CONTROLS, DEFAULT_LIVE_EDGE_TOLERANCE_SECONDS, DEFAULT_PLAYER_BEHAVIOR, DEFAULT_PLAYER_CONFIG, DEFAULT_THEME, DEFAULT_WATERMARK, type DebugConfig, EventEmitter, type HlsLoaderConstructor, type HlsModuleLike, type HlsQualityLevel, type HlsSupportMode, KEY_PROXY_MAX_FAILURES, type LiveMediaSnapshot, type LoggingConfig, PACKAGE_VERSION, PLAYBACK_RATES, type PlayIconPreset, type PlaybackCredentialConfig, type PlaybackRate, type PlaybackSource, type PlaybackSourceContext, PlaybackSourceManager, type PlayerAudioTrack, type PlayerBehaviorConfig, type PlayerConfig, type PlayerDiagnostics, type PlayerError, PlayerErrorCode, type PlayerEventMap, type PlayerSkipSeconds, type PlayerState, type PlayerTextTrack, type PlayerZoomLevel, type QualitySelection, RefreshManager, SECRET_SCAN_MAX_DEPTH, type SeekToLiveResult, type StreamingConfig, type TextTrackSelection, type ThemeConfig, type VideoPlayer, type WatermarkConfig, assertNoSecretsInConfig, createAuthParamsLoader, createPlayerError, createVideoPlayer, getLiveEdgeTime, isAtLiveEdge, isEncryptionKeyUrl, isPlainObject, mergePlayerConfig, redactObject, redactSensitive, redactValue, resolveBuiltinHlsLoader, rewriteHlsRequestUrl, seekToLiveEdge, themeToCssVars };
|
|
798
|
+
export { type AccessibilityConfig, type AnalyticsConfig, type AuthConfig, AuthManager, AuthParamsStore, type AuthToken, type AuthTokenProviderContext, type BufferedRange, type ControlsConfig, type CreateVideoPlayerOptions, DEFAULT_CONTROLS, DEFAULT_LIVE_EDGE_TOLERANCE_SECONDS, DEFAULT_PLAYBACK_REFRESH_INTERVAL_MS, DEFAULT_PLAYER_BEHAVIOR, DEFAULT_PLAYER_CONFIG, DEFAULT_THEME, DEFAULT_WATERMARK, type DebugConfig, EventEmitter, type HlsLoaderConstructor, type HlsModuleLike, type HlsQualityLevel, type HlsSupportMode, KEY_PROXY_MAX_FAILURES, type LiveMediaSnapshot, type LoggingConfig, PACKAGE_VERSION, PLAYBACK_RATES, type PlayIconPreset, type PlaybackCredentialConfig, type PlaybackRate, type PlaybackSource, type PlaybackSourceContext, PlaybackSourceManager, type PlayerAudioTrack, type PlayerBehaviorConfig, type PlayerConfig, type PlayerDiagnostics, type PlayerError, PlayerErrorCode, type PlayerEventMap, type PlayerSkipSeconds, type PlayerState, type PlayerTextTrack, type PlayerZoomLevel, type QualitySelection, RefreshManager, SECRET_SCAN_MAX_DEPTH, type SeekToLiveResult, type StreamingConfig, type TextTrackSelection, type ThemeConfig, type VideoPlayer, type WatermarkConfig, assertNoSecretsInConfig, createAuthParamsLoader, createPlayerError, createVideoPlayer, getLiveEdgeTime, isAtLiveEdge, isEncryptionKeyUrl, isLivePlaylistUrl, isPlainObject, isSameOriginHttpUrl, mergePlayerConfig, redactObject, redactSensitive, redactValue, resolveBuiltinHlsLoader, rewriteHlsRequestUrl, seekToLiveEdge, themeToCssVars };
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,12 @@ type PlaybackCredentialConfig = {
|
|
|
58
58
|
getSource: (context: PlaybackSourceContext) => Promise<PlaybackSource>;
|
|
59
59
|
refreshSource?: (context: PlaybackSourceContext) => Promise<PlaybackSource>;
|
|
60
60
|
refreshBeforeExpiryMs?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Rotate the playback token on this cadence without restarting the loader.
|
|
63
|
+
* The working player refreshes every 45 seconds and applies the new token
|
|
64
|
+
* on the next media request.
|
|
65
|
+
*/
|
|
66
|
+
refreshIntervalMs?: number;
|
|
61
67
|
renewMaxRetries?: number;
|
|
62
68
|
renewBackoffMs?: number;
|
|
63
69
|
authRecoveryCoalesceMs?: number;
|
|
@@ -134,8 +140,24 @@ type StreamingConfig = {
|
|
|
134
140
|
enableWorker?: boolean;
|
|
135
141
|
lowLatencyMode?: boolean;
|
|
136
142
|
backBufferLength?: number;
|
|
143
|
+
/** Target forward buffer, in seconds. */
|
|
144
|
+
maxBufferLength?: number;
|
|
145
|
+
/** Upper forward buffer while bandwidth is spare, in seconds. */
|
|
146
|
+
maxMaxBufferLength?: number;
|
|
147
|
+
/** Forward buffer cap, in bytes. */
|
|
148
|
+
maxBufferSize?: number;
|
|
137
149
|
fatalRecoveryLimit?: number;
|
|
138
150
|
};
|
|
151
|
+
/**
|
|
152
|
+
* Same-origin BFF proxy for playlists, segments, and keys.
|
|
153
|
+
* The playback API rejects the browser Origin and does not send CORS
|
|
154
|
+
* headers, so cross-origin media URLs must be rewritten before fetch.
|
|
155
|
+
* The builder is not called for URLs that are already on the page origin.
|
|
156
|
+
*/
|
|
157
|
+
mediaProxyUrlBuilder?: (ctx: {
|
|
158
|
+
url: string;
|
|
159
|
+
videoId?: string;
|
|
160
|
+
}) => string;
|
|
139
161
|
/**
|
|
140
162
|
* Same-origin BFF proxy for `enc.key` (preferred in production when the
|
|
141
163
|
* server IP is allowlisted by the CDN / Cloudflare).
|
|
@@ -205,6 +227,7 @@ type PlayerConfig = Required<{
|
|
|
205
227
|
streaming: {
|
|
206
228
|
engine: "hls";
|
|
207
229
|
hls: Required<NonNullable<StreamingConfig["hls"]>>;
|
|
230
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
208
231
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
209
232
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
210
233
|
keyProxyMaxFailures?: StreamingConfig["keyProxyMaxFailures"];
|
|
@@ -289,7 +312,12 @@ type PlayerEventMap = {
|
|
|
289
312
|
};
|
|
290
313
|
|
|
291
314
|
declare const PLAYBACK_RATES: readonly [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
292
|
-
|
|
315
|
+
/**
|
|
316
|
+
* Rotate the playback token on this cadence. The loader keeps its buffer
|
|
317
|
+
* and applies the new token on the next media request.
|
|
318
|
+
*/
|
|
319
|
+
declare const DEFAULT_PLAYBACK_REFRESH_INTERVAL_MS = 45000;
|
|
320
|
+
declare const PACKAGE_VERSION = "5.2.0";
|
|
293
321
|
declare const DEFAULT_PLAYER_BEHAVIOR: Required<PlayerBehaviorConfig>;
|
|
294
322
|
declare const DEFAULT_CONTROLS: Required<ControlsConfig>;
|
|
295
323
|
declare const DEFAULT_THEME: Required<ThemeConfig>;
|
|
@@ -320,6 +348,7 @@ type PlayerConfigPartial = Partial<{
|
|
|
320
348
|
streaming: {
|
|
321
349
|
engine?: "hls";
|
|
322
350
|
hls?: Partial<PlayerConfig["streaming"]["hls"]>;
|
|
351
|
+
mediaProxyUrlBuilder?: PlayerConfig["streaming"]["mediaProxyUrlBuilder"];
|
|
323
352
|
keyProxyUrlBuilder?: PlayerConfig["streaming"]["keyProxyUrlBuilder"];
|
|
324
353
|
getKeyAccessToken?: PlayerConfig["streaming"]["getKeyAccessToken"];
|
|
325
354
|
keyProxyMaxFailures?: PlayerConfig["streaming"]["keyProxyMaxFailures"];
|
|
@@ -440,6 +469,7 @@ type HlsEngineOptions = {
|
|
|
440
469
|
startPosition?: number;
|
|
441
470
|
volume?: number;
|
|
442
471
|
videoId?: string;
|
|
472
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
443
473
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
444
474
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
445
475
|
keyProxyMaxFailures?: StreamingConfig["keyProxyMaxFailures"];
|
|
@@ -447,6 +477,9 @@ type HlsEngineOptions = {
|
|
|
447
477
|
enableWorker: boolean;
|
|
448
478
|
lowLatencyMode: boolean;
|
|
449
479
|
backBufferLength: number;
|
|
480
|
+
maxBufferLength: number;
|
|
481
|
+
maxMaxBufferLength: number;
|
|
482
|
+
maxBufferSize: number;
|
|
450
483
|
fatalRecoveryLimit: number;
|
|
451
484
|
};
|
|
452
485
|
logger: Logger;
|
|
@@ -480,7 +513,13 @@ declare class HlsEngine {
|
|
|
480
513
|
private applyStartPositionAndAutoplay;
|
|
481
514
|
private bindMediaEvents;
|
|
482
515
|
updateAuthParams(): void;
|
|
483
|
-
|
|
516
|
+
private playbackRequestUrl;
|
|
517
|
+
/**
|
|
518
|
+
* Auth params are already on the shared store, so the next request uses
|
|
519
|
+
* the new token. Restart the loader only after a real auth failure.
|
|
520
|
+
* A proactive refresh must not abort the buffered segments.
|
|
521
|
+
*/
|
|
522
|
+
resumeAfterAuthRenew(restart?: boolean): void;
|
|
484
523
|
setQuality(selection: QualitySelection): void;
|
|
485
524
|
getQuality(): QualitySelection;
|
|
486
525
|
getQualities(): HlsQualityLevel[];
|
|
@@ -624,13 +663,14 @@ type RefreshManagerOptions = {
|
|
|
624
663
|
authManager: AuthManager;
|
|
625
664
|
sourceManager: PlaybackSourceManager;
|
|
626
665
|
refreshBeforeExpiryMs: number;
|
|
666
|
+
refreshIntervalMs?: number;
|
|
627
667
|
renewMaxRetries: number;
|
|
628
668
|
renewBackoffMs: number;
|
|
629
669
|
coalesceMs: number;
|
|
630
670
|
logger: Logger;
|
|
631
671
|
isDestroyed: () => boolean;
|
|
632
|
-
onRenewing?: () => void;
|
|
633
|
-
onRenewed?: (expiresAt: number) => void;
|
|
672
|
+
onRenewing?: (reason: RefreshReason) => void;
|
|
673
|
+
onRenewed?: (expiresAt: number, reason: RefreshReason) => void;
|
|
634
674
|
onFatal?: (message: string) => void;
|
|
635
675
|
};
|
|
636
676
|
/**
|
|
@@ -640,6 +680,7 @@ type RefreshManagerOptions = {
|
|
|
640
680
|
declare class RefreshManager {
|
|
641
681
|
private readonly options;
|
|
642
682
|
private timer;
|
|
683
|
+
private intervalTimer;
|
|
643
684
|
private coalesceTimer;
|
|
644
685
|
private inFlight;
|
|
645
686
|
private consecutiveFailures;
|
|
@@ -650,6 +691,8 @@ declare class RefreshManager {
|
|
|
650
691
|
requestRenew(reason?: RefreshReason): void;
|
|
651
692
|
stop(): void;
|
|
652
693
|
private schedule;
|
|
694
|
+
/** Rotate the token on a fixed cadence. The loader reads the store live. */
|
|
695
|
+
private armInterval;
|
|
653
696
|
private renew;
|
|
654
697
|
}
|
|
655
698
|
|
|
@@ -716,6 +759,7 @@ type HlsModuleLike = object;
|
|
|
716
759
|
declare const KEY_PROXY_MAX_FAILURES = 2;
|
|
717
760
|
type AuthParamsLoaderOptions = {
|
|
718
761
|
videoId?: string;
|
|
762
|
+
mediaProxyUrlBuilder?: StreamingConfig["mediaProxyUrlBuilder"];
|
|
719
763
|
keyProxyUrlBuilder?: StreamingConfig["keyProxyUrlBuilder"];
|
|
720
764
|
getKeyAccessToken?: StreamingConfig["getKeyAccessToken"];
|
|
721
765
|
/** Override max BFF key failures before permanent browser fallback (default 2). */
|
|
@@ -737,6 +781,13 @@ declare function rewriteHlsRequestUrl(rawUrl: string, store: AuthParamsStore, op
|
|
|
737
781
|
*/
|
|
738
782
|
declare function createAuthParamsLoader(HlsModule: HlsModuleLike, store: AuthParamsStore, options?: AuthParamsLoaderOptions): HlsLoaderConstructor;
|
|
739
783
|
|
|
784
|
+
/**
|
|
785
|
+
* True for legacy `/hls-web-live/` playlists and current `/live/` playlists.
|
|
786
|
+
* A same-origin proxy URL is live when its `url` query points at one of those paths.
|
|
787
|
+
*/
|
|
788
|
+
declare function isLivePlaylistUrl(value: string): boolean;
|
|
789
|
+
declare function isSameOriginHttpUrl(value: string, baseOrigin: string): boolean;
|
|
790
|
+
|
|
740
791
|
declare function redactValue(key: string, value: unknown, seen?: WeakSet<object>, depth?: number): unknown;
|
|
741
792
|
/**
|
|
742
793
|
* Redacts sensitive fields. Cycle-safe and depth-capped.
|
|
@@ -744,4 +795,4 @@ declare function redactValue(key: string, value: unknown, seen?: WeakSet<object>
|
|
|
744
795
|
*/
|
|
745
796
|
declare function redactObject(obj: Record<string, unknown>, seen?: WeakSet<object>, depth?: number): Record<string, unknown>;
|
|
746
797
|
|
|
747
|
-
export { type AccessibilityConfig, type AnalyticsConfig, type AuthConfig, AuthManager, AuthParamsStore, type AuthToken, type AuthTokenProviderContext, type BufferedRange, type ControlsConfig, type CreateVideoPlayerOptions, DEFAULT_CONTROLS, DEFAULT_LIVE_EDGE_TOLERANCE_SECONDS, DEFAULT_PLAYER_BEHAVIOR, DEFAULT_PLAYER_CONFIG, DEFAULT_THEME, DEFAULT_WATERMARK, type DebugConfig, EventEmitter, type HlsLoaderConstructor, type HlsModuleLike, type HlsQualityLevel, type HlsSupportMode, KEY_PROXY_MAX_FAILURES, type LiveMediaSnapshot, type LoggingConfig, PACKAGE_VERSION, PLAYBACK_RATES, type PlayIconPreset, type PlaybackCredentialConfig, type PlaybackRate, type PlaybackSource, type PlaybackSourceContext, PlaybackSourceManager, type PlayerAudioTrack, type PlayerBehaviorConfig, type PlayerConfig, type PlayerDiagnostics, type PlayerError, PlayerErrorCode, type PlayerEventMap, type PlayerSkipSeconds, type PlayerState, type PlayerTextTrack, type PlayerZoomLevel, type QualitySelection, RefreshManager, SECRET_SCAN_MAX_DEPTH, type SeekToLiveResult, type StreamingConfig, type TextTrackSelection, type ThemeConfig, type VideoPlayer, type WatermarkConfig, assertNoSecretsInConfig, createAuthParamsLoader, createPlayerError, createVideoPlayer, getLiveEdgeTime, isAtLiveEdge, isEncryptionKeyUrl, isPlainObject, mergePlayerConfig, redactObject, redactSensitive, redactValue, resolveBuiltinHlsLoader, rewriteHlsRequestUrl, seekToLiveEdge, themeToCssVars };
|
|
798
|
+
export { type AccessibilityConfig, type AnalyticsConfig, type AuthConfig, AuthManager, AuthParamsStore, type AuthToken, type AuthTokenProviderContext, type BufferedRange, type ControlsConfig, type CreateVideoPlayerOptions, DEFAULT_CONTROLS, DEFAULT_LIVE_EDGE_TOLERANCE_SECONDS, DEFAULT_PLAYBACK_REFRESH_INTERVAL_MS, DEFAULT_PLAYER_BEHAVIOR, DEFAULT_PLAYER_CONFIG, DEFAULT_THEME, DEFAULT_WATERMARK, type DebugConfig, EventEmitter, type HlsLoaderConstructor, type HlsModuleLike, type HlsQualityLevel, type HlsSupportMode, KEY_PROXY_MAX_FAILURES, type LiveMediaSnapshot, type LoggingConfig, PACKAGE_VERSION, PLAYBACK_RATES, type PlayIconPreset, type PlaybackCredentialConfig, type PlaybackRate, type PlaybackSource, type PlaybackSourceContext, PlaybackSourceManager, type PlayerAudioTrack, type PlayerBehaviorConfig, type PlayerConfig, type PlayerDiagnostics, type PlayerError, PlayerErrorCode, type PlayerEventMap, type PlayerSkipSeconds, type PlayerState, type PlayerTextTrack, type PlayerZoomLevel, type QualitySelection, RefreshManager, SECRET_SCAN_MAX_DEPTH, type SeekToLiveResult, type StreamingConfig, type TextTrackSelection, type ThemeConfig, type VideoPlayer, type WatermarkConfig, assertNoSecretsInConfig, createAuthParamsLoader, createPlayerError, createVideoPlayer, getLiveEdgeTime, isAtLiveEdge, isEncryptionKeyUrl, isLivePlaylistUrl, isPlainObject, isSameOriginHttpUrl, mergePlayerConfig, redactObject, redactSensitive, redactValue, resolveBuiltinHlsLoader, rewriteHlsRequestUrl, seekToLiveEdge, themeToCssVars };
|