@vindral/web-sdk 2.2.2 → 2.2.3
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 +48 -43
- package/package.json +1 -1
- package/web-sdk.esm.js +1 -1
- package/web-sdk.umd.js +1 -1
package/index.d.ts
CHANGED
|
@@ -347,11 +347,57 @@ declare class AdaptivityModule {
|
|
|
347
347
|
private tooMuchTimeBuffering;
|
|
348
348
|
private tooManyBufferingEvents;
|
|
349
349
|
}
|
|
350
|
+
interface VindralErrorProps {
|
|
351
|
+
isFatal: boolean;
|
|
352
|
+
type?: ErrorType;
|
|
353
|
+
code: string;
|
|
354
|
+
source?: Error | MediaError;
|
|
355
|
+
}
|
|
356
|
+
export declare const CONNECTION_FAILED_CODE = "connection_failed";
|
|
357
|
+
export declare const CONNECTION_FAILED_AFTER_RETRIES_CODE = "connection_failed_will_not_attempt_again";
|
|
358
|
+
export declare const AUTHENTICATION_FAILED_CODE = "authentication_error";
|
|
359
|
+
export declare const AUTHENTICATION_EXPIRED_CODE = "authentication_expired";
|
|
360
|
+
export declare const CHANNEL_NOT_FOUND_CODE = "channel_not_found";
|
|
361
|
+
export declare const NO_INCOMING_DATA = "no_incoming_data_error";
|
|
362
|
+
export declare const INACTIVITY_CODE = "connection_inactivity";
|
|
363
|
+
export declare const MISSING_INIT_SEGMENT = "missing_init_segment";
|
|
364
|
+
export declare const NO_TRACK_CONTEXT = "no_track_context";
|
|
365
|
+
export declare const DISCONNECTED_BY_EDGE = "disconnected_by_edge";
|
|
366
|
+
export declare const DECODER_ERROR = "decoder_error";
|
|
367
|
+
export declare const AUDIO_PLAYER_ERROR = "audio_player_error";
|
|
368
|
+
export declare const MEDIA_SOURCE_ERROR = "media_source_error";
|
|
369
|
+
export declare type ErrorType = "internal" | "external";
|
|
370
|
+
export declare class VindralError extends Error {
|
|
371
|
+
private props;
|
|
372
|
+
private extra;
|
|
373
|
+
constructor(message: string, props: VindralErrorProps, extra?: {});
|
|
374
|
+
code: () => string;
|
|
375
|
+
isFatal: () => boolean;
|
|
376
|
+
source: () => Error | MediaError | undefined;
|
|
377
|
+
type: () => ErrorType;
|
|
378
|
+
toStringifiable: () => Record<string, unknown>;
|
|
379
|
+
}
|
|
380
|
+
export declare const mediaElementError: (isFatal: boolean, source: MediaError) => VindralError;
|
|
381
|
+
export declare const decoderError: (isFatal: boolean, source: Error) => VindralError;
|
|
382
|
+
export declare const audioPlayerError: (isFatal: boolean, source: Error) => VindralError;
|
|
383
|
+
export declare const missingInitSegmentError: (renditionId: number, channelId: string) => VindralError;
|
|
384
|
+
export declare const mediaSourceError: (isFatal: boolean, source: Error) => VindralError;
|
|
385
|
+
export declare const noTrackContextError: (type: "audio" | "video", renditionId: number, channelId: string) => VindralError;
|
|
386
|
+
export declare const audioContextTimeoutError: () => VindralError;
|
|
387
|
+
export declare const disconnectedFromEdgeServerError: (source?: VindralError | undefined) => VindralError;
|
|
388
|
+
export declare const authenticationError: (source?: Error | undefined) => VindralError;
|
|
389
|
+
export declare const authenticationExpiredError: (source?: Error | undefined) => VindralError;
|
|
390
|
+
export declare const inactivityError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
391
|
+
export declare const channelNotFoundError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
392
|
+
export declare const noIncomingDataError: (source?: Error | undefined) => VindralError;
|
|
393
|
+
export declare const unableToConnectError: (source?: Error | undefined) => VindralError;
|
|
394
|
+
export declare const unableToConnectAfterRetriesError: () => VindralError;
|
|
350
395
|
interface AudioPlayerModuleListeners {
|
|
351
396
|
["decoded frame"]: Readonly<DecodedSample>;
|
|
352
397
|
}
|
|
353
398
|
interface AudioPlayerModuleEvents {
|
|
354
399
|
["needs user input"]: NeedsUserInputContext;
|
|
400
|
+
["error"]: VindralError;
|
|
355
401
|
}
|
|
356
402
|
interface ClockSource {
|
|
357
403
|
readonly currentTime: number;
|
|
@@ -442,47 +488,6 @@ declare class BufferTimeModule {
|
|
|
442
488
|
getStatistics: () => BufferTimeStatistics;
|
|
443
489
|
private onBufferState;
|
|
444
490
|
}
|
|
445
|
-
interface VindralErrorProps {
|
|
446
|
-
isFatal: boolean;
|
|
447
|
-
type?: ErrorType;
|
|
448
|
-
code: string;
|
|
449
|
-
source?: Error | MediaError;
|
|
450
|
-
}
|
|
451
|
-
export declare const CONNECTION_FAILED_CODE = "connection_failed";
|
|
452
|
-
export declare const CONNECTION_FAILED_AFTER_RETRIES_CODE = "connection_failed_will_not_attempt_again";
|
|
453
|
-
export declare const AUTHENTICATION_FAILED_CODE = "authentication_error";
|
|
454
|
-
export declare const AUTHENTICATION_EXPIRED_CODE = "authentication_expired";
|
|
455
|
-
export declare const CHANNEL_NOT_FOUND_CODE = "channel_not_found";
|
|
456
|
-
export declare const NO_INCOMING_DATA = "no_incoming_data_error";
|
|
457
|
-
export declare const INACTIVITY_CODE = "connection_inactivity";
|
|
458
|
-
export declare const MISSING_INIT_SEGMENT = "missing_init_segment";
|
|
459
|
-
export declare const NO_TRACK_CONTEXT = "no_track_context";
|
|
460
|
-
export declare const DISCONNECTED_BY_EDGE = "disconnected_by_edge";
|
|
461
|
-
export declare const DECODER_ERROR = "decoder_error";
|
|
462
|
-
export declare type ErrorType = "internal" | "external";
|
|
463
|
-
export declare class VindralError extends Error {
|
|
464
|
-
private props;
|
|
465
|
-
private extra;
|
|
466
|
-
constructor(message: string, props: VindralErrorProps, extra?: {});
|
|
467
|
-
code: () => string;
|
|
468
|
-
isFatal: () => boolean;
|
|
469
|
-
source: () => Error | MediaError | undefined;
|
|
470
|
-
type: () => ErrorType;
|
|
471
|
-
toStringifiable: () => Record<string, unknown>;
|
|
472
|
-
}
|
|
473
|
-
export declare const mediaElementError: (isFatal: boolean, source: MediaError) => VindralError;
|
|
474
|
-
export declare const decoderError: (isFatal: boolean, source: Error) => VindralError;
|
|
475
|
-
export declare const missingInitSegmentError: (renditionId: number, channelId: string) => VindralError;
|
|
476
|
-
export declare const noTrackContextError: (type: "audio" | "video", renditionId: number, channelId: string) => VindralError;
|
|
477
|
-
export declare const audioContextTimeoutError: () => VindralError;
|
|
478
|
-
export declare const disconnectedFromEdgeServerError: (source?: VindralError | undefined) => VindralError;
|
|
479
|
-
export declare const authenticationError: (source?: Error | undefined) => VindralError;
|
|
480
|
-
export declare const authenticationExpiredError: (source?: Error | undefined) => VindralError;
|
|
481
|
-
export declare const inactivityError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
482
|
-
export declare const channelNotFoundError: (type: ErrorType, source?: Error | undefined) => VindralError;
|
|
483
|
-
export declare const noIncomingDataError: (source?: Error | undefined) => VindralError;
|
|
484
|
-
export declare const unableToConnectError: (source?: Error | undefined) => VindralError;
|
|
485
|
-
export declare const unableToConnectAfterRetriesError: () => VindralError;
|
|
486
491
|
declare type State = "connected" | "disconnected" | "connecting";
|
|
487
492
|
declare type ContextSwitchState = "completed" | "started";
|
|
488
493
|
interface ConnectionModuleListeners {
|
|
@@ -1333,7 +1338,6 @@ declare class TelemetryModule {
|
|
|
1333
1338
|
private timers;
|
|
1334
1339
|
private emitter;
|
|
1335
1340
|
private options;
|
|
1336
|
-
private runtimeInfo;
|
|
1337
1341
|
private parentContext;
|
|
1338
1342
|
private unsentLines;
|
|
1339
1343
|
private retries;
|
|
@@ -1342,7 +1346,7 @@ declare class TelemetryModule {
|
|
|
1342
1346
|
private statsCount;
|
|
1343
1347
|
private constructor();
|
|
1344
1348
|
unload: () => void;
|
|
1345
|
-
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions,
|
|
1349
|
+
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions, parentContext: ParentContext) => TelemetryModule;
|
|
1346
1350
|
load: () => void;
|
|
1347
1351
|
addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
|
|
1348
1352
|
addEvent: (event: TelemetryEvent) => void;
|
|
@@ -1385,6 +1389,7 @@ interface VideoPlayerStatistics {
|
|
|
1385
1389
|
rendererDroppedFrameCount: number;
|
|
1386
1390
|
}
|
|
1387
1391
|
declare class VideoPlayerModule {
|
|
1392
|
+
private readonly oldTimestampLimit;
|
|
1388
1393
|
private logger;
|
|
1389
1394
|
private emitter;
|
|
1390
1395
|
private videoRenderer;
|
package/package.json
CHANGED