@vindral/web-sdk 2.1.2 → 2.1.5
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/index.d.ts +12 -2
- package/package.json +1 -1
- package/web-sdk.esm.js +1 -1
- package/web-sdk.umd.js +1 -1
package/index.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ declare class Emitter<TEvents, TEmits = TEvents, ArgLessEvents extends VoidKeys<
|
|
|
86
86
|
on<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => void): void;
|
|
87
87
|
once<T extends ArgLessEvents>(eventName: T, fn: () => void): void;
|
|
88
88
|
once<T extends ArgEvents>(eventName: T, fn: (args: TEvents[T]) => void): void;
|
|
89
|
+
reset(): void;
|
|
89
90
|
private add;
|
|
90
91
|
}
|
|
91
92
|
declare type FilterFunc<T> = (item: T) => boolean;
|
|
@@ -442,6 +443,7 @@ declare class BufferTimeModule {
|
|
|
442
443
|
}
|
|
443
444
|
interface VindralErrorProps {
|
|
444
445
|
isFatal: boolean;
|
|
446
|
+
type?: ErrorType;
|
|
445
447
|
code: string;
|
|
446
448
|
source?: Error | MediaError;
|
|
447
449
|
}
|
|
@@ -455,6 +457,8 @@ export declare const INACTIVITY_CODE = "connection_inactivity";
|
|
|
455
457
|
export declare const MISSING_INIT_SEGMENT = "missing_init_segment";
|
|
456
458
|
export declare const NO_TRACK_CONTEXT = "no_track_context";
|
|
457
459
|
export declare const DISCONNECTED_BY_EDGE = "disconnected_by_edge";
|
|
460
|
+
export declare const DECODER_ERROR = "decoder_error";
|
|
461
|
+
export declare type ErrorType = "internal" | "external";
|
|
458
462
|
export declare class VindralError extends Error {
|
|
459
463
|
private props;
|
|
460
464
|
private extra;
|
|
@@ -462,17 +466,19 @@ export declare class VindralError extends Error {
|
|
|
462
466
|
code: () => string;
|
|
463
467
|
isFatal: () => boolean;
|
|
464
468
|
source: () => Error | MediaError | undefined;
|
|
469
|
+
type: () => ErrorType;
|
|
465
470
|
toStringifiable: () => Record<string, unknown>;
|
|
466
471
|
}
|
|
467
472
|
export declare const mediaElementError: (isFatal: boolean, source: MediaError) => VindralError;
|
|
473
|
+
export declare const decoderError: (isFatal: boolean, source: Error) => VindralError;
|
|
468
474
|
export declare const missingInitSegmentError: (renditionId: number, channelId: string) => VindralError;
|
|
469
475
|
export declare const noTrackContextError: (type: "audio" | "video", renditionId: number, channelId: string) => VindralError;
|
|
470
476
|
export declare const audioContextTimeoutError: () => VindralError;
|
|
471
477
|
export declare const disconnectedFromEdgeServerError: (source?: VindralError | undefined) => VindralError;
|
|
472
478
|
export declare const authenticationError: (source?: Error | undefined) => VindralError;
|
|
473
479
|
export declare const authenticationExpiredError: (source?: Error | undefined) => VindralError;
|
|
474
|
-
export declare const inactivityError: (source?: Error | undefined) => VindralError;
|
|
475
|
-
export declare const channelNotFoundError: (source?: Error | undefined) => VindralError;
|
|
480
|
+
export declare const inactivityError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
481
|
+
export declare const channelNotFoundError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
476
482
|
export declare const noIncomingDataError: (source?: Error | undefined) => VindralError;
|
|
477
483
|
export declare const unableToConnectError: (source?: Error | undefined) => VindralError;
|
|
478
484
|
export declare const unableToConnectAfterRetriesError: () => VindralError;
|
|
@@ -697,11 +703,13 @@ interface DecoderContext<Type extends "audio" | "video"> {
|
|
|
697
703
|
initSegment(initSegment: Readonly<InitSegment>): void;
|
|
698
704
|
enqueue(sample: Readonly<DecoderParamType<Type>>): void;
|
|
699
705
|
take(): DecoderReturnType<Type> | undefined;
|
|
706
|
+
error?: () => Error | undefined;
|
|
700
707
|
}
|
|
701
708
|
interface DecoderModuleEvents {
|
|
702
709
|
["video decode rate"]: number;
|
|
703
710
|
["decoded frame"]: Readonly<DecodedSample>;
|
|
704
711
|
["buffer state"]: Readonly<BufferState>;
|
|
712
|
+
["error"]: Readonly<VindralError>;
|
|
705
713
|
}
|
|
706
714
|
interface DecoderModuleListeners {
|
|
707
715
|
["init segment"]: Readonly<InitSegment>;
|
|
@@ -1373,6 +1381,7 @@ declare class VideoPlayerModule {
|
|
|
1373
1381
|
private onDecodedFrame;
|
|
1374
1382
|
private render;
|
|
1375
1383
|
private renderSample;
|
|
1384
|
+
private stopRender;
|
|
1376
1385
|
}
|
|
1377
1386
|
export interface Modules {
|
|
1378
1387
|
audioPlayer?: AudioPlayerModule;
|
|
@@ -1419,6 +1428,7 @@ export interface Options {
|
|
|
1419
1428
|
burstEnabled?: boolean;
|
|
1420
1429
|
mseEnabled?: boolean;
|
|
1421
1430
|
mseOpusEnabled?: boolean;
|
|
1431
|
+
iosBackgroundPlayEnabled?: boolean;
|
|
1422
1432
|
abrEnabled?: boolean;
|
|
1423
1433
|
maxSize?: Size;
|
|
1424
1434
|
maxAudioBitRate?: number;
|
package/package.json
CHANGED