@vindral/web-sdk 2.2.4 → 2.2.6

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
@@ -366,6 +366,7 @@ export declare const DISCONNECTED_BY_EDGE = "disconnected_by_edge";
366
366
  export declare const DECODER_ERROR = "decoder_error";
367
367
  export declare const AUDIO_PLAYER_ERROR = "audio_player_error";
368
368
  export declare const MEDIA_SOURCE_ERROR = "media_source_error";
369
+ export declare const WEBGL_CONTEXT_LOST_ERROR = "webgl_context_lost_error";
369
370
  export declare type ErrorType = "internal" | "external";
370
371
  export declare class VindralError extends Error {
371
372
  private props;
@@ -392,6 +393,7 @@ export declare const channelNotFoundError: (type: ErrorType, source?: Error | un
392
393
  export declare const noIncomingDataError: (source?: Error | undefined) => VindralError;
393
394
  export declare const unableToConnectError: (source?: Error | undefined) => VindralError;
394
395
  export declare const unableToConnectAfterRetriesError: () => VindralError;
396
+ export declare const webglContextError: (source: Error) => VindralError;
395
397
  interface AudioPlayerModuleListeners {
396
398
  ["decoded frame"]: Readonly<DecodedSample>;
397
399
  }
@@ -441,6 +443,7 @@ declare class AudioPlayerModule {
441
443
  play: () => Promise<void>;
442
444
  private resume;
443
445
  private getAudioContext;
446
+ private setupContext;
444
447
  private setGain;
445
448
  }
446
449
  interface BufferTimeConfig {
@@ -480,6 +483,7 @@ declare class BufferTimeModule {
480
483
  private bufferTimeAdjustmentCount;
481
484
  constructor(emitter: Emitter<BufferTimeListeners, unknown>, logger: Logger, qualityOfServiceSource: QualityOfServiceSource, targetBufferTimeTarget: TargetBufferTimeTarget, config: Partial<BufferTimeConfig>);
482
485
  static create: (emitter: Emitter<BufferTimeListeners, unknown>, logger: Logger, qualityOfServiceSource: QualityOfServiceSource, targetBufferTimeTarget: TargetBufferTimeTarget, config?: Partial<BufferTimeConfig>) => BufferTimeModule;
486
+ updateConfig(config: Partial<BufferTimeConfig>): void;
483
487
  load: () => void;
484
488
  unload: () => void;
485
489
  suspend: () => void;
@@ -1382,6 +1386,7 @@ declare class UnpauseModule {
1382
1386
  }
1383
1387
  interface VideoPlayerModuleListeners {
1384
1388
  ["decoded frame"]: Readonly<DecodedSample>;
1389
+ ["error"]: Readonly<VindralError>;
1385
1390
  }
1386
1391
  interface ClockSource {
1387
1392
  readonly currentTime: number;
@@ -1389,6 +1394,8 @@ interface ClockSource {
1389
1394
  interface VideoPlayerStatistics {
1390
1395
  renderedFrameCount: number;
1391
1396
  rendererDroppedFrameCount: number;
1397
+ contextLostCount: number;
1398
+ contextRestoredCount: number;
1392
1399
  }
1393
1400
  declare class VideoPlayerModule {
1394
1401
  private readonly oldTimestampLimit;
@@ -1402,6 +1409,7 @@ declare class VideoPlayerModule {
1402
1409
  private renderedFrameCount;
1403
1410
  private rendererDroppedFrameCount;
1404
1411
  constructor(emitter: Emitter<VideoPlayerModuleListeners, unknown>, logger: Logger, clockSource: ClockSource);
1412
+ load: () => void;
1405
1413
  unload: () => Promise<void>;
1406
1414
  suspend: () => void;
1407
1415
  unsuspend: () => void;
@@ -1614,8 +1622,15 @@ export interface Channel {
1614
1622
  isLive: boolean;
1615
1623
  thumbnailUrls: string[];
1616
1624
  }
1617
- interface ChannelWithRenditions extends Channel {
1625
+ interface ClientOverrides {
1626
+ maxVideoBitRate?: number;
1627
+ minBufferTime?: number;
1628
+ maxBufferTime?: number;
1629
+ burstEnabled?: boolean;
1630
+ }
1631
+ interface ChannelWithRenditionsAndOverrides extends Channel {
1618
1632
  renditions: Rendition[];
1633
+ overrides?: ClientOverrides;
1619
1634
  }
1620
1635
  interface ConnectOptions {
1621
1636
  channelGroupId?: string;
@@ -1635,7 +1650,7 @@ export interface ConnectResponse {
1635
1650
  logsUrl?: string;
1636
1651
  statsUrl?: string;
1637
1652
  telemetry?: Telemetry;
1638
- channels: ChannelWithRenditions[];
1653
+ channels: ChannelWithRenditionsAndOverrides[];
1639
1654
  edges: string[];
1640
1655
  }
1641
1656
  export interface ApiClientOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vindral/web-sdk",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "homepage": "https://vindral.com",
5
5
  "description": "Web SDK for viewing Vindral streams",
6
6
  "license": "SEE LICENSE IN https://www.vindral.com/terms-conditions",