@opentok/client 2.22.2 → 2.22.5

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.
@@ -48,6 +48,8 @@ declare namespace OT {
48
48
 
49
49
  export function getSupportedCodecs(): Promise<{ videoEncoders: ('H264' | 'VP8')[], videoDecoders: ('H264' | 'VP8')[] }>;
50
50
 
51
+ export function hasMediaProcessorSupport(): boolean;
52
+
51
53
  export type WidgetStyle = {
52
54
  audioLevelDisplayMode: 'auto' | 'on' | 'off';
53
55
  backgroundImageURI: string;
@@ -78,6 +80,7 @@ declare namespace OT {
78
80
  frameRate?: 30 | 15 | 7 | 1;
79
81
  maxResolution?: Dimensions;
80
82
  resolution?: (
83
+ '1920x1080' |
81
84
  '1280x960' |
82
85
  '1280x720' |
83
86
  '640x480' |
@@ -104,6 +107,7 @@ declare namespace OT {
104
107
  name?: string;
105
108
  publishAudio?: boolean;
106
109
  publishVideo?: boolean;
110
+ publishCaptions?: boolean;
107
111
  scalableScreenshare?: boolean;
108
112
  style?: Partial<PublisherStyle>;
109
113
  videoContentHint?: VideoContentHint;
@@ -144,7 +148,7 @@ declare namespace OT {
144
148
  width: number;
145
149
  height: number;
146
150
  };
147
- videoType: 'camera' | 'screen';
151
+ videoType: 'camera' | 'screen' | 'custom' | undefined;
148
152
  }
149
153
 
150
154
  export type Event<Type, Target> = {
@@ -269,6 +273,7 @@ declare namespace OT {
269
273
  clearVideoFilter(): Promise<void>;
270
274
  publishAudio(value: boolean): void;
271
275
  publishVideo(value: boolean): void;
276
+ publishCaptions(value: boolean): void;
272
277
  cycleVideo(): Promise<{ deviceId: string }>;
273
278
  setAudioSource(audioSource:string | MediaStreamTrack): Promise<undefined>;
274
279
  getAudioSource(): MediaStreamTrack;
@@ -470,6 +475,11 @@ declare namespace OT {
470
475
 
471
476
  connected: Event<'connected', Subscriber>;
472
477
 
478
+ captionReceived: Event<'captionReceived', Subscriber> & {
479
+ streamId: string;
480
+ caption: string;
481
+ };
482
+
473
483
  destroyed: Event<'destroyed', Subscriber> & {
474
484
  reason: string;
475
485
  };
@@ -499,6 +509,9 @@ declare namespace OT {
499
509
  getImgData(): string | null;
500
510
  getStats(callback: (error?: OTError, stats?: SubscriberStats) => void): void;
501
511
  getRtcStatsReport(): Promise<RTCStatsReport>;
512
+ subscribeToCaptions(value: boolean): Promise<void>;
513
+ isSubscribedToCaptions(): boolean;
514
+ isAudioBlocked(): boolean;
502
515
  restrictFrameRate(value: boolean): void;
503
516
  setAudioVolume(volume: number): void;
504
517
  setPreferredFrameRate(frameRate: number): void;