@whereby.com/core 1.31.6 → 1.32.0
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/dist/index.cjs +149 -28
- package/dist/index.d.cts +741 -1
- package/dist/index.d.mts +741 -1
- package/dist/index.d.ts +741 -1
- package/dist/index.mjs +149 -29
- package/dist/legacy-esm.js +149 -29
- package/dist/redux/index.cjs +400 -15
- package/dist/redux/index.d.cts +559 -4
- package/dist/redux/index.d.mts +559 -4
- package/dist/redux/index.d.ts +559 -4
- package/dist/redux/index.js +393 -16
- package/dist/redux/index.mjs +393 -16
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
|
@@ -32,21 +32,53 @@ type HttpClientRequestConfig = AxiosRequestConfig | {
|
|
|
32
32
|
interface IHttpClient {
|
|
33
33
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Class used for making http calls. This is just a pure
|
|
37
|
+
* wrapper around the http lib that we decide to use,
|
|
38
|
+
* so that we can switch implementations.
|
|
39
|
+
*/
|
|
35
40
|
declare class HttpClient implements IHttpClient {
|
|
36
41
|
_baseUrl: string;
|
|
42
|
+
/**
|
|
43
|
+
* Creates an HttpClient instance.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} [baseUrl] - The base URL where all requests are made.
|
|
46
|
+
*/
|
|
37
47
|
constructor({ baseUrl }: {
|
|
38
48
|
baseUrl: string;
|
|
39
49
|
});
|
|
40
50
|
private _requestAxios;
|
|
51
|
+
/**
|
|
52
|
+
* Wrapper for the axios API
|
|
53
|
+
*
|
|
54
|
+
* @param {string} url - Required. URL (appended to base URL) where API call will be made
|
|
55
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
56
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
57
|
+
*/
|
|
41
58
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
42
59
|
}
|
|
43
60
|
|
|
61
|
+
/**
|
|
62
|
+
* ApiClient for doing multipart/form-data requests.
|
|
63
|
+
*/
|
|
44
64
|
declare class MultipartHttpClient implements IHttpClient {
|
|
45
65
|
_httpClient: IHttpClient;
|
|
46
66
|
constructor({ httpClient }: {
|
|
47
67
|
httpClient: IHttpClient;
|
|
48
68
|
});
|
|
69
|
+
/**
|
|
70
|
+
* Convert the provided object to a FormData object containing the same keys and values.
|
|
71
|
+
* @param {object} data - the data to convert.
|
|
72
|
+
* @returns {FormData}
|
|
73
|
+
*/
|
|
49
74
|
static dataToFormData(data: Record<string, string>): FormData;
|
|
75
|
+
/**
|
|
76
|
+
* Request a resource using multipart/form-data encoding.
|
|
77
|
+
*
|
|
78
|
+
* @param {string} url - the url to request
|
|
79
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
80
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
81
|
+
*/
|
|
50
82
|
request(url: string, options?: HttpClientRequestConfig): Promise<Response>;
|
|
51
83
|
}
|
|
52
84
|
|
|
@@ -80,19 +112,40 @@ interface ApiClientOptions {
|
|
|
80
112
|
baseUrl?: string;
|
|
81
113
|
fetchDeviceCredentials?: AuthenticatedHttpClientOptions["fetchDeviceCredentials"];
|
|
82
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Class used for all Whereby API calls.
|
|
117
|
+
*/
|
|
83
118
|
declare class ApiClient {
|
|
84
119
|
authenticatedHttpClient: AuthenticatedHttpClient;
|
|
85
120
|
authenticatedFormDataHttpClient: MultipartHttpClient;
|
|
121
|
+
/**
|
|
122
|
+
* Create an ApiClient instance.
|
|
123
|
+
*/
|
|
86
124
|
constructor({ baseUrl, fetchDeviceCredentials, }?: ApiClientOptions);
|
|
125
|
+
/**
|
|
126
|
+
* Wrapper for the fetch API
|
|
127
|
+
*/
|
|
87
128
|
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
129
|
+
/**
|
|
130
|
+
* Performs a multipart request where data is multipart/form-data encoded.
|
|
131
|
+
*/
|
|
88
132
|
requestMultipart(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
89
133
|
}
|
|
90
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Related to device calls needed to obtain credentials
|
|
137
|
+
*/
|
|
91
138
|
declare class DeviceService {
|
|
92
139
|
_apiClient: ApiClient;
|
|
93
140
|
constructor({ apiClient }: {
|
|
94
141
|
apiClient: ApiClient;
|
|
95
142
|
});
|
|
143
|
+
/**
|
|
144
|
+
* Get's the device credentials needed for most of the other API services
|
|
145
|
+
*
|
|
146
|
+
* @return {Promise} A promise which is fulfilled or failed based on the
|
|
147
|
+
* response.
|
|
148
|
+
*/
|
|
96
149
|
getCredentials(): Promise<Credentials | null>;
|
|
97
150
|
}
|
|
98
151
|
|
|
@@ -105,6 +158,11 @@ declare class CredentialsService extends EventEmitter {
|
|
|
105
158
|
_deviceService: DeviceService;
|
|
106
159
|
_credentialsStore: AbstractStore;
|
|
107
160
|
credentialsPromise?: Promise<Credentials | null>;
|
|
161
|
+
/**
|
|
162
|
+
* Service to manage Whereby's Rest API credentials.
|
|
163
|
+
*
|
|
164
|
+
* @param {ObjectStore} credentialsStore - Store to manage the credentials.
|
|
165
|
+
*/
|
|
108
166
|
constructor({ deviceService, credentialsStore, }: {
|
|
109
167
|
deviceService: DeviceService;
|
|
110
168
|
credentialsStore: AbstractStore;
|
|
@@ -114,10 +172,38 @@ declare class CredentialsService extends EventEmitter {
|
|
|
114
172
|
storeName?: string;
|
|
115
173
|
storeType?: "localStorage" | "chromeStorage";
|
|
116
174
|
}): CredentialsService;
|
|
175
|
+
/**
|
|
176
|
+
* Contacts the REST API to get new credentials. DO NOT USE directly, call getCredentials() instead.
|
|
177
|
+
*
|
|
178
|
+
* @see getCredentials
|
|
179
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
180
|
+
*/
|
|
117
181
|
_fetchNewCredentialsFromApi(): Promise<Credentials | null>;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the current credentials without triggering an API request to get new ones.
|
|
184
|
+
* If no credentials are currently available it will return null.
|
|
185
|
+
*
|
|
186
|
+
* @returns {?Credentials} - The credentials currently in use, null otherwise.
|
|
187
|
+
*/
|
|
118
188
|
getCurrentCredentials(): Promise<Credentials | null>;
|
|
189
|
+
/**
|
|
190
|
+
* Returns a promise that will contain the credentials for this client.
|
|
191
|
+
* If no credentials are available in local storage, new ones will be fetched from the server.
|
|
192
|
+
*
|
|
193
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
194
|
+
*/
|
|
119
195
|
getCredentials(): Promise<Credentials | null>;
|
|
196
|
+
/**
|
|
197
|
+
* Saves new credentials which replace the existing ones and abort any pending request to get new ones.
|
|
198
|
+
*
|
|
199
|
+
* @param {Credentials} credentials - New credentials to store.
|
|
200
|
+
*/
|
|
120
201
|
saveCredentials(credentials: Credentials): Promise<Credentials>;
|
|
202
|
+
/**
|
|
203
|
+
* It will set the userId for the current credentials.
|
|
204
|
+
*
|
|
205
|
+
* @param userId - The user id to set.
|
|
206
|
+
*/
|
|
121
207
|
setUserId(userId: string | null): Promise<void>;
|
|
122
208
|
}
|
|
123
209
|
|
|
@@ -255,9 +341,19 @@ declare class Organization {
|
|
|
255
341
|
}
|
|
256
342
|
|
|
257
343
|
type FetchOrganizationFunction = () => Promise<Organization | undefined>;
|
|
344
|
+
/**
|
|
345
|
+
* Class used for all Whereby organization API calls.
|
|
346
|
+
*/
|
|
258
347
|
declare class OrganizationApiClient {
|
|
259
348
|
private _apiClient;
|
|
260
349
|
private _fetchOrganization;
|
|
350
|
+
/**
|
|
351
|
+
* Create an OrganizationApiClient instance.
|
|
352
|
+
*
|
|
353
|
+
* @param {Object} options - The options for the OrganizationApiClient.
|
|
354
|
+
* @param {ApiClient} [options.apiClient] - The apiClient to use.
|
|
355
|
+
* @param {Function} [options.fetchOrganization] - function that returns a promise with the organization.
|
|
356
|
+
*/
|
|
261
357
|
constructor({ apiClient, fetchOrganization, }: {
|
|
262
358
|
apiClient: ApiClient;
|
|
263
359
|
fetchOrganization?: FetchOrganizationFunction;
|
|
@@ -278,6 +374,9 @@ declare class OrganizationService {
|
|
|
278
374
|
constructor({ apiClient }: {
|
|
279
375
|
apiClient: ApiClient;
|
|
280
376
|
});
|
|
377
|
+
/**
|
|
378
|
+
* Creates an organization.
|
|
379
|
+
*/
|
|
281
380
|
createOrganization({ organizationName, subdomain, owner, }: {
|
|
282
381
|
organizationName: string;
|
|
283
382
|
subdomain: string;
|
|
@@ -292,8 +391,23 @@ declare class OrganizationService {
|
|
|
292
391
|
consents?: ReadonlyArray<ConsentGrantRequest>;
|
|
293
392
|
};
|
|
294
393
|
}): Promise<string>;
|
|
394
|
+
/**
|
|
395
|
+
* Retrieves the organization based on the subdomain.
|
|
396
|
+
*/
|
|
295
397
|
getOrganizationBySubdomain(subdomain: string): Promise<Organization | null>;
|
|
398
|
+
/**
|
|
399
|
+
* Retrieves the organization based on the organizationId.
|
|
400
|
+
*
|
|
401
|
+
* Note: This endpoint should only be used to retrieve an organization when the device is linked
|
|
402
|
+
* to a user in that organization. Use getOrganizationBySubdomain instead if you just want the information
|
|
403
|
+
* about an organization that is mapped to a given subdomain.
|
|
404
|
+
*/
|
|
296
405
|
getOrganizationByOrganizationId(organizationId: string): Promise<Organization | null>;
|
|
406
|
+
/**
|
|
407
|
+
* Retrieves the organizations that contain a user
|
|
408
|
+
* matching provided the email+code or phoneNumber+code
|
|
409
|
+
* combination.
|
|
410
|
+
*/
|
|
297
411
|
getOrganizationsByContactPoint(options: {
|
|
298
412
|
email: string;
|
|
299
413
|
code: string;
|
|
@@ -301,17 +415,37 @@ declare class OrganizationService {
|
|
|
301
415
|
phoneNumber: string;
|
|
302
416
|
code: string;
|
|
303
417
|
}): Promise<ReadonlyArray<Organization>>;
|
|
418
|
+
/**
|
|
419
|
+
* Retrieves the organizations that contain a user
|
|
420
|
+
* matching provided the idToken
|
|
421
|
+
*/
|
|
304
422
|
getOrganizationsByIdToken({ idToken }: {
|
|
305
423
|
idToken: string;
|
|
306
424
|
}): Promise<ReadonlyArray<Organization>>;
|
|
425
|
+
/**
|
|
426
|
+
* Retrieves the organizations containing a user
|
|
427
|
+
* with either the email or phoneNumber matching the logged in user.
|
|
428
|
+
*
|
|
429
|
+
* This is useful for showing the possible organization that the current
|
|
430
|
+
* user could log in to.
|
|
431
|
+
*/
|
|
307
432
|
getOrganizationsByLoggedInUser(): Promise<ReadonlyArray<Organization>>;
|
|
433
|
+
/**
|
|
434
|
+
* Checks if a subdomain is available and verifies its format.
|
|
435
|
+
*/
|
|
308
436
|
getSubdomainAvailability(subdomain: string): Promise<{
|
|
309
437
|
status: string;
|
|
310
438
|
}>;
|
|
439
|
+
/**
|
|
440
|
+
* Updates preferences of the organization.
|
|
441
|
+
*/
|
|
311
442
|
updatePreferences({ organizationId, preferences, }: {
|
|
312
443
|
organizationId: string;
|
|
313
444
|
preferences: OrganizationPreferences;
|
|
314
445
|
}): Promise<undefined>;
|
|
446
|
+
/**
|
|
447
|
+
* Delete organization
|
|
448
|
+
*/
|
|
315
449
|
deleteOrganization({ organizationId }: {
|
|
316
450
|
organizationId: string;
|
|
317
451
|
}): Promise<undefined>;
|
|
@@ -330,55 +464,152 @@ declare class OrganizationServiceCache {
|
|
|
330
464
|
}
|
|
331
465
|
|
|
332
466
|
declare class Room {
|
|
467
|
+
readonly isClaimed: boolean;
|
|
468
|
+
readonly isBanned: boolean;
|
|
333
469
|
readonly isLocked: boolean;
|
|
334
470
|
constructor(properties?: {});
|
|
335
471
|
}
|
|
336
472
|
|
|
473
|
+
/**
|
|
474
|
+
* Service for talking to the Room related APIs
|
|
475
|
+
*/
|
|
337
476
|
declare class RoomService {
|
|
477
|
+
/**
|
|
478
|
+
* @param {object} organizationApiClient (required)
|
|
479
|
+
*/
|
|
338
480
|
constructor({ organizationApiClient }: {
|
|
339
481
|
organizationApiClient: any;
|
|
340
482
|
});
|
|
483
|
+
/**
|
|
484
|
+
* Gets the list of visited rooms
|
|
485
|
+
*
|
|
486
|
+
* @param {Object} args
|
|
487
|
+
* @param {Array<string>} [types=["team"]] - The type of rooms that should be fetched.
|
|
488
|
+
* @param {Array<string>} [fields=["meeting"]] - The fields of room that should be fetched.
|
|
489
|
+
* @returns {Promise<array>} - It will resolve with an array.
|
|
490
|
+
*/
|
|
341
491
|
getRooms({ types, fields }?: {
|
|
342
492
|
fields?: never[] | undefined;
|
|
343
493
|
}): any;
|
|
494
|
+
/**
|
|
495
|
+
* Gets the specified room.
|
|
496
|
+
*
|
|
497
|
+
* Currently information is implicitly alluded to via the servers
|
|
498
|
+
* `/room/roomName` response. This method patches the data
|
|
499
|
+
* tempoarily, until the day it comes back from the server.
|
|
500
|
+
*
|
|
501
|
+
* @returns {Promise<Room>} - It will resolve with the Room.
|
|
502
|
+
*/
|
|
344
503
|
getRoom({ roomName, fields }: {
|
|
345
504
|
roomName: string;
|
|
346
505
|
fields?: Array<string>;
|
|
347
506
|
}): Promise<Room>;
|
|
507
|
+
/**
|
|
508
|
+
* Claims the specified room.
|
|
509
|
+
*
|
|
510
|
+
* @param {Object} args
|
|
511
|
+
* @param {String} args.roomName - The roomName to claim
|
|
512
|
+
* @param {String} args.type - The type of room to claim
|
|
513
|
+
* @param {String} args.mode - The optional mode of room to claim
|
|
514
|
+
* @param {[Boolean]} args.isLocked - The optional lock status of room to claim
|
|
515
|
+
* @returns {Promise} - It will resolve with undefined.
|
|
516
|
+
*/
|
|
348
517
|
claimRoom({ roomName, type, mode, isLocked }: {
|
|
349
518
|
roomName: any;
|
|
350
519
|
type: any;
|
|
351
520
|
mode: any;
|
|
352
521
|
isLocked: any;
|
|
353
522
|
}): any;
|
|
523
|
+
/**
|
|
524
|
+
* Unclaims the specified room.
|
|
525
|
+
*
|
|
526
|
+
* @param {string} roomName - the room name to unclaim.
|
|
527
|
+
* @returns {Promise.<undefined>} - It will resolve with undefined.
|
|
528
|
+
*/
|
|
354
529
|
unclaimRoom(roomName: any): any;
|
|
530
|
+
/**
|
|
531
|
+
* Changes the name of the room
|
|
532
|
+
*
|
|
533
|
+
* @param {Object} args
|
|
534
|
+
* @param {string} args.roomName - The name of the room to rename
|
|
535
|
+
* @param {string} args.newRoomName - The new name
|
|
536
|
+
* @returns {Promise<undefined>} - It will resolve if the room was renamed, reject for all other cases
|
|
537
|
+
*/
|
|
355
538
|
renameRoom({ roomName, newRoomName }: {
|
|
356
539
|
roomName: any;
|
|
357
540
|
newRoomName: any;
|
|
358
541
|
}): any;
|
|
542
|
+
/**
|
|
543
|
+
* Changes the room mode (experimental)
|
|
544
|
+
*
|
|
545
|
+
* @param {string} roomName - The name of the room to change mode of
|
|
546
|
+
* @param {string} mode - The name of mode to set, currently only "group" is supported
|
|
547
|
+
* @returns {Promise<undefined>} - It will resolve if mode was changed, rejects for all other cases
|
|
548
|
+
*/
|
|
359
549
|
changeMode({ roomName, mode }: {
|
|
360
550
|
roomName: any;
|
|
361
551
|
mode: any;
|
|
362
552
|
}): any;
|
|
553
|
+
/**
|
|
554
|
+
* Updates the room prefs
|
|
555
|
+
*
|
|
556
|
+
* @param {string} roomName - The name of the room to change mode of
|
|
557
|
+
* @param {object} preferences - The prefs you want to update and their values
|
|
558
|
+
* @returns {Promise<undefined>} - It will resolve if updated, rejects for all other cases
|
|
559
|
+
*/
|
|
363
560
|
updatePreferences({ roomName, preferences }: {
|
|
364
561
|
roomName: any;
|
|
365
562
|
preferences: any;
|
|
366
563
|
}): any;
|
|
564
|
+
/**
|
|
565
|
+
* Updates the protected room prefs
|
|
566
|
+
*
|
|
567
|
+
* @param {string} roomName - The name of the room to change mode of
|
|
568
|
+
* @param {object} preferences - The protected prefs you want to update and their values
|
|
569
|
+
* @returns {Promise<undefined>} - It will resolve if updated, rejects for all other cases
|
|
570
|
+
*/
|
|
367
571
|
updateProtectedPreferences({ roomName, preferences }: {
|
|
368
572
|
roomName: any;
|
|
369
573
|
preferences: any;
|
|
370
574
|
}): any;
|
|
371
575
|
getRoomPermissions(roomName: any, { roomKey }?: {}): any;
|
|
576
|
+
/**
|
|
577
|
+
* Gets the specified room metrics
|
|
578
|
+
*
|
|
579
|
+
* @param {Object} args
|
|
580
|
+
* @param {string} args.roomName - The name of the room to get metrics from.
|
|
581
|
+
* @param {string} args.metrics - Comma-separated list of metrics to include.
|
|
582
|
+
* @param {string} args.from (optional) - Start time (inclusive) to count from in
|
|
583
|
+
* ISO format. Defaults to counting from the start of time.
|
|
584
|
+
* @param {string} args.to (optional) - End time (exclusive) to count up to in
|
|
585
|
+
* ISO format. Defaults to counting up to the current time.
|
|
586
|
+
* @returns {Promise<Object>} - It will resolve with the requested metrics.
|
|
587
|
+
*/
|
|
372
588
|
getRoomMetrics({ roomName, metrics, from, to }: {
|
|
373
589
|
roomName: any;
|
|
374
590
|
metrics: any;
|
|
375
591
|
from: any;
|
|
376
592
|
to: any;
|
|
377
593
|
}): any;
|
|
594
|
+
/**
|
|
595
|
+
* Changes the room type
|
|
596
|
+
*
|
|
597
|
+
* @param {Object} args
|
|
598
|
+
* @param {string} args.roomName - The name of the room to change mode of
|
|
599
|
+
* @param {"personal" | "personal_xl"} args.type - Room type that should be set
|
|
600
|
+
* @returns {Promise<undefined>} - It will resolve if type was changed, rejects for all other cases
|
|
601
|
+
*/
|
|
378
602
|
changeType({ roomName, type }: {
|
|
379
603
|
roomName: any;
|
|
380
604
|
type: any;
|
|
381
605
|
}): any;
|
|
606
|
+
/** Gets a Forest campaign social image
|
|
607
|
+
*
|
|
608
|
+
* @param {Object} args
|
|
609
|
+
* @param {string} args.roomName - The name of the room to get metrics from.
|
|
610
|
+
* @param {number} args.count - Number to be displayed in the image as tree count.
|
|
611
|
+
* @returns {Promise<string>} - It will resolve with the image url.
|
|
612
|
+
*/
|
|
382
613
|
getForestSocialImage({ roomName, count }: {
|
|
383
614
|
roomName: any;
|
|
384
615
|
count: any;
|
|
@@ -435,7 +666,24 @@ declare class LiveCaption {
|
|
|
435
666
|
constructor({ resultId, senderId, text }: LiveCaptionEvent);
|
|
436
667
|
}
|
|
437
668
|
|
|
669
|
+
/**
|
|
670
|
+
* Public helpers for the optional camera effects and audio denoiser features.
|
|
671
|
+
*
|
|
672
|
+
* These wrap `@whereby.com/camera-effects` and `@whereby.com/audio-denoiser`,
|
|
673
|
+
* which are bundled with core but loaded on demand via dynamic import. Consumers
|
|
674
|
+
* should reach for these instead of importing the underlying packages directly,
|
|
675
|
+
* so the effect code stays in a lazily-loaded chunk and is never pulled into the
|
|
676
|
+
* main bundle for consumers who don't use these features.
|
|
677
|
+
*/
|
|
678
|
+
/**
|
|
679
|
+
* List the camera effect preset ids that are usable in the current environment.
|
|
680
|
+
* The camera effects code is loaded on demand the first time this is called.
|
|
681
|
+
*/
|
|
438
682
|
declare function getUsableCameraEffectPresets(): Promise<string[]>;
|
|
683
|
+
/**
|
|
684
|
+
* Whether audio noise suppression is supported in the current browser. The
|
|
685
|
+
* audio denoiser code is loaded on demand the first time this is called.
|
|
686
|
+
*/
|
|
439
687
|
declare function isAudioDenoiserSupported(): Promise<boolean>;
|
|
440
688
|
|
|
441
689
|
interface RoomIntegrationContent {
|
|
@@ -454,6 +702,15 @@ declare function youtube({ url, startAt, metadata, }: {
|
|
|
454
702
|
startAt?: number;
|
|
455
703
|
metadata?: YouTubeContentMetadata;
|
|
456
704
|
}): RoomIntegrationContent | null;
|
|
705
|
+
/**
|
|
706
|
+
* Builds the content for a Miro share from an embed link.
|
|
707
|
+
*
|
|
708
|
+
* Miro cannot be built from an ordinary `miro.com/app/board/...` url: access links are minted by
|
|
709
|
+
* Miro's board picker using Whereby's credentials. Use the hosted picker to let a user browse their
|
|
710
|
+
* boards; use this when you already hold a link, e.g. one pasted from Miro's own Embed dialog.
|
|
711
|
+
*
|
|
712
|
+
* @returns null for anything that is not a Miro embed link.
|
|
713
|
+
*/
|
|
457
714
|
declare function miro({ accessLink }: {
|
|
458
715
|
accessLink: string;
|
|
459
716
|
}): RoomIntegrationContent | null;
|
|
@@ -538,8 +795,15 @@ interface Screenshare {
|
|
|
538
795
|
isLocal: boolean;
|
|
539
796
|
}
|
|
540
797
|
|
|
798
|
+
/**
|
|
799
|
+
* Base URL overrides for `WherebyClient` and `createServices`.
|
|
800
|
+
*
|
|
801
|
+
* @internal For Whereby's own development. May change without notice.
|
|
802
|
+
*/
|
|
541
803
|
interface ServicesOptions {
|
|
804
|
+
/** Base URL of the Whereby API. Defaults to the URL the SDK was built with. */
|
|
542
805
|
apiBaseUrl?: string;
|
|
806
|
+
/** Base URL of the signal server. Defaults to the URL the SDK was built with. */
|
|
543
807
|
signalBaseUrl?: string;
|
|
544
808
|
}
|
|
545
809
|
declare function createServices({ apiBaseUrl, signalBaseUrl }?: ServicesOptions): {
|
|
@@ -548,6 +812,7 @@ declare function createServices({ apiBaseUrl, signalBaseUrl }?: ServicesOptions)
|
|
|
548
812
|
organizationService: OrganizationService;
|
|
549
813
|
roomIntegrationService: RoomIntegrationService;
|
|
550
814
|
fetchOrganizationFromRoomUrl: (roomUrl: string) => Promise<Organization | null>;
|
|
815
|
+
fetchRoomFromRoomUrl: (roomUrl: string) => Promise<Room>;
|
|
551
816
|
signalBaseUrl: string;
|
|
552
817
|
};
|
|
553
818
|
|
|
@@ -567,20 +832,43 @@ interface Options {
|
|
|
567
832
|
interface DebouncedFunction {
|
|
568
833
|
(...args: any[]): void;
|
|
569
834
|
}
|
|
835
|
+
/**
|
|
836
|
+
* Debounce function.
|
|
837
|
+
*
|
|
838
|
+
* @param {Function} fn - Function to debounce.
|
|
839
|
+
* @param {Object} [options] - Options.
|
|
840
|
+
* @param {number} [options.delay=500] - Delay in milliseconds.
|
|
841
|
+
* @param {boolean} [options.edges=false] - Whether to call the function on the
|
|
842
|
+
* leading and trailing edges of the wait timeout.
|
|
843
|
+
* @returns {Function} Debounced function.
|
|
844
|
+
*/
|
|
570
845
|
declare function debounce(fn: DebouncedFunction, { delay, edges }?: Options): DebouncedFunction;
|
|
571
846
|
|
|
847
|
+
/**
|
|
848
|
+
* Parse the raw data contained in a roomKey JWT token without verifying if the token is
|
|
849
|
+
* valid (i.e. we do not have the JWT signing keys in this environment)
|
|
850
|
+
*/
|
|
572
851
|
declare function parseUnverifiedRoomKeyData(roomKey: string): any;
|
|
573
852
|
|
|
853
|
+
/**
|
|
854
|
+
* Reducer
|
|
855
|
+
*/
|
|
574
856
|
interface WaitingParticipantsState {
|
|
575
857
|
waitingParticipants: WaitingParticipant[];
|
|
576
858
|
}
|
|
577
859
|
|
|
860
|
+
/**
|
|
861
|
+
* Reducer
|
|
862
|
+
*/
|
|
578
863
|
interface StreamingState {
|
|
579
864
|
isStreaming: boolean;
|
|
580
865
|
error: unknown;
|
|
581
866
|
startedAt?: number;
|
|
582
867
|
}
|
|
583
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Reducer
|
|
871
|
+
*/
|
|
584
872
|
interface rtcAnalyticsState {
|
|
585
873
|
reportedValues: {
|
|
586
874
|
[key: string]: unknown;
|
|
@@ -591,6 +879,9 @@ type ChatMessage$1 = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "times
|
|
|
591
879
|
removed: boolean;
|
|
592
880
|
file?: ChatFileShare;
|
|
593
881
|
};
|
|
882
|
+
/**
|
|
883
|
+
* Reducer
|
|
884
|
+
*/
|
|
594
885
|
interface ChatState {
|
|
595
886
|
chatMessages: ChatMessage$1[];
|
|
596
887
|
}
|
|
@@ -677,6 +968,9 @@ type NotificationEventMap = {
|
|
|
677
968
|
};
|
|
678
969
|
|
|
679
970
|
type NotificationsEventEmitter = EventEmitter<NotificationEventMap>;
|
|
971
|
+
/**
|
|
972
|
+
* Reducer
|
|
973
|
+
*/
|
|
680
974
|
interface NotificationsState {
|
|
681
975
|
emitter: NotificationsEventEmitter;
|
|
682
976
|
events: Array<NotificationEvent>;
|
|
@@ -695,6 +989,9 @@ interface LocalParticipantState$1 extends LocalParticipant {
|
|
|
695
989
|
breakoutGroupAssigned: string;
|
|
696
990
|
}
|
|
697
991
|
|
|
992
|
+
/**
|
|
993
|
+
* Reducer
|
|
994
|
+
*/
|
|
698
995
|
interface LiveTranscriptionState$1 {
|
|
699
996
|
isInitiator: boolean;
|
|
700
997
|
isTranscribing: boolean;
|
|
@@ -703,6 +1000,9 @@ interface LiveTranscriptionState$1 {
|
|
|
703
1000
|
startedAt?: number;
|
|
704
1001
|
}
|
|
705
1002
|
|
|
1003
|
+
/**
|
|
1004
|
+
* Reducer
|
|
1005
|
+
*/
|
|
706
1006
|
interface LiveCaptionsState$1 {
|
|
707
1007
|
isCaptioning: boolean;
|
|
708
1008
|
error?: string;
|
|
@@ -723,6 +1023,9 @@ interface FileUpload {
|
|
|
723
1023
|
status: "uploading" | "sent" | "error";
|
|
724
1024
|
error?: FileShareError;
|
|
725
1025
|
}
|
|
1026
|
+
/**
|
|
1027
|
+
* Reducer
|
|
1028
|
+
*/
|
|
726
1029
|
interface FileShareState {
|
|
727
1030
|
uploads: FileUpload[];
|
|
728
1031
|
requestInFlight: boolean;
|
|
@@ -732,6 +1035,9 @@ interface SendFilesOptions {
|
|
|
732
1035
|
isBroadcast?: boolean;
|
|
733
1036
|
}
|
|
734
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* Reducer
|
|
1040
|
+
*/
|
|
735
1041
|
interface CloudRecordingState$1 {
|
|
736
1042
|
isInitiator: boolean;
|
|
737
1043
|
isRecording: boolean;
|
|
@@ -760,6 +1066,11 @@ interface CameraEffectsState {
|
|
|
760
1066
|
|
|
761
1067
|
type StopFn = () => void;
|
|
762
1068
|
interface AudioDenoiserState {
|
|
1069
|
+
/**
|
|
1070
|
+
* User intent — true if the consumer asked for denoising on. Persists
|
|
1071
|
+
* across mid-flight stops triggered by device/stream switches so we can
|
|
1072
|
+
* auto-reapply after the switch settles.
|
|
1073
|
+
*/
|
|
763
1074
|
wanted: boolean;
|
|
764
1075
|
isSwitching: boolean;
|
|
765
1076
|
error?: unknown;
|
|
@@ -771,16 +1082,27 @@ interface AudioDenoiserState {
|
|
|
771
1082
|
};
|
|
772
1083
|
}
|
|
773
1084
|
|
|
1085
|
+
/**
|
|
1086
|
+
* Reducer
|
|
1087
|
+
*/
|
|
774
1088
|
interface AuthorizationState {
|
|
775
1089
|
roomKey: string | null;
|
|
776
1090
|
assistantKey?: string | null;
|
|
777
1091
|
roleName: RoleName;
|
|
778
1092
|
}
|
|
779
1093
|
|
|
1094
|
+
/** Seconds a breakout timer runs for when one is enabled without an explicit duration. */
|
|
780
1095
|
declare const DEFAULT_BREAKOUT_TIMER_DURATION = 1800;
|
|
1096
|
+
/**
|
|
1097
|
+
* Reducer
|
|
1098
|
+
*/
|
|
781
1099
|
interface BreakoutState$1 extends BreakoutConfig {
|
|
782
1100
|
error: string | null;
|
|
783
1101
|
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Breakout groups require an SFU ("group") room. In a peer-to-peer room, moving clients in and out
|
|
1104
|
+
* of groups would tear down peer connections that never get re-established, so we refuse to start.
|
|
1105
|
+
*/
|
|
784
1106
|
declare const BREAKOUT_UNAVAILABLE_ERROR = "Breakout groups are not available in peer-to-peer rooms";
|
|
785
1107
|
interface BreakoutSessionSettings {
|
|
786
1108
|
enforceAssignment?: boolean;
|
|
@@ -807,6 +1129,9 @@ interface UpdateBreakoutSessionOptions extends BreakoutSessionSettings {
|
|
|
807
1129
|
[clientId: string]: string;
|
|
808
1130
|
};
|
|
809
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Group helpers
|
|
1134
|
+
*/
|
|
810
1135
|
declare const BREAKOUT_GROUPS_MIN_MAX: [number, number];
|
|
811
1136
|
declare function defaultBreakoutGroupName(groupId: string): string;
|
|
812
1137
|
declare function createBreakoutGroups(count?: number): {
|
|
@@ -861,17 +1186,26 @@ interface ConnectionMonitorState {
|
|
|
861
1186
|
stopCallbackFunction?: () => void;
|
|
862
1187
|
}
|
|
863
1188
|
|
|
1189
|
+
/**
|
|
1190
|
+
* Reducer
|
|
1191
|
+
*/
|
|
864
1192
|
interface DeviceCredentialsState {
|
|
865
1193
|
isFetching: boolean;
|
|
866
1194
|
data?: Credentials | null;
|
|
867
1195
|
}
|
|
868
1196
|
|
|
1197
|
+
/**
|
|
1198
|
+
* Reducer
|
|
1199
|
+
*/
|
|
869
1200
|
interface OrganizationState {
|
|
870
1201
|
data: Organization | null | undefined;
|
|
871
1202
|
isFetching: boolean;
|
|
872
1203
|
error: unknown;
|
|
873
1204
|
}
|
|
874
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* Reducer
|
|
1208
|
+
*/
|
|
875
1209
|
interface RemoteParticipantSliceState {
|
|
876
1210
|
remoteParticipants: RemoteParticipant[];
|
|
877
1211
|
}
|
|
@@ -894,8 +1228,18 @@ type ClientView = {
|
|
|
894
1228
|
breakoutGroupAssigned?: string;
|
|
895
1229
|
};
|
|
896
1230
|
|
|
1231
|
+
/** @internal For Whereby's own development. May change without notice. */
|
|
1232
|
+
type RoomLockStateSource = "fetch" | "signal";
|
|
1233
|
+
/** @internal For Whereby's own development. May change without notice. */
|
|
1234
|
+
type RoomFetchStatus = "idle" | "fetching" | "fetched" | "failed";
|
|
897
1235
|
interface RoomState {
|
|
898
1236
|
isLocked: boolean;
|
|
1237
|
+
lockStateSource: RoomLockStateSource | null;
|
|
1238
|
+
lockStateRoomUrl: string | null;
|
|
1239
|
+
requestedRoomUrl: string | null;
|
|
1240
|
+
roomFetchStatus: RoomFetchStatus;
|
|
1241
|
+
roomFetchRequestId: string | null;
|
|
1242
|
+
isInRoom: boolean;
|
|
899
1243
|
mode: RoomMode | null;
|
|
900
1244
|
}
|
|
901
1245
|
|
|
@@ -903,6 +1247,9 @@ type LocalMediaOptions$1 = {
|
|
|
903
1247
|
audio: boolean;
|
|
904
1248
|
video: boolean;
|
|
905
1249
|
};
|
|
1250
|
+
/**
|
|
1251
|
+
* Reducer
|
|
1252
|
+
*/
|
|
906
1253
|
interface LocalMediaState$1 {
|
|
907
1254
|
beforeEffectTracks?: {
|
|
908
1255
|
audio?: MediaStreamTrack;
|
|
@@ -933,6 +1280,14 @@ interface LocalMediaState$1 {
|
|
|
933
1280
|
widescreenMode: boolean;
|
|
934
1281
|
}
|
|
935
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* Reducer
|
|
1285
|
+
*/
|
|
1286
|
+
/**
|
|
1287
|
+
* Whether to join with the camera and/or microphone muted. The devices are still
|
|
1288
|
+
* acquired according to `localMediaOptions` - this only decides the state we join
|
|
1289
|
+
* with. `true` means muted, an omitted key leaves that device untouched.
|
|
1290
|
+
*/
|
|
936
1291
|
type InitialMuteStates = {
|
|
937
1292
|
camera?: boolean;
|
|
938
1293
|
microphone?: boolean;
|
|
@@ -970,6 +1325,9 @@ interface AppState {
|
|
|
970
1325
|
type ConnectionStatus = "ready" | "connecting" | "connected" | "room_locked" | "knocking" | "knock_on_hold" | "knock_rejected" | "kicked" | "leaving" | "left" | "disconnected" | "reconnecting";
|
|
971
1326
|
type JoinRoomStage = "credentials" | "organization" | "local_media" | "signal_connect" | "identify_device" | "join_room";
|
|
972
1327
|
type JoinRoomErrorNames = "organization_fetch_failed" | "join_cancelled";
|
|
1328
|
+
/**
|
|
1329
|
+
* Reducer
|
|
1330
|
+
*/
|
|
973
1331
|
interface RoomConnectionState$1 {
|
|
974
1332
|
session: {
|
|
975
1333
|
createdAt: string;
|
|
@@ -1022,6 +1380,9 @@ interface RoomIntegrationErrorDetail {
|
|
|
1022
1380
|
code: RoomIntegrationError;
|
|
1023
1381
|
message: string;
|
|
1024
1382
|
}
|
|
1383
|
+
/**
|
|
1384
|
+
* Reducer
|
|
1385
|
+
*/
|
|
1025
1386
|
interface RoomIntegrationsState$1 {
|
|
1026
1387
|
available: RoomIntegration[];
|
|
1027
1388
|
unavailable: RoomIntegration[];
|
|
@@ -1047,6 +1408,9 @@ declare function roomIntegrationPickerUrl({ integration, parentOrigin, featureSo
|
|
|
1047
1408
|
featureSource?: string;
|
|
1048
1409
|
}): string;
|
|
1049
1410
|
|
|
1411
|
+
/**
|
|
1412
|
+
* Reducer
|
|
1413
|
+
*/
|
|
1050
1414
|
interface StreamResolutionUpdate {
|
|
1051
1415
|
streamId: string;
|
|
1052
1416
|
width: number;
|
|
@@ -1070,6 +1434,9 @@ interface ToggleAudioOnlyModeOptions {
|
|
|
1070
1434
|
autoDisableLocalCamera?: boolean;
|
|
1071
1435
|
}
|
|
1072
1436
|
|
|
1437
|
+
/**
|
|
1438
|
+
* Reducer
|
|
1439
|
+
*/
|
|
1073
1440
|
interface SignalConnectionState {
|
|
1074
1441
|
deviceIdentified: boolean;
|
|
1075
1442
|
isIdentifyingDevice: boolean;
|
|
@@ -1077,6 +1444,9 @@ interface SignalConnectionState {
|
|
|
1077
1444
|
socket: ServerSocket | null;
|
|
1078
1445
|
}
|
|
1079
1446
|
|
|
1447
|
+
/**
|
|
1448
|
+
* Reducer
|
|
1449
|
+
*/
|
|
1080
1450
|
interface SpotlightsState {
|
|
1081
1451
|
sorted: {
|
|
1082
1452
|
clientId: string;
|
|
@@ -1208,6 +1578,7 @@ declare const createStore: ({ preloadedState, injectServices, }: {
|
|
|
1208
1578
|
organizationService: OrganizationService;
|
|
1209
1579
|
roomIntegrationService: RoomIntegrationService;
|
|
1210
1580
|
fetchOrganizationFromRoomUrl: (roomUrl: string) => Promise<Organization | null>;
|
|
1581
|
+
fetchRoomFromRoomUrl: (roomUrl: string) => Promise<Room>;
|
|
1211
1582
|
signalBaseUrl: string;
|
|
1212
1583
|
};
|
|
1213
1584
|
}, redux.UnknownAction>;
|
|
@@ -1238,10 +1609,36 @@ declare abstract class BaseClient<TState, TEvents extends Record<string, unknown
|
|
|
1238
1609
|
protected previousState: TState;
|
|
1239
1610
|
private stateSubscribers;
|
|
1240
1611
|
constructor(store: Store);
|
|
1612
|
+
/**
|
|
1613
|
+
* Gets the current state of the client.
|
|
1614
|
+
* @returns The current state of the client.
|
|
1615
|
+
*/
|
|
1241
1616
|
abstract getState(): TState;
|
|
1617
|
+
/**
|
|
1618
|
+
* Subscribes to state changes.
|
|
1619
|
+
* @param callback The callback function to be called when the state changes.
|
|
1620
|
+
* @returns A function to unsubscribe from the state changes.
|
|
1621
|
+
*/
|
|
1242
1622
|
subscribe(callback: (state: TState) => void): () => void;
|
|
1623
|
+
/**
|
|
1624
|
+
* Handles state changes by comparing the current state with the previous state.
|
|
1625
|
+
* @param state The current state of the client.
|
|
1626
|
+
* @param previousState The previous state of the client.
|
|
1627
|
+
* @returns void
|
|
1628
|
+
* @protected
|
|
1629
|
+
*/
|
|
1243
1630
|
protected abstract handleStateChanges(state: TState, previousState: TState): void;
|
|
1631
|
+
/**
|
|
1632
|
+
* Sets up the event bridge to listen for state changes and emit events accordingly.
|
|
1633
|
+
* @returns void
|
|
1634
|
+
* @private
|
|
1635
|
+
*/
|
|
1244
1636
|
private setupEventBridge;
|
|
1637
|
+
/**
|
|
1638
|
+
* Destroys the client by clearing all subscribers and removing all listeners.
|
|
1639
|
+
* @returns void
|
|
1640
|
+
* @public
|
|
1641
|
+
*/
|
|
1245
1642
|
destroy(): void;
|
|
1246
1643
|
}
|
|
1247
1644
|
|
|
@@ -1377,6 +1774,10 @@ declare class LocalMediaClient extends BaseClient<LocalMediaState, LocalMediaEve
|
|
|
1377
1774
|
setMicrophoneDevice(deviceId: string): void;
|
|
1378
1775
|
setSpeakerDevice(deviceId: string): void;
|
|
1379
1776
|
stopMedia(): void;
|
|
1777
|
+
/**
|
|
1778
|
+
* Destroy the LocalMediaClient instance.
|
|
1779
|
+
* This method cleans up any resources and event listeners.
|
|
1780
|
+
*/
|
|
1380
1781
|
destroy(): void;
|
|
1381
1782
|
}
|
|
1382
1783
|
|
|
@@ -1445,7 +1846,9 @@ type LiveStreamState = {
|
|
|
1445
1846
|
startedAt?: number;
|
|
1446
1847
|
};
|
|
1447
1848
|
type BreakoutState = {
|
|
1849
|
+
/** Breakout groups require a group (SFU) room; false in peer-to-peer rooms. */
|
|
1448
1850
|
isAvailable: boolean;
|
|
1851
|
+
/** Set when a breakout action was refused, e.g. starting a session in a peer-to-peer room. */
|
|
1449
1852
|
error: string | null;
|
|
1450
1853
|
isActive: boolean;
|
|
1451
1854
|
currentGroup: {
|
|
@@ -1499,6 +1902,12 @@ interface RoomConnectionState {
|
|
|
1499
1902
|
isAudioOnlyModeEnabled: boolean;
|
|
1500
1903
|
isCameraEnabled: boolean;
|
|
1501
1904
|
isMicrophoneEnabled: boolean;
|
|
1905
|
+
/**
|
|
1906
|
+
* Whether the room is locked. Known before joining once the room is fetched, and null until then. Also null when
|
|
1907
|
+
* the room doesn't exist or can't be fetched. Assistants and Node.js participants don't fetch the room, so they
|
|
1908
|
+
* only know it after joining.
|
|
1909
|
+
*/
|
|
1910
|
+
isLocked: boolean | null;
|
|
1502
1911
|
liveStream?: LiveStreamState;
|
|
1503
1912
|
liveCaptions?: LiveCaptionsState;
|
|
1504
1913
|
liveTranscription?: LiveTranscriptionState;
|
|
@@ -1529,6 +1938,7 @@ declare const LOCAL_SCREENSHARE_STATUS_CHANGED = "local-screenshare:status-chang
|
|
|
1529
1938
|
declare const LOCAL_SCREENSHARE_CHANGED = "local-screenshare:state-changed";
|
|
1530
1939
|
declare const REMOTE_PARTICIPANTS_CHANGED = "remote-participants:changed";
|
|
1531
1940
|
declare const ROOM_SESSION_ID_CHANGED = "room-session-id:changed";
|
|
1941
|
+
declare const ROOM_LOCK_CHANGED = "room-lock:changed";
|
|
1532
1942
|
declare const SCREENSHARE_STARTED = "screenshare:started";
|
|
1533
1943
|
declare const SCREENSHARE_STOPPED = "screenshare:stopped";
|
|
1534
1944
|
declare const CAMERA_STATE_CHANGED = "camera:state-changed";
|
|
@@ -1575,6 +1985,7 @@ type RoomConnectionEvents = {
|
|
|
1575
1985
|
[ROOM_JOINED_ERROR]: [error: RoomJoinedErrors | string];
|
|
1576
1986
|
[ROOM_REJOINED]: [room: RoomRejoinedEvent];
|
|
1577
1987
|
[ROOM_SESSION_ID_CHANGED]: [roomSessionId: string | null];
|
|
1988
|
+
[ROOM_LOCK_CHANGED]: [isLocked: boolean | null];
|
|
1578
1989
|
[WAITING_PARTICIPANT_JOINED]: [participant: WaitingParticipant];
|
|
1579
1990
|
[WAITING_PARTICIPANT_LEFT]: [participantId: string];
|
|
1580
1991
|
[SPOTLIGHT_PARTICIPANT_ADDED]: [participant: ClientView];
|
|
@@ -1606,6 +2017,7 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
|
|
|
1606
2017
|
private microphoneStateSubscribers;
|
|
1607
2018
|
private remoteParticipantsSubscribers;
|
|
1608
2019
|
private roomSessionIdSubscribers;
|
|
2020
|
+
private roomLockSubscribers;
|
|
1609
2021
|
private screenshareSubscribers;
|
|
1610
2022
|
private spotlightedParticipantsSubscribers;
|
|
1611
2023
|
private waitingParticipantsSubscribers;
|
|
@@ -1622,12 +2034,39 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
|
|
|
1622
2034
|
subscribeToConnectionError(callback: (error: string | null) => void): () => void;
|
|
1623
2035
|
subscribeToJoinStage(callback: (joinStage: JoinRoomStage | null) => void): () => void;
|
|
1624
2036
|
subscribeToRoomSessionId(callback: (roomSessionId: string | null) => void): () => void;
|
|
2037
|
+
subscribeToRoomLock(callback: (isLocked: boolean | null) => void): () => void;
|
|
1625
2038
|
subscribeToAudioOnlyMode(callback: (isEnabled: boolean) => void): () => void;
|
|
2039
|
+
/**
|
|
2040
|
+
* Subscribe to remote participant quality report changes.
|
|
2041
|
+
*
|
|
2042
|
+
* The report is keyed by `clientId` and has an entry for each remote client (not the local client).
|
|
2043
|
+
* Each entry has a `quality` level (`"ok"`, `"warning"` or `"critical"`), which is the worst of the
|
|
2044
|
+
* client's video and audio quality. The report is empty until the call quality monitor starts after
|
|
2045
|
+
* joining a room, and is reset to empty after leaving.
|
|
2046
|
+
*
|
|
2047
|
+
* @param callback - Called with the latest report whenever it changes.
|
|
2048
|
+
* @returns A function that removes the subscription.
|
|
2049
|
+
*/
|
|
1626
2050
|
subscribeToRemoteParticipantQualityReport(callback: (report: RemoteParticipantQualityReport) => void): () => void;
|
|
2051
|
+
/**
|
|
2052
|
+
* Subscribe to local participant quality report changes.
|
|
2053
|
+
*
|
|
2054
|
+
* The report has a `quality` level (`"ok"`, `"warning"` or `"critical"`), which is the worst of the
|
|
2055
|
+
* local client's video and audio quality, and a `cpu` level (`"ok"`, `"warning"` or `"critical"`) for
|
|
2056
|
+
* the local device's CPU pressure. `cpu` is left out when the browser can't measure CPU pressure (it
|
|
2057
|
+
* needs the Compute Pressure API). The report is empty until the call quality monitor starts after
|
|
2058
|
+
* joining a room, and is reset to empty after leaving.
|
|
2059
|
+
*
|
|
2060
|
+
* @param callback - Called with the latest report whenever it changes.
|
|
2061
|
+
* @returns A function that removes the subscription.
|
|
2062
|
+
*/
|
|
1627
2063
|
subscribeToLocalParticipantQualityReport(callback: (report: LocalParticipantQualityReport) => void): () => void;
|
|
1628
2064
|
subscribeToLiveStream(callback: (status: {
|
|
1629
2065
|
status: "streaming";
|
|
1630
2066
|
} | undefined) => void): () => void;
|
|
2067
|
+
/**
|
|
2068
|
+
* @deprecated Use 'subscribeToLocalScreenshare' instead
|
|
2069
|
+
*/
|
|
1631
2070
|
subscribeToLocalScreenshareStatus(callback: (status?: LocalScreenshareStatus) => void): () => void;
|
|
1632
2071
|
subscribeToLocalScreenshare(callback: (status: LocalScreenshareState | undefined) => void): () => void;
|
|
1633
2072
|
subscribeToLocalParticipant(callback: (participant?: LocalParticipantState) => void): () => void;
|
|
@@ -1637,85 +2076,374 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
|
|
|
1637
2076
|
subscribeToSpotlightedParticipants(callback: (participants: ClientView[]) => void): () => void;
|
|
1638
2077
|
subscribeToMicrophoneState(callback: (isMicrophoneEnabled: boolean) => void): () => void;
|
|
1639
2078
|
subscribeToCameraState(callback: (isCameraEnabled: boolean) => void): () => void;
|
|
2079
|
+
/**
|
|
2080
|
+
* Get the current state of the Whereby client.
|
|
2081
|
+
* @return {object} - The current state of the client.
|
|
2082
|
+
*/
|
|
1640
2083
|
getState(): RoomConnectionState;
|
|
2084
|
+
/**
|
|
2085
|
+
* Get the event emitter for the Whereby client.
|
|
2086
|
+
* @return {EventEmitter} - The event emitter instance.
|
|
2087
|
+
*/
|
|
1641
2088
|
getNotificationsEventEmitter(): NotificationsEventEmitter;
|
|
2089
|
+
/**
|
|
2090
|
+
* Initialize the client with options.
|
|
2091
|
+
* This method can be called multiple times to update options.
|
|
2092
|
+
* A new `roomUrl` fetches the room, so `isLocked` is known before joining.
|
|
2093
|
+
* @param options<WherebyClientOptions> - Options for the Whereby client.
|
|
2094
|
+
*/
|
|
1642
2095
|
initialize(options: WherebyClientOptions): void;
|
|
2096
|
+
/**
|
|
2097
|
+
* Join a Whereby room.
|
|
2098
|
+
* The promise rejects if the room URL is not provided, if the room can't be joined, and with `"join_cancelled"`
|
|
2099
|
+
* when the room is left or joined again before this join has finished.
|
|
2100
|
+
*/
|
|
1643
2101
|
joinRoom(): Promise<RoomJoinedSuccess>;
|
|
2102
|
+
/**
|
|
2103
|
+
* Send a chat message to the room.
|
|
2104
|
+
* @param text - The message text to send.
|
|
2105
|
+
* @param parentId - Optional id of the message this is a reply to.
|
|
2106
|
+
* @param isBroadcast - When true and a breakout session is active, the message is broadcast to all
|
|
2107
|
+
* breakout groups instead of only the sender's group.
|
|
2108
|
+
*/
|
|
1644
2109
|
sendChatMessage(text: string, parentId?: string, isBroadcast?: boolean): void;
|
|
2110
|
+
/**
|
|
2111
|
+
* Remove a chat message from the room.
|
|
2112
|
+
* @param id - The message id to remove.
|
|
2113
|
+
* @param sig - The message signature to use to authorize removal.
|
|
2114
|
+
*/
|
|
1645
2115
|
removeChatMessage(id: string, sig?: string | null): void;
|
|
2116
|
+
/**
|
|
2117
|
+
* Upload files and share them with the room as chat messages. Each file is shared as its own
|
|
2118
|
+
* chat message, so replying with both text and files means calling
|
|
2119
|
+
* {@link RoomConnectionClient.sendChatMessage} and this method with the same `parentId`.
|
|
2120
|
+
* @param files - The files to share.
|
|
2121
|
+
* @param options.parentId - Optional id of the message the files are a reply to.
|
|
2122
|
+
* @param options.isBroadcast - When true and a breakout session is active, the files are broadcast
|
|
2123
|
+
* to all breakout groups instead of only the sender's group.
|
|
2124
|
+
*/
|
|
1646
2125
|
sendFiles(files: File[], options?: SendFilesOptions): void;
|
|
2126
|
+
/**
|
|
2127
|
+
* Download a shared file. Resolves with the file contents as a Blob
|
|
2128
|
+
* @param file - The shared file to download.
|
|
2129
|
+
*/
|
|
1647
2130
|
downloadFile(file: ChatFileShare): Promise<Blob>;
|
|
2131
|
+
/**
|
|
2132
|
+
* Knock the room.
|
|
2133
|
+
*/
|
|
1648
2134
|
knock(): void;
|
|
2135
|
+
/**
|
|
2136
|
+
* Cancel the knock request.
|
|
2137
|
+
*/
|
|
1649
2138
|
cancelKnock(): void;
|
|
2139
|
+
/**
|
|
2140
|
+
* Leave the current room.
|
|
2141
|
+
* This method will reset the client state.
|
|
2142
|
+
*/
|
|
1650
2143
|
leaveRoom(): void;
|
|
2144
|
+
/**
|
|
2145
|
+
* Set the display name for the local participant.
|
|
2146
|
+
* @param displayName - The display name to set.
|
|
2147
|
+
*/
|
|
1651
2148
|
setDisplayName(displayName: string): void;
|
|
2149
|
+
/**
|
|
2150
|
+
* Toggle the camera on or off.
|
|
2151
|
+
* @param enabled - If true, enables the camera; if false, disables it.
|
|
2152
|
+
* If undefined, toggles the current state.
|
|
2153
|
+
*/
|
|
1652
2154
|
toggleCamera(enabled?: boolean): void;
|
|
2155
|
+
/**
|
|
2156
|
+
* Toggle the microphone on or off.
|
|
2157
|
+
* @param enabled - If true, enables the microphone; if false, disables it.
|
|
2158
|
+
* If undefined, toggles the current state.
|
|
2159
|
+
*/
|
|
1653
2160
|
toggleMicrophone(enabled?: boolean): void;
|
|
2161
|
+
/**
|
|
2162
|
+
* Toggle video hd mode on or off.
|
|
2163
|
+
* @param enabled - If true, enables hd mode; if false, disables it.
|
|
2164
|
+
* If undefined, toggles the current state.
|
|
2165
|
+
*/
|
|
1654
2166
|
toggleHdMode(enabled?: boolean): void;
|
|
2167
|
+
/**
|
|
2168
|
+
* Toggle low data mode on or off.
|
|
2169
|
+
* @param enabled - If true, enables low data mode; if false, disables it.
|
|
2170
|
+
* If undefined, toggles the current state.
|
|
2171
|
+
*/
|
|
1655
2172
|
toggleLowDataMode(enabled?: boolean): void;
|
|
2173
|
+
/**
|
|
2174
|
+
* Toggle audio-only mode on or off. While enabled, all incoming video is paused and only audio is received.
|
|
2175
|
+
* @param enabled - If true, enables audio-only mode; if false, disables it.
|
|
2176
|
+
* If undefined, toggles the current state.
|
|
2177
|
+
* @param options - Optional settings for audio-only mode.
|
|
2178
|
+
* @param options.autoDisableLocalCamera - If true, also turns off the local camera when enabling audio-only mode.
|
|
2179
|
+
* The camera is not turned back on when audio-only mode is disabled.
|
|
2180
|
+
*/
|
|
1656
2181
|
toggleAudioOnlyMode(enabled?: boolean, options?: ToggleAudioOnlyModeOptions): void;
|
|
2182
|
+
/**
|
|
2183
|
+
* Toggle video widescreen mode on or off.
|
|
2184
|
+
* @param enabled - If true, enables widescreen mode; if false, disables it.
|
|
2185
|
+
* If undefined, toggles the current state.
|
|
2186
|
+
*/
|
|
1657
2187
|
toggleWidescreenMode(enabled?: boolean): void;
|
|
2188
|
+
/**
|
|
2189
|
+
* Toggle raised hand.
|
|
2190
|
+
* @param enabled - If true, raises the hand; if false, lowers it.
|
|
2191
|
+
* If undefined, toggles the current state.
|
|
2192
|
+
*/
|
|
1658
2193
|
toggleRaiseHand(enabled?: boolean): void;
|
|
2194
|
+
/**
|
|
2195
|
+
* Ask a participant to speak.
|
|
2196
|
+
* @param participantId - The ID of the participant to ask.
|
|
2197
|
+
*/
|
|
1659
2198
|
askToSpeak(participantId: string): void;
|
|
2199
|
+
/**
|
|
2200
|
+
* Ask a participant to turn on their camera.
|
|
2201
|
+
* @param participantId - The ID of the participant to ask.
|
|
2202
|
+
*/
|
|
1660
2203
|
askToTurnOnCamera(participantId: string): void;
|
|
2204
|
+
/**
|
|
2205
|
+
* Ask a participant to share their screen.
|
|
2206
|
+
* @param participantId - The ID of the participant to ask.
|
|
2207
|
+
*/
|
|
1661
2208
|
askToTurnOnScreenshare(participantId: string): void;
|
|
2209
|
+
/**
|
|
2210
|
+
* Accept a waiting participant.
|
|
2211
|
+
* @param participantId - The ID of the participant to accept.
|
|
2212
|
+
*/
|
|
1662
2213
|
acceptWaitingParticipant(participantId: string): void;
|
|
2214
|
+
/**
|
|
2215
|
+
* Put a waiting participant on hold, optionally sending them a message.
|
|
2216
|
+
* The participant remains in the waiting room.
|
|
2217
|
+
* @param participantId - The ID of the participant to put on hold.
|
|
2218
|
+
* @param response - An optional message to show the waiting participant.
|
|
2219
|
+
*/
|
|
1663
2220
|
holdWaitingParticipant(participantId: string, response?: string): void;
|
|
2221
|
+
/**
|
|
2222
|
+
* Reject a waiting participant, optionally sending them a message.
|
|
2223
|
+
* @param participantId - The ID of the participant to reject.
|
|
2224
|
+
* @param response - An optional message to show the rejected participant.
|
|
2225
|
+
*/
|
|
1664
2226
|
rejectWaitingParticipant(participantId: string, response?: string): void;
|
|
2227
|
+
/**
|
|
2228
|
+
* Start cloud recording.
|
|
2229
|
+
*/
|
|
1665
2230
|
startCloudRecording(): void;
|
|
2231
|
+
/**
|
|
2232
|
+
* Stop cloud recording.
|
|
2233
|
+
*/
|
|
1666
2234
|
stopCloudRecording(): void;
|
|
2235
|
+
/**
|
|
2236
|
+
* Start live transcription.
|
|
2237
|
+
*/
|
|
1667
2238
|
startLiveTranscription(): void;
|
|
2239
|
+
/**
|
|
2240
|
+
* Stop live transcription.
|
|
2241
|
+
*/
|
|
1668
2242
|
stopLiveTranscription(): void;
|
|
2243
|
+
/**
|
|
2244
|
+
* Start live captions.
|
|
2245
|
+
*/
|
|
1669
2246
|
startLiveCaptions(): void;
|
|
2247
|
+
/**
|
|
2248
|
+
* Stop live captions.
|
|
2249
|
+
*/
|
|
1670
2250
|
stopLiveCaptions(): void;
|
|
2251
|
+
/**
|
|
2252
|
+
* Start screensharing.
|
|
2253
|
+
*/
|
|
1671
2254
|
startScreenshare(): void;
|
|
2255
|
+
/**
|
|
2256
|
+
* Stop screensharing.
|
|
2257
|
+
*/
|
|
1672
2258
|
stopScreenshare(): void;
|
|
2259
|
+
/**
|
|
2260
|
+
* Stop participant screenshare.
|
|
2261
|
+
* @param participantId - The ID of the participant to stop screensharing.
|
|
2262
|
+
*/
|
|
1673
2263
|
stopParticipantScreenshare(participantId: string): void;
|
|
2264
|
+
/**
|
|
2265
|
+
* Lock or unlock the room.
|
|
2266
|
+
* @param locked - If true, locks the room; if false, unlocks it.
|
|
2267
|
+
*/
|
|
1674
2268
|
lockRoom(locked: boolean): void;
|
|
2269
|
+
/**
|
|
2270
|
+
* Mute participants.
|
|
2271
|
+
* @param participantIds - An array of participant IDs to mute.
|
|
2272
|
+
* This method will mute the specified participants.
|
|
2273
|
+
*/
|
|
1675
2274
|
muteParticipants(participantIds: string[]): void;
|
|
2275
|
+
/**
|
|
2276
|
+
* Turn off participant cameras.
|
|
2277
|
+
* @param participantIds - An array of participant IDs to turn off cameras for.
|
|
2278
|
+
* This method will turn off the specified participants' cameras.
|
|
2279
|
+
*/
|
|
1676
2280
|
turnOffParticipantCameras(participantIds: string[]): void;
|
|
2281
|
+
/**
|
|
2282
|
+
* Spotlight a participant.
|
|
2283
|
+
* @param participantId - The ID of the participant to spotlight.
|
|
2284
|
+
*/
|
|
1677
2285
|
spotlightParticipant(participantId: string): void;
|
|
2286
|
+
/**
|
|
2287
|
+
* Remove spotlight from a participant.
|
|
2288
|
+
* @param participantId - The ID of the participant to remove spotlight from.
|
|
2289
|
+
*/
|
|
1678
2290
|
removeSpotlight(participantId: string): void;
|
|
2291
|
+
/**
|
|
2292
|
+
* Kick a participant from the room.
|
|
2293
|
+
* @param participantId - The ID of the participant to kick.
|
|
2294
|
+
*/
|
|
1679
2295
|
kickParticipant(participantId: string): void;
|
|
2296
|
+
/**
|
|
2297
|
+
* End the meeting.
|
|
2298
|
+
* @param stayBehind - If true, the local participant will stay behind; if false, they will leave.
|
|
2299
|
+
* If undefined, defaults to false.
|
|
2300
|
+
*/
|
|
1680
2301
|
endMeeting(stayBehind?: boolean): void;
|
|
2302
|
+
/**
|
|
2303
|
+
* Share a room integration with everyone in the room, or in the current breakout group.
|
|
2304
|
+
*
|
|
2305
|
+
* The integration must be enabled for the room. `tagName` and `props` come from the integration's
|
|
2306
|
+
* own bootstrap: they describe which content element to render and with which attributes.
|
|
2307
|
+
*
|
|
2308
|
+
* @param options.roomIntegrationId - The integration to start.
|
|
2309
|
+
* @param options.tagName - Custom element name for the content frame.
|
|
2310
|
+
* @param options.shareUrl - The https url of the shared content.
|
|
2311
|
+
* @param options.props - Optional props to pass to the content frame.
|
|
2312
|
+
*/
|
|
1681
2313
|
startRoomIntegration(options: {
|
|
1682
2314
|
roomIntegrationId: string;
|
|
1683
2315
|
tagName: string;
|
|
1684
2316
|
shareUrl: string;
|
|
1685
2317
|
props?: RoomIntegrationProps;
|
|
1686
2318
|
}): void;
|
|
2319
|
+
/**
|
|
2320
|
+
* Stop a running room integration.
|
|
2321
|
+
*
|
|
2322
|
+
* @param options.roomIntegrationSessionId - The running session to stop.
|
|
2323
|
+
* @param options.intent - "end" when the user deliberately ended it, otherwise "stop".
|
|
2324
|
+
*/
|
|
1687
2325
|
stopRoomIntegration(options: {
|
|
1688
2326
|
roomIntegrationSessionId: string;
|
|
1689
2327
|
intent?: "stop" | "end";
|
|
1690
2328
|
}): void;
|
|
2329
|
+
/**
|
|
2330
|
+
* Update the props of a running room integration, propagating them to everyone in the room.
|
|
2331
|
+
* This is how integration state such as playback position is kept in sync.
|
|
2332
|
+
*
|
|
2333
|
+
* @param options.roomIntegrationSessionId - The running session to update.
|
|
2334
|
+
* @param options.props - Partial patch, merged into the session's existing props.
|
|
2335
|
+
*/
|
|
1691
2336
|
updateRoomIntegrationProps(options: {
|
|
1692
2337
|
roomIntegrationSessionId: string;
|
|
1693
2338
|
props: RoomIntegrationProps;
|
|
1694
2339
|
}): void;
|
|
2340
|
+
/**
|
|
2341
|
+
* Join a breakout group.
|
|
2342
|
+
* @param group - The ID of the breakout group to join.
|
|
2343
|
+
*/
|
|
1695
2344
|
joinBreakoutGroup(group: string): void;
|
|
2345
|
+
/**
|
|
2346
|
+
* Join the breakout main room.
|
|
2347
|
+
*/
|
|
1696
2348
|
joinBreakoutMainRoom(): void;
|
|
2349
|
+
/**
|
|
2350
|
+
* Start a breakout session. Requires host privileges.
|
|
2351
|
+
* @param options - The groups, optional participant assignments and session settings.
|
|
2352
|
+
*/
|
|
1697
2353
|
startBreakoutSession(options: StartBreakoutSessionOptions): void;
|
|
2354
|
+
/**
|
|
2355
|
+
* Update an ongoing breakout session's groups and/or settings. Requires host privileges.
|
|
2356
|
+
* @param options - The groups, participant assignments and session settings to update.
|
|
2357
|
+
*/
|
|
1698
2358
|
updateBreakoutSession(options: UpdateBreakoutSessionOptions): void;
|
|
2359
|
+
/**
|
|
2360
|
+
* Stop the ongoing breakout session. Requires host privileges.
|
|
2361
|
+
*/
|
|
1699
2362
|
stopBreakoutSession(): void;
|
|
2363
|
+
/**
|
|
2364
|
+
* Assign participants to breakout groups. Requires host privileges.
|
|
2365
|
+
* @param assignments - A map of participant `clientId -> groupId`. Merged with the current
|
|
2366
|
+
* assignments (participants not included keep theirs); an empty `groupId` unassigns the participant.
|
|
2367
|
+
*/
|
|
1700
2368
|
assignBreakoutParticipants(assignments: {
|
|
1701
2369
|
[clientId: string]: string;
|
|
1702
2370
|
}): void;
|
|
2371
|
+
/**
|
|
2372
|
+
* Randomly distribute all remote participants across the breakout groups. Requires host privileges.
|
|
2373
|
+
*/
|
|
1703
2374
|
assignAllBreakoutParticipants(): void;
|
|
2375
|
+
/**
|
|
2376
|
+
* Clear all breakout group assignments. Requires host privileges.
|
|
2377
|
+
*/
|
|
1704
2378
|
unassignAllBreakoutParticipants(): void;
|
|
2379
|
+
/**
|
|
2380
|
+
* Re-shuffle the currently-assigned participants across the breakout groups. Requires host privileges.
|
|
2381
|
+
*/
|
|
1705
2382
|
shuffleBreakoutParticipants(): void;
|
|
2383
|
+
/**
|
|
2384
|
+
* Extend the running breakout timer. Requires host privileges.
|
|
2385
|
+
* @param seconds - Number of seconds to add (default 60).
|
|
2386
|
+
*/
|
|
1706
2387
|
extendBreakoutTimer(seconds?: number): void;
|
|
2388
|
+
/**
|
|
2389
|
+
* Stop the running breakout timer (the session itself stays active). Requires host privileges.
|
|
2390
|
+
*/
|
|
1707
2391
|
stopBreakoutTimer(): void;
|
|
2392
|
+
/**
|
|
2393
|
+
* Broadcast a main-room participant's audio/video into all breakout groups. This spotlights the
|
|
2394
|
+
* participant; during an active breakout the SFU routes their stream into every group. Requires
|
|
2395
|
+
* host privileges.
|
|
2396
|
+
* @param participantId - The clientId of the participant to broadcast.
|
|
2397
|
+
*/
|
|
1708
2398
|
broadcastToGroups(participantId: string): void;
|
|
2399
|
+
/**
|
|
2400
|
+
* Stop broadcasting a participant into the breakout groups (removes their spotlight). Requires
|
|
2401
|
+
* host privileges.
|
|
2402
|
+
* @param participantId - The clientId of the participant to stop broadcasting.
|
|
2403
|
+
*/
|
|
1709
2404
|
stopBroadcastToGroups(participantId: string): void;
|
|
2405
|
+
/**
|
|
2406
|
+
* Report stream resolution.
|
|
2407
|
+
* @param streamId - The ID of the stream to report.
|
|
2408
|
+
* @param width - The width of the stream.
|
|
2409
|
+
* @param height - The height of the stream.
|
|
2410
|
+
*/
|
|
1710
2411
|
reportStreamResolution(streamId: string, width: number, height: number): void;
|
|
2412
|
+
/**
|
|
2413
|
+
* Replace the local stream with a new effect stream.
|
|
2414
|
+
* @param effectId - The ID of the effect to use.
|
|
2415
|
+
*/
|
|
1711
2416
|
switchCameraEffect(effectId: string): Promise<void>;
|
|
2417
|
+
/**
|
|
2418
|
+
* Replace the local stream with a custom image effect stream.
|
|
2419
|
+
* @param imageUrl - The URL of the custom image to use as the background. This needs to be a base64 encoded image or a URL accessible from the browser.
|
|
2420
|
+
*/
|
|
1712
2421
|
switchCameraEffectCustom(imageUrl: string): Promise<void>;
|
|
2422
|
+
/**
|
|
2423
|
+
* Remove the effect stream and revert to the original local stream.
|
|
2424
|
+
*/
|
|
1713
2425
|
clearCameraEffect(): Promise<void>;
|
|
2426
|
+
/**
|
|
2427
|
+
* Enable audio noise suppression on the local microphone stream. The
|
|
2428
|
+
* denoiser is automatically reapplied if the microphone device is later
|
|
2429
|
+
* switched. The denoiser code is loaded on demand the first time it is
|
|
2430
|
+
* enabled.
|
|
2431
|
+
*/
|
|
1714
2432
|
enableAudioDenoiser(): Promise<void>;
|
|
2433
|
+
/**
|
|
2434
|
+
* Disable audio noise suppression and revert to the raw microphone stream.
|
|
2435
|
+
*/
|
|
1715
2436
|
disableAudioDenoiser(): Promise<void>;
|
|
2437
|
+
/**
|
|
2438
|
+
* Destroy the client.
|
|
2439
|
+
* This method will stop the app and reset the client state.
|
|
2440
|
+
*/
|
|
1716
2441
|
destroy(): void;
|
|
1717
2442
|
}
|
|
1718
2443
|
|
|
2444
|
+
/**
|
|
2445
|
+
* The credentials of the device the SDK uses to call the Whereby API.
|
|
2446
|
+
*/
|
|
1719
2447
|
interface DeviceCredentials {
|
|
1720
2448
|
deviceId: string;
|
|
1721
2449
|
hmac: string;
|
|
@@ -1726,14 +2454,26 @@ declare class WherebyClient {
|
|
|
1726
2454
|
private localMediaClient;
|
|
1727
2455
|
protected roomConnectionClient: RoomConnectionClient;
|
|
1728
2456
|
private gridClient;
|
|
2457
|
+
/**
|
|
2458
|
+
* @param options - @internal Base URL overrides for Whereby's own development. They may change without notice.
|
|
2459
|
+
*/
|
|
1729
2460
|
constructor(options?: ServicesOptions);
|
|
1730
2461
|
getLocalMedia(): LocalMediaClient;
|
|
1731
2462
|
getRoomConnection(): RoomConnectionClient;
|
|
1732
2463
|
getGrid(): GridClient;
|
|
2464
|
+
/**
|
|
2465
|
+
* Gets the credentials of the device this client uses for the Whereby API, for apps that call the Whereby API
|
|
2466
|
+
* as the same device as the SDK. Build the header as `Authorization: Basic base64(deviceId:hmac)`.
|
|
2467
|
+
*
|
|
2468
|
+
* Returns the stored credentials if there are any. Otherwise it registers a new device, as joining a room does,
|
|
2469
|
+
* and stores its credentials. Concurrent calls share one request.
|
|
2470
|
+
*
|
|
2471
|
+
* @returns The device credentials, or null if the API returned none.
|
|
2472
|
+
*/
|
|
1733
2473
|
getDeviceCredentials(): Promise<DeviceCredentials | null>;
|
|
1734
2474
|
getStore(): Store;
|
|
1735
2475
|
destroy(): void;
|
|
1736
2476
|
}
|
|
1737
2477
|
|
|
1738
|
-
export { ACCEPTED_FILE_TYPES, AUDIO_ONLY_MODE_CHANGED, ApiClient, BREAKOUT_CONFIG_CHANGED, BREAKOUT_GROUPS_MIN_MAX, BREAKOUT_UNAVAILABLE_ERROR, CAMERA_DEVICES_CHANGED, CAMERA_DEVICE_ERROR_CHANGED, CAMERA_ENABLED_CHANGED, CAMERA_STATE_CHANGED, CHAT_NEW_MESSAGE, CLIENT_VIEW_CHANGED, CLIENT_VIEW_SPOTLIGHTS_CHANGED, CLOUD_RECORDING_STATUS_CHANGED, CONNECTION_ERROR_CHANGED, CONNECTION_JOIN_STAGE_CHANGED, CONNECTION_STATUS_CHANGED, CURRENT_CAMERA_CHANGED, CURRENT_MICROPHONE_CHANGED, CURRENT_SPEAKER_CHANGED, Credentials, CredentialsService, DEFAULT_BREAKOUT_TIMER_DURATION, GridClient, IS_SETTING_CAMERA_DEVICE, IS_SETTING_MICROPHONE_DEVICE, LIVE_CAPTIONS_STATUS_CHANGED, LIVE_TRANSCRIPTION_STATUS_CHANGED, LOCAL_MEDIA_STARTING, LOCAL_MEDIA_START_ERROR_CHANGED, LOCAL_PARTICIPANT_CHANGED, LOCAL_PARTICIPANT_QUALITY_REPORT_CHANGED, LOCAL_SCREENSHARE_CHANGED, LOCAL_SCREENSHARE_STATUS_CHANGED, LOCAL_STREAM_CHANGED, LiveCaption, LocalMediaClient, LocalParticipant, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, MICROPHONE_DEVICES_CHANGED, MICROPHONE_DEVICE_ERROR_CHANGED, MICROPHONE_ENABLED_CHANGED, MICROPHONE_STATE_CHANGED, NUMBER_OF_CLIENT_VIEWS_CHANGED, Organization, OrganizationApiClient, OrganizationService, OrganizationServiceCache, REMOTE_PARTICIPANTS_CHANGED, REMOTE_PARTICIPANT_QUALITY_REPORT_CHANGED, ROOM_INTEGRATION_PICKER_MESSAGES, ROOM_JOINED, ROOM_JOINED_ERROR, ROOM_REJOINED, ROOM_SESSION_ID_CHANGED, RUNNING_ROOM_INTEGRATIONS_CHANGED, RoomConnectionClient, RoomIntegrationService, RoomService, SCREENSHARE_STARTED, SCREENSHARE_STOPPED, SPEAKER_DEVICES_CHANGED, SPOTLIGHT_PARTICIPANT_ADDED, SPOTLIGHT_PARTICIPANT_REMOVED, STREAMING_STARTED, STREAMING_STOPPED, WAITING_PARTICIPANT_JOINED, WAITING_PARTICIPANT_LEFT, WherebyClient, createBreakoutGroups, createServices, debounce, defaultBreakoutGroupName, getAudioTrack, getFakeMediaStream, getUsableCameraEffectPresets, getVideoTrack, hasValue, isAudioDenoiserSupported, miro, parseUnverifiedRoomKeyData, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl, youtube };
|
|
2478
|
+
export { ACCEPTED_FILE_TYPES, AUDIO_ONLY_MODE_CHANGED, ApiClient, BREAKOUT_CONFIG_CHANGED, BREAKOUT_GROUPS_MIN_MAX, BREAKOUT_UNAVAILABLE_ERROR, CAMERA_DEVICES_CHANGED, CAMERA_DEVICE_ERROR_CHANGED, CAMERA_ENABLED_CHANGED, CAMERA_STATE_CHANGED, CHAT_NEW_MESSAGE, CLIENT_VIEW_CHANGED, CLIENT_VIEW_SPOTLIGHTS_CHANGED, CLOUD_RECORDING_STATUS_CHANGED, CONNECTION_ERROR_CHANGED, CONNECTION_JOIN_STAGE_CHANGED, CONNECTION_STATUS_CHANGED, CURRENT_CAMERA_CHANGED, CURRENT_MICROPHONE_CHANGED, CURRENT_SPEAKER_CHANGED, Credentials, CredentialsService, DEFAULT_BREAKOUT_TIMER_DURATION, GridClient, IS_SETTING_CAMERA_DEVICE, IS_SETTING_MICROPHONE_DEVICE, LIVE_CAPTIONS_STATUS_CHANGED, LIVE_TRANSCRIPTION_STATUS_CHANGED, LOCAL_MEDIA_STARTING, LOCAL_MEDIA_START_ERROR_CHANGED, LOCAL_PARTICIPANT_CHANGED, LOCAL_PARTICIPANT_QUALITY_REPORT_CHANGED, LOCAL_SCREENSHARE_CHANGED, LOCAL_SCREENSHARE_STATUS_CHANGED, LOCAL_STREAM_CHANGED, LiveCaption, LocalMediaClient, LocalParticipant, MAX_FILES_PER_UPLOAD, MAX_FILE_SIZE, MICROPHONE_DEVICES_CHANGED, MICROPHONE_DEVICE_ERROR_CHANGED, MICROPHONE_ENABLED_CHANGED, MICROPHONE_STATE_CHANGED, NUMBER_OF_CLIENT_VIEWS_CHANGED, Organization, OrganizationApiClient, OrganizationService, OrganizationServiceCache, REMOTE_PARTICIPANTS_CHANGED, REMOTE_PARTICIPANT_QUALITY_REPORT_CHANGED, ROOM_INTEGRATION_PICKER_MESSAGES, ROOM_JOINED, ROOM_JOINED_ERROR, ROOM_LOCK_CHANGED, ROOM_REJOINED, ROOM_SESSION_ID_CHANGED, RUNNING_ROOM_INTEGRATIONS_CHANGED, RoomConnectionClient, RoomIntegrationService, RoomService, SCREENSHARE_STARTED, SCREENSHARE_STOPPED, SPEAKER_DEVICES_CHANGED, SPOTLIGHT_PARTICIPANT_ADDED, SPOTLIGHT_PARTICIPANT_REMOVED, STREAMING_STARTED, STREAMING_STOPPED, WAITING_PARTICIPANT_JOINED, WAITING_PARTICIPANT_LEFT, WherebyClient, createBreakoutGroups, createServices, debounce, defaultBreakoutGroupName, getAudioTrack, getFakeMediaStream, getUsableCameraEffectPresets, getVideoTrack, hasValue, isAudioDenoiserSupported, miro, parseUnverifiedRoomKeyData, roomIntegrationContent, roomIntegrationContentTagName, roomIntegrationPickerUrl, youtube };
|
|
1739
2479
|
export type { AppConfig, BreakoutSessionSettings, BreakoutState, BreakoutTimerEvent, CPUQualityLevel, CallQualityLevel, ChatMessage, ChatMessageEvent, ChatMessageState, ClientView, CloudRecordingState, ConnectionStatus, DeviceCredentials, FileShareError, FileUpload, FindRoomIntegrationsResponse, FullOrganizationPermissions, GridEvents, GridState, InitialMuteStates, JoinRoomErrorNames, JoinRoomStage, LiveCaptionsState, LiveStreamState, LiveTranscriptionState, LocalMediaEvents, LocalMediaOptions, LocalMediaState, LocalParticipantQualityReport, LocalParticipantState, LocalScreenshareState, LocalScreenshareStatus, NotificationEvents, NotificationsEventEmitter, OrganizationLimits, OrganizationOnboardingSurvey, OrganizationPermissionAction, OrganizationPermissions, OrganizationPreferences, ReconnectedEvent, ReconnectingEvent, RemoteParticipant, RemoteParticipantData, RemoteParticipantQualityReport, RemoteParticipantState, RequestAudioEvent, RequestScreenshareEvent, RequestVideoEvent, RoomConnectionEvents, RoomConnectionState, RoomIntegration, RoomIntegrationContent, RoomIntegrationError, RoomIntegrationErrorDetail, RoomIntegrationPickerResult, RoomIntegrationResponse, RoomIntegrationSession, RoomIntegrationSessionView, RoomIntegrationsState, Screenshare, ScreenshareState, SendFilesOptions, ServicesOptions, SignalClientEvent, SignalStatusEvent, StartBreakoutSessionOptions, StickyReaction, StickyReactionEvent, StreamState, ToggleAudioOnlyModeOptions, UpdateBreakoutSessionOptions, WaitingParticipant, WaitingParticipantState, WherebyClientOptions, YouTubeContentMetadata };
|