@opentok/client 2.22.1 → 2.22.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.
@@ -78,6 +78,7 @@ declare namespace OT {
78
78
  frameRate?: 30 | 15 | 7 | 1;
79
79
  maxResolution?: Dimensions;
80
80
  resolution?: (
81
+ '1920x1080' |
81
82
  '1280x960' |
82
83
  '1280x720' |
83
84
  '640x480' |
@@ -90,6 +91,13 @@ declare namespace OT {
90
91
 
91
92
  export type VideoContentHint = "text" | "detail" | "motion" | "";
92
93
 
94
+ export type BackgroundBlurFilter = {
95
+ type: 'backgroundBlur';
96
+ blurStrength?: 'low' | 'high';
97
+ };
98
+
99
+ export type VideoFilter = BackgroundBlurFilter;
100
+
93
101
  export type PublisherProperties = WidgetProperties & GetUserMediaProperties & {
94
102
  audioBitrate?: number;
95
103
  audioFallbackEnabled?: boolean;
@@ -97,9 +105,12 @@ declare namespace OT {
97
105
  name?: string;
98
106
  publishAudio?: boolean;
99
107
  publishVideo?: boolean;
108
+ publishCaptions?: boolean;
109
+ scalableScreenshare?: boolean;
100
110
  style?: Partial<PublisherStyle>;
101
111
  videoContentHint?: VideoContentHint;
102
112
  enableDtx?: boolean;
113
+ videoFilter?: VideoFilter;
103
114
  };
104
115
 
105
116
  export type SubscriberStyle = WidgetStyle & {
@@ -135,7 +146,7 @@ declare namespace OT {
135
146
  width: number;
136
147
  height: number;
137
148
  };
138
- videoType: 'camera' | 'screen';
149
+ videoType: 'camera' | 'screen' | 'custom' | undefined;
139
150
  }
140
151
 
141
152
  export type Event<Type, Target> = {
@@ -255,8 +266,12 @@ declare namespace OT {
255
266
  getStats(callback: (error?: OTError, stats?: PublisherStatsArr) => void): void;
256
267
  getRtcStatsReport(): Promise<PublisherRtcStatsReportArr>;
257
268
  getStyle(): PublisherProperties;
269
+ applyVideoFilter(videoFilter: VideoFilter): Promise<void>;
270
+ getVideoFilter(): VideoFilter | null;
271
+ clearVideoFilter(): Promise<void>;
258
272
  publishAudio(value: boolean): void;
259
273
  publishVideo(value: boolean): void;
274
+ publishCaptions(value: boolean): void;
260
275
  cycleVideo(): Promise<{ deviceId: string }>;
261
276
  setAudioSource(audioSource:string | MediaStreamTrack): Promise<undefined>;
262
277
  getAudioSource(): MediaStreamTrack;
@@ -331,7 +346,7 @@ declare namespace OT {
331
346
  signal: Event<'signal', Session> & {
332
347
  type?: string;
333
348
  data?: string;
334
- from: Connection;
349
+ from: Connection | null;
335
350
  };
336
351
 
337
352
  streamCreated: Event<'streamCreated', Session> & {
@@ -458,6 +473,11 @@ declare namespace OT {
458
473
 
459
474
  connected: Event<'connected', Subscriber>;
460
475
 
476
+ captionReceived: Event<'captionReceived', Subscriber> & {
477
+ streamId: string;
478
+ caption: string;
479
+ };
480
+
461
481
  destroyed: Event<'destroyed', Subscriber> & {
462
482
  reason: string;
463
483
  };
@@ -487,6 +507,9 @@ declare namespace OT {
487
507
  getImgData(): string | null;
488
508
  getStats(callback: (error?: OTError, stats?: SubscriberStats) => void): void;
489
509
  getRtcStatsReport(): Promise<RTCStatsReport>;
510
+ subscribeToCaptions(value: boolean): Promise<void>;
511
+ isSubscribedToCaptions(): boolean;
512
+ isAudioBlocked(): boolean;
490
513
  restrictFrameRate(value: boolean): void;
491
514
  setAudioVolume(volume: number): void;
492
515
  setPreferredFrameRate(frameRate: number): void;