hls.js 1.5.14-0.canary.10536 → 1.5.14-0.canary.10541
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/hls.d.mts +3179 -0
- package/dist/hls.d.ts +3179 -0
- package/dist/hls.js +2 -2
- package/dist/hls.light.js +2 -2
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.mjs +2 -2
- package/dist/hls.min.js +1 -1
- package/dist/hls.mjs +2 -2
- package/dist/hls.worker.js +1 -1
- package/package.json +7 -7
package/dist/hls.d.mts
ADDED
@@ -0,0 +1,3179 @@
|
|
1
|
+
export declare interface AbrComponentAPI extends ComponentAPI {
|
2
|
+
firstAutoLevel: number;
|
3
|
+
forcedAutoLevel: number;
|
4
|
+
nextAutoLevel: number;
|
5
|
+
readonly bwEstimator?: EwmaBandWidthEstimator;
|
6
|
+
resetEstimator(abrEwmaDefaultEstimate: number): any;
|
7
|
+
}
|
8
|
+
|
9
|
+
export declare class AbrController extends Logger implements AbrComponentAPI {
|
10
|
+
protected hls: Hls;
|
11
|
+
private lastLevelLoadSec;
|
12
|
+
private lastLoadedFragLevel;
|
13
|
+
private firstSelection;
|
14
|
+
private _nextAutoLevel;
|
15
|
+
private nextAutoLevelKey;
|
16
|
+
private audioTracksByGroup;
|
17
|
+
private codecTiers;
|
18
|
+
private timer;
|
19
|
+
private fragCurrent;
|
20
|
+
private partCurrent;
|
21
|
+
private bitrateTestDelay;
|
22
|
+
bwEstimator: EwmaBandWidthEstimator;
|
23
|
+
constructor(hls: Hls);
|
24
|
+
resetEstimator(abrEwmaDefaultEstimate?: number): void;
|
25
|
+
private initEstimator;
|
26
|
+
protected registerListeners(): void;
|
27
|
+
protected unregisterListeners(): void;
|
28
|
+
destroy(): void;
|
29
|
+
protected onManifestLoading(event: Events.MANIFEST_LOADING, data: ManifestLoadingData): void;
|
30
|
+
private onLevelsUpdated;
|
31
|
+
private onMaxAutoLevelUpdated;
|
32
|
+
protected onFragLoading(event: Events.FRAG_LOADING, data: FragLoadingData): void;
|
33
|
+
protected onLevelSwitching(event: Events.LEVEL_SWITCHING, data: LevelSwitchingData): void;
|
34
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
35
|
+
private getTimeToLoadFrag;
|
36
|
+
protected onLevelLoaded(event: Events.LEVEL_LOADED, data: LevelLoadedData): void;
|
37
|
+
private _abandonRulesCheck;
|
38
|
+
protected onFragLoaded(event: Events.FRAG_LOADED, { frag, part }: FragLoadedData): void;
|
39
|
+
protected onFragBuffered(event: Events.FRAG_BUFFERED, data: FragBufferedData): void;
|
40
|
+
private ignoreFragment;
|
41
|
+
clearTimer(): void;
|
42
|
+
get firstAutoLevel(): number;
|
43
|
+
get forcedAutoLevel(): number;
|
44
|
+
get nextAutoLevel(): number;
|
45
|
+
private getAutoLevelKey;
|
46
|
+
private getNextABRAutoLevel;
|
47
|
+
private getStarvationDelay;
|
48
|
+
private getBwEstimate;
|
49
|
+
private findBestLevel;
|
50
|
+
set nextAutoLevel(nextLevel: number);
|
51
|
+
}
|
52
|
+
|
53
|
+
export declare type ABRControllerConfig = {
|
54
|
+
abrEwmaFastLive: number;
|
55
|
+
abrEwmaSlowLive: number;
|
56
|
+
abrEwmaFastVoD: number;
|
57
|
+
abrEwmaSlowVoD: number;
|
58
|
+
/**
|
59
|
+
* Default bandwidth estimate in bits/s prior to collecting fragment bandwidth samples
|
60
|
+
*/
|
61
|
+
abrEwmaDefaultEstimate: number;
|
62
|
+
abrEwmaDefaultEstimateMax: number;
|
63
|
+
abrBandWidthFactor: number;
|
64
|
+
abrBandWidthUpFactor: number;
|
65
|
+
abrMaxWithRealBitrate: boolean;
|
66
|
+
maxStarvationDelay: number;
|
67
|
+
maxLoadingDelay: number;
|
68
|
+
};
|
69
|
+
|
70
|
+
export declare class AttrList {
|
71
|
+
[key: string]: any;
|
72
|
+
constructor(attrs: string | Record<string, any>, parsed?: Pick<ParsedMultivariantPlaylist | LevelDetails, 'variableList' | 'hasVariableRefs' | 'playlistParsingError'>);
|
73
|
+
get clientAttrs(): string[];
|
74
|
+
decimalInteger(attrName: string): number;
|
75
|
+
hexadecimalInteger(attrName: string): Uint8Array | null;
|
76
|
+
hexadecimalIntegerAsNumber(attrName: string): number;
|
77
|
+
decimalFloatingPoint(attrName: string): number;
|
78
|
+
optionalFloat(attrName: string, defaultValue: number): number;
|
79
|
+
enumeratedString(attrName: string): string | undefined;
|
80
|
+
enumeratedStringList<T extends {
|
81
|
+
[key: string]: boolean;
|
82
|
+
}>(attrName: string, dict: T): {
|
83
|
+
[key in keyof T]: boolean;
|
84
|
+
};
|
85
|
+
bool(attrName: string): boolean;
|
86
|
+
decimalResolution(attrName: string): {
|
87
|
+
width: number;
|
88
|
+
height: number;
|
89
|
+
} | undefined;
|
90
|
+
static parseAttrList(input: string, parsed?: Pick<ParsedMultivariantPlaylist | LevelDetails, 'variableList' | 'hasVariableRefs' | 'playlistParsingError'>): Record<string, string>;
|
91
|
+
}
|
92
|
+
|
93
|
+
export declare type AudioPlaylistType = 'AUDIO';
|
94
|
+
|
95
|
+
export declare type AudioSelectionOption = {
|
96
|
+
lang?: string;
|
97
|
+
assocLang?: string;
|
98
|
+
characteristics?: string;
|
99
|
+
channels?: string;
|
100
|
+
name?: string;
|
101
|
+
audioCodec?: string;
|
102
|
+
groupId?: string;
|
103
|
+
default?: boolean;
|
104
|
+
};
|
105
|
+
|
106
|
+
export declare class AudioStreamController extends BaseStreamController implements NetworkComponentAPI {
|
107
|
+
private videoAnchor;
|
108
|
+
private mainFragLoading;
|
109
|
+
private bufferedTrack;
|
110
|
+
private switchingTrack;
|
111
|
+
private trackId;
|
112
|
+
private waitingData;
|
113
|
+
private mainDetails;
|
114
|
+
private flushing;
|
115
|
+
private bufferFlushed;
|
116
|
+
private cachedTrackLoadedData;
|
117
|
+
constructor(hls: Hls, fragmentTracker: FragmentTracker, keyLoader: KeyLoader);
|
118
|
+
protected onHandlerDestroying(): void;
|
119
|
+
protected registerListeners(): void;
|
120
|
+
protected unregisterListeners(): void;
|
121
|
+
onInitPtsFound(event: Events.INIT_PTS_FOUND, { frag, id, initPTS, timescale }: InitPTSFoundData): void;
|
122
|
+
private findSyncFrag;
|
123
|
+
startLoad(startPosition: number): void;
|
124
|
+
doTick(): void;
|
125
|
+
clearWaitingFragment(): void;
|
126
|
+
protected resetLoadingState(): void;
|
127
|
+
protected onTickEnd(): void;
|
128
|
+
private doTickIdle;
|
129
|
+
protected onMediaDetaching(): void;
|
130
|
+
private onAudioTracksUpdated;
|
131
|
+
private onAudioTrackSwitching;
|
132
|
+
protected onManifestLoading(): void;
|
133
|
+
private onLevelLoaded;
|
134
|
+
private onAudioTrackLoaded;
|
135
|
+
_handleFragmentLoadProgress(data: FragLoadedData): void;
|
136
|
+
protected _handleFragmentLoadComplete(fragLoadedData: FragLoadedData): void;
|
137
|
+
private onBufferReset;
|
138
|
+
private onBufferCreated;
|
139
|
+
private onFragLoading;
|
140
|
+
private onFragBuffered;
|
141
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
142
|
+
private onBufferFlushing;
|
143
|
+
private onBufferFlushed;
|
144
|
+
private _handleTransmuxComplete;
|
145
|
+
private _bufferInitSegment;
|
146
|
+
protected loadFragment(frag: Fragment, track: Level, targetBufferTime: number): void;
|
147
|
+
private flushAudioIfNeeded;
|
148
|
+
private completeAudioSwitch;
|
149
|
+
}
|
150
|
+
|
151
|
+
export declare class AudioTrackController extends BasePlaylistController {
|
152
|
+
private tracks;
|
153
|
+
private groupIds;
|
154
|
+
private tracksInGroup;
|
155
|
+
private trackId;
|
156
|
+
private currentTrack;
|
157
|
+
private selectDefaultTrack;
|
158
|
+
constructor(hls: Hls);
|
159
|
+
private registerListeners;
|
160
|
+
private unregisterListeners;
|
161
|
+
destroy(): void;
|
162
|
+
protected onManifestLoading(): void;
|
163
|
+
protected onManifestParsed(event: Events.MANIFEST_PARSED, data: ManifestParsedData): void;
|
164
|
+
protected onAudioTrackLoaded(event: Events.AUDIO_TRACK_LOADED, data: AudioTrackLoadedData): void;
|
165
|
+
protected onLevelLoading(event: Events.LEVEL_LOADING, data: LevelLoadingData): void;
|
166
|
+
protected onLevelSwitching(event: Events.LEVEL_SWITCHING, data: LevelSwitchingData): void;
|
167
|
+
private switchLevel;
|
168
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
169
|
+
get allAudioTracks(): MediaPlaylist[];
|
170
|
+
get audioTracks(): MediaPlaylist[];
|
171
|
+
get audioTrack(): number;
|
172
|
+
set audioTrack(newId: number);
|
173
|
+
setAudioOption(audioOption: MediaPlaylist | AudioSelectionOption | undefined): MediaPlaylist | null;
|
174
|
+
private setAudioTrack;
|
175
|
+
private findTrackId;
|
176
|
+
protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void;
|
177
|
+
}
|
178
|
+
|
179
|
+
export declare interface AudioTrackLoadedData extends TrackLoadedData {
|
180
|
+
}
|
181
|
+
|
182
|
+
export declare interface AudioTracksUpdatedData {
|
183
|
+
audioTracks: MediaPlaylist[];
|
184
|
+
}
|
185
|
+
|
186
|
+
export declare interface AudioTrackSwitchedData extends MediaPlaylist {
|
187
|
+
}
|
188
|
+
|
189
|
+
export declare interface AudioTrackSwitchingData extends MediaPlaylist {
|
190
|
+
}
|
191
|
+
|
192
|
+
export declare interface BackBufferData {
|
193
|
+
bufferEnd: number;
|
194
|
+
}
|
195
|
+
|
196
|
+
export declare class BasePlaylistController extends Logger implements NetworkComponentAPI {
|
197
|
+
protected hls: Hls;
|
198
|
+
protected timer: number;
|
199
|
+
protected requestScheduled: number;
|
200
|
+
protected canLoad: boolean;
|
201
|
+
constructor(hls: Hls, logPrefix: string);
|
202
|
+
destroy(): void;
|
203
|
+
protected clearTimer(): void;
|
204
|
+
startLoad(): void;
|
205
|
+
stopLoad(): void;
|
206
|
+
protected switchParams(playlistUri: string, previous: LevelDetails | undefined, current: LevelDetails | undefined): HlsUrlParameters | undefined;
|
207
|
+
protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void;
|
208
|
+
protected shouldLoadPlaylist(playlist: Level | MediaPlaylist | null | undefined): boolean;
|
209
|
+
protected shouldReloadPlaylist(playlist: Level | MediaPlaylist | null | undefined): boolean;
|
210
|
+
protected playlistLoaded(index: number, data: LevelLoadedData | AudioTrackLoadedData | TrackLoadedData, previousDetails?: LevelDetails): void;
|
211
|
+
private getDeliveryDirectives;
|
212
|
+
protected checkRetry(errorEvent: ErrorData): boolean;
|
213
|
+
}
|
214
|
+
|
215
|
+
export declare class BaseSegment {
|
216
|
+
private _byteRange;
|
217
|
+
private _url;
|
218
|
+
readonly baseurl: string;
|
219
|
+
relurl?: string;
|
220
|
+
elementaryStreams: ElementaryStreams;
|
221
|
+
constructor(baseurl: string);
|
222
|
+
setByteRange(value: string, previous?: BaseSegment): void;
|
223
|
+
get byteRange(): [number, number] | [];
|
224
|
+
get byteRangeStartOffset(): number | undefined;
|
225
|
+
get byteRangeEndOffset(): number | undefined;
|
226
|
+
get url(): string;
|
227
|
+
set url(value: string);
|
228
|
+
}
|
229
|
+
|
230
|
+
export declare class BaseStreamController extends TaskLoop implements NetworkComponentAPI {
|
231
|
+
protected hls: Hls;
|
232
|
+
protected fragPrevious: MediaFragment | null;
|
233
|
+
protected fragCurrent: Fragment | null;
|
234
|
+
protected fragmentTracker: FragmentTracker;
|
235
|
+
protected transmuxer: TransmuxerInterface | null;
|
236
|
+
protected _state: string;
|
237
|
+
protected playlistType: PlaylistLevelType;
|
238
|
+
protected media: HTMLMediaElement | null;
|
239
|
+
protected mediaBuffer: Bufferable | null;
|
240
|
+
protected config: HlsConfig;
|
241
|
+
protected bitrateTest: boolean;
|
242
|
+
protected lastCurrentTime: number;
|
243
|
+
protected nextLoadPosition: number;
|
244
|
+
protected startPosition: number;
|
245
|
+
protected startTimeOffset: number | null;
|
246
|
+
protected loadedmetadata: boolean;
|
247
|
+
protected retryDate: number;
|
248
|
+
protected levels: Array<Level> | null;
|
249
|
+
protected fragmentLoader: FragmentLoader;
|
250
|
+
protected keyLoader: KeyLoader;
|
251
|
+
protected levelLastLoaded: Level | null;
|
252
|
+
protected startFragRequested: boolean;
|
253
|
+
protected decrypter: Decrypter;
|
254
|
+
protected initPTS: RationalTimestamp[];
|
255
|
+
protected buffering: boolean;
|
256
|
+
protected loadingParts: boolean;
|
257
|
+
private loopSn?;
|
258
|
+
constructor(hls: Hls, fragmentTracker: FragmentTracker, keyLoader: KeyLoader, logPrefix: string, playlistType: PlaylistLevelType);
|
259
|
+
protected registerListeners(): void;
|
260
|
+
protected unregisterListeners(): void;
|
261
|
+
protected doTick(): void;
|
262
|
+
protected onTickEnd(): void;
|
263
|
+
startLoad(startPosition: number): void;
|
264
|
+
stopLoad(): void;
|
265
|
+
pauseBuffering(): void;
|
266
|
+
resumeBuffering(): void;
|
267
|
+
protected _streamEnded(bufferInfo: BufferInfo, levelDetails: LevelDetails): boolean;
|
268
|
+
protected getLevelDetails(): LevelDetails | undefined;
|
269
|
+
protected onMediaAttached(event: Events.MEDIA_ATTACHED, data: MediaAttachedData): void;
|
270
|
+
protected onMediaDetaching(): void;
|
271
|
+
protected onManifestLoading(): void;
|
272
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
273
|
+
protected onMediaSeeking: () => void;
|
274
|
+
protected onMediaEnded: () => void;
|
275
|
+
protected onManifestLoaded(event: Events.MANIFEST_LOADED, data: ManifestLoadedData): void;
|
276
|
+
protected onHandlerDestroying(): void;
|
277
|
+
protected onHandlerDestroyed(): void;
|
278
|
+
protected loadFragment(frag: Fragment, level: Level, targetBufferTime: number): void;
|
279
|
+
private _loadFragForPlayback;
|
280
|
+
protected clearTrackerIfNeeded(frag: Fragment): void;
|
281
|
+
protected checkLiveUpdate(details: LevelDetails): void;
|
282
|
+
protected flushMainBuffer(startOffset: number, endOffset: number, type?: SourceBufferName | null): void;
|
283
|
+
protected _loadInitSegment(frag: Fragment, level: Level): void;
|
284
|
+
private completeInitSegmentLoad;
|
285
|
+
protected fragContextChanged(frag: Fragment | null): boolean;
|
286
|
+
protected fragBufferedComplete(frag: Fragment, part: Part | null): void;
|
287
|
+
protected seekToStartPos(): void;
|
288
|
+
protected _handleFragmentLoadComplete(fragLoadedEndData: PartsLoadedData): void;
|
289
|
+
protected _handleFragmentLoadProgress(frag: PartsLoadedData | FragLoadedData): void;
|
290
|
+
protected _doFragLoad(frag: Fragment, level: Level, targetBufferTime?: number | null, progressCallback?: FragmentLoadProgressCallback): Promise<PartsLoadedData | FragLoadedData | null>;
|
291
|
+
private doFragPartsLoad;
|
292
|
+
private handleFragLoadError;
|
293
|
+
protected _handleTransmuxerFlush(chunkMeta: ChunkMetadata): void;
|
294
|
+
private shouldLoadParts;
|
295
|
+
protected getCurrentContext(chunkMeta: ChunkMetadata): {
|
296
|
+
frag: MediaFragment;
|
297
|
+
part: Part | null;
|
298
|
+
level: Level;
|
299
|
+
} | null;
|
300
|
+
protected bufferFragmentData(data: RemuxedTrack, frag: Fragment, part: Part | null, chunkMeta: ChunkMetadata, noBacktracking?: boolean): void;
|
301
|
+
protected flushBufferGap(frag: Fragment): void;
|
302
|
+
protected getFwdBufferInfo(bufferable: Bufferable | null, type: PlaylistLevelType): BufferInfo | null;
|
303
|
+
private getFwdBufferInfoAtPos;
|
304
|
+
protected getMaxBufferLength(levelBitrate?: number): number;
|
305
|
+
protected reduceMaxBufferLength(threshold: number, fragDuration: number): boolean;
|
306
|
+
protected getAppendedFrag(position: number, playlistType?: PlaylistLevelType): Fragment | null;
|
307
|
+
protected getNextFragment(pos: number, levelDetails: LevelDetails): Fragment | null;
|
308
|
+
protected isLoopLoading(frag: Fragment, targetBufferTime: number): boolean;
|
309
|
+
protected getNextFragmentLoopLoading(frag: Fragment, levelDetails: LevelDetails, bufferInfo: BufferInfo, playlistType: PlaylistLevelType, maxBufLen: number): Fragment | null;
|
310
|
+
mapToInitFragWhenRequired(frag: Fragment | null): typeof frag;
|
311
|
+
getNextPart(partList: Part[], frag: Fragment, targetBufferTime: number): number;
|
312
|
+
private loadedEndOfParts;
|
313
|
+
protected getInitialLiveFragment(levelDetails: LevelDetails, fragments: MediaFragment[]): MediaFragment | null;
|
314
|
+
protected getFragmentAtPosition(bufferEnd: number, end: number, levelDetails: LevelDetails): MediaFragment | null;
|
315
|
+
protected synchronizeToLiveEdge(levelDetails: LevelDetails): void;
|
316
|
+
protected alignPlaylists(details: LevelDetails, previousDetails: LevelDetails | undefined, switchDetails: LevelDetails | undefined): number;
|
317
|
+
protected waitForCdnTuneIn(details: LevelDetails): boolean | 0;
|
318
|
+
protected setStartPosition(details: LevelDetails, sliding: number): void;
|
319
|
+
protected getLoadPosition(): number;
|
320
|
+
private handleFragLoadAborted;
|
321
|
+
protected resetFragmentLoading(frag: Fragment): void;
|
322
|
+
protected onFragmentOrKeyLoadError(filterType: PlaylistLevelType, data: ErrorData): void;
|
323
|
+
protected reduceLengthAndFlushBuffer(data: ErrorData): boolean;
|
324
|
+
protected resetFragmentErrors(filterType: PlaylistLevelType): void;
|
325
|
+
protected afterBufferFlushed(media: Bufferable, bufferType: SourceBufferName, playlistType: PlaylistLevelType): void;
|
326
|
+
protected resetLoadingState(): void;
|
327
|
+
protected resetStartWhenNotLoaded(level: Level | null): void;
|
328
|
+
protected resetWhenMissingContext(chunkMeta: ChunkMetadata): void;
|
329
|
+
protected removeUnbufferedFrags(start?: number): void;
|
330
|
+
private updateLevelTiming;
|
331
|
+
private playlistLabel;
|
332
|
+
private fragInfo;
|
333
|
+
protected resetTransmuxer(): void;
|
334
|
+
protected recoverWorkerError(data: ErrorData): void;
|
335
|
+
set state(nextState: string);
|
336
|
+
get state(): string;
|
337
|
+
}
|
338
|
+
|
339
|
+
declare type Bufferable = {
|
340
|
+
buffered: TimeRanges;
|
341
|
+
};
|
342
|
+
|
343
|
+
export declare interface BufferAppendedData {
|
344
|
+
type: SourceBufferName;
|
345
|
+
frag: Fragment;
|
346
|
+
part: Part | null;
|
347
|
+
chunkMeta: ChunkMetadata;
|
348
|
+
parent: PlaylistLevelType;
|
349
|
+
timeRanges: Partial<Record<SourceBufferName, TimeRanges>>;
|
350
|
+
}
|
351
|
+
|
352
|
+
export declare interface BufferAppendingData {
|
353
|
+
type: SourceBufferName;
|
354
|
+
frag: Fragment;
|
355
|
+
part: Part | null;
|
356
|
+
chunkMeta: ChunkMetadata;
|
357
|
+
parent: PlaylistLevelType;
|
358
|
+
data: Uint8Array;
|
359
|
+
}
|
360
|
+
|
361
|
+
export declare interface BufferCodecsData {
|
362
|
+
video?: Track;
|
363
|
+
audio?: Track;
|
364
|
+
}
|
365
|
+
|
366
|
+
export declare class BufferController extends Logger implements ComponentAPI {
|
367
|
+
private details;
|
368
|
+
private _objectUrl;
|
369
|
+
private operationQueue;
|
370
|
+
private listeners;
|
371
|
+
private hls;
|
372
|
+
private fragmentTracker;
|
373
|
+
bufferCodecEventsExpected: number;
|
374
|
+
private _bufferCodecEventsTotal;
|
375
|
+
media: HTMLMediaElement | null;
|
376
|
+
mediaSource: MediaSource | null;
|
377
|
+
private lastMpegAudioChunk;
|
378
|
+
private blockedAudioAppend;
|
379
|
+
private lastVideoAppendEnd;
|
380
|
+
private appendSource;
|
381
|
+
appendErrors: {
|
382
|
+
audio: number;
|
383
|
+
video: number;
|
384
|
+
audiovideo: number;
|
385
|
+
};
|
386
|
+
tracks: TrackSet;
|
387
|
+
pendingTracks: TrackSet;
|
388
|
+
sourceBuffer: SourceBuffers;
|
389
|
+
constructor(hls: Hls, fragmentTracker: FragmentTracker);
|
390
|
+
hasSourceTypes(): boolean;
|
391
|
+
destroy(): void;
|
392
|
+
protected registerListeners(): void;
|
393
|
+
protected unregisterListeners(): void;
|
394
|
+
private _initSourceBuffer;
|
395
|
+
private onManifestLoading;
|
396
|
+
protected onManifestParsed(event: Events.MANIFEST_PARSED, data: ManifestParsedData): void;
|
397
|
+
protected onMediaAttaching(event: Events.MEDIA_ATTACHING, data: MediaAttachingData): void;
|
398
|
+
private _onEndStreaming;
|
399
|
+
private _onStartStreaming;
|
400
|
+
protected onMediaDetaching(): void;
|
401
|
+
protected onBufferReset(): void;
|
402
|
+
private resetBuffer;
|
403
|
+
protected onBufferCodecs(event: Events.BUFFER_CODECS, data: BufferCodecsData): void;
|
404
|
+
protected appendChangeType(type: SourceBufferName, mimeType: string): void;
|
405
|
+
private blockAudio;
|
406
|
+
private unblockAudio;
|
407
|
+
protected onBufferAppending(event: Events.BUFFER_APPENDING, eventData: BufferAppendingData): void;
|
408
|
+
private getFlushOp;
|
409
|
+
protected onBufferFlushing(event: Events.BUFFER_FLUSHING, data: BufferFlushingData): void;
|
410
|
+
protected onFragParsed(event: Events.FRAG_PARSED, data: FragParsedData): void;
|
411
|
+
private onFragChanged;
|
412
|
+
protected onBufferEos(event: Events.BUFFER_EOS, data: BufferEOSData): void;
|
413
|
+
protected onLevelUpdated(event: Events.LEVEL_UPDATED, { details }: LevelUpdatedData): void;
|
414
|
+
private onError;
|
415
|
+
private resetAppendErrors;
|
416
|
+
trimBuffers(): void;
|
417
|
+
flushBackBuffer(currentTime: number, targetDuration: number, targetBackBufferPosition: number): void;
|
418
|
+
flushFrontBuffer(currentTime: number, targetDuration: number, targetFrontBufferPosition: number): void;
|
419
|
+
/**
|
420
|
+
* Update Media Source duration to current level duration or override to Infinity if configuration parameter
|
421
|
+
* 'liveDurationInfinity` is set to `true`
|
422
|
+
* More details: https://github.com/video-dev/hls.js/issues/355
|
423
|
+
*/
|
424
|
+
private getDurationAndRange;
|
425
|
+
private updateMediaSource;
|
426
|
+
protected checkPendingTracks(): void;
|
427
|
+
protected createSourceBuffers(tracks: TrackSet): void;
|
428
|
+
private _onMediaSourceOpen;
|
429
|
+
private _onMediaSourceClose;
|
430
|
+
private _onMediaSourceEnded;
|
431
|
+
private _onMediaEmptied;
|
432
|
+
private get mediaSrc();
|
433
|
+
private _onSBUpdateStart;
|
434
|
+
private _onSBUpdateEnd;
|
435
|
+
private _onSBUpdateError;
|
436
|
+
private removeExecutor;
|
437
|
+
private appendExecutor;
|
438
|
+
private blockBuffers;
|
439
|
+
private getSourceBufferTypes;
|
440
|
+
private addBufferListener;
|
441
|
+
private removeBufferListeners;
|
442
|
+
}
|
443
|
+
|
444
|
+
export declare type BufferControllerConfig = {
|
445
|
+
appendErrorMaxRetry: number;
|
446
|
+
backBufferLength: number;
|
447
|
+
frontBufferFlushThreshold: number;
|
448
|
+
liveDurationInfinity: boolean;
|
449
|
+
/**
|
450
|
+
* @deprecated use backBufferLength
|
451
|
+
*/
|
452
|
+
liveBackBufferLength: number | null;
|
453
|
+
};
|
454
|
+
|
455
|
+
export declare interface BufferCreatedData {
|
456
|
+
tracks: TrackSet;
|
457
|
+
}
|
458
|
+
|
459
|
+
export declare interface BufferEOSData {
|
460
|
+
type?: SourceBufferName;
|
461
|
+
}
|
462
|
+
|
463
|
+
export declare interface BufferFlushedData {
|
464
|
+
type: SourceBufferName;
|
465
|
+
}
|
466
|
+
|
467
|
+
export declare interface BufferFlushingData {
|
468
|
+
startOffset: number;
|
469
|
+
endOffset: number;
|
470
|
+
endOffsetSubtitles?: number;
|
471
|
+
type: SourceBufferName | null;
|
472
|
+
}
|
473
|
+
|
474
|
+
export declare type BufferInfo = {
|
475
|
+
len: number;
|
476
|
+
start: number;
|
477
|
+
end: number;
|
478
|
+
nextStart?: number;
|
479
|
+
};
|
480
|
+
|
481
|
+
export declare class CapLevelController implements ComponentAPI {
|
482
|
+
private hls;
|
483
|
+
private autoLevelCapping;
|
484
|
+
private firstLevel;
|
485
|
+
private media;
|
486
|
+
private restrictedLevels;
|
487
|
+
private timer;
|
488
|
+
private clientRect;
|
489
|
+
private streamController?;
|
490
|
+
constructor(hls: Hls);
|
491
|
+
setStreamController(streamController: StreamController): void;
|
492
|
+
destroy(): void;
|
493
|
+
protected registerListeners(): void;
|
494
|
+
protected unregisterListener(): void;
|
495
|
+
protected onFpsDropLevelCapping(event: Events.FPS_DROP_LEVEL_CAPPING, data: FPSDropLevelCappingData): void;
|
496
|
+
protected onMediaAttaching(event: Events.MEDIA_ATTACHING, data: MediaAttachingData): void;
|
497
|
+
protected onManifestParsed(event: Events.MANIFEST_PARSED, data: ManifestParsedData): void;
|
498
|
+
private onLevelsUpdated;
|
499
|
+
protected onBufferCodecs(event: Events.BUFFER_CODECS, data: BufferCodecsData): void;
|
500
|
+
protected onMediaDetaching(): void;
|
501
|
+
detectPlayerSize(): void;
|
502
|
+
getMaxLevel(capLevelIndex: number): number;
|
503
|
+
startCapping(): void;
|
504
|
+
stopCapping(): void;
|
505
|
+
getDimensions(): {
|
506
|
+
width: number;
|
507
|
+
height: number;
|
508
|
+
};
|
509
|
+
get mediaWidth(): number;
|
510
|
+
get mediaHeight(): number;
|
511
|
+
get contentScaleFactor(): number;
|
512
|
+
private isLevelAllowed;
|
513
|
+
static getMaxLevelByMediaSize(levels: Array<Level>, width: number, height: number): number;
|
514
|
+
}
|
515
|
+
|
516
|
+
export declare type CapLevelControllerConfig = {
|
517
|
+
capLevelToPlayerSize: boolean;
|
518
|
+
};
|
519
|
+
|
520
|
+
/**
|
521
|
+
* Keep a CEA-608 screen of 32x15 styled characters
|
522
|
+
* @constructor
|
523
|
+
*/
|
524
|
+
declare class CaptionScreen {
|
525
|
+
rows: Row[];
|
526
|
+
currRow: number;
|
527
|
+
nrRollUpRows: number | null;
|
528
|
+
lastOutputScreen: CaptionScreen | null;
|
529
|
+
logger: CaptionsLogger;
|
530
|
+
constructor(logger: CaptionsLogger);
|
531
|
+
reset(): void;
|
532
|
+
equals(other: CaptionScreen): boolean;
|
533
|
+
copy(other: CaptionScreen): void;
|
534
|
+
isEmpty(): boolean;
|
535
|
+
backSpace(): void;
|
536
|
+
clearToEndOfRow(): void;
|
537
|
+
/**
|
538
|
+
* Insert a character (without styling) in the current row.
|
539
|
+
*/
|
540
|
+
insertChar(char: number): void;
|
541
|
+
setPen(styles: Partial<PenStyles>): void;
|
542
|
+
moveCursor(relPos: number): void;
|
543
|
+
setCursor(absPos: number): void;
|
544
|
+
setPAC(pacData: PACData): void;
|
545
|
+
/**
|
546
|
+
* Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).
|
547
|
+
*/
|
548
|
+
setBkgData(bkgData: Partial<PenStyles>): void;
|
549
|
+
setRollUpRows(nrRows: number | null): void;
|
550
|
+
rollUp(): void;
|
551
|
+
/**
|
552
|
+
* Get all non-empty rows with as unicode text.
|
553
|
+
*/
|
554
|
+
getDisplayText(asOneRow?: boolean): string;
|
555
|
+
getTextAndFormat(): Row[];
|
556
|
+
}
|
557
|
+
|
558
|
+
declare class CaptionsLogger {
|
559
|
+
time: number | null;
|
560
|
+
verboseLevel: VerboseLevel;
|
561
|
+
log(severity: VerboseLevel, msg: string | (() => string)): void;
|
562
|
+
}
|
563
|
+
|
564
|
+
export declare class ChunkMetadata {
|
565
|
+
readonly level: number;
|
566
|
+
readonly sn: number;
|
567
|
+
readonly part: number;
|
568
|
+
readonly id: number;
|
569
|
+
readonly size: number;
|
570
|
+
readonly partial: boolean;
|
571
|
+
readonly transmuxing: HlsChunkPerformanceTiming;
|
572
|
+
readonly buffering: {
|
573
|
+
[key in SourceBufferName]: HlsChunkPerformanceTiming;
|
574
|
+
};
|
575
|
+
constructor(level: number, sn: number, id: number, size?: number, part?: number, partial?: boolean);
|
576
|
+
}
|
577
|
+
|
578
|
+
/**
|
579
|
+
* Controller to deal with Common Media Client Data (CMCD)
|
580
|
+
* @see https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf
|
581
|
+
*/
|
582
|
+
export declare class CMCDController implements ComponentAPI {
|
583
|
+
private hls;
|
584
|
+
private config;
|
585
|
+
private media?;
|
586
|
+
private sid?;
|
587
|
+
private cid?;
|
588
|
+
private useHeaders;
|
589
|
+
private includeKeys?;
|
590
|
+
private initialized;
|
591
|
+
private starved;
|
592
|
+
private buffering;
|
593
|
+
private audioBuffer?;
|
594
|
+
private videoBuffer?;
|
595
|
+
constructor(hls: Hls);
|
596
|
+
private registerListeners;
|
597
|
+
private unregisterListeners;
|
598
|
+
destroy(): void;
|
599
|
+
private onMediaAttached;
|
600
|
+
private onMediaDetached;
|
601
|
+
private onBufferCreated;
|
602
|
+
private onWaiting;
|
603
|
+
private onPlaying;
|
604
|
+
/**
|
605
|
+
* Create baseline CMCD data
|
606
|
+
*/
|
607
|
+
private createData;
|
608
|
+
/**
|
609
|
+
* Apply CMCD data to a request.
|
610
|
+
*/
|
611
|
+
private apply;
|
612
|
+
/**
|
613
|
+
* Apply CMCD data to a manifest request.
|
614
|
+
*/
|
615
|
+
private applyPlaylistData;
|
616
|
+
/**
|
617
|
+
* Apply CMCD data to a segment request
|
618
|
+
*/
|
619
|
+
private applyFragmentData;
|
620
|
+
private getNextFrag;
|
621
|
+
private getNextPart;
|
622
|
+
/**
|
623
|
+
* The CMCD object type.
|
624
|
+
*/
|
625
|
+
private getObjectType;
|
626
|
+
/**
|
627
|
+
* Get the highest bitrate.
|
628
|
+
*/
|
629
|
+
private getTopBandwidth;
|
630
|
+
/**
|
631
|
+
* Get the buffer length for a media type in milliseconds
|
632
|
+
*/
|
633
|
+
private getBufferLength;
|
634
|
+
/**
|
635
|
+
* Create a playlist loader
|
636
|
+
*/
|
637
|
+
private createPlaylistLoader;
|
638
|
+
/**
|
639
|
+
* Create a playlist loader
|
640
|
+
*/
|
641
|
+
private createFragmentLoader;
|
642
|
+
}
|
643
|
+
|
644
|
+
export declare type CMCDControllerConfig = {
|
645
|
+
sessionId?: string;
|
646
|
+
contentId?: string;
|
647
|
+
useHeaders?: boolean;
|
648
|
+
includeKeys?: string[];
|
649
|
+
};
|
650
|
+
|
651
|
+
export declare interface ComponentAPI {
|
652
|
+
destroy(): void;
|
653
|
+
}
|
654
|
+
|
655
|
+
export declare class ContentSteeringController extends Logger implements NetworkComponentAPI {
|
656
|
+
private readonly hls;
|
657
|
+
private loader;
|
658
|
+
private uri;
|
659
|
+
private pathwayId;
|
660
|
+
private _pathwayPriority;
|
661
|
+
private timeToLoad;
|
662
|
+
private reloadTimer;
|
663
|
+
private updated;
|
664
|
+
private started;
|
665
|
+
private enabled;
|
666
|
+
private levels;
|
667
|
+
private audioTracks;
|
668
|
+
private subtitleTracks;
|
669
|
+
private penalizedPathways;
|
670
|
+
constructor(hls: Hls);
|
671
|
+
private registerListeners;
|
672
|
+
private unregisterListeners;
|
673
|
+
pathways(): string[];
|
674
|
+
get pathwayPriority(): string[] | null;
|
675
|
+
set pathwayPriority(pathwayPriority: string[]);
|
676
|
+
startLoad(): void;
|
677
|
+
stopLoad(): void;
|
678
|
+
clearTimeout(): void;
|
679
|
+
destroy(): void;
|
680
|
+
removeLevel(levelToRemove: Level): void;
|
681
|
+
private onManifestLoading;
|
682
|
+
private onManifestLoaded;
|
683
|
+
private onManifestParsed;
|
684
|
+
private onError;
|
685
|
+
filterParsedLevels(levels: Level[]): Level[];
|
686
|
+
private getLevelsForPathway;
|
687
|
+
private updatePathwayPriority;
|
688
|
+
private getPathwayForGroupId;
|
689
|
+
private clonePathways;
|
690
|
+
private loadSteeringManifest;
|
691
|
+
private scheduleRefresh;
|
692
|
+
}
|
693
|
+
|
694
|
+
export declare type ContentSteeringOptions = {
|
695
|
+
uri: string;
|
696
|
+
pathwayId: string;
|
697
|
+
};
|
698
|
+
|
699
|
+
export declare interface CuesInterface {
|
700
|
+
newCue(track: TextTrack | null, startTime: number, endTime: number, captionScreen: CaptionScreen): VTTCue[];
|
701
|
+
}
|
702
|
+
|
703
|
+
export declare interface CuesParsedData {
|
704
|
+
type: 'captions' | 'subtitles';
|
705
|
+
cues: any;
|
706
|
+
track: string;
|
707
|
+
}
|
708
|
+
|
709
|
+
export declare class DateRange {
|
710
|
+
attr: AttrList;
|
711
|
+
tagAnchor: Fragment | null;
|
712
|
+
tagOrder: number;
|
713
|
+
private _startDate;
|
714
|
+
private _endDate?;
|
715
|
+
private _cue?;
|
716
|
+
private _badValueForSameId?;
|
717
|
+
constructor(dateRangeAttr: AttrList, dateRangeWithSameId?: DateRange | undefined, tagCount?: number);
|
718
|
+
get id(): string;
|
719
|
+
get class(): string;
|
720
|
+
get cue(): DateRangeCue;
|
721
|
+
get startTime(): number;
|
722
|
+
get startDate(): Date;
|
723
|
+
get endDate(): Date | null;
|
724
|
+
get duration(): number | null;
|
725
|
+
get plannedDuration(): number | null;
|
726
|
+
get endOnNext(): boolean;
|
727
|
+
get isInterstitial(): boolean;
|
728
|
+
get isValid(): boolean;
|
729
|
+
}
|
730
|
+
|
731
|
+
export declare type DateRangeCue = {
|
732
|
+
pre: boolean;
|
733
|
+
post: boolean;
|
734
|
+
once: boolean;
|
735
|
+
};
|
736
|
+
|
737
|
+
declare interface DecryptData {
|
738
|
+
uri: string;
|
739
|
+
method: string;
|
740
|
+
keyFormat: string;
|
741
|
+
keyFormatVersions: number[];
|
742
|
+
iv: Uint8Array | null;
|
743
|
+
key: Uint8Array | null;
|
744
|
+
keyId: Uint8Array | null;
|
745
|
+
pssh: Uint8Array | null;
|
746
|
+
encrypted: boolean;
|
747
|
+
isCommonEncryption: boolean;
|
748
|
+
}
|
749
|
+
|
750
|
+
declare class Decrypter {
|
751
|
+
private logEnabled;
|
752
|
+
private removePKCS7Padding;
|
753
|
+
private subtle;
|
754
|
+
private softwareDecrypter;
|
755
|
+
private key;
|
756
|
+
private fastAesKey;
|
757
|
+
private remainderData;
|
758
|
+
private currentIV;
|
759
|
+
private currentResult;
|
760
|
+
private useSoftware;
|
761
|
+
private enableSoftwareAES;
|
762
|
+
constructor(config: HlsConfig, { removePKCS7Padding }?: {
|
763
|
+
removePKCS7Padding?: boolean | undefined;
|
764
|
+
});
|
765
|
+
destroy(): void;
|
766
|
+
isSync(): boolean;
|
767
|
+
flush(): Uint8Array | null;
|
768
|
+
reset(): void;
|
769
|
+
decrypt(data: Uint8Array | ArrayBuffer, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
770
|
+
softwareDecrypt(data: Uint8Array, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): ArrayBuffer | null;
|
771
|
+
webCryptoDecrypt(data: Uint8Array, key: ArrayBuffer, iv: ArrayBuffer, aesMode: DecrypterAesMode): Promise<ArrayBuffer>;
|
772
|
+
private onWebCryptoError;
|
773
|
+
private getValidChunk;
|
774
|
+
private logOnce;
|
775
|
+
}
|
776
|
+
|
777
|
+
declare const enum DecrypterAesMode {
|
778
|
+
cbc = 0,
|
779
|
+
ctr = 1
|
780
|
+
}
|
781
|
+
|
782
|
+
declare type DRMSystemConfiguration = {
|
783
|
+
licenseUrl: string;
|
784
|
+
serverCertificateUrl?: string;
|
785
|
+
generateRequest?: (this: Hls, initDataType: string, initData: ArrayBuffer | null, keyContext: MediaKeySessionContext) => {
|
786
|
+
initDataType: string;
|
787
|
+
initData: ArrayBuffer | null;
|
788
|
+
} | undefined | never;
|
789
|
+
};
|
790
|
+
|
791
|
+
export declare type DRMSystemOptions = {
|
792
|
+
audioRobustness?: string;
|
793
|
+
videoRobustness?: string;
|
794
|
+
audioEncryptionScheme?: string | null;
|
795
|
+
videoEncryptionScheme?: string | null;
|
796
|
+
persistentState?: MediaKeysRequirement;
|
797
|
+
distinctiveIdentifier?: MediaKeysRequirement;
|
798
|
+
sessionTypes?: string[];
|
799
|
+
sessionType?: string;
|
800
|
+
};
|
801
|
+
|
802
|
+
export declare type DRMSystemsConfiguration = Partial<Record<KeySystems, DRMSystemConfiguration>>;
|
803
|
+
|
804
|
+
export declare interface ElementaryStreamInfo {
|
805
|
+
startPTS: number;
|
806
|
+
endPTS: number;
|
807
|
+
startDTS: number;
|
808
|
+
endDTS: number;
|
809
|
+
partial?: boolean;
|
810
|
+
}
|
811
|
+
|
812
|
+
export declare type ElementaryStreams = Record<ElementaryStreamTypes, ElementaryStreamInfo | null>;
|
813
|
+
|
814
|
+
export declare const enum ElementaryStreamTypes {
|
815
|
+
AUDIO = "audio",
|
816
|
+
VIDEO = "video",
|
817
|
+
AUDIOVIDEO = "audiovideo"
|
818
|
+
}
|
819
|
+
|
820
|
+
/**
|
821
|
+
* Controller to deal with encrypted media extensions (EME)
|
822
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Encrypted_Media_Extensions_API
|
823
|
+
*
|
824
|
+
* @class
|
825
|
+
* @constructor
|
826
|
+
*/
|
827
|
+
export declare class EMEController extends Logger implements ComponentAPI {
|
828
|
+
static CDMCleanupPromise: Promise<void> | void;
|
829
|
+
private readonly hls;
|
830
|
+
private readonly config;
|
831
|
+
private media;
|
832
|
+
private keyFormatPromise;
|
833
|
+
private keySystemAccessPromises;
|
834
|
+
private _requestLicenseFailureCount;
|
835
|
+
private mediaKeySessions;
|
836
|
+
private keyIdToKeySessionPromise;
|
837
|
+
private setMediaKeysQueue;
|
838
|
+
constructor(hls: Hls);
|
839
|
+
destroy(): void;
|
840
|
+
private registerListeners;
|
841
|
+
private unregisterListeners;
|
842
|
+
private getLicenseServerUrl;
|
843
|
+
private getServerCertificateUrl;
|
844
|
+
private attemptKeySystemAccess;
|
845
|
+
private requestMediaKeySystemAccess;
|
846
|
+
private getMediaKeysPromise;
|
847
|
+
private createMediaKeySessionContext;
|
848
|
+
private renewKeySession;
|
849
|
+
private getKeyIdString;
|
850
|
+
private updateKeySession;
|
851
|
+
selectKeySystemFormat(frag: Fragment): Promise<KeySystemFormats>;
|
852
|
+
private getKeyFormatPromise;
|
853
|
+
loadKey(data: KeyLoadedData): Promise<MediaKeySessionContext>;
|
854
|
+
private throwIfDestroyed;
|
855
|
+
private handleError;
|
856
|
+
private getKeySystemForKeyPromise;
|
857
|
+
private getKeySystemSelectionPromise;
|
858
|
+
private onMediaEncrypted;
|
859
|
+
private onWaitingForKey;
|
860
|
+
private attemptSetMediaKeys;
|
861
|
+
private generateRequestWithPreferredKeySession;
|
862
|
+
private onKeyStatusChange;
|
863
|
+
private fetchServerCertificate;
|
864
|
+
private setMediaKeysServerCertificate;
|
865
|
+
private renewLicense;
|
866
|
+
private unpackPlayReadyKeyMessage;
|
867
|
+
private setupLicenseXHR;
|
868
|
+
private requestLicense;
|
869
|
+
private onMediaAttached;
|
870
|
+
private onMediaDetached;
|
871
|
+
private onManifestLoading;
|
872
|
+
private onManifestLoaded;
|
873
|
+
private removeSession;
|
874
|
+
}
|
875
|
+
|
876
|
+
export declare type EMEControllerConfig = {
|
877
|
+
licenseXhrSetup?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContext, licenseChallenge: Uint8Array) => void | Uint8Array | Promise<Uint8Array | void>;
|
878
|
+
licenseResponseCallback?: (this: Hls, xhr: XMLHttpRequest, url: string, keyContext: MediaKeySessionContext) => ArrayBuffer;
|
879
|
+
emeEnabled: boolean;
|
880
|
+
widevineLicenseUrl?: string;
|
881
|
+
drmSystems: DRMSystemsConfiguration;
|
882
|
+
drmSystemOptions: DRMSystemOptions;
|
883
|
+
requestMediaKeySystemAccessFunc: MediaKeyFunc | null;
|
884
|
+
};
|
885
|
+
|
886
|
+
export declare const enum ErrorActionFlags {
|
887
|
+
None = 0,
|
888
|
+
MoveAllAlternatesMatchingHost = 1,
|
889
|
+
MoveAllAlternatesMatchingHDCP = 2,
|
890
|
+
SwitchToSDR = 4
|
891
|
+
}
|
892
|
+
|
893
|
+
export declare class ErrorController extends Logger implements NetworkComponentAPI {
|
894
|
+
private readonly hls;
|
895
|
+
private playlistError;
|
896
|
+
private penalizedRenditions;
|
897
|
+
constructor(hls: Hls);
|
898
|
+
private registerListeners;
|
899
|
+
private unregisterListeners;
|
900
|
+
destroy(): void;
|
901
|
+
startLoad(startPosition: number): void;
|
902
|
+
stopLoad(): void;
|
903
|
+
private getVariantLevelIndex;
|
904
|
+
private onManifestLoading;
|
905
|
+
private onLevelUpdated;
|
906
|
+
private onError;
|
907
|
+
private keySystemError;
|
908
|
+
private getPlaylistRetryOrSwitchAction;
|
909
|
+
private getFragRetryOrSwitchAction;
|
910
|
+
private getLevelSwitchAction;
|
911
|
+
onErrorOut(event: Events.ERROR, data: ErrorData): void;
|
912
|
+
private sendAlternateToPenaltyBox;
|
913
|
+
private switchLevel;
|
914
|
+
}
|
915
|
+
|
916
|
+
export declare interface ErrorData {
|
917
|
+
type: ErrorTypes;
|
918
|
+
details: ErrorDetails;
|
919
|
+
error: Error;
|
920
|
+
fatal: boolean;
|
921
|
+
errorAction?: IErrorAction;
|
922
|
+
buffer?: number;
|
923
|
+
bytes?: number;
|
924
|
+
chunkMeta?: ChunkMetadata;
|
925
|
+
context?: PlaylistLoaderContext;
|
926
|
+
event?: keyof HlsListeners | 'demuxerWorker';
|
927
|
+
frag?: Fragment;
|
928
|
+
part?: Part | null;
|
929
|
+
level?: number | undefined;
|
930
|
+
levelRetry?: boolean;
|
931
|
+
loader?: Loader<LoaderContext>;
|
932
|
+
networkDetails?: any;
|
933
|
+
stats?: LoaderStats;
|
934
|
+
mimeType?: string;
|
935
|
+
reason?: string;
|
936
|
+
response?: LoaderResponse;
|
937
|
+
url?: string;
|
938
|
+
parent?: PlaylistLevelType;
|
939
|
+
sourceBufferName?: SourceBufferName;
|
940
|
+
/**
|
941
|
+
* @deprecated Use ErrorData.error
|
942
|
+
*/
|
943
|
+
err?: {
|
944
|
+
message: string;
|
945
|
+
};
|
946
|
+
}
|
947
|
+
|
948
|
+
export declare enum ErrorDetails {
|
949
|
+
KEY_SYSTEM_NO_KEYS = "keySystemNoKeys",
|
950
|
+
KEY_SYSTEM_NO_ACCESS = "keySystemNoAccess",
|
951
|
+
KEY_SYSTEM_NO_SESSION = "keySystemNoSession",
|
952
|
+
KEY_SYSTEM_NO_CONFIGURED_LICENSE = "keySystemNoConfiguredLicense",
|
953
|
+
KEY_SYSTEM_LICENSE_REQUEST_FAILED = "keySystemLicenseRequestFailed",
|
954
|
+
KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED = "keySystemServerCertificateRequestFailed",
|
955
|
+
KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED = "keySystemServerCertificateUpdateFailed",
|
956
|
+
KEY_SYSTEM_SESSION_UPDATE_FAILED = "keySystemSessionUpdateFailed",
|
957
|
+
KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED = "keySystemStatusOutputRestricted",
|
958
|
+
KEY_SYSTEM_STATUS_INTERNAL_ERROR = "keySystemStatusInternalError",
|
959
|
+
MANIFEST_LOAD_ERROR = "manifestLoadError",
|
960
|
+
MANIFEST_LOAD_TIMEOUT = "manifestLoadTimeOut",
|
961
|
+
MANIFEST_PARSING_ERROR = "manifestParsingError",
|
962
|
+
MANIFEST_INCOMPATIBLE_CODECS_ERROR = "manifestIncompatibleCodecsError",
|
963
|
+
LEVEL_EMPTY_ERROR = "levelEmptyError",
|
964
|
+
LEVEL_LOAD_ERROR = "levelLoadError",
|
965
|
+
LEVEL_LOAD_TIMEOUT = "levelLoadTimeOut",
|
966
|
+
LEVEL_PARSING_ERROR = "levelParsingError",
|
967
|
+
LEVEL_SWITCH_ERROR = "levelSwitchError",
|
968
|
+
AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError",
|
969
|
+
AUDIO_TRACK_LOAD_TIMEOUT = "audioTrackLoadTimeOut",
|
970
|
+
SUBTITLE_LOAD_ERROR = "subtitleTrackLoadError",
|
971
|
+
SUBTITLE_TRACK_LOAD_TIMEOUT = "subtitleTrackLoadTimeOut",
|
972
|
+
FRAG_LOAD_ERROR = "fragLoadError",
|
973
|
+
FRAG_LOAD_TIMEOUT = "fragLoadTimeOut",
|
974
|
+
FRAG_DECRYPT_ERROR = "fragDecryptError",
|
975
|
+
FRAG_PARSING_ERROR = "fragParsingError",
|
976
|
+
FRAG_GAP = "fragGap",
|
977
|
+
REMUX_ALLOC_ERROR = "remuxAllocError",
|
978
|
+
KEY_LOAD_ERROR = "keyLoadError",
|
979
|
+
KEY_LOAD_TIMEOUT = "keyLoadTimeOut",
|
980
|
+
BUFFER_ADD_CODEC_ERROR = "bufferAddCodecError",
|
981
|
+
BUFFER_INCOMPATIBLE_CODECS_ERROR = "bufferIncompatibleCodecsError",
|
982
|
+
BUFFER_APPEND_ERROR = "bufferAppendError",
|
983
|
+
BUFFER_APPENDING_ERROR = "bufferAppendingError",
|
984
|
+
BUFFER_STALLED_ERROR = "bufferStalledError",
|
985
|
+
BUFFER_FULL_ERROR = "bufferFullError",
|
986
|
+
BUFFER_SEEK_OVER_HOLE = "bufferSeekOverHole",
|
987
|
+
BUFFER_NUDGE_ON_STALL = "bufferNudgeOnStall",
|
988
|
+
INTERNAL_EXCEPTION = "internalException",
|
989
|
+
INTERNAL_ABORTED = "aborted",
|
990
|
+
ATTACH_MEDIA_ERROR = "attachMediaError",
|
991
|
+
UNKNOWN = "unknown"
|
992
|
+
}
|
993
|
+
|
994
|
+
export declare enum ErrorTypes {
|
995
|
+
NETWORK_ERROR = "networkError",
|
996
|
+
MEDIA_ERROR = "mediaError",
|
997
|
+
KEY_SYSTEM_ERROR = "keySystemError",
|
998
|
+
MUX_ERROR = "muxError",
|
999
|
+
OTHER_ERROR = "otherError"
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
export declare enum Events {
|
1003
|
+
MEDIA_ATTACHING = "hlsMediaAttaching",
|
1004
|
+
MEDIA_ATTACHED = "hlsMediaAttached",
|
1005
|
+
MEDIA_DETACHING = "hlsMediaDetaching",
|
1006
|
+
MEDIA_DETACHED = "hlsMediaDetached",
|
1007
|
+
MEDIA_ENDED = "hlsMediaEnded",
|
1008
|
+
BUFFER_RESET = "hlsBufferReset",
|
1009
|
+
BUFFER_CODECS = "hlsBufferCodecs",
|
1010
|
+
BUFFER_CREATED = "hlsBufferCreated",
|
1011
|
+
BUFFER_APPENDING = "hlsBufferAppending",
|
1012
|
+
BUFFER_APPENDED = "hlsBufferAppended",
|
1013
|
+
BUFFER_EOS = "hlsBufferEos",
|
1014
|
+
BUFFER_FLUSHING = "hlsBufferFlushing",
|
1015
|
+
BUFFER_FLUSHED = "hlsBufferFlushed",
|
1016
|
+
MANIFEST_LOADING = "hlsManifestLoading",
|
1017
|
+
MANIFEST_LOADED = "hlsManifestLoaded",
|
1018
|
+
MANIFEST_PARSED = "hlsManifestParsed",
|
1019
|
+
LEVEL_SWITCHING = "hlsLevelSwitching",
|
1020
|
+
LEVEL_SWITCHED = "hlsLevelSwitched",
|
1021
|
+
LEVEL_LOADING = "hlsLevelLoading",
|
1022
|
+
LEVEL_LOADED = "hlsLevelLoaded",
|
1023
|
+
LEVEL_UPDATED = "hlsLevelUpdated",
|
1024
|
+
LEVEL_PTS_UPDATED = "hlsLevelPtsUpdated",
|
1025
|
+
LEVELS_UPDATED = "hlsLevelsUpdated",
|
1026
|
+
AUDIO_TRACKS_UPDATED = "hlsAudioTracksUpdated",
|
1027
|
+
AUDIO_TRACK_SWITCHING = "hlsAudioTrackSwitching",
|
1028
|
+
AUDIO_TRACK_SWITCHED = "hlsAudioTrackSwitched",
|
1029
|
+
AUDIO_TRACK_LOADING = "hlsAudioTrackLoading",
|
1030
|
+
AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded",
|
1031
|
+
SUBTITLE_TRACKS_UPDATED = "hlsSubtitleTracksUpdated",
|
1032
|
+
SUBTITLE_TRACKS_CLEARED = "hlsSubtitleTracksCleared",
|
1033
|
+
SUBTITLE_TRACK_SWITCH = "hlsSubtitleTrackSwitch",
|
1034
|
+
SUBTITLE_TRACK_LOADING = "hlsSubtitleTrackLoading",
|
1035
|
+
SUBTITLE_TRACK_LOADED = "hlsSubtitleTrackLoaded",
|
1036
|
+
SUBTITLE_FRAG_PROCESSED = "hlsSubtitleFragProcessed",
|
1037
|
+
CUES_PARSED = "hlsCuesParsed",
|
1038
|
+
NON_NATIVE_TEXT_TRACKS_FOUND = "hlsNonNativeTextTracksFound",
|
1039
|
+
INIT_PTS_FOUND = "hlsInitPtsFound",
|
1040
|
+
FRAG_LOADING = "hlsFragLoading",
|
1041
|
+
FRAG_LOAD_EMERGENCY_ABORTED = "hlsFragLoadEmergencyAborted",
|
1042
|
+
FRAG_LOADED = "hlsFragLoaded",
|
1043
|
+
FRAG_DECRYPTED = "hlsFragDecrypted",
|
1044
|
+
FRAG_PARSING_INIT_SEGMENT = "hlsFragParsingInitSegment",
|
1045
|
+
FRAG_PARSING_USERDATA = "hlsFragParsingUserdata",
|
1046
|
+
FRAG_PARSING_METADATA = "hlsFragParsingMetadata",
|
1047
|
+
FRAG_PARSED = "hlsFragParsed",
|
1048
|
+
FRAG_BUFFERED = "hlsFragBuffered",
|
1049
|
+
FRAG_CHANGED = "hlsFragChanged",
|
1050
|
+
FPS_DROP = "hlsFpsDrop",
|
1051
|
+
FPS_DROP_LEVEL_CAPPING = "hlsFpsDropLevelCapping",
|
1052
|
+
MAX_AUTO_LEVEL_UPDATED = "hlsMaxAutoLevelUpdated",
|
1053
|
+
ERROR = "hlsError",
|
1054
|
+
DESTROYING = "hlsDestroying",
|
1055
|
+
KEY_LOADING = "hlsKeyLoading",
|
1056
|
+
KEY_LOADED = "hlsKeyLoaded",
|
1057
|
+
LIVE_BACK_BUFFER_REACHED = "hlsLiveBackBufferReached",
|
1058
|
+
BACK_BUFFER_REACHED = "hlsBackBufferReached",
|
1059
|
+
STEERING_MANIFEST_LOADED = "hlsSteeringManifestLoaded"
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
declare class EwmaBandWidthEstimator {
|
1063
|
+
private defaultEstimate_;
|
1064
|
+
private minWeight_;
|
1065
|
+
private minDelayMs_;
|
1066
|
+
private slow_;
|
1067
|
+
private fast_;
|
1068
|
+
private defaultTTFB_;
|
1069
|
+
private ttfb_;
|
1070
|
+
constructor(slow: number, fast: number, defaultEstimate: number, defaultTTFB?: number);
|
1071
|
+
update(slow: number, fast: number): void;
|
1072
|
+
sample(durationMs: number, numBytes: number): void;
|
1073
|
+
sampleTTFB(ttfb: number): void;
|
1074
|
+
canEstimate(): boolean;
|
1075
|
+
getEstimate(): number;
|
1076
|
+
getEstimateTTFB(): number;
|
1077
|
+
destroy(): void;
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
declare type ExtendedSourceBuffer = SourceBuffer & {
|
1081
|
+
ended?: boolean;
|
1082
|
+
ending?: boolean;
|
1083
|
+
changeType?: (type: string) => void;
|
1084
|
+
};
|
1085
|
+
|
1086
|
+
export declare class FPSController implements ComponentAPI {
|
1087
|
+
private hls;
|
1088
|
+
private isVideoPlaybackQualityAvailable;
|
1089
|
+
private timer?;
|
1090
|
+
private media;
|
1091
|
+
private lastTime;
|
1092
|
+
private lastDroppedFrames;
|
1093
|
+
private lastDecodedFrames;
|
1094
|
+
private streamController;
|
1095
|
+
constructor(hls: Hls);
|
1096
|
+
setStreamController(streamController: StreamController): void;
|
1097
|
+
protected registerListeners(): void;
|
1098
|
+
protected unregisterListeners(): void;
|
1099
|
+
destroy(): void;
|
1100
|
+
protected onMediaAttaching(event: Events.MEDIA_ATTACHING, data: MediaAttachingData): void;
|
1101
|
+
private onMediaDetaching;
|
1102
|
+
checkFPS(video: HTMLVideoElement, decodedFrames: number, droppedFrames: number): void;
|
1103
|
+
checkFPSInterval(): void;
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
export declare type FPSControllerConfig = {
|
1107
|
+
capLevelOnFPSDrop: boolean;
|
1108
|
+
fpsDroppedMonitoringPeriod: number;
|
1109
|
+
fpsDroppedMonitoringThreshold: number;
|
1110
|
+
};
|
1111
|
+
|
1112
|
+
export declare interface FPSDropData {
|
1113
|
+
currentDropped: number;
|
1114
|
+
currentDecoded: number;
|
1115
|
+
totalDroppedFrames: number;
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
export declare interface FPSDropLevelCappingData {
|
1119
|
+
droppedLevel: number;
|
1120
|
+
level: number;
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
export declare interface FragBufferedData {
|
1124
|
+
stats: LoadStats;
|
1125
|
+
frag: Fragment;
|
1126
|
+
part: Part | null;
|
1127
|
+
id: string;
|
1128
|
+
}
|
1129
|
+
|
1130
|
+
export declare interface FragChangedData {
|
1131
|
+
frag: Fragment;
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
export declare interface FragDecryptedData {
|
1135
|
+
frag: Fragment;
|
1136
|
+
payload: ArrayBuffer;
|
1137
|
+
stats: {
|
1138
|
+
tstart: number;
|
1139
|
+
tdecrypt: number;
|
1140
|
+
};
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
export declare interface FragLoadedData {
|
1144
|
+
frag: Fragment;
|
1145
|
+
part: Part | null;
|
1146
|
+
payload: ArrayBuffer;
|
1147
|
+
networkDetails: unknown;
|
1148
|
+
}
|
1149
|
+
|
1150
|
+
export declare interface FragLoadEmergencyAbortedData {
|
1151
|
+
frag: Fragment;
|
1152
|
+
part: Part | null;
|
1153
|
+
stats: LoaderStats;
|
1154
|
+
}
|
1155
|
+
|
1156
|
+
declare interface FragLoadFailResult extends ErrorData {
|
1157
|
+
frag: Fragment;
|
1158
|
+
part?: Part;
|
1159
|
+
response?: {
|
1160
|
+
data: any;
|
1161
|
+
code: number;
|
1162
|
+
text: string;
|
1163
|
+
url: string;
|
1164
|
+
};
|
1165
|
+
networkDetails: any;
|
1166
|
+
}
|
1167
|
+
|
1168
|
+
export declare interface FragLoadingData {
|
1169
|
+
frag: Fragment;
|
1170
|
+
part?: Part;
|
1171
|
+
targetBufferTime: number | null;
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
/**
|
1175
|
+
* Object representing parsed data from an HLS Segment. Found in {@link hls.js#LevelDetails.fragments}.
|
1176
|
+
*/
|
1177
|
+
export declare class Fragment extends BaseSegment {
|
1178
|
+
private _decryptdata;
|
1179
|
+
rawProgramDateTime: string | null;
|
1180
|
+
programDateTime: number | null;
|
1181
|
+
tagList: Array<string[]>;
|
1182
|
+
duration: number;
|
1183
|
+
sn: number | 'initSegment';
|
1184
|
+
levelkeys?: {
|
1185
|
+
[key: string]: LevelKey;
|
1186
|
+
};
|
1187
|
+
readonly type: PlaylistLevelType;
|
1188
|
+
loader: Loader<FragmentLoaderContext> | null;
|
1189
|
+
keyLoader: Loader<KeyLoaderContext> | null;
|
1190
|
+
level: number;
|
1191
|
+
cc: number;
|
1192
|
+
startPTS?: number;
|
1193
|
+
endPTS?: number;
|
1194
|
+
startDTS?: number;
|
1195
|
+
endDTS?: number;
|
1196
|
+
start: number;
|
1197
|
+
deltaPTS?: number;
|
1198
|
+
maxStartPTS?: number;
|
1199
|
+
minEndPTS?: number;
|
1200
|
+
stats: LoadStats;
|
1201
|
+
data?: Uint8Array;
|
1202
|
+
bitrateTest: boolean;
|
1203
|
+
title: string | null;
|
1204
|
+
initSegment: Fragment | null;
|
1205
|
+
endList?: boolean;
|
1206
|
+
gap?: boolean;
|
1207
|
+
urlId: number;
|
1208
|
+
constructor(type: PlaylistLevelType, baseurl: string);
|
1209
|
+
get decryptdata(): LevelKey | null;
|
1210
|
+
get end(): number;
|
1211
|
+
get endProgramDateTime(): number | null;
|
1212
|
+
get encrypted(): boolean;
|
1213
|
+
setKeyFormat(keyFormat: KeySystemFormats): void;
|
1214
|
+
abortRequests(): void;
|
1215
|
+
setElementaryStreamInfo(type: ElementaryStreamTypes, startPTS: number, endPTS: number, startDTS: number, endDTS: number, partial?: boolean): void;
|
1216
|
+
clearElementaryStreamInfo(): void;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
declare class FragmentLoader {
|
1220
|
+
private readonly config;
|
1221
|
+
private loader;
|
1222
|
+
private partLoadTimeout;
|
1223
|
+
constructor(config: HlsConfig);
|
1224
|
+
destroy(): void;
|
1225
|
+
abort(): void;
|
1226
|
+
load(frag: Fragment, onProgress?: FragmentLoadProgressCallback): Promise<FragLoadedData>;
|
1227
|
+
loadPart(frag: Fragment, part: Part, onProgress: FragmentLoadProgressCallback): Promise<FragLoadedData>;
|
1228
|
+
private updateStatsFromPart;
|
1229
|
+
private resetLoader;
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
/**
|
1233
|
+
* @deprecated use fragLoadPolicy.default
|
1234
|
+
*/
|
1235
|
+
export declare type FragmentLoaderConfig = {
|
1236
|
+
fragLoadingTimeOut: number;
|
1237
|
+
fragLoadingMaxRetry: number;
|
1238
|
+
fragLoadingRetryDelay: number;
|
1239
|
+
fragLoadingMaxRetryTimeout: number;
|
1240
|
+
};
|
1241
|
+
|
1242
|
+
export declare interface FragmentLoaderConstructor {
|
1243
|
+
new (confg: HlsConfig): Loader<FragmentLoaderContext>;
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
export declare interface FragmentLoaderContext extends LoaderContext {
|
1247
|
+
frag: Fragment;
|
1248
|
+
part: Part | null;
|
1249
|
+
resetIV?: boolean;
|
1250
|
+
}
|
1251
|
+
|
1252
|
+
declare type FragmentLoadProgressCallback = (result: FragLoadedData | PartsLoadedData) => void;
|
1253
|
+
|
1254
|
+
declare const enum FragmentState {
|
1255
|
+
NOT_LOADED = "NOT_LOADED",
|
1256
|
+
APPENDING = "APPENDING",
|
1257
|
+
PARTIAL = "PARTIAL",
|
1258
|
+
OK = "OK"
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
declare class FragmentTracker implements ComponentAPI {
|
1262
|
+
private activePartLists;
|
1263
|
+
private endListFragments;
|
1264
|
+
private fragments;
|
1265
|
+
private timeRanges;
|
1266
|
+
private bufferPadding;
|
1267
|
+
private hls;
|
1268
|
+
private hasGaps;
|
1269
|
+
constructor(hls: Hls);
|
1270
|
+
private _registerListeners;
|
1271
|
+
private _unregisterListeners;
|
1272
|
+
destroy(): void;
|
1273
|
+
/**
|
1274
|
+
* Return a Fragment or Part with an appended range that matches the position and levelType
|
1275
|
+
* Otherwise, return null
|
1276
|
+
*/
|
1277
|
+
getAppendedFrag(position: number, levelType: PlaylistLevelType): Fragment | Part | null;
|
1278
|
+
/**
|
1279
|
+
* Return a buffered Fragment that matches the position and levelType.
|
1280
|
+
* A buffered Fragment is one whose loading, parsing and appending is done (completed or "partial" meaning aborted).
|
1281
|
+
* If not found any Fragment, return null
|
1282
|
+
*/
|
1283
|
+
getBufferedFrag(position: number, levelType: PlaylistLevelType): MediaFragment | null;
|
1284
|
+
getFragAtPos(position: number, levelType: PlaylistLevelType, buffered?: boolean): MediaFragment | null;
|
1285
|
+
/**
|
1286
|
+
* Partial fragments effected by coded frame eviction will be removed
|
1287
|
+
* The browser will unload parts of the buffer to free up memory for new buffer data
|
1288
|
+
* Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable)
|
1289
|
+
*/
|
1290
|
+
detectEvictedFragments(elementaryStream: SourceBufferName, timeRange: TimeRanges, playlistType: PlaylistLevelType, appendedPart?: Part | null, removeAppending?: boolean): void;
|
1291
|
+
/**
|
1292
|
+
* Checks if the fragment passed in is loaded in the buffer properly
|
1293
|
+
* Partially loaded fragments will be registered as a partial fragment
|
1294
|
+
*/
|
1295
|
+
detectPartialFragments(data: FragBufferedData): void;
|
1296
|
+
private removeParts;
|
1297
|
+
fragBuffered(frag: MediaFragment, force?: true): void;
|
1298
|
+
private getBufferedTimes;
|
1299
|
+
/**
|
1300
|
+
* Gets the partial fragment for a certain time
|
1301
|
+
*/
|
1302
|
+
getPartialFragment(time: number): Fragment | null;
|
1303
|
+
isEndListAppended(type: PlaylistLevelType): boolean;
|
1304
|
+
getState(fragment: Fragment): FragmentState;
|
1305
|
+
private isTimeBuffered;
|
1306
|
+
private onManifestLoading;
|
1307
|
+
private onFragLoaded;
|
1308
|
+
private onBufferAppended;
|
1309
|
+
private onFragBuffered;
|
1310
|
+
private hasFragment;
|
1311
|
+
hasFragments(type?: PlaylistLevelType): boolean;
|
1312
|
+
hasParts(type: PlaylistLevelType): boolean;
|
1313
|
+
removeFragmentsInRange(start: number, end: number, playlistType: PlaylistLevelType, withGapOnly?: boolean, unbufferedOnly?: boolean): void;
|
1314
|
+
removeFragment(fragment: Fragment): void;
|
1315
|
+
removeAllFragments(): void;
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
export declare interface FragParsedData {
|
1319
|
+
frag: Fragment;
|
1320
|
+
part: Part | null;
|
1321
|
+
}
|
1322
|
+
|
1323
|
+
export declare interface FragParsingInitSegmentData {
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
export declare interface FragParsingMetadataData {
|
1327
|
+
id: string;
|
1328
|
+
frag: Fragment;
|
1329
|
+
details: LevelDetails;
|
1330
|
+
samples: MetadataSample[];
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
export declare interface FragParsingUserdataData {
|
1334
|
+
id: string;
|
1335
|
+
frag: Fragment;
|
1336
|
+
details: LevelDetails;
|
1337
|
+
samples: UserdataSample[];
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
export declare type HdcpLevel = (typeof HdcpLevels)[number];
|
1341
|
+
|
1342
|
+
declare const HdcpLevels: readonly ["NONE", "TYPE-0", "TYPE-1", null];
|
1343
|
+
|
1344
|
+
/**
|
1345
|
+
* The `Hls` class is the core of the HLS.js library used to instantiate player instances.
|
1346
|
+
* @public
|
1347
|
+
*/
|
1348
|
+
declare class Hls implements HlsEventEmitter {
|
1349
|
+
private static defaultConfig;
|
1350
|
+
/**
|
1351
|
+
* The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.
|
1352
|
+
*/
|
1353
|
+
readonly config: HlsConfig;
|
1354
|
+
/**
|
1355
|
+
* The configuration object provided on player instantiation.
|
1356
|
+
*/
|
1357
|
+
readonly userConfig: Partial<HlsConfig>;
|
1358
|
+
/**
|
1359
|
+
* The logger functions used by this player instance, configured on player instantiation.
|
1360
|
+
*/
|
1361
|
+
readonly logger: ILogger;
|
1362
|
+
private coreComponents;
|
1363
|
+
private networkControllers;
|
1364
|
+
private _emitter;
|
1365
|
+
private _autoLevelCapping;
|
1366
|
+
private _maxHdcpLevel;
|
1367
|
+
private abrController;
|
1368
|
+
private bufferController;
|
1369
|
+
private capLevelController;
|
1370
|
+
private latencyController;
|
1371
|
+
private levelController;
|
1372
|
+
private streamController;
|
1373
|
+
private audioTrackController;
|
1374
|
+
private subtitleTrackController;
|
1375
|
+
private emeController;
|
1376
|
+
private cmcdController;
|
1377
|
+
private _media;
|
1378
|
+
private _url;
|
1379
|
+
private triggeringException?;
|
1380
|
+
/**
|
1381
|
+
* Get the video-dev/hls.js package version.
|
1382
|
+
*/
|
1383
|
+
static get version(): string;
|
1384
|
+
/**
|
1385
|
+
* Check if the required MediaSource Extensions are available.
|
1386
|
+
*/
|
1387
|
+
static isMSESupported(): boolean;
|
1388
|
+
/**
|
1389
|
+
* Check if MediaSource Extensions are available and isTypeSupported checks pass for any baseline codecs.
|
1390
|
+
*/
|
1391
|
+
static isSupported(): boolean;
|
1392
|
+
/**
|
1393
|
+
* Get the MediaSource global used for MSE playback (ManagedMediaSource, MediaSource, or WebKitMediaSource).
|
1394
|
+
*/
|
1395
|
+
static getMediaSource(): typeof MediaSource | undefined;
|
1396
|
+
static get Events(): typeof Events;
|
1397
|
+
static get ErrorTypes(): typeof ErrorTypes;
|
1398
|
+
static get ErrorDetails(): typeof ErrorDetails;
|
1399
|
+
/**
|
1400
|
+
* Get the default configuration applied to new instances.
|
1401
|
+
*/
|
1402
|
+
static get DefaultConfig(): HlsConfig;
|
1403
|
+
/**
|
1404
|
+
* Replace the default configuration applied to new instances.
|
1405
|
+
*/
|
1406
|
+
static set DefaultConfig(defaultConfig: HlsConfig);
|
1407
|
+
/**
|
1408
|
+
* Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`.
|
1409
|
+
* @param userConfig - Configuration options applied over `Hls.DefaultConfig`
|
1410
|
+
*/
|
1411
|
+
constructor(userConfig?: Partial<HlsConfig>);
|
1412
|
+
createController(ControllerClass: any, components: any): any;
|
1413
|
+
on<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
|
1414
|
+
once<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
|
1415
|
+
removeAllListeners<E extends keyof HlsListeners>(event?: E | undefined): void;
|
1416
|
+
off<E extends keyof HlsListeners, Context = undefined>(event: E, listener?: HlsListeners[E] | undefined, context?: Context, once?: boolean | undefined): void;
|
1417
|
+
listeners<E extends keyof HlsListeners>(event: E): HlsListeners[E][];
|
1418
|
+
emit<E extends keyof HlsListeners>(event: E, name: E, eventObject: Parameters<HlsListeners[E]>[1]): boolean;
|
1419
|
+
trigger<E extends keyof HlsListeners>(event: E, eventObject: Parameters<HlsListeners[E]>[1]): boolean;
|
1420
|
+
listenerCount<E extends keyof HlsListeners>(event: E): number;
|
1421
|
+
/**
|
1422
|
+
* Dispose of the instance
|
1423
|
+
*/
|
1424
|
+
destroy(): void;
|
1425
|
+
/**
|
1426
|
+
* Attaches Hls.js to a media element
|
1427
|
+
*/
|
1428
|
+
attachMedia(media: HTMLMediaElement): void;
|
1429
|
+
/**
|
1430
|
+
* Detach Hls.js from the media
|
1431
|
+
*/
|
1432
|
+
detachMedia(): void;
|
1433
|
+
/**
|
1434
|
+
* Set the source URL. Can be relative or absolute.
|
1435
|
+
*/
|
1436
|
+
loadSource(url: string): void;
|
1437
|
+
/**
|
1438
|
+
* Gets the currently loaded URL
|
1439
|
+
*/
|
1440
|
+
get url(): string | null;
|
1441
|
+
/**
|
1442
|
+
* Start loading data from the stream source.
|
1443
|
+
* Depending on default config, client starts loading automatically when a source is set.
|
1444
|
+
*
|
1445
|
+
* @param startPosition - Set the start position to stream from.
|
1446
|
+
* Defaults to -1 (None: starts from earliest point)
|
1447
|
+
*/
|
1448
|
+
startLoad(startPosition?: number): void;
|
1449
|
+
/**
|
1450
|
+
* Stop loading of any stream data.
|
1451
|
+
*/
|
1452
|
+
stopLoad(): void;
|
1453
|
+
/**
|
1454
|
+
* Resumes stream controller segment loading after `pauseBuffering` has been called.
|
1455
|
+
*/
|
1456
|
+
resumeBuffering(): void;
|
1457
|
+
/**
|
1458
|
+
* Prevents stream controller from loading new segments until `resumeBuffering` is called.
|
1459
|
+
* This allows for media buffering to be paused without interupting playlist loading.
|
1460
|
+
*/
|
1461
|
+
pauseBuffering(): void;
|
1462
|
+
/**
|
1463
|
+
* Swap through possible audio codecs in the stream (for example to switch from stereo to 5.1)
|
1464
|
+
*/
|
1465
|
+
swapAudioCodec(): void;
|
1466
|
+
/**
|
1467
|
+
* When the media-element fails, this allows to detach and then re-attach it
|
1468
|
+
* as one call (convenience method).
|
1469
|
+
*
|
1470
|
+
* Automatic recovery of media-errors by this process is configurable.
|
1471
|
+
*/
|
1472
|
+
recoverMediaError(): void;
|
1473
|
+
removeLevel(levelIndex: number): void;
|
1474
|
+
/**
|
1475
|
+
* @returns an array of levels (variants) sorted by HDCP-LEVEL, RESOLUTION (height), FRAME-RATE, CODECS, VIDEO-RANGE, and BANDWIDTH
|
1476
|
+
*/
|
1477
|
+
get levels(): Level[];
|
1478
|
+
/**
|
1479
|
+
* Index of quality level (variant) currently played
|
1480
|
+
*/
|
1481
|
+
get currentLevel(): number;
|
1482
|
+
/**
|
1483
|
+
* Set quality level index immediately. This will flush the current buffer to replace the quality asap. That means playback will interrupt at least shortly to re-buffer and re-sync eventually. Set to -1 for automatic level selection.
|
1484
|
+
*/
|
1485
|
+
set currentLevel(newLevel: number);
|
1486
|
+
/**
|
1487
|
+
* Index of next quality level loaded as scheduled by stream controller.
|
1488
|
+
*/
|
1489
|
+
get nextLevel(): number;
|
1490
|
+
/**
|
1491
|
+
* Set quality level index for next loaded data.
|
1492
|
+
* This will switch the video quality asap, without interrupting playback.
|
1493
|
+
* May abort current loading of data, and flush parts of buffer (outside currently played fragment region).
|
1494
|
+
* @param newLevel - Pass -1 for automatic level selection
|
1495
|
+
*/
|
1496
|
+
set nextLevel(newLevel: number);
|
1497
|
+
/**
|
1498
|
+
* Return the quality level of the currently or last (of none is loaded currently) segment
|
1499
|
+
*/
|
1500
|
+
get loadLevel(): number;
|
1501
|
+
/**
|
1502
|
+
* Set quality level index for next loaded data in a conservative way.
|
1503
|
+
* This will switch the quality without flushing, but interrupt current loading.
|
1504
|
+
* Thus the moment when the quality switch will appear in effect will only be after the already existing buffer.
|
1505
|
+
* @param newLevel - Pass -1 for automatic level selection
|
1506
|
+
*/
|
1507
|
+
set loadLevel(newLevel: number);
|
1508
|
+
/**
|
1509
|
+
* get next quality level loaded
|
1510
|
+
*/
|
1511
|
+
get nextLoadLevel(): number;
|
1512
|
+
/**
|
1513
|
+
* Set quality level of next loaded segment in a fully "non-destructive" way.
|
1514
|
+
* Same as `loadLevel` but will wait for next switch (until current loading is done).
|
1515
|
+
*/
|
1516
|
+
set nextLoadLevel(level: number);
|
1517
|
+
/**
|
1518
|
+
* Return "first level": like a default level, if not set,
|
1519
|
+
* falls back to index of first level referenced in manifest
|
1520
|
+
*/
|
1521
|
+
get firstLevel(): number;
|
1522
|
+
/**
|
1523
|
+
* Sets "first-level", see getter.
|
1524
|
+
*/
|
1525
|
+
set firstLevel(newLevel: number);
|
1526
|
+
/**
|
1527
|
+
* Return the desired start level for the first fragment that will be loaded.
|
1528
|
+
* The default value of -1 indicates automatic start level selection.
|
1529
|
+
* Setting hls.nextAutoLevel without setting a startLevel will result in
|
1530
|
+
* the nextAutoLevel value being used for one fragment load.
|
1531
|
+
*/
|
1532
|
+
get startLevel(): number;
|
1533
|
+
/**
|
1534
|
+
* set start level (level of first fragment that will be played back)
|
1535
|
+
* if not overrided by user, first level appearing in manifest will be used as start level
|
1536
|
+
* if -1 : automatic start level selection, playback will start from level matching download bandwidth
|
1537
|
+
* (determined from download of first segment)
|
1538
|
+
*/
|
1539
|
+
set startLevel(newLevel: number);
|
1540
|
+
/**
|
1541
|
+
* Whether level capping is enabled.
|
1542
|
+
* Default value is set via `config.capLevelToPlayerSize`.
|
1543
|
+
*/
|
1544
|
+
get capLevelToPlayerSize(): boolean;
|
1545
|
+
/**
|
1546
|
+
* Enables or disables level capping. If disabled after previously enabled, `nextLevelSwitch` will be immediately called.
|
1547
|
+
*/
|
1548
|
+
set capLevelToPlayerSize(shouldStartCapping: boolean);
|
1549
|
+
/**
|
1550
|
+
* Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)
|
1551
|
+
*/
|
1552
|
+
get autoLevelCapping(): number;
|
1553
|
+
/**
|
1554
|
+
* Returns the current bandwidth estimate in bits per second, when available. Otherwise, `NaN` is returned.
|
1555
|
+
*/
|
1556
|
+
get bandwidthEstimate(): number;
|
1557
|
+
set bandwidthEstimate(abrEwmaDefaultEstimate: number);
|
1558
|
+
/**
|
1559
|
+
* get time to first byte estimate
|
1560
|
+
* @type {number}
|
1561
|
+
*/
|
1562
|
+
get ttfbEstimate(): number;
|
1563
|
+
/**
|
1564
|
+
* Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)
|
1565
|
+
*/
|
1566
|
+
set autoLevelCapping(newLevel: number);
|
1567
|
+
get maxHdcpLevel(): HdcpLevel;
|
1568
|
+
set maxHdcpLevel(value: HdcpLevel);
|
1569
|
+
/**
|
1570
|
+
* True when automatic level selection enabled
|
1571
|
+
*/
|
1572
|
+
get autoLevelEnabled(): boolean;
|
1573
|
+
/**
|
1574
|
+
* Level set manually (if any)
|
1575
|
+
*/
|
1576
|
+
get manualLevel(): number;
|
1577
|
+
/**
|
1578
|
+
* min level selectable in auto mode according to config.minAutoBitrate
|
1579
|
+
*/
|
1580
|
+
get minAutoLevel(): number;
|
1581
|
+
/**
|
1582
|
+
* max level selectable in auto mode according to autoLevelCapping
|
1583
|
+
*/
|
1584
|
+
get maxAutoLevel(): number;
|
1585
|
+
get firstAutoLevel(): number;
|
1586
|
+
/**
|
1587
|
+
* next automatically selected quality level
|
1588
|
+
*/
|
1589
|
+
get nextAutoLevel(): number;
|
1590
|
+
/**
|
1591
|
+
* this setter is used to force next auto level.
|
1592
|
+
* this is useful to force a switch down in auto mode:
|
1593
|
+
* in case of load error on level N, hls.js can set nextAutoLevel to N-1 for example)
|
1594
|
+
* forced value is valid for one fragment. upon successful frag loading at forced level,
|
1595
|
+
* this value will be resetted to -1 by ABR controller.
|
1596
|
+
*/
|
1597
|
+
set nextAutoLevel(nextLevel: number);
|
1598
|
+
/**
|
1599
|
+
* get the datetime value relative to media.currentTime for the active level Program Date Time if present
|
1600
|
+
*/
|
1601
|
+
get playingDate(): Date | null;
|
1602
|
+
get mainForwardBufferInfo(): BufferInfo | null;
|
1603
|
+
get maxBufferLength(): number;
|
1604
|
+
/**
|
1605
|
+
* Find and select the best matching audio track, making a level switch when a Group change is necessary.
|
1606
|
+
* Updates `hls.config.audioPreference`. Returns the selected track, or null when no matching track is found.
|
1607
|
+
*/
|
1608
|
+
setAudioOption(audioOption: MediaPlaylist | AudioSelectionOption | undefined): MediaPlaylist | null;
|
1609
|
+
/**
|
1610
|
+
* Find and select the best matching subtitle track, making a level switch when a Group change is necessary.
|
1611
|
+
* Updates `hls.config.subtitlePreference`. Returns the selected track, or null when no matching track is found.
|
1612
|
+
*/
|
1613
|
+
setSubtitleOption(subtitleOption: MediaPlaylist | SubtitleSelectionOption | undefined): MediaPlaylist | null;
|
1614
|
+
/**
|
1615
|
+
* Get the complete list of audio tracks across all media groups
|
1616
|
+
*/
|
1617
|
+
get allAudioTracks(): Array<MediaPlaylist>;
|
1618
|
+
/**
|
1619
|
+
* Get the list of selectable audio tracks
|
1620
|
+
*/
|
1621
|
+
get audioTracks(): Array<MediaPlaylist>;
|
1622
|
+
/**
|
1623
|
+
* index of the selected audio track (index in audio track lists)
|
1624
|
+
*/
|
1625
|
+
get audioTrack(): number;
|
1626
|
+
/**
|
1627
|
+
* selects an audio track, based on its index in audio track lists
|
1628
|
+
*/
|
1629
|
+
set audioTrack(audioTrackId: number);
|
1630
|
+
/**
|
1631
|
+
* get the complete list of subtitle tracks across all media groups
|
1632
|
+
*/
|
1633
|
+
get allSubtitleTracks(): Array<MediaPlaylist>;
|
1634
|
+
/**
|
1635
|
+
* get alternate subtitle tracks list from playlist
|
1636
|
+
*/
|
1637
|
+
get subtitleTracks(): Array<MediaPlaylist>;
|
1638
|
+
/**
|
1639
|
+
* index of the selected subtitle track (index in subtitle track lists)
|
1640
|
+
*/
|
1641
|
+
get subtitleTrack(): number;
|
1642
|
+
get media(): HTMLMediaElement | null;
|
1643
|
+
/**
|
1644
|
+
* select an subtitle track, based on its index in subtitle track lists
|
1645
|
+
*/
|
1646
|
+
set subtitleTrack(subtitleTrackId: number);
|
1647
|
+
/**
|
1648
|
+
* Whether subtitle display is enabled or not
|
1649
|
+
*/
|
1650
|
+
get subtitleDisplay(): boolean;
|
1651
|
+
/**
|
1652
|
+
* Enable/disable subtitle display rendering
|
1653
|
+
*/
|
1654
|
+
set subtitleDisplay(value: boolean);
|
1655
|
+
/**
|
1656
|
+
* get mode for Low-Latency HLS loading
|
1657
|
+
*/
|
1658
|
+
get lowLatencyMode(): boolean;
|
1659
|
+
/**
|
1660
|
+
* Enable/disable Low-Latency HLS part playlist and segment loading, and start live streams at playlist PART-HOLD-BACK rather than HOLD-BACK.
|
1661
|
+
*/
|
1662
|
+
set lowLatencyMode(mode: boolean);
|
1663
|
+
/**
|
1664
|
+
* Position (in seconds) of live sync point (ie edge of live position minus safety delay defined by ```hls.config.liveSyncDuration```)
|
1665
|
+
* @returns null prior to loading live Playlist
|
1666
|
+
*/
|
1667
|
+
get liveSyncPosition(): number | null;
|
1668
|
+
/**
|
1669
|
+
* Estimated position (in seconds) of live edge (ie edge of live playlist plus time sync playlist advanced)
|
1670
|
+
* @returns 0 before first playlist is loaded
|
1671
|
+
*/
|
1672
|
+
get latency(): number;
|
1673
|
+
/**
|
1674
|
+
* maximum distance from the edge before the player seeks forward to ```hls.liveSyncPosition```
|
1675
|
+
* configured using ```liveMaxLatencyDurationCount``` (multiple of target duration) or ```liveMaxLatencyDuration```
|
1676
|
+
* @returns 0 before first playlist is loaded
|
1677
|
+
*/
|
1678
|
+
get maxLatency(): number;
|
1679
|
+
/**
|
1680
|
+
* target distance from the edge as calculated by the latency controller
|
1681
|
+
*/
|
1682
|
+
get targetLatency(): number | null;
|
1683
|
+
set targetLatency(latency: number);
|
1684
|
+
/**
|
1685
|
+
* the rate at which the edge of the current live playlist is advancing or 1 if there is none
|
1686
|
+
*/
|
1687
|
+
get drift(): number | null;
|
1688
|
+
/**
|
1689
|
+
* set to true when startLoad is called before MANIFEST_PARSED event
|
1690
|
+
*/
|
1691
|
+
get forceStartLoad(): boolean;
|
1692
|
+
/**
|
1693
|
+
* ContentSteering pathwayPriority getter/setter
|
1694
|
+
*/
|
1695
|
+
get pathwayPriority(): string[] | null;
|
1696
|
+
set pathwayPriority(pathwayPriority: string[]);
|
1697
|
+
}
|
1698
|
+
export default Hls;
|
1699
|
+
|
1700
|
+
export declare interface HlsChunkPerformanceTiming extends HlsPerformanceTiming {
|
1701
|
+
executeStart: number;
|
1702
|
+
executeEnd: number;
|
1703
|
+
}
|
1704
|
+
|
1705
|
+
export declare type HlsConfig = {
|
1706
|
+
debug: boolean | ILogger;
|
1707
|
+
enableWorker: boolean;
|
1708
|
+
workerPath: null | string;
|
1709
|
+
enableSoftwareAES: boolean;
|
1710
|
+
minAutoBitrate: number;
|
1711
|
+
ignoreDevicePixelRatio: boolean;
|
1712
|
+
preferManagedMediaSource: boolean;
|
1713
|
+
loader: {
|
1714
|
+
new (confg: HlsConfig): Loader<LoaderContext>;
|
1715
|
+
};
|
1716
|
+
fLoader?: FragmentLoaderConstructor;
|
1717
|
+
pLoader?: PlaylistLoaderConstructor;
|
1718
|
+
fetchSetup?: (context: LoaderContext, initParams: any) => Request;
|
1719
|
+
xhrSetup?: (xhr: XMLHttpRequest, url: string) => Promise<void> | void;
|
1720
|
+
audioStreamController?: typeof AudioStreamController;
|
1721
|
+
audioTrackController?: typeof AudioTrackController;
|
1722
|
+
subtitleStreamController?: typeof SubtitleStreamController;
|
1723
|
+
subtitleTrackController?: typeof SubtitleTrackController;
|
1724
|
+
timelineController?: typeof TimelineController;
|
1725
|
+
emeController?: typeof EMEController;
|
1726
|
+
cmcd?: CMCDControllerConfig;
|
1727
|
+
cmcdController?: typeof CMCDController;
|
1728
|
+
contentSteeringController?: typeof ContentSteeringController;
|
1729
|
+
useMediaCapabilities: boolean;
|
1730
|
+
abrController: typeof AbrController;
|
1731
|
+
bufferController: typeof BufferController;
|
1732
|
+
capLevelController: typeof CapLevelController;
|
1733
|
+
errorController: typeof ErrorController;
|
1734
|
+
fpsController: typeof FPSController;
|
1735
|
+
progressive: boolean;
|
1736
|
+
lowLatencyMode: boolean;
|
1737
|
+
} & ABRControllerConfig & BufferControllerConfig & CapLevelControllerConfig & EMEControllerConfig & FPSControllerConfig & LevelControllerConfig & MP4RemuxerConfig & StreamControllerConfig & SelectionPreferences & LatencyControllerConfig & MetadataControllerConfig & TimelineControllerConfig & TSDemuxerConfig & HlsLoadPolicies & FragmentLoaderConfig & PlaylistLoaderConfig;
|
1738
|
+
|
1739
|
+
export declare interface HlsEventEmitter {
|
1740
|
+
on<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
|
1741
|
+
once<E extends keyof HlsListeners, Context = undefined>(event: E, listener: HlsListeners[E], context?: Context): void;
|
1742
|
+
removeAllListeners<E extends keyof HlsListeners>(event?: E): void;
|
1743
|
+
off<E extends keyof HlsListeners, Context = undefined>(event: E, listener?: HlsListeners[E], context?: Context, once?: boolean): void;
|
1744
|
+
listeners<E extends keyof HlsListeners>(event: E): HlsListeners[E][];
|
1745
|
+
emit<E extends keyof HlsListeners>(event: E, name: E, eventObject: Parameters<HlsListeners[E]>[1]): boolean;
|
1746
|
+
listenerCount<E extends keyof HlsListeners>(event: E): number;
|
1747
|
+
}
|
1748
|
+
|
1749
|
+
/**
|
1750
|
+
* Defines each Event type and payload by Event name. Used in {@link hls.js#HlsEventEmitter} to strongly type the event listener API.
|
1751
|
+
*/
|
1752
|
+
export declare interface HlsListeners {
|
1753
|
+
[Events.MEDIA_ATTACHING]: (event: Events.MEDIA_ATTACHING, data: MediaAttachingData) => void;
|
1754
|
+
[Events.MEDIA_ATTACHED]: (event: Events.MEDIA_ATTACHED, data: MediaAttachedData) => void;
|
1755
|
+
[Events.MEDIA_DETACHING]: (event: Events.MEDIA_DETACHING) => void;
|
1756
|
+
[Events.MEDIA_DETACHED]: (event: Events.MEDIA_DETACHED) => void;
|
1757
|
+
[Events.MEDIA_ENDED]: (event: Events.MEDIA_ENDED, data: MediaEndedData) => void;
|
1758
|
+
[Events.BUFFER_RESET]: (event: Events.BUFFER_RESET) => void;
|
1759
|
+
[Events.BUFFER_CODECS]: (event: Events.BUFFER_CODECS, data: BufferCodecsData) => void;
|
1760
|
+
[Events.BUFFER_CREATED]: (event: Events.BUFFER_CREATED, data: BufferCreatedData) => void;
|
1761
|
+
[Events.BUFFER_APPENDING]: (event: Events.BUFFER_APPENDING, data: BufferAppendingData) => void;
|
1762
|
+
[Events.BUFFER_APPENDED]: (event: Events.BUFFER_APPENDED, data: BufferAppendedData) => void;
|
1763
|
+
[Events.BUFFER_EOS]: (event: Events.BUFFER_EOS, data: BufferEOSData) => void;
|
1764
|
+
[Events.BUFFER_FLUSHING]: (event: Events.BUFFER_FLUSHING, data: BufferFlushingData) => void;
|
1765
|
+
[Events.BUFFER_FLUSHED]: (event: Events.BUFFER_FLUSHED, data: BufferFlushedData) => void;
|
1766
|
+
[Events.MANIFEST_LOADING]: (event: Events.MANIFEST_LOADING, data: ManifestLoadingData) => void;
|
1767
|
+
[Events.MANIFEST_LOADED]: (event: Events.MANIFEST_LOADED, data: ManifestLoadedData) => void;
|
1768
|
+
[Events.MANIFEST_PARSED]: (event: Events.MANIFEST_PARSED, data: ManifestParsedData) => void;
|
1769
|
+
[Events.LEVEL_SWITCHING]: (event: Events.LEVEL_SWITCHING, data: LevelSwitchingData) => void;
|
1770
|
+
[Events.LEVEL_SWITCHED]: (event: Events.LEVEL_SWITCHED, data: LevelSwitchedData) => void;
|
1771
|
+
[Events.LEVEL_LOADING]: (event: Events.LEVEL_LOADING, data: LevelLoadingData) => void;
|
1772
|
+
[Events.LEVEL_LOADED]: (event: Events.LEVEL_LOADED, data: LevelLoadedData) => void;
|
1773
|
+
[Events.LEVEL_UPDATED]: (event: Events.LEVEL_UPDATED, data: LevelUpdatedData) => void;
|
1774
|
+
[Events.LEVEL_PTS_UPDATED]: (event: Events.LEVEL_PTS_UPDATED, data: LevelPTSUpdatedData) => void;
|
1775
|
+
[Events.LEVELS_UPDATED]: (event: Events.LEVELS_UPDATED, data: LevelsUpdatedData) => void;
|
1776
|
+
[Events.AUDIO_TRACKS_UPDATED]: (event: Events.AUDIO_TRACKS_UPDATED, data: AudioTracksUpdatedData) => void;
|
1777
|
+
[Events.AUDIO_TRACK_SWITCHING]: (event: Events.AUDIO_TRACK_SWITCHING, data: AudioTrackSwitchingData) => void;
|
1778
|
+
[Events.AUDIO_TRACK_SWITCHED]: (event: Events.AUDIO_TRACK_SWITCHED, data: AudioTrackSwitchedData) => void;
|
1779
|
+
[Events.AUDIO_TRACK_LOADING]: (event: Events.AUDIO_TRACK_LOADING, data: TrackLoadingData) => void;
|
1780
|
+
[Events.AUDIO_TRACK_LOADED]: (event: Events.AUDIO_TRACK_LOADED, data: AudioTrackLoadedData) => void;
|
1781
|
+
[Events.SUBTITLE_TRACKS_UPDATED]: (event: Events.SUBTITLE_TRACKS_UPDATED, data: SubtitleTracksUpdatedData) => void;
|
1782
|
+
[Events.SUBTITLE_TRACKS_CLEARED]: (event: Events.SUBTITLE_TRACKS_CLEARED) => void;
|
1783
|
+
[Events.SUBTITLE_TRACK_SWITCH]: (event: Events.SUBTITLE_TRACK_SWITCH, data: SubtitleTrackSwitchData) => void;
|
1784
|
+
[Events.SUBTITLE_TRACK_LOADING]: (event: Events.SUBTITLE_TRACK_LOADING, data: TrackLoadingData) => void;
|
1785
|
+
[Events.SUBTITLE_TRACK_LOADED]: (event: Events.SUBTITLE_TRACK_LOADED, data: SubtitleTrackLoadedData) => void;
|
1786
|
+
[Events.SUBTITLE_FRAG_PROCESSED]: (event: Events.SUBTITLE_FRAG_PROCESSED, data: SubtitleFragProcessedData) => void;
|
1787
|
+
[Events.CUES_PARSED]: (event: Events.CUES_PARSED, data: CuesParsedData) => void;
|
1788
|
+
[Events.NON_NATIVE_TEXT_TRACKS_FOUND]: (event: Events.NON_NATIVE_TEXT_TRACKS_FOUND, data: NonNativeTextTracksData) => void;
|
1789
|
+
[Events.INIT_PTS_FOUND]: (event: Events.INIT_PTS_FOUND, data: InitPTSFoundData) => void;
|
1790
|
+
[Events.FRAG_LOADING]: (event: Events.FRAG_LOADING, data: FragLoadingData) => void;
|
1791
|
+
[Events.FRAG_LOAD_EMERGENCY_ABORTED]: (event: Events.FRAG_LOAD_EMERGENCY_ABORTED, data: FragLoadEmergencyAbortedData) => void;
|
1792
|
+
[Events.FRAG_LOADED]: (event: Events.FRAG_LOADED, data: FragLoadedData) => void;
|
1793
|
+
[Events.FRAG_DECRYPTED]: (event: Events.FRAG_DECRYPTED, data: FragDecryptedData) => void;
|
1794
|
+
[Events.FRAG_PARSING_INIT_SEGMENT]: (event: Events.FRAG_PARSING_INIT_SEGMENT, data: FragParsingInitSegmentData) => void;
|
1795
|
+
[Events.FRAG_PARSING_USERDATA]: (event: Events.FRAG_PARSING_USERDATA, data: FragParsingUserdataData) => void;
|
1796
|
+
[Events.FRAG_PARSING_METADATA]: (event: Events.FRAG_PARSING_METADATA, data: FragParsingMetadataData) => void;
|
1797
|
+
[Events.FRAG_PARSED]: (event: Events.FRAG_PARSED, data: FragParsedData) => void;
|
1798
|
+
[Events.FRAG_BUFFERED]: (event: Events.FRAG_BUFFERED, data: FragBufferedData) => void;
|
1799
|
+
[Events.FRAG_CHANGED]: (event: Events.FRAG_CHANGED, data: FragChangedData) => void;
|
1800
|
+
[Events.FPS_DROP]: (event: Events.FPS_DROP, data: FPSDropData) => void;
|
1801
|
+
[Events.FPS_DROP_LEVEL_CAPPING]: (event: Events.FPS_DROP_LEVEL_CAPPING, data: FPSDropLevelCappingData) => void;
|
1802
|
+
[Events.MAX_AUTO_LEVEL_UPDATED]: (event: Events.MAX_AUTO_LEVEL_UPDATED, data: MaxAutoLevelUpdatedData) => void;
|
1803
|
+
[Events.ERROR]: (event: Events.ERROR, data: ErrorData) => void;
|
1804
|
+
[Events.DESTROYING]: (event: Events.DESTROYING) => void;
|
1805
|
+
[Events.KEY_LOADING]: (event: Events.KEY_LOADING, data: KeyLoadingData) => void;
|
1806
|
+
[Events.KEY_LOADED]: (event: Events.KEY_LOADED, data: KeyLoadedData) => void;
|
1807
|
+
[Events.LIVE_BACK_BUFFER_REACHED]: (event: Events.LIVE_BACK_BUFFER_REACHED, data: LiveBackBufferData) => void;
|
1808
|
+
[Events.BACK_BUFFER_REACHED]: (event: Events.BACK_BUFFER_REACHED, data: BackBufferData) => void;
|
1809
|
+
[Events.STEERING_MANIFEST_LOADED]: (event: Events.STEERING_MANIFEST_LOADED, data: SteeringManifestLoadedData) => void;
|
1810
|
+
}
|
1811
|
+
|
1812
|
+
export declare type HlsLoadPolicies = {
|
1813
|
+
fragLoadPolicy: LoadPolicy;
|
1814
|
+
keyLoadPolicy: LoadPolicy;
|
1815
|
+
certLoadPolicy: LoadPolicy;
|
1816
|
+
playlistLoadPolicy: LoadPolicy;
|
1817
|
+
manifestLoadPolicy: LoadPolicy;
|
1818
|
+
steeringManifestLoadPolicy: LoadPolicy;
|
1819
|
+
};
|
1820
|
+
|
1821
|
+
export declare interface HlsPerformanceTiming {
|
1822
|
+
start: number;
|
1823
|
+
end: number;
|
1824
|
+
}
|
1825
|
+
|
1826
|
+
export declare interface HlsProgressivePerformanceTiming extends HlsPerformanceTiming {
|
1827
|
+
first: number;
|
1828
|
+
}
|
1829
|
+
|
1830
|
+
export declare const enum HlsSkip {
|
1831
|
+
No = "",
|
1832
|
+
Yes = "YES",
|
1833
|
+
v2 = "v2"
|
1834
|
+
}
|
1835
|
+
|
1836
|
+
export declare class HlsUrlParameters {
|
1837
|
+
msn?: number;
|
1838
|
+
part?: number;
|
1839
|
+
skip?: HlsSkip;
|
1840
|
+
constructor(msn?: number, part?: number, skip?: HlsSkip);
|
1841
|
+
addDirectives(uri: string): string | never;
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
export declare type IErrorAction = {
|
1845
|
+
action: NetworkErrorAction;
|
1846
|
+
flags: ErrorActionFlags;
|
1847
|
+
retryCount?: number;
|
1848
|
+
retryConfig?: RetryConfig;
|
1849
|
+
hdcpLevel?: HdcpLevel;
|
1850
|
+
nextAutoLevel?: number;
|
1851
|
+
resolved?: boolean;
|
1852
|
+
};
|
1853
|
+
|
1854
|
+
declare interface ILogFunction {
|
1855
|
+
(message?: any, ...optionalParams: any[]): void;
|
1856
|
+
}
|
1857
|
+
|
1858
|
+
export declare interface ILogger {
|
1859
|
+
trace: ILogFunction;
|
1860
|
+
debug: ILogFunction;
|
1861
|
+
log: ILogFunction;
|
1862
|
+
warn: ILogFunction;
|
1863
|
+
info: ILogFunction;
|
1864
|
+
error: ILogFunction;
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
export declare interface InitPTSFoundData {
|
1868
|
+
id: PlaylistLevelType;
|
1869
|
+
frag: MediaFragment;
|
1870
|
+
initPTS: number;
|
1871
|
+
timescale: number;
|
1872
|
+
}
|
1873
|
+
|
1874
|
+
declare interface InitSegmentData {
|
1875
|
+
tracks?: TrackSet;
|
1876
|
+
initPTS: number | undefined;
|
1877
|
+
timescale: number | undefined;
|
1878
|
+
}
|
1879
|
+
|
1880
|
+
export declare interface KeyLoadedData {
|
1881
|
+
frag: Fragment;
|
1882
|
+
keyInfo: KeyLoaderInfo;
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
declare class KeyLoader implements ComponentAPI {
|
1886
|
+
private readonly config;
|
1887
|
+
keyUriToKeyInfo: {
|
1888
|
+
[keyuri: string]: KeyLoaderInfo;
|
1889
|
+
};
|
1890
|
+
emeController: EMEController | null;
|
1891
|
+
constructor(config: HlsConfig);
|
1892
|
+
abort(type?: PlaylistLevelType): void;
|
1893
|
+
detach(): void;
|
1894
|
+
destroy(): void;
|
1895
|
+
createKeyLoadError(frag: Fragment, details: ErrorDetails | undefined, error: Error, networkDetails?: any, response?: {
|
1896
|
+
url: string;
|
1897
|
+
data: undefined;
|
1898
|
+
code: number;
|
1899
|
+
text: string;
|
1900
|
+
}): LoadError;
|
1901
|
+
loadClear(loadingFrag: Fragment, encryptedFragments: Fragment[]): void | Promise<void>;
|
1902
|
+
load(frag: Fragment): Promise<KeyLoadedData>;
|
1903
|
+
loadInternal(frag: Fragment, keySystemFormat?: KeySystemFormats): Promise<KeyLoadedData>;
|
1904
|
+
loadKeyEME(keyInfo: KeyLoaderInfo, frag: Fragment): Promise<KeyLoadedData>;
|
1905
|
+
loadKeyHTTP(keyInfo: KeyLoaderInfo, frag: Fragment): Promise<KeyLoadedData>;
|
1906
|
+
private resetLoader;
|
1907
|
+
}
|
1908
|
+
|
1909
|
+
declare interface KeyLoaderContext extends LoaderContext {
|
1910
|
+
keyInfo: KeyLoaderInfo;
|
1911
|
+
frag: Fragment;
|
1912
|
+
}
|
1913
|
+
|
1914
|
+
declare interface KeyLoaderInfo {
|
1915
|
+
decryptdata: LevelKey;
|
1916
|
+
keyLoadPromise: Promise<KeyLoadedData> | null;
|
1917
|
+
loader: Loader<KeyLoaderContext> | null;
|
1918
|
+
mediaKeySessionContext: MediaKeySessionContext | null;
|
1919
|
+
}
|
1920
|
+
|
1921
|
+
export declare interface KeyLoadingData {
|
1922
|
+
frag: Fragment;
|
1923
|
+
}
|
1924
|
+
|
1925
|
+
export declare const enum KeySystemFormats {
|
1926
|
+
CLEARKEY = "org.w3.clearkey",
|
1927
|
+
FAIRPLAY = "com.apple.streamingkeydelivery",
|
1928
|
+
PLAYREADY = "com.microsoft.playready",
|
1929
|
+
WIDEVINE = "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"
|
1930
|
+
}
|
1931
|
+
|
1932
|
+
/**
|
1933
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess
|
1934
|
+
*/
|
1935
|
+
export declare const enum KeySystems {
|
1936
|
+
CLEARKEY = "org.w3.clearkey",
|
1937
|
+
FAIRPLAY = "com.apple.fps",
|
1938
|
+
PLAYREADY = "com.microsoft.playready",
|
1939
|
+
WIDEVINE = "com.widevine.alpha"
|
1940
|
+
}
|
1941
|
+
|
1942
|
+
export declare type LatencyControllerConfig = {
|
1943
|
+
liveSyncDurationCount: number;
|
1944
|
+
liveMaxLatencyDurationCount: number;
|
1945
|
+
liveSyncDuration?: number;
|
1946
|
+
liveMaxLatencyDuration?: number;
|
1947
|
+
maxLiveSyncPlaybackRate: number;
|
1948
|
+
liveSyncOnStallIncrease: number;
|
1949
|
+
};
|
1950
|
+
|
1951
|
+
export declare class Level {
|
1952
|
+
readonly _attrs: LevelAttributes[];
|
1953
|
+
readonly audioCodec: string | undefined;
|
1954
|
+
readonly bitrate: number;
|
1955
|
+
readonly codecSet: string;
|
1956
|
+
readonly url: string[];
|
1957
|
+
readonly frameRate: number;
|
1958
|
+
readonly height: number;
|
1959
|
+
readonly id: number;
|
1960
|
+
readonly name: string;
|
1961
|
+
readonly videoCodec: string | undefined;
|
1962
|
+
readonly width: number;
|
1963
|
+
details?: LevelDetails;
|
1964
|
+
fragmentError: number;
|
1965
|
+
loadError: number;
|
1966
|
+
loaded?: {
|
1967
|
+
bytes: number;
|
1968
|
+
duration: number;
|
1969
|
+
};
|
1970
|
+
realBitrate: number;
|
1971
|
+
supportedPromise?: Promise<MediaDecodingInfo>;
|
1972
|
+
supportedResult?: MediaDecodingInfo;
|
1973
|
+
private _avgBitrate;
|
1974
|
+
private _audioGroups?;
|
1975
|
+
private _subtitleGroups?;
|
1976
|
+
private readonly _urlId;
|
1977
|
+
constructor(data: LevelParsed | MediaPlaylist);
|
1978
|
+
get maxBitrate(): number;
|
1979
|
+
get averageBitrate(): number;
|
1980
|
+
get attrs(): LevelAttributes;
|
1981
|
+
get codecs(): string;
|
1982
|
+
get pathwayId(): string;
|
1983
|
+
get videoRange(): VideoRange;
|
1984
|
+
get score(): number;
|
1985
|
+
get uri(): string;
|
1986
|
+
hasAudioGroup(groupId: string | undefined): boolean;
|
1987
|
+
hasSubtitleGroup(groupId: string | undefined): boolean;
|
1988
|
+
get audioGroups(): (string | undefined)[] | undefined;
|
1989
|
+
get subtitleGroups(): (string | undefined)[] | undefined;
|
1990
|
+
addGroupId(type: string, groupId: string | undefined): void;
|
1991
|
+
get urlId(): number;
|
1992
|
+
set urlId(value: number);
|
1993
|
+
get audioGroupIds(): (string | undefined)[] | undefined;
|
1994
|
+
get textGroupIds(): (string | undefined)[] | undefined;
|
1995
|
+
get audioGroupId(): string | undefined;
|
1996
|
+
get textGroupId(): string | undefined;
|
1997
|
+
addFallback(): void;
|
1998
|
+
}
|
1999
|
+
|
2000
|
+
export declare interface LevelAttributes extends AttrList {
|
2001
|
+
'ALLOWED-CPC'?: string;
|
2002
|
+
AUDIO?: string;
|
2003
|
+
'AVERAGE-BANDWIDTH'?: string;
|
2004
|
+
BANDWIDTH?: string;
|
2005
|
+
'CLOSED-CAPTIONS'?: string;
|
2006
|
+
CODECS?: string;
|
2007
|
+
'FRAME-RATE'?: string;
|
2008
|
+
'HDCP-LEVEL'?: 'TYPE-0' | 'TYPE-1' | 'NONE';
|
2009
|
+
'PATHWAY-ID'?: string;
|
2010
|
+
RESOLUTION?: string;
|
2011
|
+
SCORE?: string;
|
2012
|
+
'STABLE-VARIANT-ID'?: string;
|
2013
|
+
SUBTITLES?: string;
|
2014
|
+
'SUPPLEMENTAL-CODECS'?: string;
|
2015
|
+
VIDEO?: string;
|
2016
|
+
'VIDEO-RANGE'?: VideoRange;
|
2017
|
+
}
|
2018
|
+
|
2019
|
+
export declare type LevelControllerConfig = {
|
2020
|
+
startLevel?: number;
|
2021
|
+
};
|
2022
|
+
|
2023
|
+
/**
|
2024
|
+
* Object representing parsed data from an HLS Media Playlist. Found in {@link hls.js#Level.details}.
|
2025
|
+
*/
|
2026
|
+
export declare class LevelDetails {
|
2027
|
+
PTSKnown: boolean;
|
2028
|
+
alignedSliding: boolean;
|
2029
|
+
averagetargetduration?: number;
|
2030
|
+
endCC: number;
|
2031
|
+
endSN: number;
|
2032
|
+
fragments: MediaFragment[];
|
2033
|
+
fragmentHint?: MediaFragment;
|
2034
|
+
partList: Part[] | null;
|
2035
|
+
dateRanges: Record<string, DateRange>;
|
2036
|
+
dateRangeTagCount: number;
|
2037
|
+
live: boolean;
|
2038
|
+
ageHeader: number;
|
2039
|
+
advancedDateTime?: number;
|
2040
|
+
updated: boolean;
|
2041
|
+
advanced: boolean;
|
2042
|
+
availabilityDelay?: number;
|
2043
|
+
misses: number;
|
2044
|
+
startCC: number;
|
2045
|
+
startSN: number;
|
2046
|
+
startTimeOffset: number | null;
|
2047
|
+
targetduration: number;
|
2048
|
+
totalduration: number;
|
2049
|
+
type: string | null;
|
2050
|
+
url: string;
|
2051
|
+
m3u8: string;
|
2052
|
+
version: number | null;
|
2053
|
+
canBlockReload: boolean;
|
2054
|
+
canSkipUntil: number;
|
2055
|
+
canSkipDateRanges: boolean;
|
2056
|
+
skippedSegments: number;
|
2057
|
+
recentlyRemovedDateranges?: string[];
|
2058
|
+
partHoldBack: number;
|
2059
|
+
holdBack: number;
|
2060
|
+
partTarget: number;
|
2061
|
+
preloadHint?: AttrList;
|
2062
|
+
renditionReports?: AttrList[];
|
2063
|
+
tuneInGoal: number;
|
2064
|
+
deltaUpdateFailed?: boolean;
|
2065
|
+
driftStartTime: number;
|
2066
|
+
driftEndTime: number;
|
2067
|
+
driftStart: number;
|
2068
|
+
driftEnd: number;
|
2069
|
+
encryptedFragments: Fragment[];
|
2070
|
+
playlistParsingError: Error | null;
|
2071
|
+
variableList: VariableMap | null;
|
2072
|
+
hasVariableRefs: boolean;
|
2073
|
+
constructor(baseUrl: string);
|
2074
|
+
reloaded(previous: LevelDetails | undefined): void;
|
2075
|
+
get hasProgramDateTime(): boolean;
|
2076
|
+
get levelTargetDuration(): number;
|
2077
|
+
get drift(): number;
|
2078
|
+
get edge(): number;
|
2079
|
+
get partEnd(): number;
|
2080
|
+
get fragmentEnd(): number;
|
2081
|
+
get age(): number;
|
2082
|
+
get lastPartIndex(): number;
|
2083
|
+
get lastPartSn(): number;
|
2084
|
+
}
|
2085
|
+
|
2086
|
+
export declare class LevelKey implements DecryptData {
|
2087
|
+
readonly uri: string;
|
2088
|
+
readonly method: string;
|
2089
|
+
readonly keyFormat: string;
|
2090
|
+
readonly keyFormatVersions: number[];
|
2091
|
+
readonly encrypted: boolean;
|
2092
|
+
readonly isCommonEncryption: boolean;
|
2093
|
+
iv: Uint8Array | null;
|
2094
|
+
key: Uint8Array | null;
|
2095
|
+
keyId: Uint8Array | null;
|
2096
|
+
pssh: Uint8Array | null;
|
2097
|
+
static clearKeyUriToKeyIdMap(): void;
|
2098
|
+
constructor(method: string, uri: string, format: string, formatversions?: number[], iv?: Uint8Array | null);
|
2099
|
+
isSupported(): boolean;
|
2100
|
+
getDecryptData(sn: number | 'initSegment'): LevelKey | null;
|
2101
|
+
}
|
2102
|
+
|
2103
|
+
export declare interface LevelLoadedData {
|
2104
|
+
details: LevelDetails;
|
2105
|
+
id: number;
|
2106
|
+
level: number;
|
2107
|
+
networkDetails: any;
|
2108
|
+
stats: LoaderStats;
|
2109
|
+
deliveryDirectives: HlsUrlParameters | null;
|
2110
|
+
}
|
2111
|
+
|
2112
|
+
export declare interface LevelLoadingData {
|
2113
|
+
id: number;
|
2114
|
+
level: number;
|
2115
|
+
pathwayId: string | undefined;
|
2116
|
+
url: string;
|
2117
|
+
deliveryDirectives: HlsUrlParameters | null;
|
2118
|
+
}
|
2119
|
+
|
2120
|
+
export declare interface LevelParsed {
|
2121
|
+
attrs: LevelAttributes;
|
2122
|
+
audioCodec?: string;
|
2123
|
+
bitrate: number;
|
2124
|
+
details?: LevelDetails;
|
2125
|
+
height?: number;
|
2126
|
+
id?: number;
|
2127
|
+
name: string;
|
2128
|
+
textCodec?: string;
|
2129
|
+
unknownCodecs?: string[];
|
2130
|
+
url: string;
|
2131
|
+
videoCodec?: string;
|
2132
|
+
width?: number;
|
2133
|
+
}
|
2134
|
+
|
2135
|
+
export declare interface LevelPTSUpdatedData {
|
2136
|
+
details: LevelDetails;
|
2137
|
+
level: Level;
|
2138
|
+
drift: number;
|
2139
|
+
type: string;
|
2140
|
+
frag: Fragment;
|
2141
|
+
start: number;
|
2142
|
+
end: number;
|
2143
|
+
}
|
2144
|
+
|
2145
|
+
export declare interface LevelsUpdatedData {
|
2146
|
+
levels: Array<Level>;
|
2147
|
+
}
|
2148
|
+
|
2149
|
+
export declare interface LevelSwitchedData {
|
2150
|
+
level: number;
|
2151
|
+
}
|
2152
|
+
|
2153
|
+
export declare interface LevelSwitchingData {
|
2154
|
+
level: number;
|
2155
|
+
attrs: LevelAttributes;
|
2156
|
+
details: LevelDetails | undefined;
|
2157
|
+
bitrate: number;
|
2158
|
+
averageBitrate: number;
|
2159
|
+
maxBitrate: number;
|
2160
|
+
realBitrate: number;
|
2161
|
+
width: number;
|
2162
|
+
height: number;
|
2163
|
+
codecSet: string;
|
2164
|
+
audioCodec: string | undefined;
|
2165
|
+
videoCodec: string | undefined;
|
2166
|
+
audioGroups: (string | undefined)[] | undefined;
|
2167
|
+
subtitleGroups: (string | undefined)[] | undefined;
|
2168
|
+
loaded: {
|
2169
|
+
bytes: number;
|
2170
|
+
duration: number;
|
2171
|
+
} | undefined;
|
2172
|
+
loadError: number;
|
2173
|
+
fragmentError: number;
|
2174
|
+
name: string | undefined;
|
2175
|
+
id: number;
|
2176
|
+
uri: string;
|
2177
|
+
url: string[];
|
2178
|
+
urlId: 0;
|
2179
|
+
audioGroupIds: (string | undefined)[] | undefined;
|
2180
|
+
textGroupIds: (string | undefined)[] | undefined;
|
2181
|
+
}
|
2182
|
+
|
2183
|
+
export declare interface LevelUpdatedData {
|
2184
|
+
details: LevelDetails;
|
2185
|
+
level: number;
|
2186
|
+
}
|
2187
|
+
|
2188
|
+
/**
|
2189
|
+
* @deprecated Use BackBufferData
|
2190
|
+
*/
|
2191
|
+
export declare interface LiveBackBufferData extends BackBufferData {
|
2192
|
+
}
|
2193
|
+
|
2194
|
+
export declare interface Loader<T extends LoaderContext> {
|
2195
|
+
destroy(): void;
|
2196
|
+
abort(): void;
|
2197
|
+
load(context: T, config: LoaderConfiguration, callbacks: LoaderCallbacks<T>): void;
|
2198
|
+
/**
|
2199
|
+
* `getCacheAge()` is called by hls.js to get the duration that a given object
|
2200
|
+
* has been sitting in a cache proxy when playing live. If implemented,
|
2201
|
+
* this should return a value in seconds.
|
2202
|
+
*
|
2203
|
+
* For HTTP based loaders, this should return the contents of the "age" header.
|
2204
|
+
*
|
2205
|
+
* @returns time object being lodaded
|
2206
|
+
*/
|
2207
|
+
getCacheAge?: () => number | null;
|
2208
|
+
getResponseHeader?: (name: string) => string | null;
|
2209
|
+
context: T | null;
|
2210
|
+
stats: LoaderStats;
|
2211
|
+
}
|
2212
|
+
|
2213
|
+
export declare interface LoaderCallbacks<T extends LoaderContext> {
|
2214
|
+
onSuccess: LoaderOnSuccess<T>;
|
2215
|
+
onError: LoaderOnError<T>;
|
2216
|
+
onTimeout: LoaderOnTimeout<T>;
|
2217
|
+
onAbort?: LoaderOnAbort<T>;
|
2218
|
+
onProgress?: LoaderOnProgress<T>;
|
2219
|
+
}
|
2220
|
+
|
2221
|
+
export declare type LoaderConfig = {
|
2222
|
+
maxTimeToFirstByteMs: number;
|
2223
|
+
maxLoadTimeMs: number;
|
2224
|
+
timeoutRetry: RetryConfig | null;
|
2225
|
+
errorRetry: RetryConfig | null;
|
2226
|
+
};
|
2227
|
+
|
2228
|
+
export declare interface LoaderConfiguration {
|
2229
|
+
loadPolicy: LoaderConfig;
|
2230
|
+
/**
|
2231
|
+
* @deprecated use LoaderConfig timeoutRetry and errorRetry maxNumRetry
|
2232
|
+
*/
|
2233
|
+
maxRetry: number;
|
2234
|
+
/**
|
2235
|
+
* @deprecated use LoaderConfig maxTimeToFirstByteMs and maxLoadTimeMs
|
2236
|
+
*/
|
2237
|
+
timeout: number;
|
2238
|
+
/**
|
2239
|
+
* @deprecated use LoaderConfig timeoutRetry and errorRetry retryDelayMs
|
2240
|
+
*/
|
2241
|
+
retryDelay: number;
|
2242
|
+
/**
|
2243
|
+
* @deprecated use LoaderConfig timeoutRetry and errorRetry maxRetryDelayMs
|
2244
|
+
*/
|
2245
|
+
maxRetryDelay: number;
|
2246
|
+
highWaterMark?: number;
|
2247
|
+
}
|
2248
|
+
|
2249
|
+
export declare interface LoaderContext {
|
2250
|
+
url: string;
|
2251
|
+
responseType: string;
|
2252
|
+
headers?: Record<string, string>;
|
2253
|
+
rangeStart?: number;
|
2254
|
+
rangeEnd?: number;
|
2255
|
+
progressData?: boolean;
|
2256
|
+
}
|
2257
|
+
|
2258
|
+
export declare type LoaderOnAbort<T extends LoaderContext> = (stats: LoaderStats, context: T, networkDetails: any) => void;
|
2259
|
+
|
2260
|
+
export declare type LoaderOnError<T extends LoaderContext> = (error: {
|
2261
|
+
code: number;
|
2262
|
+
text: string;
|
2263
|
+
}, context: T, networkDetails: any, stats: LoaderStats) => void;
|
2264
|
+
|
2265
|
+
export declare type LoaderOnProgress<T extends LoaderContext> = (stats: LoaderStats, context: T, data: string | ArrayBuffer, networkDetails: any) => void;
|
2266
|
+
|
2267
|
+
export declare type LoaderOnSuccess<T extends LoaderContext> = (response: LoaderResponse, stats: LoaderStats, context: T, networkDetails: any) => void;
|
2268
|
+
|
2269
|
+
export declare type LoaderOnTimeout<T extends LoaderContext> = (stats: LoaderStats, context: T, networkDetails: any) => void;
|
2270
|
+
|
2271
|
+
export declare interface LoaderResponse {
|
2272
|
+
url: string;
|
2273
|
+
data?: string | ArrayBuffer | Object;
|
2274
|
+
code?: number;
|
2275
|
+
text?: string;
|
2276
|
+
}
|
2277
|
+
|
2278
|
+
declare class LoadError extends Error {
|
2279
|
+
readonly data: FragLoadFailResult;
|
2280
|
+
constructor(data: FragLoadFailResult);
|
2281
|
+
}
|
2282
|
+
|
2283
|
+
export declare interface LoaderStats {
|
2284
|
+
aborted: boolean;
|
2285
|
+
loaded: number;
|
2286
|
+
retry: number;
|
2287
|
+
total: number;
|
2288
|
+
chunkCount: number;
|
2289
|
+
bwEstimate: number;
|
2290
|
+
loading: HlsProgressivePerformanceTiming;
|
2291
|
+
parsing: HlsPerformanceTiming;
|
2292
|
+
buffering: HlsProgressivePerformanceTiming;
|
2293
|
+
}
|
2294
|
+
|
2295
|
+
export declare type LoadPolicy = {
|
2296
|
+
default: LoaderConfig;
|
2297
|
+
};
|
2298
|
+
|
2299
|
+
export declare class LoadStats implements LoaderStats {
|
2300
|
+
aborted: boolean;
|
2301
|
+
loaded: number;
|
2302
|
+
retry: number;
|
2303
|
+
total: number;
|
2304
|
+
chunkCount: number;
|
2305
|
+
bwEstimate: number;
|
2306
|
+
loading: HlsProgressivePerformanceTiming;
|
2307
|
+
parsing: HlsPerformanceTiming;
|
2308
|
+
buffering: HlsProgressivePerformanceTiming;
|
2309
|
+
}
|
2310
|
+
|
2311
|
+
export declare class Logger implements ILogger {
|
2312
|
+
trace: ILogFunction;
|
2313
|
+
debug: ILogFunction;
|
2314
|
+
log: ILogFunction;
|
2315
|
+
warn: ILogFunction;
|
2316
|
+
info: ILogFunction;
|
2317
|
+
error: ILogFunction;
|
2318
|
+
constructor(label: string, logger: ILogger);
|
2319
|
+
}
|
2320
|
+
|
2321
|
+
export declare type MainPlaylistType = AudioPlaylistType | 'VIDEO';
|
2322
|
+
|
2323
|
+
export declare interface ManifestLoadedData {
|
2324
|
+
audioTracks: MediaPlaylist[];
|
2325
|
+
captions?: MediaPlaylist[];
|
2326
|
+
contentSteering: ContentSteeringOptions | null;
|
2327
|
+
levels: LevelParsed[];
|
2328
|
+
networkDetails: any;
|
2329
|
+
sessionData: Record<string, AttrList> | null;
|
2330
|
+
sessionKeys: LevelKey[] | null;
|
2331
|
+
startTimeOffset: number | null;
|
2332
|
+
stats: LoaderStats;
|
2333
|
+
subtitles?: MediaPlaylist[];
|
2334
|
+
url: string;
|
2335
|
+
variableList: VariableMap | null;
|
2336
|
+
}
|
2337
|
+
|
2338
|
+
export declare interface ManifestLoadingData {
|
2339
|
+
url: string;
|
2340
|
+
}
|
2341
|
+
|
2342
|
+
export declare interface ManifestParsedData {
|
2343
|
+
levels: Level[];
|
2344
|
+
audioTracks: MediaPlaylist[];
|
2345
|
+
subtitleTracks: MediaPlaylist[];
|
2346
|
+
sessionData: Record<string, AttrList> | null;
|
2347
|
+
sessionKeys: LevelKey[] | null;
|
2348
|
+
firstLevel: number;
|
2349
|
+
stats: LoaderStats;
|
2350
|
+
audio: boolean;
|
2351
|
+
video: boolean;
|
2352
|
+
altAudio: boolean;
|
2353
|
+
}
|
2354
|
+
|
2355
|
+
declare interface MaxAutoLevelUpdatedData {
|
2356
|
+
autoLevelCapping: number;
|
2357
|
+
levels: Level[] | null;
|
2358
|
+
maxAutoLevel: number;
|
2359
|
+
minAutoLevel: number;
|
2360
|
+
maxHdcpLevel: HdcpLevel;
|
2361
|
+
}
|
2362
|
+
|
2363
|
+
export declare interface MediaAttachedData {
|
2364
|
+
media: HTMLMediaElement;
|
2365
|
+
mediaSource?: MediaSource;
|
2366
|
+
}
|
2367
|
+
|
2368
|
+
export declare interface MediaAttachingData {
|
2369
|
+
media: HTMLMediaElement;
|
2370
|
+
}
|
2371
|
+
|
2372
|
+
export declare interface MediaAttributes extends AttrList {
|
2373
|
+
'ASSOC-LANGUAGE'?: string;
|
2374
|
+
AUTOSELECT?: 'YES' | 'NO';
|
2375
|
+
CHANNELS?: string;
|
2376
|
+
CHARACTERISTICS?: string;
|
2377
|
+
DEFAULT?: 'YES' | 'NO';
|
2378
|
+
FORCED?: 'YES' | 'NO';
|
2379
|
+
'GROUP-ID': string;
|
2380
|
+
'INSTREAM-ID'?: string;
|
2381
|
+
LANGUAGE?: string;
|
2382
|
+
NAME: string;
|
2383
|
+
'PATHWAY-ID'?: string;
|
2384
|
+
'STABLE-RENDITION-ID'?: string;
|
2385
|
+
TYPE?: 'AUDIO' | 'VIDEO' | 'SUBTITLES' | 'CLOSED-CAPTIONS';
|
2386
|
+
URI?: string;
|
2387
|
+
}
|
2388
|
+
|
2389
|
+
export declare type MediaDecodingInfo = {
|
2390
|
+
supported: boolean;
|
2391
|
+
configurations: readonly MediaDecodingConfiguration[];
|
2392
|
+
decodingInfoResults: readonly MediaCapabilitiesDecodingInfo[];
|
2393
|
+
error?: Error;
|
2394
|
+
};
|
2395
|
+
|
2396
|
+
export declare interface MediaEndedData {
|
2397
|
+
stalled: boolean;
|
2398
|
+
}
|
2399
|
+
|
2400
|
+
export declare interface MediaFragment extends Fragment {
|
2401
|
+
sn: number;
|
2402
|
+
}
|
2403
|
+
|
2404
|
+
export declare type MediaKeyFunc = (keySystem: KeySystems, supportedConfigurations: MediaKeySystemConfiguration[]) => Promise<MediaKeySystemAccess>;
|
2405
|
+
|
2406
|
+
export declare interface MediaKeySessionContext {
|
2407
|
+
keySystem: KeySystems;
|
2408
|
+
mediaKeys: MediaKeys;
|
2409
|
+
decryptdata: LevelKey;
|
2410
|
+
mediaKeysSession: MediaKeySession;
|
2411
|
+
keyStatus: MediaKeyStatus;
|
2412
|
+
licenseXhr?: XMLHttpRequest;
|
2413
|
+
_onmessage?: (this: MediaKeySession, ev: MediaKeyMessageEvent) => any;
|
2414
|
+
_onkeystatuseschange?: (this: MediaKeySession, ev: Event) => any;
|
2415
|
+
}
|
2416
|
+
|
2417
|
+
export declare interface MediaPlaylist {
|
2418
|
+
attrs: MediaAttributes;
|
2419
|
+
audioCodec?: string;
|
2420
|
+
autoselect: boolean;
|
2421
|
+
bitrate: number;
|
2422
|
+
channels?: string;
|
2423
|
+
characteristics?: string;
|
2424
|
+
details?: LevelDetails;
|
2425
|
+
height?: number;
|
2426
|
+
default: boolean;
|
2427
|
+
forced: boolean;
|
2428
|
+
groupId: string;
|
2429
|
+
id: number;
|
2430
|
+
instreamId?: string;
|
2431
|
+
lang?: string;
|
2432
|
+
assocLang?: string;
|
2433
|
+
name: string;
|
2434
|
+
textCodec?: string;
|
2435
|
+
unknownCodecs?: string[];
|
2436
|
+
type: MediaPlaylistType | 'main';
|
2437
|
+
url: string;
|
2438
|
+
videoCodec?: string;
|
2439
|
+
width?: number;
|
2440
|
+
}
|
2441
|
+
|
2442
|
+
export declare type MediaPlaylistType = MainPlaylistType | SubtitlePlaylistType;
|
2443
|
+
|
2444
|
+
export declare type MetadataControllerConfig = {
|
2445
|
+
enableDateRangeMetadataCues: boolean;
|
2446
|
+
enableEmsgMetadataCues: boolean;
|
2447
|
+
enableID3MetadataCues: boolean;
|
2448
|
+
};
|
2449
|
+
|
2450
|
+
export declare interface MetadataSample {
|
2451
|
+
pts: number;
|
2452
|
+
dts: number;
|
2453
|
+
duration: number;
|
2454
|
+
len?: number;
|
2455
|
+
data: Uint8Array;
|
2456
|
+
type: MetadataSchema;
|
2457
|
+
}
|
2458
|
+
|
2459
|
+
export declare const enum MetadataSchema {
|
2460
|
+
audioId3 = "org.id3",
|
2461
|
+
dateRange = "com.apple.quicktime.HLS",
|
2462
|
+
emsg = "https://aomedia.org/emsg/ID3"
|
2463
|
+
}
|
2464
|
+
|
2465
|
+
export declare type MP4RemuxerConfig = {
|
2466
|
+
stretchShortVideoTrack: boolean;
|
2467
|
+
maxAudioFramesDrift: number;
|
2468
|
+
};
|
2469
|
+
|
2470
|
+
export declare interface NetworkComponentAPI extends ComponentAPI {
|
2471
|
+
startLoad(startPosition: number): void;
|
2472
|
+
stopLoad(): void;
|
2473
|
+
pauseBuffering?(): void;
|
2474
|
+
resumeBuffering?(): void;
|
2475
|
+
}
|
2476
|
+
|
2477
|
+
export declare const enum NetworkErrorAction {
|
2478
|
+
DoNothing = 0,
|
2479
|
+
SendEndCallback = 1,// Reserved for future use
|
2480
|
+
SendAlternateToPenaltyBox = 2,
|
2481
|
+
RemoveAlternatePermanently = 3,// Reserved for future use
|
2482
|
+
InsertDiscontinuity = 4,// Reserved for future use
|
2483
|
+
RetryRequest = 5
|
2484
|
+
}
|
2485
|
+
|
2486
|
+
export declare interface NonNativeTextTrack {
|
2487
|
+
_id?: string;
|
2488
|
+
label: any;
|
2489
|
+
kind: string;
|
2490
|
+
default: boolean;
|
2491
|
+
closedCaptions?: MediaPlaylist;
|
2492
|
+
subtitleTrack?: MediaPlaylist;
|
2493
|
+
}
|
2494
|
+
|
2495
|
+
export declare interface NonNativeTextTracksData {
|
2496
|
+
tracks: Array<NonNativeTextTrack>;
|
2497
|
+
}
|
2498
|
+
|
2499
|
+
declare interface PACData {
|
2500
|
+
row: number;
|
2501
|
+
indent: number | null;
|
2502
|
+
color: string | null;
|
2503
|
+
underline: boolean;
|
2504
|
+
italics: boolean;
|
2505
|
+
}
|
2506
|
+
|
2507
|
+
export declare type ParsedMultivariantPlaylist = {
|
2508
|
+
contentSteering: ContentSteeringOptions | null;
|
2509
|
+
levels: LevelParsed[];
|
2510
|
+
playlistParsingError: Error | null;
|
2511
|
+
sessionData: Record<string, AttrList> | null;
|
2512
|
+
sessionKeys: LevelKey[] | null;
|
2513
|
+
startTimeOffset: number | null;
|
2514
|
+
variableList: VariableMap | null;
|
2515
|
+
hasVariableRefs: boolean;
|
2516
|
+
};
|
2517
|
+
|
2518
|
+
/**
|
2519
|
+
* Object representing parsed data from an HLS Partial Segment. Found in {@link hls.js#LevelDetails.partList}.
|
2520
|
+
*/
|
2521
|
+
export declare class Part extends BaseSegment {
|
2522
|
+
readonly fragOffset: number;
|
2523
|
+
readonly duration: number;
|
2524
|
+
readonly gap: boolean;
|
2525
|
+
readonly independent: boolean;
|
2526
|
+
readonly relurl: string;
|
2527
|
+
readonly fragment: MediaFragment;
|
2528
|
+
readonly index: number;
|
2529
|
+
stats: LoadStats;
|
2530
|
+
constructor(partAttrs: AttrList, frag: MediaFragment, baseurl: string, index: number, previous?: Part);
|
2531
|
+
get start(): number;
|
2532
|
+
get end(): number;
|
2533
|
+
get loaded(): boolean;
|
2534
|
+
}
|
2535
|
+
|
2536
|
+
declare interface PartsLoadedData {
|
2537
|
+
frag: Fragment;
|
2538
|
+
part: Part | null;
|
2539
|
+
partsLoaded?: FragLoadedData[];
|
2540
|
+
}
|
2541
|
+
|
2542
|
+
export declare type PathwayClone = {
|
2543
|
+
'BASE-ID': string;
|
2544
|
+
ID: string;
|
2545
|
+
'URI-REPLACEMENT': UriReplacement;
|
2546
|
+
};
|
2547
|
+
|
2548
|
+
declare class PenState {
|
2549
|
+
foreground: string;
|
2550
|
+
underline: boolean;
|
2551
|
+
italics: boolean;
|
2552
|
+
background: string;
|
2553
|
+
flash: boolean;
|
2554
|
+
reset(): void;
|
2555
|
+
setStyles(styles: Partial<PenStyles>): void;
|
2556
|
+
isDefault(): boolean;
|
2557
|
+
equals(other: PenState): boolean;
|
2558
|
+
copy(newPenState: PenState): void;
|
2559
|
+
toString(): string;
|
2560
|
+
}
|
2561
|
+
|
2562
|
+
declare type PenStyles = {
|
2563
|
+
foreground: string | null;
|
2564
|
+
underline: boolean;
|
2565
|
+
italics: boolean;
|
2566
|
+
background: string;
|
2567
|
+
flash: boolean;
|
2568
|
+
};
|
2569
|
+
|
2570
|
+
export declare const enum PlaylistContextType {
|
2571
|
+
MANIFEST = "manifest",
|
2572
|
+
LEVEL = "level",
|
2573
|
+
AUDIO_TRACK = "audioTrack",
|
2574
|
+
SUBTITLE_TRACK = "subtitleTrack"
|
2575
|
+
}
|
2576
|
+
|
2577
|
+
export declare const enum PlaylistLevelType {
|
2578
|
+
MAIN = "main",
|
2579
|
+
AUDIO = "audio",
|
2580
|
+
SUBTITLE = "subtitle"
|
2581
|
+
}
|
2582
|
+
|
2583
|
+
/**
|
2584
|
+
* @deprecated use manifestLoadPolicy.default and playlistLoadPolicy.default
|
2585
|
+
*/
|
2586
|
+
export declare type PlaylistLoaderConfig = {
|
2587
|
+
manifestLoadingTimeOut: number;
|
2588
|
+
manifestLoadingMaxRetry: number;
|
2589
|
+
manifestLoadingRetryDelay: number;
|
2590
|
+
manifestLoadingMaxRetryTimeout: number;
|
2591
|
+
levelLoadingTimeOut: number;
|
2592
|
+
levelLoadingMaxRetry: number;
|
2593
|
+
levelLoadingRetryDelay: number;
|
2594
|
+
levelLoadingMaxRetryTimeout: number;
|
2595
|
+
};
|
2596
|
+
|
2597
|
+
export declare interface PlaylistLoaderConstructor {
|
2598
|
+
new (confg: HlsConfig): Loader<PlaylistLoaderContext>;
|
2599
|
+
}
|
2600
|
+
|
2601
|
+
export declare interface PlaylistLoaderContext extends LoaderContext {
|
2602
|
+
type: PlaylistContextType;
|
2603
|
+
level: number | null;
|
2604
|
+
id: number | null;
|
2605
|
+
groupId?: string;
|
2606
|
+
pathwayId?: string;
|
2607
|
+
levelDetails?: LevelDetails;
|
2608
|
+
deliveryDirectives: HlsUrlParameters | null;
|
2609
|
+
}
|
2610
|
+
|
2611
|
+
declare type RationalTimestamp = {
|
2612
|
+
baseTime: number;
|
2613
|
+
timescale: number;
|
2614
|
+
};
|
2615
|
+
|
2616
|
+
declare interface RemuxedMetadata {
|
2617
|
+
samples: MetadataSample[];
|
2618
|
+
}
|
2619
|
+
|
2620
|
+
declare interface RemuxedTrack {
|
2621
|
+
data1: Uint8Array;
|
2622
|
+
data2?: Uint8Array;
|
2623
|
+
startPTS: number;
|
2624
|
+
endPTS: number;
|
2625
|
+
startDTS: number;
|
2626
|
+
endDTS: number;
|
2627
|
+
type: SourceBufferName;
|
2628
|
+
hasAudio: boolean;
|
2629
|
+
hasVideo: boolean;
|
2630
|
+
independent?: boolean;
|
2631
|
+
firstKeyFrame?: number;
|
2632
|
+
firstKeyFramePTS?: number;
|
2633
|
+
nb: number;
|
2634
|
+
transferredData1?: ArrayBuffer;
|
2635
|
+
transferredData2?: ArrayBuffer;
|
2636
|
+
dropped?: number;
|
2637
|
+
}
|
2638
|
+
|
2639
|
+
declare interface RemuxedUserdata {
|
2640
|
+
samples: UserdataSample[];
|
2641
|
+
}
|
2642
|
+
|
2643
|
+
declare interface RemuxerResult {
|
2644
|
+
audio?: RemuxedTrack;
|
2645
|
+
video?: RemuxedTrack;
|
2646
|
+
text?: RemuxedUserdata;
|
2647
|
+
id3?: RemuxedMetadata;
|
2648
|
+
initSegment?: InitSegmentData;
|
2649
|
+
independent?: boolean;
|
2650
|
+
}
|
2651
|
+
|
2652
|
+
export declare type RetryConfig = {
|
2653
|
+
maxNumRetry: number;
|
2654
|
+
retryDelayMs: number;
|
2655
|
+
maxRetryDelayMs: number;
|
2656
|
+
backoff?: 'exponential' | 'linear';
|
2657
|
+
shouldRetry?: (retryConfig: RetryConfig | null | undefined, retryCount: number, isTimeout: boolean, loaderResponse: LoaderResponse | undefined, retry: boolean) => boolean;
|
2658
|
+
};
|
2659
|
+
|
2660
|
+
/**
|
2661
|
+
* CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.
|
2662
|
+
* @constructor
|
2663
|
+
*/
|
2664
|
+
declare class Row {
|
2665
|
+
chars: StyledUnicodeChar[];
|
2666
|
+
pos: number;
|
2667
|
+
currPenState: PenState;
|
2668
|
+
cueStartTime: number | null;
|
2669
|
+
private logger;
|
2670
|
+
constructor(logger: CaptionsLogger);
|
2671
|
+
equals(other: Row): boolean;
|
2672
|
+
copy(other: Row): void;
|
2673
|
+
isEmpty(): boolean;
|
2674
|
+
/**
|
2675
|
+
* Set the cursor to a valid column.
|
2676
|
+
*/
|
2677
|
+
setCursor(absPos: number): void;
|
2678
|
+
/**
|
2679
|
+
* Move the cursor relative to current position.
|
2680
|
+
*/
|
2681
|
+
moveCursor(relPos: number): void;
|
2682
|
+
/**
|
2683
|
+
* Backspace, move one step back and clear character.
|
2684
|
+
*/
|
2685
|
+
backSpace(): void;
|
2686
|
+
insertChar(byte: number): void;
|
2687
|
+
clearFromPos(startPos: number): void;
|
2688
|
+
clear(): void;
|
2689
|
+
clearToEndOfRow(): void;
|
2690
|
+
getTextString(): string;
|
2691
|
+
setPenStyles(styles: Partial<PenStyles>): void;
|
2692
|
+
}
|
2693
|
+
|
2694
|
+
export declare type SelectionPreferences = {
|
2695
|
+
videoPreference?: VideoSelectionOption;
|
2696
|
+
audioPreference?: AudioSelectionOption;
|
2697
|
+
subtitlePreference?: SubtitleSelectionOption;
|
2698
|
+
};
|
2699
|
+
|
2700
|
+
export declare type SourceBufferName = 'video' | 'audio' | 'audiovideo';
|
2701
|
+
|
2702
|
+
declare type SourceBuffers = Partial<Record<SourceBufferName, ExtendedSourceBuffer>>;
|
2703
|
+
|
2704
|
+
export declare type SteeringManifest = {
|
2705
|
+
VERSION: 1;
|
2706
|
+
TTL: number;
|
2707
|
+
'RELOAD-URI'?: string;
|
2708
|
+
'PATHWAY-PRIORITY': string[];
|
2709
|
+
'PATHWAY-CLONES'?: PathwayClone[];
|
2710
|
+
};
|
2711
|
+
|
2712
|
+
export declare interface SteeringManifestLoadedData {
|
2713
|
+
steeringManifest: SteeringManifest;
|
2714
|
+
url: string;
|
2715
|
+
}
|
2716
|
+
|
2717
|
+
declare class StreamController extends BaseStreamController implements NetworkComponentAPI {
|
2718
|
+
private audioCodecSwap;
|
2719
|
+
private gapController;
|
2720
|
+
private level;
|
2721
|
+
private _forceStartLoad;
|
2722
|
+
private altAudio;
|
2723
|
+
private audioOnly;
|
2724
|
+
private fragPlaying;
|
2725
|
+
private fragLastKbps;
|
2726
|
+
private couldBacktrack;
|
2727
|
+
private backtrackFragment;
|
2728
|
+
private audioCodecSwitch;
|
2729
|
+
private videoBuffer;
|
2730
|
+
constructor(hls: Hls, fragmentTracker: FragmentTracker, keyLoader: KeyLoader);
|
2731
|
+
protected registerListeners(): void;
|
2732
|
+
protected unregisterListeners(): void;
|
2733
|
+
protected onHandlerDestroying(): void;
|
2734
|
+
startLoad(startPosition: number): void;
|
2735
|
+
stopLoad(): void;
|
2736
|
+
protected doTick(): void;
|
2737
|
+
protected onTickEnd(): void;
|
2738
|
+
private doTickIdle;
|
2739
|
+
protected loadFragment(frag: Fragment, level: Level, targetBufferTime: number): void;
|
2740
|
+
private getBufferedFrag;
|
2741
|
+
private followingBufferedFrag;
|
2742
|
+
immediateLevelSwitch(): void;
|
2743
|
+
/**
|
2744
|
+
* try to switch ASAP without breaking video playback:
|
2745
|
+
* in order to ensure smooth but quick level switching,
|
2746
|
+
* we need to find the next flushable buffer range
|
2747
|
+
* we should take into account new segment fetch time
|
2748
|
+
*/
|
2749
|
+
nextLevelSwitch(): void;
|
2750
|
+
private abortCurrentFrag;
|
2751
|
+
protected flushMainBuffer(startOffset: number, endOffset: number): void;
|
2752
|
+
protected onMediaAttached(event: Events.MEDIA_ATTACHED, data: MediaAttachedData): void;
|
2753
|
+
protected onMediaDetaching(): void;
|
2754
|
+
private onMediaPlaying;
|
2755
|
+
private onMediaSeeked;
|
2756
|
+
protected onManifestLoading(): void;
|
2757
|
+
private onManifestParsed;
|
2758
|
+
private onLevelLoading;
|
2759
|
+
private onLevelLoaded;
|
2760
|
+
protected _handleFragmentLoadProgress(data: FragLoadedData): void;
|
2761
|
+
private onAudioTrackSwitching;
|
2762
|
+
private onAudioTrackSwitched;
|
2763
|
+
private onBufferCreated;
|
2764
|
+
private onFragBuffered;
|
2765
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
2766
|
+
private checkBuffer;
|
2767
|
+
private onFragLoadEmergencyAborted;
|
2768
|
+
private onBufferFlushed;
|
2769
|
+
private onLevelsUpdated;
|
2770
|
+
swapAudioCodec(): void;
|
2771
|
+
/**
|
2772
|
+
* Seeks to the set startPosition if not equal to the mediaElement's current time.
|
2773
|
+
*/
|
2774
|
+
protected seekToStartPos(): void;
|
2775
|
+
private _getAudioCodec;
|
2776
|
+
private _loadBitrateTestFrag;
|
2777
|
+
private _handleTransmuxComplete;
|
2778
|
+
private _bufferInitSegment;
|
2779
|
+
getMainFwdBufferInfo(): BufferInfo | null;
|
2780
|
+
get maxBufferLength(): number;
|
2781
|
+
private backtrack;
|
2782
|
+
private checkFragmentChanged;
|
2783
|
+
get nextLevel(): number;
|
2784
|
+
get currentFrag(): Fragment | null;
|
2785
|
+
get currentProgramDateTime(): Date | null;
|
2786
|
+
get currentLevel(): number;
|
2787
|
+
get nextBufferedFrag(): MediaFragment | null;
|
2788
|
+
get forceStartLoad(): boolean;
|
2789
|
+
}
|
2790
|
+
|
2791
|
+
export declare type StreamControllerConfig = {
|
2792
|
+
autoStartLoad: boolean;
|
2793
|
+
startPosition: number;
|
2794
|
+
defaultAudioCodec?: string;
|
2795
|
+
initialLiveManifestSize: number;
|
2796
|
+
maxBufferLength: number;
|
2797
|
+
maxBufferSize: number;
|
2798
|
+
maxBufferHole: number;
|
2799
|
+
highBufferWatchdogPeriod: number;
|
2800
|
+
nudgeOffset: number;
|
2801
|
+
nudgeMaxRetry: number;
|
2802
|
+
maxFragLookUpTolerance: number;
|
2803
|
+
maxMaxBufferLength: number;
|
2804
|
+
startFragPrefetch: boolean;
|
2805
|
+
testBandwidth: boolean;
|
2806
|
+
};
|
2807
|
+
|
2808
|
+
/**
|
2809
|
+
* Unicode character with styling and background.
|
2810
|
+
* @constructor
|
2811
|
+
*/
|
2812
|
+
declare class StyledUnicodeChar {
|
2813
|
+
uchar: string;
|
2814
|
+
penState: PenState;
|
2815
|
+
reset(): void;
|
2816
|
+
setChar(uchar: string, newPenState: PenState): void;
|
2817
|
+
setPenState(newPenState: PenState): void;
|
2818
|
+
equals(other: StyledUnicodeChar): boolean;
|
2819
|
+
copy(newChar: StyledUnicodeChar): void;
|
2820
|
+
isEmpty(): boolean;
|
2821
|
+
}
|
2822
|
+
|
2823
|
+
export declare interface SubtitleFragProcessedData {
|
2824
|
+
success: boolean;
|
2825
|
+
frag: Fragment;
|
2826
|
+
error?: Error;
|
2827
|
+
}
|
2828
|
+
|
2829
|
+
export declare type SubtitlePlaylistType = 'SUBTITLES' | 'CLOSED-CAPTIONS';
|
2830
|
+
|
2831
|
+
export declare type SubtitleSelectionOption = {
|
2832
|
+
lang?: string;
|
2833
|
+
assocLang?: string;
|
2834
|
+
characteristics?: string;
|
2835
|
+
name?: string;
|
2836
|
+
groupId?: string;
|
2837
|
+
default?: boolean;
|
2838
|
+
forced?: boolean;
|
2839
|
+
};
|
2840
|
+
|
2841
|
+
export declare class SubtitleStreamController extends BaseStreamController implements NetworkComponentAPI {
|
2842
|
+
private currentTrackId;
|
2843
|
+
private tracksBuffered;
|
2844
|
+
private mainDetails;
|
2845
|
+
constructor(hls: Hls, fragmentTracker: FragmentTracker, keyLoader: KeyLoader);
|
2846
|
+
protected onHandlerDestroying(): void;
|
2847
|
+
protected registerListeners(): void;
|
2848
|
+
protected unregisterListeners(): void;
|
2849
|
+
startLoad(startPosition: number): void;
|
2850
|
+
protected onManifestLoading(): void;
|
2851
|
+
protected onMediaDetaching(): void;
|
2852
|
+
private onLevelLoaded;
|
2853
|
+
private onSubtitleFragProcessed;
|
2854
|
+
private onBufferFlushing;
|
2855
|
+
private onFragBuffered;
|
2856
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
2857
|
+
private onSubtitleTracksUpdated;
|
2858
|
+
private onSubtitleTrackSwitch;
|
2859
|
+
private onSubtitleTrackLoaded;
|
2860
|
+
_handleFragmentLoadComplete(fragLoadedData: FragLoadedData): void;
|
2861
|
+
doTick(): void;
|
2862
|
+
protected loadFragment(frag: Fragment, level: Level, targetBufferTime: number): void;
|
2863
|
+
get mediaBufferTimeRanges(): Bufferable;
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
export declare class SubtitleTrackController extends BasePlaylistController {
|
2867
|
+
private media;
|
2868
|
+
private tracks;
|
2869
|
+
private groupIds;
|
2870
|
+
private tracksInGroup;
|
2871
|
+
private trackId;
|
2872
|
+
private currentTrack;
|
2873
|
+
private selectDefaultTrack;
|
2874
|
+
private queuedDefaultTrack;
|
2875
|
+
private useTextTrackPolling;
|
2876
|
+
private subtitlePollingInterval;
|
2877
|
+
private _subtitleDisplay;
|
2878
|
+
private asyncPollTrackChange;
|
2879
|
+
constructor(hls: Hls);
|
2880
|
+
destroy(): void;
|
2881
|
+
get subtitleDisplay(): boolean;
|
2882
|
+
set subtitleDisplay(value: boolean);
|
2883
|
+
private registerListeners;
|
2884
|
+
private unregisterListeners;
|
2885
|
+
protected onMediaAttached(event: Events.MEDIA_ATTACHED, data: MediaAttachedData): void;
|
2886
|
+
private pollTrackChange;
|
2887
|
+
protected onMediaDetaching(): void;
|
2888
|
+
protected onManifestLoading(): void;
|
2889
|
+
protected onManifestParsed(event: Events.MANIFEST_PARSED, data: ManifestParsedData): void;
|
2890
|
+
protected onSubtitleTrackLoaded(event: Events.SUBTITLE_TRACK_LOADED, data: TrackLoadedData): void;
|
2891
|
+
protected onLevelLoading(event: Events.LEVEL_LOADING, data: LevelLoadingData): void;
|
2892
|
+
protected onLevelSwitching(event: Events.LEVEL_SWITCHING, data: LevelSwitchingData): void;
|
2893
|
+
private switchLevel;
|
2894
|
+
private findTrackId;
|
2895
|
+
private findTrackForTextTrack;
|
2896
|
+
protected onError(event: Events.ERROR, data: ErrorData): void;
|
2897
|
+
get allSubtitleTracks(): MediaPlaylist[];
|
2898
|
+
/** get alternate subtitle tracks list from playlist **/
|
2899
|
+
get subtitleTracks(): MediaPlaylist[];
|
2900
|
+
/** get/set index of the selected subtitle track (based on index in subtitle track lists) **/
|
2901
|
+
get subtitleTrack(): number;
|
2902
|
+
set subtitleTrack(newId: number);
|
2903
|
+
setSubtitleOption(subtitleOption: MediaPlaylist | SubtitleSelectionOption | undefined): MediaPlaylist | null;
|
2904
|
+
protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void;
|
2905
|
+
/**
|
2906
|
+
* Disables the old subtitleTrack and sets current mode on the next subtitleTrack.
|
2907
|
+
* This operates on the DOM textTracks.
|
2908
|
+
* A value of -1 will disable all subtitle tracks.
|
2909
|
+
*/
|
2910
|
+
private toggleTrackModes;
|
2911
|
+
/**
|
2912
|
+
* This method is responsible for validating the subtitle index and periodically reloading if live.
|
2913
|
+
* Dispatches the SUBTITLE_TRACK_SWITCH event, which instructs the subtitle-stream-controller to load the selected track.
|
2914
|
+
*/
|
2915
|
+
private setSubtitleTrack;
|
2916
|
+
private onTextTracksChanged;
|
2917
|
+
}
|
2918
|
+
|
2919
|
+
export declare interface SubtitleTrackLoadedData extends TrackLoadedData {
|
2920
|
+
}
|
2921
|
+
|
2922
|
+
export declare interface SubtitleTracksUpdatedData {
|
2923
|
+
subtitleTracks: MediaPlaylist[];
|
2924
|
+
}
|
2925
|
+
|
2926
|
+
export declare interface SubtitleTrackSwitchData {
|
2927
|
+
id: number;
|
2928
|
+
name?: string;
|
2929
|
+
groupId?: string;
|
2930
|
+
type?: MediaPlaylistType | 'main';
|
2931
|
+
url?: string;
|
2932
|
+
}
|
2933
|
+
|
2934
|
+
/**
|
2935
|
+
* @ignore
|
2936
|
+
* Sub-class specialization of EventHandler base class.
|
2937
|
+
*
|
2938
|
+
* TaskLoop allows to schedule a task function being called (optionnaly repeatedly) on the main loop,
|
2939
|
+
* scheduled asynchroneously, avoiding recursive calls in the same tick.
|
2940
|
+
*
|
2941
|
+
* The task itself is implemented in `doTick`. It can be requested and called for single execution
|
2942
|
+
* using the `tick` method.
|
2943
|
+
*
|
2944
|
+
* It will be assured that the task execution method (`tick`) only gets called once per main loop "tick",
|
2945
|
+
* no matter how often it gets requested for execution. Execution in further ticks will be scheduled accordingly.
|
2946
|
+
*
|
2947
|
+
* If further execution requests have already been scheduled on the next tick, it can be checked with `hasNextTick`,
|
2948
|
+
* and cancelled with `clearNextTick`.
|
2949
|
+
*
|
2950
|
+
* The task can be scheduled as an interval repeatedly with a period as parameter (see `setInterval`, `clearInterval`).
|
2951
|
+
*
|
2952
|
+
* Sub-classes need to implement the `doTick` method which will effectively have the task execution routine.
|
2953
|
+
*
|
2954
|
+
* Further explanations:
|
2955
|
+
*
|
2956
|
+
* The baseclass has a `tick` method that will schedule the doTick call. It may be called synchroneously
|
2957
|
+
* only for a stack-depth of one. On re-entrant calls, sub-sequent calls are scheduled for next main loop ticks.
|
2958
|
+
*
|
2959
|
+
* When the task execution (`tick` method) is called in re-entrant way this is detected and
|
2960
|
+
* we are limiting the task execution per call stack to exactly one, but scheduling/post-poning further
|
2961
|
+
* task processing on the next main loop iteration (also known as "next tick" in the Node/JS runtime lingo).
|
2962
|
+
*/
|
2963
|
+
declare class TaskLoop extends Logger {
|
2964
|
+
private readonly _boundTick;
|
2965
|
+
private _tickTimer;
|
2966
|
+
private _tickInterval;
|
2967
|
+
private _tickCallCount;
|
2968
|
+
constructor(label: string, logger: ILogger);
|
2969
|
+
destroy(): void;
|
2970
|
+
protected onHandlerDestroying(): void;
|
2971
|
+
protected onHandlerDestroyed(): void;
|
2972
|
+
hasInterval(): boolean;
|
2973
|
+
hasNextTick(): boolean;
|
2974
|
+
/**
|
2975
|
+
* @param millis - Interval time (ms)
|
2976
|
+
* @eturns True when interval has been scheduled, false when already scheduled (no effect)
|
2977
|
+
*/
|
2978
|
+
setInterval(millis: number): boolean;
|
2979
|
+
/**
|
2980
|
+
* @returns True when interval was cleared, false when none was set (no effect)
|
2981
|
+
*/
|
2982
|
+
clearInterval(): boolean;
|
2983
|
+
/**
|
2984
|
+
* @returns True when timeout was cleared, false when none was set (no effect)
|
2985
|
+
*/
|
2986
|
+
clearNextTick(): boolean;
|
2987
|
+
/**
|
2988
|
+
* Will call the subclass doTick implementation in this main loop tick
|
2989
|
+
* or in the next one (via setTimeout(,0)) in case it has already been called
|
2990
|
+
* in this tick (in case this is a re-entrant call).
|
2991
|
+
*/
|
2992
|
+
tick(): void;
|
2993
|
+
tickImmediate(): void;
|
2994
|
+
/**
|
2995
|
+
* For subclass to implement task logic
|
2996
|
+
* @abstract
|
2997
|
+
*/
|
2998
|
+
protected doTick(): void;
|
2999
|
+
}
|
3000
|
+
|
3001
|
+
export declare class TimelineController implements ComponentAPI {
|
3002
|
+
private hls;
|
3003
|
+
private media;
|
3004
|
+
private config;
|
3005
|
+
private enabled;
|
3006
|
+
private Cues;
|
3007
|
+
private textTracks;
|
3008
|
+
private tracks;
|
3009
|
+
private initPTS;
|
3010
|
+
private unparsedVttFrags;
|
3011
|
+
private captionsTracks;
|
3012
|
+
private nonNativeCaptionsTracks;
|
3013
|
+
private cea608Parser1?;
|
3014
|
+
private cea608Parser2?;
|
3015
|
+
private lastCc;
|
3016
|
+
private lastSn;
|
3017
|
+
private lastPartIndex;
|
3018
|
+
private prevCC;
|
3019
|
+
private vttCCs;
|
3020
|
+
private captionsProperties;
|
3021
|
+
constructor(hls: Hls);
|
3022
|
+
destroy(): void;
|
3023
|
+
private initCea608Parsers;
|
3024
|
+
addCues(trackName: string, startTime: number, endTime: number, screen: CaptionScreen, cueRanges: Array<[number, number]>): void;
|
3025
|
+
private onInitPtsFound;
|
3026
|
+
private getExistingTrack;
|
3027
|
+
createCaptionsTrack(trackName: string): void;
|
3028
|
+
private createNativeTrack;
|
3029
|
+
private createNonNativeTrack;
|
3030
|
+
private createTextTrack;
|
3031
|
+
private onMediaAttaching;
|
3032
|
+
private onMediaDetaching;
|
3033
|
+
private onManifestLoading;
|
3034
|
+
private _cleanTracks;
|
3035
|
+
private onSubtitleTracksUpdated;
|
3036
|
+
private onManifestLoaded;
|
3037
|
+
private closedCaptionsForLevel;
|
3038
|
+
private onFragLoading;
|
3039
|
+
private onFragLoaded;
|
3040
|
+
private _parseIMSC1;
|
3041
|
+
private _parseVTTs;
|
3042
|
+
private _fallbackToIMSC1;
|
3043
|
+
private _appendCues;
|
3044
|
+
private onFragDecrypted;
|
3045
|
+
private onSubtitleTracksCleared;
|
3046
|
+
private onFragParsingUserdata;
|
3047
|
+
onBufferFlushing(event: Events.BUFFER_FLUSHING, { startOffset, endOffset, endOffsetSubtitles, type }: BufferFlushingData): void;
|
3048
|
+
private extractCea608Data;
|
3049
|
+
}
|
3050
|
+
|
3051
|
+
export declare type TimelineControllerConfig = {
|
3052
|
+
cueHandler: CuesInterface;
|
3053
|
+
enableWebVTT: boolean;
|
3054
|
+
enableIMSC1: boolean;
|
3055
|
+
enableCEA708Captions: boolean;
|
3056
|
+
captionsTextTrack1Label: string;
|
3057
|
+
captionsTextTrack1LanguageCode: string;
|
3058
|
+
captionsTextTrack2Label: string;
|
3059
|
+
captionsTextTrack2LanguageCode: string;
|
3060
|
+
captionsTextTrack3Label: string;
|
3061
|
+
captionsTextTrack3LanguageCode: string;
|
3062
|
+
captionsTextTrack4Label: string;
|
3063
|
+
captionsTextTrack4LanguageCode: string;
|
3064
|
+
renderTextTracksNatively: boolean;
|
3065
|
+
};
|
3066
|
+
|
3067
|
+
export declare interface Track {
|
3068
|
+
id: 'audio' | 'main';
|
3069
|
+
buffer?: SourceBuffer;
|
3070
|
+
container: string;
|
3071
|
+
codec?: string;
|
3072
|
+
initSegment?: Uint8Array;
|
3073
|
+
levelCodec?: string;
|
3074
|
+
metadata?: any;
|
3075
|
+
}
|
3076
|
+
|
3077
|
+
export declare interface TrackLoadedData {
|
3078
|
+
details: LevelDetails;
|
3079
|
+
id: number;
|
3080
|
+
groupId: string;
|
3081
|
+
networkDetails: any;
|
3082
|
+
stats: LoaderStats;
|
3083
|
+
deliveryDirectives: HlsUrlParameters | null;
|
3084
|
+
}
|
3085
|
+
|
3086
|
+
export declare interface TrackLoadingData {
|
3087
|
+
id: number;
|
3088
|
+
groupId: string;
|
3089
|
+
url: string;
|
3090
|
+
deliveryDirectives: HlsUrlParameters | null;
|
3091
|
+
}
|
3092
|
+
|
3093
|
+
export declare interface TrackSet {
|
3094
|
+
audio?: Track;
|
3095
|
+
video?: Track;
|
3096
|
+
audiovideo?: Track;
|
3097
|
+
}
|
3098
|
+
|
3099
|
+
declare class TransmuxerInterface {
|
3100
|
+
error: Error | null;
|
3101
|
+
private hls;
|
3102
|
+
private id;
|
3103
|
+
private instanceNo;
|
3104
|
+
private observer;
|
3105
|
+
private frag;
|
3106
|
+
private part;
|
3107
|
+
private useWorker;
|
3108
|
+
private workerContext;
|
3109
|
+
private transmuxer;
|
3110
|
+
private onTransmuxComplete;
|
3111
|
+
private onFlush;
|
3112
|
+
constructor(hls: Hls, id: PlaylistLevelType, onTransmuxComplete: (transmuxResult: TransmuxerResult) => void, onFlush: (chunkMeta: ChunkMetadata) => void);
|
3113
|
+
reset(): void;
|
3114
|
+
private terminateWorker;
|
3115
|
+
destroy(): void;
|
3116
|
+
push(data: ArrayBuffer, initSegmentData: Uint8Array | undefined, audioCodec: string | undefined, videoCodec: string | undefined, frag: MediaFragment, part: Part | null, duration: number, accurateTimeOffset: boolean, chunkMeta: ChunkMetadata, defaultInitPTS?: RationalTimestamp): void;
|
3117
|
+
flush(chunkMeta: ChunkMetadata): void;
|
3118
|
+
private transmuxerError;
|
3119
|
+
private handleFlushResult;
|
3120
|
+
private onWorkerMessage;
|
3121
|
+
private onWorkerError;
|
3122
|
+
private configureTransmuxer;
|
3123
|
+
private handleTransmuxComplete;
|
3124
|
+
}
|
3125
|
+
|
3126
|
+
declare interface TransmuxerResult {
|
3127
|
+
remuxResult: RemuxerResult;
|
3128
|
+
chunkMeta: ChunkMetadata;
|
3129
|
+
}
|
3130
|
+
|
3131
|
+
export declare type TSDemuxerConfig = {
|
3132
|
+
forceKeyFrameOnDiscontinuity: boolean;
|
3133
|
+
};
|
3134
|
+
|
3135
|
+
export declare type UriReplacement = {
|
3136
|
+
HOST?: string;
|
3137
|
+
PARAMS?: {
|
3138
|
+
[queryParameter: string]: string;
|
3139
|
+
};
|
3140
|
+
'PER-VARIANT-URIS'?: {
|
3141
|
+
[stableVariantId: string]: string;
|
3142
|
+
};
|
3143
|
+
'PER-RENDITION-URIS'?: {
|
3144
|
+
[stableRenditionId: string]: string;
|
3145
|
+
};
|
3146
|
+
};
|
3147
|
+
|
3148
|
+
export declare interface UserdataSample {
|
3149
|
+
pts: number;
|
3150
|
+
bytes?: Uint8Array;
|
3151
|
+
type?: number;
|
3152
|
+
payloadType?: number;
|
3153
|
+
uuid?: string;
|
3154
|
+
userData?: string;
|
3155
|
+
userDataBytes?: Uint8Array;
|
3156
|
+
}
|
3157
|
+
|
3158
|
+
export declare type VariableMap = Record<string, string>;
|
3159
|
+
|
3160
|
+
declare const enum VerboseLevel {
|
3161
|
+
ERROR = 0,
|
3162
|
+
TEXT = 1,
|
3163
|
+
WARNING = 2,
|
3164
|
+
INFO = 2,
|
3165
|
+
DEBUG = 3,
|
3166
|
+
DATA = 3
|
3167
|
+
}
|
3168
|
+
|
3169
|
+
declare type VideoRange = (typeof VideoRangeValues)[number];
|
3170
|
+
|
3171
|
+
declare const VideoRangeValues: readonly ["SDR", "PQ", "HLG"];
|
3172
|
+
|
3173
|
+
export declare type VideoSelectionOption = {
|
3174
|
+
preferHDR?: boolean;
|
3175
|
+
allowedVideoRanges?: Array<VideoRange>;
|
3176
|
+
videoCodec?: string;
|
3177
|
+
};
|
3178
|
+
|
3179
|
+
export { }
|