@vindral/web-sdk 2.2.2 → 2.2.4
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 +52 -45
- 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 {
|
|
@@ -1181,7 +1186,8 @@ export declare type Statistics = ModuleStatistics & UserAgentInformation & {
|
|
|
1181
1186
|
version: string;
|
|
1182
1187
|
ip?: string;
|
|
1183
1188
|
url: string;
|
|
1184
|
-
sessionId
|
|
1189
|
+
sessionId?: string;
|
|
1190
|
+
clientId: string;
|
|
1185
1191
|
uptime: number;
|
|
1186
1192
|
videoBitRate?: number;
|
|
1187
1193
|
audioBitRate?: number;
|
|
@@ -1207,7 +1213,8 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
|
1207
1213
|
private logger;
|
|
1208
1214
|
private modules;
|
|
1209
1215
|
private clientIp?;
|
|
1210
|
-
private sessionId
|
|
1216
|
+
private sessionId?;
|
|
1217
|
+
private clientId;
|
|
1211
1218
|
private _channels;
|
|
1212
1219
|
private createdAt;
|
|
1213
1220
|
private hasCalledConnect;
|
|
@@ -1333,7 +1340,6 @@ declare class TelemetryModule {
|
|
|
1333
1340
|
private timers;
|
|
1334
1341
|
private emitter;
|
|
1335
1342
|
private options;
|
|
1336
|
-
private runtimeInfo;
|
|
1337
1343
|
private parentContext;
|
|
1338
1344
|
private unsentLines;
|
|
1339
1345
|
private retries;
|
|
@@ -1342,7 +1348,7 @@ declare class TelemetryModule {
|
|
|
1342
1348
|
private statsCount;
|
|
1343
1349
|
private constructor();
|
|
1344
1350
|
unload: () => void;
|
|
1345
|
-
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions,
|
|
1351
|
+
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions, parentContext: ParentContext) => TelemetryModule;
|
|
1346
1352
|
load: () => void;
|
|
1347
1353
|
addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
|
|
1348
1354
|
addEvent: (event: TelemetryEvent) => void;
|
|
@@ -1385,6 +1391,7 @@ interface VideoPlayerStatistics {
|
|
|
1385
1391
|
rendererDroppedFrameCount: number;
|
|
1386
1392
|
}
|
|
1387
1393
|
declare class VideoPlayerModule {
|
|
1394
|
+
private readonly oldTimestampLimit;
|
|
1388
1395
|
private logger;
|
|
1389
1396
|
private emitter;
|
|
1390
1397
|
private videoRenderer;
|
package/package.json
CHANGED