@vindral/web-sdk 3.0.0 → 3.0.2

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 CHANGED
@@ -113,7 +113,7 @@ interface Telemetry {
113
113
  maxErrorReports?: number;
114
114
  interval?: number;
115
115
  }
116
- interface ConnectResponse {
116
+ export interface ConnectResponse {
117
117
  logsUrl?: string;
118
118
  statsUrl?: string;
119
119
  telemetry?: Telemetry;
@@ -314,7 +314,7 @@ export declare class CastSender extends Emitter<CastSenderEvents> {
314
314
  private castLibrariesAdded;
315
315
  private verifyCastLibraries;
316
316
  }
317
- interface TimeRange {
317
+ export interface TimeRange {
318
318
  start: number;
319
319
  end: number;
320
320
  }
@@ -355,6 +355,14 @@ interface VindralErrorProps {
355
355
  code: string;
356
356
  source?: Error | MediaError;
357
357
  }
358
+ export declare const CONNECTION_FAILED_CODE = "connection_failed";
359
+ export declare const CONNECTION_FAILED_AFTER_RETRIES_CODE = "connection_failed_will_not_attempt_again";
360
+ export declare const AUTHENTICATION_FAILED_CODE = "authentication_error";
361
+ export declare const AUTHENTICATION_EXPIRED_CODE = "authentication_expired";
362
+ export declare const CHANNEL_NOT_FOUND_CODE = "channel_not_found";
363
+ export declare const NO_INCOMING_DATA = "no_incoming_data_error";
364
+ export declare const INACTIVITY_CODE = "connection_inactivity";
365
+ export declare const DISCONNECTED_BY_EDGE = "disconnected_by_edge";
358
366
  declare type ErrorType = "internal" | "external";
359
367
  /**
360
368
  * Represents a vindral error - all errors emitted from the Vindral instance inherit from this class.
@@ -393,10 +401,16 @@ interface ConnectionStatistics {
393
401
  connectCount: number;
394
402
  connectionAttemptCount: number;
395
403
  }
396
- interface RenditionLevel {
404
+ export interface RenditionLevel {
397
405
  audio?: AudioRendition;
398
406
  video?: VideoRendition;
399
407
  }
408
+ declare type RenditionLevelChangedReason = "abr" | "manual";
409
+ export interface RenditionLevelChanged {
410
+ from?: RenditionLevel;
411
+ to?: RenditionLevel;
412
+ reason: RenditionLevelChangedReason;
413
+ }
400
414
  interface RenditionLevel {
401
415
  audio?: AudioRendition;
402
416
  video?: VideoRendition;
@@ -473,6 +487,8 @@ interface MseModuleStatistics {
473
487
  mediaSourceOpenTime: number;
474
488
  totalVideoFrames?: number;
475
489
  droppedVideoFrames?: number;
490
+ successfulVideoAppendCalls?: number;
491
+ successfulAudioAppendsCalls?: number;
476
492
  }
477
493
  interface QualityOfServiceModuleStatistics {
478
494
  timeSpentBuffering: number;
@@ -851,6 +867,9 @@ export declare class Vindral extends Emitter<PublicVindralEvents> {
851
867
  * and handle that event gracefully.
852
868
  */
853
869
  userInput: () => void;
870
+ /**
871
+ * Pauses the stream. Call .play() to resume playback again.
872
+ */
854
873
  pause: () => void;
855
874
  /**
856
875
  *