@vindral/web-sdk 2.2.1 → 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 +51 -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 {
|
|
@@ -1159,6 +1164,7 @@ declare const defaultOptions: {
|
|
|
1159
1164
|
poster: string | boolean;
|
|
1160
1165
|
reconnectHandler: (state: ReconnectState) => Promise<boolean> | boolean;
|
|
1161
1166
|
iosWakeLockEnabled: boolean;
|
|
1167
|
+
telemetryEnabled: boolean;
|
|
1162
1168
|
advanced: {
|
|
1163
1169
|
wasmDecodingConstraint: Partial<VideoConstraint>;
|
|
1164
1170
|
};
|
|
@@ -1293,6 +1299,7 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
|
|
|
1293
1299
|
}
|
|
1294
1300
|
interface TelemetryModuleOptions {
|
|
1295
1301
|
url: string;
|
|
1302
|
+
enabled?: boolean;
|
|
1296
1303
|
interval?: number;
|
|
1297
1304
|
includeErrors?: boolean;
|
|
1298
1305
|
includeEvents?: boolean;
|
|
@@ -1331,7 +1338,6 @@ declare class TelemetryModule {
|
|
|
1331
1338
|
private timers;
|
|
1332
1339
|
private emitter;
|
|
1333
1340
|
private options;
|
|
1334
|
-
private runtimeInfo;
|
|
1335
1341
|
private parentContext;
|
|
1336
1342
|
private unsentLines;
|
|
1337
1343
|
private retries;
|
|
@@ -1340,7 +1346,7 @@ declare class TelemetryModule {
|
|
|
1340
1346
|
private statsCount;
|
|
1341
1347
|
private constructor();
|
|
1342
1348
|
unload: () => void;
|
|
1343
|
-
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions,
|
|
1349
|
+
static create: (logger: Logger, emitter: Emitter<TelemetryModuleListeners, TelemetryModuleEvents>, options: TelemetryModuleOptions, parentContext: ParentContext) => TelemetryModule;
|
|
1344
1350
|
load: () => void;
|
|
1345
1351
|
addStats: ({ isFinal, initiator }?: FlushOptions, extra?: Record<string, unknown>) => void;
|
|
1346
1352
|
addEvent: (event: TelemetryEvent) => void;
|
|
@@ -1383,6 +1389,7 @@ interface VideoPlayerStatistics {
|
|
|
1383
1389
|
rendererDroppedFrameCount: number;
|
|
1384
1390
|
}
|
|
1385
1391
|
declare class VideoPlayerModule {
|
|
1392
|
+
private readonly oldTimestampLimit;
|
|
1386
1393
|
private logger;
|
|
1387
1394
|
private emitter;
|
|
1388
1395
|
private videoRenderer;
|
|
@@ -1451,6 +1458,7 @@ export interface Options {
|
|
|
1451
1458
|
mseOpusEnabled?: boolean;
|
|
1452
1459
|
iosBackgroundPlayEnabled?: boolean;
|
|
1453
1460
|
abrEnabled?: boolean;
|
|
1461
|
+
telemetryEnabled?: boolean;
|
|
1454
1462
|
maxSize?: Size;
|
|
1455
1463
|
maxAudioBitRate?: number;
|
|
1456
1464
|
maxVideoBitRate?: number;
|
package/package.json
CHANGED