@whereby.com/browser-sdk 2.1.0-beta.1 → 2.1.0-beta.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/dist/cdn/v2-embed-beta.js +16 -0
- package/dist/cdn/v2-react-beta.js +3 -0
- package/dist/core/index.d.ts +2320 -0
- package/dist/core/index.js +63283 -0
- package/dist/embed/index.d.ts +109 -0
- package/dist/embed/index.esm.js +156 -0
- package/dist/react/index.d.ts +860 -0
- package/dist/react/index.esm.js +10585 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.esm.js +70 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2320 @@
|
|
|
1
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
|
+
import { PayloadAction, AsyncThunkPayloadCreator, AsyncThunk, TypedStartListening, TypedAddListener, Selector } from '@reduxjs/toolkit';
|
|
3
|
+
import * as redux_thunk from 'redux-thunk';
|
|
4
|
+
import { AxiosRequestConfig } from 'axios';
|
|
5
|
+
import EventEmitter from 'events';
|
|
6
|
+
import * as redux from 'redux';
|
|
7
|
+
import * as reselect from 'reselect';
|
|
8
|
+
import * as _whereby_jslib_media_src_utils_ServerSocket from '@whereby/jslib-media/src/utils/ServerSocket';
|
|
9
|
+
import _whereby_jslib_media_src_utils_ServerSocket__default, { ChatMessage as ChatMessage$1 } from '@whereby/jslib-media/src/utils/ServerSocket';
|
|
10
|
+
import RtcManagerDispatcher, { RtcStreamAddedPayload, RtcEvents, RtcManagerCreatedPayload } from '@whereby/jslib-media/src/webrtc/RtcManagerDispatcher';
|
|
11
|
+
import RtcManager from '@whereby/jslib-media/src/webrtc/RtcManager';
|
|
12
|
+
|
|
13
|
+
type Json = string | number | boolean | null | Array<Json> | {
|
|
14
|
+
[key: string]: Json;
|
|
15
|
+
};
|
|
16
|
+
interface ResponseOptions {
|
|
17
|
+
data?: Json;
|
|
18
|
+
headers?: Record<string, unknown>;
|
|
19
|
+
status?: number;
|
|
20
|
+
statusText?: string;
|
|
21
|
+
url?: string | null;
|
|
22
|
+
}
|
|
23
|
+
declare class Response {
|
|
24
|
+
data: Json;
|
|
25
|
+
headers: Record<string, unknown>;
|
|
26
|
+
status: number;
|
|
27
|
+
statusText: string;
|
|
28
|
+
url: string | null;
|
|
29
|
+
constructor(initialValues?: ResponseOptions);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class EmbeddedFreeTierStatus {
|
|
33
|
+
isExhausted: boolean;
|
|
34
|
+
renewsAt: Date;
|
|
35
|
+
totalMinutesLimit: number;
|
|
36
|
+
totalMinutesUsed: number;
|
|
37
|
+
constructor({ isExhausted, renewsAt, totalMinutesLimit, totalMinutesUsed, }: {
|
|
38
|
+
isExhausted: boolean;
|
|
39
|
+
renewsAt: Date;
|
|
40
|
+
totalMinutesLimit: number;
|
|
41
|
+
totalMinutesUsed: number;
|
|
42
|
+
});
|
|
43
|
+
static fromJson(data: Record<string, unknown>): EmbeddedFreeTierStatus;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface AccountProps {
|
|
47
|
+
basePlanId: string | null;
|
|
48
|
+
isDeactivated: boolean;
|
|
49
|
+
isOnTrial: boolean;
|
|
50
|
+
onTrialUntil: Date | null;
|
|
51
|
+
trialStatus: string | null;
|
|
52
|
+
embeddedFreeTierStatus: EmbeddedFreeTierStatus | null;
|
|
53
|
+
}
|
|
54
|
+
declare class Account {
|
|
55
|
+
basePlanId: string | null;
|
|
56
|
+
embeddedFreeTierStatus: EmbeddedFreeTierStatus | null;
|
|
57
|
+
isDeactivated: boolean;
|
|
58
|
+
isOnTrial: boolean;
|
|
59
|
+
onTrialUntil: Date | null;
|
|
60
|
+
trialStatus: string | null;
|
|
61
|
+
constructor({ basePlanId, embeddedFreeTierStatus, isDeactivated, isOnTrial, onTrialUntil, trialStatus, }: AccountProps);
|
|
62
|
+
static fromJson(data: Record<string, unknown>): Account;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface OrganizationPermissionAction {
|
|
66
|
+
isAllowed: boolean;
|
|
67
|
+
isSupported: boolean;
|
|
68
|
+
}
|
|
69
|
+
interface FullOrganizationPermissions {
|
|
70
|
+
images: {
|
|
71
|
+
logoImageUrl: {
|
|
72
|
+
set: OrganizationPermissionAction;
|
|
73
|
+
reset: OrganizationPermissionAction;
|
|
74
|
+
};
|
|
75
|
+
roomBackgroundImageUrl: {
|
|
76
|
+
set: OrganizationPermissionAction;
|
|
77
|
+
reset: OrganizationPermissionAction;
|
|
78
|
+
};
|
|
79
|
+
roomKnockPageBackgroundImageUrl: {
|
|
80
|
+
set: OrganizationPermissionAction;
|
|
81
|
+
reset: OrganizationPermissionAction;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
invitations: {
|
|
85
|
+
add: OrganizationPermissionAction;
|
|
86
|
+
delete: OrganizationPermissionAction;
|
|
87
|
+
list: OrganizationPermissionAction;
|
|
88
|
+
};
|
|
89
|
+
roles: {
|
|
90
|
+
set: OrganizationPermissionAction;
|
|
91
|
+
remove: OrganizationPermissionAction;
|
|
92
|
+
removeSelf: OrganizationPermissionAction;
|
|
93
|
+
list: OrganizationPermissionAction;
|
|
94
|
+
};
|
|
95
|
+
users: {
|
|
96
|
+
signUpWithoutInvitation: OrganizationPermissionAction;
|
|
97
|
+
};
|
|
98
|
+
rooms: {
|
|
99
|
+
customize: OrganizationPermissionAction;
|
|
100
|
+
customizeSelf: OrganizationPermissionAction;
|
|
101
|
+
list: OrganizationPermissionAction;
|
|
102
|
+
lock: OrganizationPermissionAction;
|
|
103
|
+
unclaim: OrganizationPermissionAction;
|
|
104
|
+
unclaimSelf: OrganizationPermissionAction;
|
|
105
|
+
};
|
|
106
|
+
subscriptions: {
|
|
107
|
+
add: OrganizationPermissionAction;
|
|
108
|
+
list: OrganizationPermissionAction;
|
|
109
|
+
payLatestInvoice: OrganizationPermissionAction;
|
|
110
|
+
updatePlan: OrganizationPermissionAction;
|
|
111
|
+
};
|
|
112
|
+
browserExtension: {
|
|
113
|
+
install: OrganizationPermissionAction;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
type OrganizationPermissions = Partial<FullOrganizationPermissions>;
|
|
117
|
+
interface OrganizationLimits {
|
|
118
|
+
maxNumberOfInvitationsAndUsers: number | null;
|
|
119
|
+
maxNumberOfClaimedRooms: number | null;
|
|
120
|
+
maxRoomLimitPerOrganization: number | null;
|
|
121
|
+
trialMinutesLimit: number | null;
|
|
122
|
+
includedUnits: number | null;
|
|
123
|
+
}
|
|
124
|
+
interface OrganizationOnboardingSurvey {
|
|
125
|
+
name: string;
|
|
126
|
+
value: unknown;
|
|
127
|
+
}
|
|
128
|
+
type OrganizationPreferences = Record<string, boolean | string | null | number>;
|
|
129
|
+
declare class Organization {
|
|
130
|
+
static GLOBAL_ORGANIZATION_ID: string;
|
|
131
|
+
organizationId: string;
|
|
132
|
+
organizationName: string;
|
|
133
|
+
subdomain: string;
|
|
134
|
+
permissions: OrganizationPermissions;
|
|
135
|
+
limits: OrganizationLimits;
|
|
136
|
+
account: Account | null;
|
|
137
|
+
logoImageUrl: string | null;
|
|
138
|
+
roomBackgroundImageUrl: string | null;
|
|
139
|
+
roomBackgroundThumbnailUrl: string | null;
|
|
140
|
+
roomKnockPageBackgroundImageUrl: string | null;
|
|
141
|
+
roomKnockPageBackgroundThumbnailUrl: string | null;
|
|
142
|
+
preferences: OrganizationPreferences | null;
|
|
143
|
+
onboardingSurvey: OrganizationOnboardingSurvey | null;
|
|
144
|
+
type: string | null;
|
|
145
|
+
constructor(properties: {
|
|
146
|
+
account: Account | null;
|
|
147
|
+
organizationId: string;
|
|
148
|
+
organizationName: string;
|
|
149
|
+
subdomain: string;
|
|
150
|
+
permissions: OrganizationPermissions;
|
|
151
|
+
limits: OrganizationLimits;
|
|
152
|
+
logoImageUrl: string | null;
|
|
153
|
+
roomBackgroundImageUrl: string | null;
|
|
154
|
+
roomBackgroundThumbnailUrl: string | null;
|
|
155
|
+
roomKnockPageBackgroundImageUrl: string | null;
|
|
156
|
+
roomKnockPageBackgroundThumbnailUrl: string | null;
|
|
157
|
+
preferences: OrganizationPreferences | null;
|
|
158
|
+
onboardingSurvey: OrganizationOnboardingSurvey | null;
|
|
159
|
+
type: string | null;
|
|
160
|
+
});
|
|
161
|
+
static fromJson(data: Json): Organization;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
type HttpClientRequestConfig = AxiosRequestConfig | {
|
|
165
|
+
[key: string]: unknown;
|
|
166
|
+
};
|
|
167
|
+
interface IHttpClient {
|
|
168
|
+
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Class used for making http calls. This is just a pure
|
|
172
|
+
* wrapper around the http lib that we decide to use,
|
|
173
|
+
* so that we can switch implementations.
|
|
174
|
+
*/
|
|
175
|
+
declare class HttpClient implements IHttpClient {
|
|
176
|
+
_baseUrl: string;
|
|
177
|
+
/**
|
|
178
|
+
* Creates an HttpClient instance.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} [baseUrl] - The base URL where all requests are made.
|
|
181
|
+
*/
|
|
182
|
+
constructor({ baseUrl }: {
|
|
183
|
+
baseUrl: string;
|
|
184
|
+
});
|
|
185
|
+
private _requestAxios;
|
|
186
|
+
/**
|
|
187
|
+
* Wrapper for the axios API
|
|
188
|
+
*
|
|
189
|
+
* @param {string} url - Required. URL (appended to base URL) where API call will be made
|
|
190
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
191
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
192
|
+
*/
|
|
193
|
+
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* ApiClient for doing multipart/form-data requests.
|
|
198
|
+
*/
|
|
199
|
+
declare class MultipartHttpClient implements IHttpClient {
|
|
200
|
+
_httpClient: IHttpClient;
|
|
201
|
+
constructor({ httpClient }: {
|
|
202
|
+
httpClient: IHttpClient;
|
|
203
|
+
});
|
|
204
|
+
/**
|
|
205
|
+
* Convert the provided object to a FormData object containing the same keys and values.
|
|
206
|
+
* @param {object} data - the data to convert.
|
|
207
|
+
* @returns {FormData}
|
|
208
|
+
*/
|
|
209
|
+
static dataToFormData(data: Record<string, string>): FormData;
|
|
210
|
+
/**
|
|
211
|
+
* Request a resource using multipart/form-data encoding.
|
|
212
|
+
*
|
|
213
|
+
* @param {string} url - the url to request
|
|
214
|
+
* @param {object} options - Required. Contains the data needed for the fetch API
|
|
215
|
+
* @return {Promise<Response>} - A promise which will return a Response object (https://developer.mozilla.org/en-US/docs/Web/API/Response)
|
|
216
|
+
*/
|
|
217
|
+
request(url: string, options?: HttpClientRequestConfig): Promise<Response>;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface CredentialsOptions {
|
|
221
|
+
uuid: string;
|
|
222
|
+
hmac: string;
|
|
223
|
+
userId?: string;
|
|
224
|
+
}
|
|
225
|
+
declare class Credentials {
|
|
226
|
+
credentials: {
|
|
227
|
+
uuid: CredentialsOptions["uuid"];
|
|
228
|
+
};
|
|
229
|
+
hmac: CredentialsOptions["hmac"];
|
|
230
|
+
userId: CredentialsOptions["userId"];
|
|
231
|
+
constructor(uuid: CredentialsOptions["uuid"], hmac: CredentialsOptions["hmac"], userId?: CredentialsOptions["userId"]);
|
|
232
|
+
toJson(): Json;
|
|
233
|
+
static fromJson(json: Json): Credentials;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
interface AuthenticatedHttpClientOptions {
|
|
237
|
+
httpClient: HttpClient;
|
|
238
|
+
fetchDeviceCredentials: () => Promise<Credentials | null>;
|
|
239
|
+
}
|
|
240
|
+
declare class AuthenticatedHttpClient {
|
|
241
|
+
private _httpClient;
|
|
242
|
+
private _fetchDeviceCredentials;
|
|
243
|
+
constructor({ httpClient, fetchDeviceCredentials }: AuthenticatedHttpClientOptions);
|
|
244
|
+
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
245
|
+
}
|
|
246
|
+
interface ApiClientOptions {
|
|
247
|
+
baseUrl?: string;
|
|
248
|
+
fetchDeviceCredentials?: AuthenticatedHttpClientOptions["fetchDeviceCredentials"];
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Class used for all Whereby API calls.
|
|
252
|
+
*/
|
|
253
|
+
declare class ApiClient {
|
|
254
|
+
authenticatedHttpClient: AuthenticatedHttpClient;
|
|
255
|
+
authenticatedFormDataHttpClient: MultipartHttpClient;
|
|
256
|
+
/**
|
|
257
|
+
* Create an ApiClient instance.
|
|
258
|
+
*/
|
|
259
|
+
constructor({ baseUrl, fetchDeviceCredentials, }?: ApiClientOptions);
|
|
260
|
+
/**
|
|
261
|
+
* Wrapper for the fetch API
|
|
262
|
+
*/
|
|
263
|
+
request(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
264
|
+
/**
|
|
265
|
+
* Performs a multipart request where data is multipart/form-data encoded.
|
|
266
|
+
*/
|
|
267
|
+
requestMultipart(url: string, options: HttpClientRequestConfig): Promise<Response>;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Related to device calls needed to obtain credentials
|
|
272
|
+
*/
|
|
273
|
+
declare class DeviceService {
|
|
274
|
+
_apiClient: ApiClient;
|
|
275
|
+
constructor({ apiClient }: {
|
|
276
|
+
apiClient: ApiClient;
|
|
277
|
+
});
|
|
278
|
+
/**
|
|
279
|
+
* Get's the device credentials needed for most of the other API services
|
|
280
|
+
*
|
|
281
|
+
* @return {Promise} A promise which is fulfilled or failed based on the
|
|
282
|
+
* response.
|
|
283
|
+
*/
|
|
284
|
+
getCredentials(): Promise<Credentials | null>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface AbstractStore {
|
|
288
|
+
loadOrDefault(defaultValue: Json): Promise<Json>;
|
|
289
|
+
save(value: Json): Promise<void>;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
declare class CredentialsService extends EventEmitter {
|
|
293
|
+
_deviceService: DeviceService;
|
|
294
|
+
_credentialsStore: AbstractStore;
|
|
295
|
+
credentialsPromise?: Promise<Credentials | null>;
|
|
296
|
+
/**
|
|
297
|
+
* Service to manage Whereby's Rest API credentials.
|
|
298
|
+
*
|
|
299
|
+
* @param {ObjectStore} credentialsStore - Store to manage the credentials.
|
|
300
|
+
*/
|
|
301
|
+
constructor({ deviceService, credentialsStore, }: {
|
|
302
|
+
deviceService: DeviceService;
|
|
303
|
+
credentialsStore: AbstractStore;
|
|
304
|
+
});
|
|
305
|
+
static create({ baseUrl, storeName, storeType, }: {
|
|
306
|
+
baseUrl: string;
|
|
307
|
+
storeName?: string;
|
|
308
|
+
storeType?: "localStorage" | "chromeStorage";
|
|
309
|
+
}): CredentialsService;
|
|
310
|
+
/**
|
|
311
|
+
* Contacts the REST API to get new credentials. DO NOT USE directly, call getCredentials() instead.
|
|
312
|
+
*
|
|
313
|
+
* @see getCredentials
|
|
314
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
315
|
+
*/
|
|
316
|
+
_fetchNewCredentialsFromApi(): Promise<Credentials | null>;
|
|
317
|
+
/**
|
|
318
|
+
* Returns the current credentials without triggering an API request to get new ones.
|
|
319
|
+
* If no credentials are currently available it will return null.
|
|
320
|
+
*
|
|
321
|
+
* @returns {?Credentials} - The credentials currently in use, null otherwise.
|
|
322
|
+
*/
|
|
323
|
+
getCurrentCredentials(): Promise<Credentials | null>;
|
|
324
|
+
/**
|
|
325
|
+
* Returns a promise that will contain the credentials for this client.
|
|
326
|
+
* If no credentials are available in local storage, new ones will be fetched from the server.
|
|
327
|
+
*
|
|
328
|
+
* @returns {Promise.<Credentials>} - Promise that resolves with the credentials.
|
|
329
|
+
*/
|
|
330
|
+
getCredentials(): Promise<Credentials | null>;
|
|
331
|
+
/**
|
|
332
|
+
* Saves new credentials which replace the existing ones and abort any pending request to get new ones.
|
|
333
|
+
*
|
|
334
|
+
* @param {Credentials} credentials - New credentials to store.
|
|
335
|
+
*/
|
|
336
|
+
saveCredentials(credentials: Credentials): Promise<Credentials>;
|
|
337
|
+
/**
|
|
338
|
+
* It will set the userId for the current credentials.
|
|
339
|
+
*
|
|
340
|
+
* @param userId - The user id to set.
|
|
341
|
+
*/
|
|
342
|
+
setUserId(userId: string | null): Promise<void>;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
type UserConsentAction = "accepted" | "rejected" | null;
|
|
346
|
+
type ConsentGrantRequest = {
|
|
347
|
+
readonly consentRevisionId: string;
|
|
348
|
+
readonly action: UserConsentAction;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
declare class OrganizationService {
|
|
352
|
+
_apiClient: ApiClient;
|
|
353
|
+
constructor({ apiClient }: {
|
|
354
|
+
apiClient: ApiClient;
|
|
355
|
+
});
|
|
356
|
+
/**
|
|
357
|
+
* Creates an organization.
|
|
358
|
+
*/
|
|
359
|
+
createOrganization({ organizationName, subdomain, owner, }: {
|
|
360
|
+
organizationName: string;
|
|
361
|
+
subdomain: string;
|
|
362
|
+
owner: {
|
|
363
|
+
email: string;
|
|
364
|
+
displayName: string;
|
|
365
|
+
verificationCode: string;
|
|
366
|
+
consents?: ReadonlyArray<ConsentGrantRequest>;
|
|
367
|
+
} | {
|
|
368
|
+
idToken: string;
|
|
369
|
+
displayName: string;
|
|
370
|
+
consents?: ReadonlyArray<ConsentGrantRequest>;
|
|
371
|
+
};
|
|
372
|
+
}): Promise<string>;
|
|
373
|
+
/**
|
|
374
|
+
* Retrieves the organization based on the subdomain.
|
|
375
|
+
*/
|
|
376
|
+
getOrganizationBySubdomain(subdomain: string): Promise<Organization | null>;
|
|
377
|
+
/**
|
|
378
|
+
* Retrieves the organization based on the organizationId.
|
|
379
|
+
*
|
|
380
|
+
* Note: This endpoint should only be used to retrieve an organization when the device is linked
|
|
381
|
+
* to a user in that organization. Use getOrganizationBySubdomain instead if you just want the information
|
|
382
|
+
* about an organization that is mapped to a given subdomain.
|
|
383
|
+
*/
|
|
384
|
+
getOrganizationByOrganizationId(organizationId: string): Promise<Organization | null>;
|
|
385
|
+
/**
|
|
386
|
+
* Retrieves the organizations that contain a user
|
|
387
|
+
* matching provided the email+code or phoneNumber+code
|
|
388
|
+
* combination.
|
|
389
|
+
*/
|
|
390
|
+
getOrganizationsByContactPoint(options: {
|
|
391
|
+
email: string;
|
|
392
|
+
code: string;
|
|
393
|
+
} | {
|
|
394
|
+
phoneNumber: string;
|
|
395
|
+
code: string;
|
|
396
|
+
}): Promise<ReadonlyArray<Organization>>;
|
|
397
|
+
/**
|
|
398
|
+
* Retrieves the organizations that contain a user
|
|
399
|
+
* matching provided the idToken
|
|
400
|
+
*/
|
|
401
|
+
getOrganizationsByIdToken({ idToken }: {
|
|
402
|
+
idToken: string;
|
|
403
|
+
}): Promise<ReadonlyArray<Organization>>;
|
|
404
|
+
/**
|
|
405
|
+
* Retrieves the organizations containing a user
|
|
406
|
+
* with either the email or phoneNumber matching the logged in user.
|
|
407
|
+
*
|
|
408
|
+
* This is useful for showing the possible organization that the current
|
|
409
|
+
* user could log in to.
|
|
410
|
+
*/
|
|
411
|
+
getOrganizationsByLoggedInUser(): Promise<ReadonlyArray<Organization>>;
|
|
412
|
+
/**
|
|
413
|
+
* Checks if a subdomain is available and verifies its format.
|
|
414
|
+
*/
|
|
415
|
+
getSubdomainAvailability(subdomain: string): Promise<{
|
|
416
|
+
status: string;
|
|
417
|
+
}>;
|
|
418
|
+
/**
|
|
419
|
+
* Updates preferences of the organization.
|
|
420
|
+
*/
|
|
421
|
+
updatePreferences({ organizationId, preferences, }: {
|
|
422
|
+
organizationId: string;
|
|
423
|
+
preferences: OrganizationPreferences;
|
|
424
|
+
}): Promise<undefined>;
|
|
425
|
+
/**
|
|
426
|
+
* Delete organization
|
|
427
|
+
*/
|
|
428
|
+
deleteOrganization({ organizationId }: {
|
|
429
|
+
organizationId: string;
|
|
430
|
+
}): Promise<undefined>;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
interface RoomParticipantData {
|
|
434
|
+
displayName: string;
|
|
435
|
+
id: string;
|
|
436
|
+
stream?: MediaStream;
|
|
437
|
+
isAudioEnabled: boolean;
|
|
438
|
+
isVideoEnabled: boolean;
|
|
439
|
+
}
|
|
440
|
+
declare class RoomParticipant {
|
|
441
|
+
readonly displayName: string;
|
|
442
|
+
readonly id: string;
|
|
443
|
+
readonly stream?: MediaStream;
|
|
444
|
+
readonly isAudioEnabled: boolean;
|
|
445
|
+
readonly isLocalParticipant: boolean;
|
|
446
|
+
readonly isVideoEnabled: boolean;
|
|
447
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
448
|
+
}
|
|
449
|
+
interface RemoteParticipantData {
|
|
450
|
+
newJoiner: boolean;
|
|
451
|
+
streams: string[];
|
|
452
|
+
}
|
|
453
|
+
type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
|
|
454
|
+
interface Stream {
|
|
455
|
+
id: string;
|
|
456
|
+
state: StreamState;
|
|
457
|
+
}
|
|
458
|
+
interface RemoteParticipant {
|
|
459
|
+
id: string;
|
|
460
|
+
displayName: string;
|
|
461
|
+
isAudioEnabled: boolean;
|
|
462
|
+
isVideoEnabled: boolean;
|
|
463
|
+
isLocalParticipant: boolean;
|
|
464
|
+
stream: (MediaStream & {
|
|
465
|
+
inboundId?: string;
|
|
466
|
+
}) | null;
|
|
467
|
+
streams: Stream[];
|
|
468
|
+
newJoiner: boolean;
|
|
469
|
+
presentationStream: (MediaStream & {
|
|
470
|
+
inboundId?: string;
|
|
471
|
+
}) | null;
|
|
472
|
+
}
|
|
473
|
+
declare class LocalParticipant extends RoomParticipant {
|
|
474
|
+
readonly isLocalParticipant = true;
|
|
475
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
476
|
+
}
|
|
477
|
+
interface WaitingParticipant {
|
|
478
|
+
id: string;
|
|
479
|
+
displayName: string | null;
|
|
480
|
+
}
|
|
481
|
+
interface Screenshare {
|
|
482
|
+
participantId: string;
|
|
483
|
+
id: string;
|
|
484
|
+
hasAudioTrack: boolean;
|
|
485
|
+
stream?: MediaStream;
|
|
486
|
+
isLocal: boolean;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Reducer
|
|
491
|
+
*/
|
|
492
|
+
interface WaitingParticipantsState {
|
|
493
|
+
waitingParticipants: WaitingParticipant[];
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Reducer
|
|
498
|
+
*/
|
|
499
|
+
interface StreamingState {
|
|
500
|
+
isStreaming: boolean;
|
|
501
|
+
error: unknown;
|
|
502
|
+
startedAt?: number;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Reducer
|
|
507
|
+
*/
|
|
508
|
+
interface rtcAnalyticsState {
|
|
509
|
+
reportedValues: {
|
|
510
|
+
[key: string]: unknown;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
interface LocalScreenshareState {
|
|
515
|
+
status: "" | "starting" | "active";
|
|
516
|
+
stream: MediaStream | null;
|
|
517
|
+
error: unknown | null;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Reducer
|
|
522
|
+
*/
|
|
523
|
+
interface CloudRecordingState {
|
|
524
|
+
isRecording: boolean;
|
|
525
|
+
error: unknown;
|
|
526
|
+
status?: "recording" | "requested" | "error";
|
|
527
|
+
startedAt?: number;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
type ChatMessage = Pick<ChatMessage$1, "senderId" | "timestamp" | "text">;
|
|
531
|
+
/**
|
|
532
|
+
* Reducer
|
|
533
|
+
*/
|
|
534
|
+
interface ChatState {
|
|
535
|
+
chatMessages: ChatMessage[];
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Reducer
|
|
540
|
+
*/
|
|
541
|
+
interface AppState {
|
|
542
|
+
wantsToJoin: boolean;
|
|
543
|
+
roomUrl: string | null;
|
|
544
|
+
roomName: string | null;
|
|
545
|
+
roomKey: string | null;
|
|
546
|
+
displayName: string | null;
|
|
547
|
+
sdkVersion: string | null;
|
|
548
|
+
externalId: string | null;
|
|
549
|
+
isNodeSdk: boolean;
|
|
550
|
+
}
|
|
551
|
+
declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
|
|
552
|
+
doAppJoin: (state: {
|
|
553
|
+
wantsToJoin: boolean;
|
|
554
|
+
roomUrl: string | null;
|
|
555
|
+
roomName: string | null;
|
|
556
|
+
roomKey: string | null;
|
|
557
|
+
displayName: string | null;
|
|
558
|
+
sdkVersion: string | null;
|
|
559
|
+
externalId: string | null;
|
|
560
|
+
isNodeSdk: boolean;
|
|
561
|
+
}, action: PayloadAction<{
|
|
562
|
+
displayName: string;
|
|
563
|
+
localMediaOptions?: LocalMediaOptions;
|
|
564
|
+
roomKey: string | null;
|
|
565
|
+
roomUrl: string;
|
|
566
|
+
sdkVersion: string;
|
|
567
|
+
externalId: string | null;
|
|
568
|
+
}>) => {
|
|
569
|
+
roomName: string;
|
|
570
|
+
wantsToJoin: true;
|
|
571
|
+
displayName: string;
|
|
572
|
+
localMediaOptions?: LocalMediaOptions | undefined;
|
|
573
|
+
roomKey: string | null;
|
|
574
|
+
roomUrl: string;
|
|
575
|
+
sdkVersion: string;
|
|
576
|
+
externalId: string | null;
|
|
577
|
+
isNodeSdk: boolean;
|
|
578
|
+
};
|
|
579
|
+
appLeft: (state: {
|
|
580
|
+
wantsToJoin: boolean;
|
|
581
|
+
roomUrl: string | null;
|
|
582
|
+
roomName: string | null;
|
|
583
|
+
roomKey: string | null;
|
|
584
|
+
displayName: string | null;
|
|
585
|
+
sdkVersion: string | null;
|
|
586
|
+
externalId: string | null;
|
|
587
|
+
isNodeSdk: boolean;
|
|
588
|
+
}) => {
|
|
589
|
+
wantsToJoin: false;
|
|
590
|
+
roomUrl: string | null;
|
|
591
|
+
roomName: string | null;
|
|
592
|
+
roomKey: string | null;
|
|
593
|
+
displayName: string | null;
|
|
594
|
+
sdkVersion: string | null;
|
|
595
|
+
externalId: string | null;
|
|
596
|
+
isNodeSdk: boolean;
|
|
597
|
+
};
|
|
598
|
+
setRoomKey: (state: {
|
|
599
|
+
wantsToJoin: boolean;
|
|
600
|
+
roomUrl: string | null;
|
|
601
|
+
roomName: string | null;
|
|
602
|
+
roomKey: string | null;
|
|
603
|
+
displayName: string | null;
|
|
604
|
+
sdkVersion: string | null;
|
|
605
|
+
externalId: string | null;
|
|
606
|
+
isNodeSdk: boolean;
|
|
607
|
+
}, action: PayloadAction<string>) => {
|
|
608
|
+
roomKey: string;
|
|
609
|
+
wantsToJoin: boolean;
|
|
610
|
+
roomUrl: string | null;
|
|
611
|
+
roomName: string | null;
|
|
612
|
+
displayName: string | null;
|
|
613
|
+
sdkVersion: string | null;
|
|
614
|
+
externalId: string | null;
|
|
615
|
+
isNodeSdk: boolean;
|
|
616
|
+
};
|
|
617
|
+
}, "app", "app", _reduxjs_toolkit.SliceSelectors<AppState>>;
|
|
618
|
+
/**
|
|
619
|
+
* Action creators
|
|
620
|
+
*/
|
|
621
|
+
declare const doAppJoin: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
622
|
+
displayName: string;
|
|
623
|
+
localMediaOptions?: LocalMediaOptions | undefined;
|
|
624
|
+
roomKey: string | null;
|
|
625
|
+
roomUrl: string;
|
|
626
|
+
sdkVersion: string;
|
|
627
|
+
externalId: string | null;
|
|
628
|
+
}, "app/doAppJoin">;
|
|
629
|
+
declare const appLeft: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/appLeft">;
|
|
630
|
+
declare const setRoomKey: _reduxjs_toolkit.ActionCreatorWithPayload<string, "app/setRoomKey">;
|
|
631
|
+
/**
|
|
632
|
+
* Selectors
|
|
633
|
+
*/
|
|
634
|
+
declare const selectAppRaw: (state: RootState) => AppState;
|
|
635
|
+
declare const selectAppWantsToJoin: (state: RootState) => boolean;
|
|
636
|
+
declare const selectAppRoomName: (state: RootState) => string | null;
|
|
637
|
+
declare const selectAppRoomUrl: (state: RootState) => string | null;
|
|
638
|
+
declare const selectAppRoomKey: (state: RootState) => string | null;
|
|
639
|
+
declare const selectAppDisplayName: (state: RootState) => string | null;
|
|
640
|
+
declare const selectAppSdkVersion: (state: RootState) => string | null;
|
|
641
|
+
declare const selectAppExternalId: (state: RootState) => string | null;
|
|
642
|
+
declare const selectAppIsNodeSdk: (state: RootState) => boolean;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Reducer
|
|
646
|
+
*/
|
|
647
|
+
interface DeviceCredentialsState {
|
|
648
|
+
isFetching: boolean;
|
|
649
|
+
data?: Credentials | null;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
type LocalMediaOptions = {
|
|
653
|
+
disabled?: boolean;
|
|
654
|
+
audio: boolean;
|
|
655
|
+
video: boolean;
|
|
656
|
+
};
|
|
657
|
+
/**
|
|
658
|
+
* Reducer
|
|
659
|
+
*/
|
|
660
|
+
interface LocalMediaState {
|
|
661
|
+
busyDeviceIds: string[];
|
|
662
|
+
cameraDeviceError?: unknown;
|
|
663
|
+
cameraEnabled: boolean;
|
|
664
|
+
currentCameraDeviceId?: string;
|
|
665
|
+
currentMicrophoneDeviceId?: string;
|
|
666
|
+
devices: MediaDeviceInfo[];
|
|
667
|
+
isSettingCameraDevice: boolean;
|
|
668
|
+
isSettingMicrophoneDevice: boolean;
|
|
669
|
+
isTogglingCamera: boolean;
|
|
670
|
+
microphoneDeviceError?: unknown;
|
|
671
|
+
microphoneEnabled: boolean;
|
|
672
|
+
options?: LocalMediaOptions;
|
|
673
|
+
status: "" | "stopped" | "starting" | "started" | "error";
|
|
674
|
+
startError?: unknown;
|
|
675
|
+
stream?: MediaStream;
|
|
676
|
+
isSwitchingStream: boolean;
|
|
677
|
+
onDeviceChange?: () => void;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
type LocalParticipantState$1 = LocalParticipant;
|
|
681
|
+
|
|
682
|
+
declare const sdkVersion = "__SDK_VERSION__";
|
|
683
|
+
|
|
684
|
+
interface LocalParticipantState extends LocalParticipantState$1 {
|
|
685
|
+
isScreenSharing: boolean;
|
|
686
|
+
roleName: string;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* Reducer
|
|
691
|
+
*/
|
|
692
|
+
interface OrganizationState {
|
|
693
|
+
data: Organization | null | undefined;
|
|
694
|
+
isFetching: boolean;
|
|
695
|
+
error: unknown;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
interface StreamStatusUpdate {
|
|
699
|
+
clientId: string;
|
|
700
|
+
streamId: string;
|
|
701
|
+
state: StreamState;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Reducer
|
|
706
|
+
*/
|
|
707
|
+
interface RemoteParticipantState {
|
|
708
|
+
remoteParticipants: RemoteParticipant[];
|
|
709
|
+
}
|
|
710
|
+
declare const remoteParticipantsSlice: _reduxjs_toolkit.Slice<RemoteParticipantState, {
|
|
711
|
+
streamStatusUpdated: (state: {
|
|
712
|
+
remoteParticipants: {
|
|
713
|
+
id: string;
|
|
714
|
+
displayName: string;
|
|
715
|
+
isAudioEnabled: boolean;
|
|
716
|
+
isVideoEnabled: boolean;
|
|
717
|
+
isLocalParticipant: boolean;
|
|
718
|
+
stream: {
|
|
719
|
+
active: boolean;
|
|
720
|
+
id: string;
|
|
721
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
722
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
723
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
724
|
+
clone: () => MediaStream;
|
|
725
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
726
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
727
|
+
getTracks: () => MediaStreamTrack[];
|
|
728
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
729
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
730
|
+
addEventListener: {
|
|
731
|
+
<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
732
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
733
|
+
};
|
|
734
|
+
removeEventListener: {
|
|
735
|
+
<K_1 extends keyof MediaStreamEventMap>(type: K_1, listener: (this: MediaStream, ev: MediaStreamEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
736
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
737
|
+
};
|
|
738
|
+
dispatchEvent: (event: Event) => boolean;
|
|
739
|
+
inboundId?: string | undefined;
|
|
740
|
+
} | null;
|
|
741
|
+
streams: {
|
|
742
|
+
id: string;
|
|
743
|
+
state: StreamState;
|
|
744
|
+
}[];
|
|
745
|
+
newJoiner: boolean;
|
|
746
|
+
presentationStream: {
|
|
747
|
+
active: boolean;
|
|
748
|
+
id: string;
|
|
749
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
750
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
751
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
752
|
+
clone: () => MediaStream;
|
|
753
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
754
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
755
|
+
getTracks: () => MediaStreamTrack[];
|
|
756
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
757
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
758
|
+
addEventListener: {
|
|
759
|
+
<K_2 extends keyof MediaStreamEventMap>(type: K_2, listener: (this: MediaStream, ev: MediaStreamEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
760
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
761
|
+
};
|
|
762
|
+
removeEventListener: {
|
|
763
|
+
<K_3 extends keyof MediaStreamEventMap>(type: K_3, listener: (this: MediaStream, ev: MediaStreamEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
764
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
765
|
+
};
|
|
766
|
+
dispatchEvent: (event: Event) => boolean;
|
|
767
|
+
inboundId?: string | undefined;
|
|
768
|
+
} | null;
|
|
769
|
+
}[];
|
|
770
|
+
}, action: PayloadAction<StreamStatusUpdate[]>) => {
|
|
771
|
+
remoteParticipants: {
|
|
772
|
+
id: string;
|
|
773
|
+
displayName: string;
|
|
774
|
+
isAudioEnabled: boolean;
|
|
775
|
+
isVideoEnabled: boolean;
|
|
776
|
+
isLocalParticipant: boolean;
|
|
777
|
+
stream: {
|
|
778
|
+
active: boolean;
|
|
779
|
+
id: string;
|
|
780
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
781
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
782
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
783
|
+
clone: () => MediaStream;
|
|
784
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
785
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
786
|
+
getTracks: () => MediaStreamTrack[];
|
|
787
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
788
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
789
|
+
addEventListener: {
|
|
790
|
+
<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
791
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
792
|
+
};
|
|
793
|
+
removeEventListener: {
|
|
794
|
+
<K_1 extends keyof MediaStreamEventMap>(type: K_1, listener: (this: MediaStream, ev: MediaStreamEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
795
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
796
|
+
};
|
|
797
|
+
dispatchEvent: (event: Event) => boolean;
|
|
798
|
+
inboundId?: string | undefined;
|
|
799
|
+
} | null;
|
|
800
|
+
streams: {
|
|
801
|
+
id: string;
|
|
802
|
+
state: StreamState;
|
|
803
|
+
}[];
|
|
804
|
+
newJoiner: boolean;
|
|
805
|
+
presentationStream: {
|
|
806
|
+
active: boolean;
|
|
807
|
+
id: string;
|
|
808
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
809
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
810
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
811
|
+
clone: () => MediaStream;
|
|
812
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
813
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
814
|
+
getTracks: () => MediaStreamTrack[];
|
|
815
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
816
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
817
|
+
addEventListener: {
|
|
818
|
+
<K_2 extends keyof MediaStreamEventMap>(type: K_2, listener: (this: MediaStream, ev: MediaStreamEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
819
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
820
|
+
};
|
|
821
|
+
removeEventListener: {
|
|
822
|
+
<K_3 extends keyof MediaStreamEventMap>(type: K_3, listener: (this: MediaStream, ev: MediaStreamEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
823
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
824
|
+
};
|
|
825
|
+
dispatchEvent: (event: Event) => boolean;
|
|
826
|
+
inboundId?: string | undefined;
|
|
827
|
+
} | null;
|
|
828
|
+
}[];
|
|
829
|
+
};
|
|
830
|
+
participantStreamAdded: (state: {
|
|
831
|
+
remoteParticipants: {
|
|
832
|
+
id: string;
|
|
833
|
+
displayName: string;
|
|
834
|
+
isAudioEnabled: boolean;
|
|
835
|
+
isVideoEnabled: boolean;
|
|
836
|
+
isLocalParticipant: boolean;
|
|
837
|
+
stream: {
|
|
838
|
+
active: boolean;
|
|
839
|
+
id: string;
|
|
840
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
841
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
842
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
843
|
+
clone: () => MediaStream;
|
|
844
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
845
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
846
|
+
getTracks: () => MediaStreamTrack[];
|
|
847
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
848
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
849
|
+
addEventListener: {
|
|
850
|
+
<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
851
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
852
|
+
};
|
|
853
|
+
removeEventListener: {
|
|
854
|
+
<K_1 extends keyof MediaStreamEventMap>(type: K_1, listener: (this: MediaStream, ev: MediaStreamEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
855
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
856
|
+
};
|
|
857
|
+
dispatchEvent: (event: Event) => boolean;
|
|
858
|
+
inboundId?: string | undefined;
|
|
859
|
+
} | null;
|
|
860
|
+
streams: {
|
|
861
|
+
id: string;
|
|
862
|
+
state: StreamState;
|
|
863
|
+
}[];
|
|
864
|
+
newJoiner: boolean;
|
|
865
|
+
presentationStream: {
|
|
866
|
+
active: boolean;
|
|
867
|
+
id: string;
|
|
868
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
869
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
870
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
871
|
+
clone: () => MediaStream;
|
|
872
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
873
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
874
|
+
getTracks: () => MediaStreamTrack[];
|
|
875
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
876
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
877
|
+
addEventListener: {
|
|
878
|
+
<K_2 extends keyof MediaStreamEventMap>(type: K_2, listener: (this: MediaStream, ev: MediaStreamEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
879
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
880
|
+
};
|
|
881
|
+
removeEventListener: {
|
|
882
|
+
<K_3 extends keyof MediaStreamEventMap>(type: K_3, listener: (this: MediaStream, ev: MediaStreamEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
883
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
884
|
+
};
|
|
885
|
+
dispatchEvent: (event: Event) => boolean;
|
|
886
|
+
inboundId?: string | undefined;
|
|
887
|
+
} | null;
|
|
888
|
+
}[];
|
|
889
|
+
}, action: PayloadAction<RtcStreamAddedPayload>) => RemoteParticipantState;
|
|
890
|
+
participantStreamIdAdded: (state: {
|
|
891
|
+
remoteParticipants: {
|
|
892
|
+
id: string;
|
|
893
|
+
displayName: string;
|
|
894
|
+
isAudioEnabled: boolean;
|
|
895
|
+
isVideoEnabled: boolean;
|
|
896
|
+
isLocalParticipant: boolean;
|
|
897
|
+
stream: {
|
|
898
|
+
active: boolean;
|
|
899
|
+
id: string;
|
|
900
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
901
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
902
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
903
|
+
clone: () => MediaStream;
|
|
904
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
905
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
906
|
+
getTracks: () => MediaStreamTrack[];
|
|
907
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
908
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
909
|
+
addEventListener: {
|
|
910
|
+
<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
911
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
912
|
+
};
|
|
913
|
+
removeEventListener: {
|
|
914
|
+
<K_1 extends keyof MediaStreamEventMap>(type: K_1, listener: (this: MediaStream, ev: MediaStreamEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
915
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
916
|
+
};
|
|
917
|
+
dispatchEvent: (event: Event) => boolean;
|
|
918
|
+
inboundId?: string | undefined;
|
|
919
|
+
} | null;
|
|
920
|
+
streams: {
|
|
921
|
+
id: string;
|
|
922
|
+
state: StreamState;
|
|
923
|
+
}[];
|
|
924
|
+
newJoiner: boolean;
|
|
925
|
+
presentationStream: {
|
|
926
|
+
active: boolean;
|
|
927
|
+
id: string;
|
|
928
|
+
onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
929
|
+
onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
|
|
930
|
+
addTrack: (track: MediaStreamTrack) => void;
|
|
931
|
+
clone: () => MediaStream;
|
|
932
|
+
getAudioTracks: () => MediaStreamTrack[];
|
|
933
|
+
getTrackById: (trackId: string) => MediaStreamTrack | null;
|
|
934
|
+
getTracks: () => MediaStreamTrack[];
|
|
935
|
+
getVideoTracks: () => MediaStreamTrack[];
|
|
936
|
+
removeTrack: (track: MediaStreamTrack) => void;
|
|
937
|
+
addEventListener: {
|
|
938
|
+
<K_2 extends keyof MediaStreamEventMap>(type: K_2, listener: (this: MediaStream, ev: MediaStreamEventMap[K_2]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
939
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
940
|
+
};
|
|
941
|
+
removeEventListener: {
|
|
942
|
+
<K_3 extends keyof MediaStreamEventMap>(type: K_3, listener: (this: MediaStream, ev: MediaStreamEventMap[K_3]) => any, options?: boolean | EventListenerOptions | undefined): void;
|
|
943
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
|
|
944
|
+
};
|
|
945
|
+
dispatchEvent: (event: Event) => boolean;
|
|
946
|
+
inboundId?: string | undefined;
|
|
947
|
+
} | null;
|
|
948
|
+
}[];
|
|
949
|
+
}, action: PayloadAction<{
|
|
950
|
+
clientId: string;
|
|
951
|
+
streamId: string;
|
|
952
|
+
}>) => RemoteParticipantState;
|
|
953
|
+
}, "remoteParticipants", "remoteParticipants", _reduxjs_toolkit.SliceSelectors<RemoteParticipantState>>;
|
|
954
|
+
/**
|
|
955
|
+
* Action creators
|
|
956
|
+
*/
|
|
957
|
+
declare const participantStreamAdded: _reduxjs_toolkit.ActionCreatorWithPayload<RtcStreamAddedPayload, "remoteParticipants/participantStreamAdded">;
|
|
958
|
+
declare const participantStreamIdAdded: _reduxjs_toolkit.ActionCreatorWithPayload<{
|
|
959
|
+
clientId: string;
|
|
960
|
+
streamId: string;
|
|
961
|
+
}, "remoteParticipants/participantStreamIdAdded">;
|
|
962
|
+
declare const streamStatusUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<StreamStatusUpdate[], "remoteParticipants/streamStatusUpdated">;
|
|
963
|
+
/**
|
|
964
|
+
* Selectors
|
|
965
|
+
*/
|
|
966
|
+
declare const selectRemoteParticipantsRaw: (state: RootState) => RemoteParticipantState;
|
|
967
|
+
declare const selectRemoteParticipants: (state: RootState) => RemoteParticipant[];
|
|
968
|
+
declare const selectScreenshares: ((state: {
|
|
969
|
+
app: AppState;
|
|
970
|
+
chat: ChatState;
|
|
971
|
+
cloudRecording: CloudRecordingState;
|
|
972
|
+
deviceCredentials: DeviceCredentialsState;
|
|
973
|
+
localMedia: LocalMediaState;
|
|
974
|
+
localParticipant: LocalParticipantState;
|
|
975
|
+
localScreenshare: LocalScreenshareState;
|
|
976
|
+
organization: OrganizationState;
|
|
977
|
+
remoteParticipants: RemoteParticipantState;
|
|
978
|
+
roomConnection: RoomConnectionState;
|
|
979
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
980
|
+
rtcConnection: RtcConnectionState;
|
|
981
|
+
signalConnection: SignalConnectionState;
|
|
982
|
+
streaming: StreamingState;
|
|
983
|
+
waitingParticipants: WaitingParticipantsState;
|
|
984
|
+
}) => Screenshare[]) & {
|
|
985
|
+
clearCache: () => void;
|
|
986
|
+
resultsCount: () => number;
|
|
987
|
+
resetResultsCount: () => void;
|
|
988
|
+
} & {
|
|
989
|
+
resultFunc: (resultFuncArgs_0: MediaStream | null, resultFuncArgs_1: RemoteParticipant[]) => Screenshare[];
|
|
990
|
+
memoizedResultFunc: ((resultFuncArgs_0: MediaStream | null, resultFuncArgs_1: RemoteParticipant[]) => Screenshare[]) & {
|
|
991
|
+
clearCache: () => void;
|
|
992
|
+
resultsCount: () => number;
|
|
993
|
+
resetResultsCount: () => void;
|
|
994
|
+
};
|
|
995
|
+
lastResult: () => Screenshare[];
|
|
996
|
+
dependencies: [(state: {
|
|
997
|
+
app: AppState;
|
|
998
|
+
chat: ChatState;
|
|
999
|
+
cloudRecording: CloudRecordingState;
|
|
1000
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1001
|
+
localMedia: LocalMediaState;
|
|
1002
|
+
localParticipant: LocalParticipantState;
|
|
1003
|
+
localScreenshare: LocalScreenshareState;
|
|
1004
|
+
organization: OrganizationState;
|
|
1005
|
+
remoteParticipants: RemoteParticipantState;
|
|
1006
|
+
roomConnection: RoomConnectionState;
|
|
1007
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1008
|
+
rtcConnection: RtcConnectionState;
|
|
1009
|
+
signalConnection: SignalConnectionState;
|
|
1010
|
+
streaming: StreamingState;
|
|
1011
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1012
|
+
}) => MediaStream | null, (state: RootState) => RemoteParticipant[]];
|
|
1013
|
+
recomputations: () => number;
|
|
1014
|
+
resetRecomputations: () => void;
|
|
1015
|
+
dependencyRecomputations: () => number;
|
|
1016
|
+
resetDependencyRecomputations: () => void;
|
|
1017
|
+
} & {
|
|
1018
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1019
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
type ConnectionStatus = "initializing" | "connecting" | "connected" | "reconnect" | "room_locked" | "knocking" | "disconnecting" | "disconnected" | "knock_rejected";
|
|
1023
|
+
/**
|
|
1024
|
+
* Reducer
|
|
1025
|
+
*/
|
|
1026
|
+
interface RoomConnectionState {
|
|
1027
|
+
session: {
|
|
1028
|
+
createdAt: string;
|
|
1029
|
+
id: string;
|
|
1030
|
+
} | null;
|
|
1031
|
+
status: ConnectionStatus;
|
|
1032
|
+
error: unknown;
|
|
1033
|
+
}
|
|
1034
|
+
declare const roomConnectionSlice: _reduxjs_toolkit.Slice<RoomConnectionState, {
|
|
1035
|
+
connectionStatusChanged: (state: {
|
|
1036
|
+
session: {
|
|
1037
|
+
createdAt: string;
|
|
1038
|
+
id: string;
|
|
1039
|
+
} | null;
|
|
1040
|
+
status: ConnectionStatus;
|
|
1041
|
+
error: unknown;
|
|
1042
|
+
}, action: PayloadAction<ConnectionStatus>) => {
|
|
1043
|
+
status: ConnectionStatus;
|
|
1044
|
+
session: {
|
|
1045
|
+
createdAt: string;
|
|
1046
|
+
id: string;
|
|
1047
|
+
} | null;
|
|
1048
|
+
error: unknown;
|
|
1049
|
+
};
|
|
1050
|
+
}, "roomConnection", "roomConnection", _reduxjs_toolkit.SliceSelectors<RoomConnectionState>>;
|
|
1051
|
+
declare const doKnockRoom: (args: void) => AppThunk<void>;
|
|
1052
|
+
declare const doConnectRoom: (args: void) => AppThunk<void>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Selectors
|
|
1055
|
+
*/
|
|
1056
|
+
declare const selectRoomConnectionRaw: (state: RootState) => RoomConnectionState;
|
|
1057
|
+
declare const selectRoomConnectionSession: (state: RootState) => {
|
|
1058
|
+
createdAt: string;
|
|
1059
|
+
id: string;
|
|
1060
|
+
} | null;
|
|
1061
|
+
declare const selectRoomConnectionSessionId: (state: RootState) => string | undefined;
|
|
1062
|
+
declare const selectRoomConnectionStatus: (state: RootState) => ConnectionStatus;
|
|
1063
|
+
/**
|
|
1064
|
+
* Reactors
|
|
1065
|
+
*/
|
|
1066
|
+
declare const selectShouldConnectRoom: ((state: {
|
|
1067
|
+
app: AppState;
|
|
1068
|
+
chat: ChatState;
|
|
1069
|
+
cloudRecording: CloudRecordingState;
|
|
1070
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1071
|
+
localMedia: LocalMediaState;
|
|
1072
|
+
localParticipant: LocalParticipantState;
|
|
1073
|
+
localScreenshare: LocalScreenshareState;
|
|
1074
|
+
organization: OrganizationState;
|
|
1075
|
+
remoteParticipants: RemoteParticipantState;
|
|
1076
|
+
roomConnection: RoomConnectionState;
|
|
1077
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1078
|
+
rtcConnection: RtcConnectionState;
|
|
1079
|
+
signalConnection: SignalConnectionState;
|
|
1080
|
+
streaming: StreamingState;
|
|
1081
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1082
|
+
}) => boolean) & {
|
|
1083
|
+
clearCache: () => void;
|
|
1084
|
+
resultsCount: () => number;
|
|
1085
|
+
resetResultsCount: () => void;
|
|
1086
|
+
} & {
|
|
1087
|
+
resultFunc: (resultFuncArgs_0: string | undefined, resultFuncArgs_1: ConnectionStatus, resultFuncArgs_2: boolean, resultFuncArgs_3: "" | "error" | "stopped" | "starting" | "started", resultFuncArgs_4: boolean) => boolean;
|
|
1088
|
+
memoizedResultFunc: ((resultFuncArgs_0: string | undefined, resultFuncArgs_1: ConnectionStatus, resultFuncArgs_2: boolean, resultFuncArgs_3: "" | "error" | "stopped" | "starting" | "started", resultFuncArgs_4: boolean) => boolean) & {
|
|
1089
|
+
clearCache: () => void;
|
|
1090
|
+
resultsCount: () => number;
|
|
1091
|
+
resetResultsCount: () => void;
|
|
1092
|
+
};
|
|
1093
|
+
lastResult: () => boolean;
|
|
1094
|
+
dependencies: [(state: {
|
|
1095
|
+
app: AppState;
|
|
1096
|
+
chat: ChatState;
|
|
1097
|
+
cloudRecording: CloudRecordingState;
|
|
1098
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1099
|
+
localMedia: LocalMediaState;
|
|
1100
|
+
localParticipant: LocalParticipantState;
|
|
1101
|
+
localScreenshare: LocalScreenshareState;
|
|
1102
|
+
organization: OrganizationState;
|
|
1103
|
+
remoteParticipants: RemoteParticipantState;
|
|
1104
|
+
roomConnection: RoomConnectionState;
|
|
1105
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1106
|
+
rtcConnection: RtcConnectionState;
|
|
1107
|
+
signalConnection: SignalConnectionState;
|
|
1108
|
+
streaming: StreamingState;
|
|
1109
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1110
|
+
}) => string | undefined, (state: RootState) => ConnectionStatus, (state: {
|
|
1111
|
+
app: AppState;
|
|
1112
|
+
chat: ChatState;
|
|
1113
|
+
cloudRecording: CloudRecordingState;
|
|
1114
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1115
|
+
localMedia: LocalMediaState;
|
|
1116
|
+
localParticipant: LocalParticipantState;
|
|
1117
|
+
localScreenshare: LocalScreenshareState;
|
|
1118
|
+
organization: OrganizationState;
|
|
1119
|
+
remoteParticipants: RemoteParticipantState;
|
|
1120
|
+
roomConnection: RoomConnectionState;
|
|
1121
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1122
|
+
rtcConnection: RtcConnectionState;
|
|
1123
|
+
signalConnection: SignalConnectionState;
|
|
1124
|
+
streaming: StreamingState;
|
|
1125
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1126
|
+
}) => boolean, (state: {
|
|
1127
|
+
app: AppState;
|
|
1128
|
+
chat: ChatState;
|
|
1129
|
+
cloudRecording: CloudRecordingState;
|
|
1130
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1131
|
+
localMedia: LocalMediaState;
|
|
1132
|
+
localParticipant: LocalParticipantState;
|
|
1133
|
+
localScreenshare: LocalScreenshareState;
|
|
1134
|
+
organization: OrganizationState;
|
|
1135
|
+
remoteParticipants: RemoteParticipantState;
|
|
1136
|
+
roomConnection: RoomConnectionState;
|
|
1137
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1138
|
+
rtcConnection: RtcConnectionState;
|
|
1139
|
+
signalConnection: SignalConnectionState;
|
|
1140
|
+
streaming: StreamingState;
|
|
1141
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1142
|
+
}) => "" | "error" | "stopped" | "starting" | "started", (state: {
|
|
1143
|
+
app: AppState;
|
|
1144
|
+
chat: ChatState;
|
|
1145
|
+
cloudRecording: CloudRecordingState;
|
|
1146
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1147
|
+
localMedia: LocalMediaState;
|
|
1148
|
+
localParticipant: LocalParticipantState;
|
|
1149
|
+
localScreenshare: LocalScreenshareState;
|
|
1150
|
+
organization: OrganizationState;
|
|
1151
|
+
remoteParticipants: RemoteParticipantState;
|
|
1152
|
+
roomConnection: RoomConnectionState;
|
|
1153
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1154
|
+
rtcConnection: RtcConnectionState;
|
|
1155
|
+
signalConnection: SignalConnectionState;
|
|
1156
|
+
streaming: StreamingState;
|
|
1157
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1158
|
+
}) => boolean];
|
|
1159
|
+
recomputations: () => number;
|
|
1160
|
+
resetRecomputations: () => void;
|
|
1161
|
+
dependencyRecomputations: () => number;
|
|
1162
|
+
resetDependencyRecomputations: () => void;
|
|
1163
|
+
} & {
|
|
1164
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1165
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
declare const createWebRtcEmitter: (dispatch: AppDispatch) => {
|
|
1169
|
+
emit: (eventName: keyof RtcEvents, data: RtcEvents[keyof RtcEvents]) => void;
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* Reducer
|
|
1173
|
+
*/
|
|
1174
|
+
interface StreamResolutionUpdate {
|
|
1175
|
+
streamId: string;
|
|
1176
|
+
width: number;
|
|
1177
|
+
height: number;
|
|
1178
|
+
}
|
|
1179
|
+
interface RtcConnectionState {
|
|
1180
|
+
dispatcherCreated: boolean;
|
|
1181
|
+
error: unknown;
|
|
1182
|
+
isCreatingDispatcher: boolean;
|
|
1183
|
+
reportedStreamResolutions: {
|
|
1184
|
+
[streamId: string]: Omit<StreamResolutionUpdate, "streamId">;
|
|
1185
|
+
};
|
|
1186
|
+
rtcManager: RtcManager | null;
|
|
1187
|
+
rtcManagerDispatcher: RtcManagerDispatcher | null;
|
|
1188
|
+
rtcManagerInitialized: boolean;
|
|
1189
|
+
status: "" | "ready" | "reconnect";
|
|
1190
|
+
isAcceptingStreams: boolean;
|
|
1191
|
+
}
|
|
1192
|
+
declare const rtcConnectionSlice: _reduxjs_toolkit.Slice<RtcConnectionState, {
|
|
1193
|
+
isAcceptingStreams: (state: {
|
|
1194
|
+
dispatcherCreated: boolean;
|
|
1195
|
+
error: unknown;
|
|
1196
|
+
isCreatingDispatcher: boolean;
|
|
1197
|
+
reportedStreamResolutions: {
|
|
1198
|
+
[x: string]: {
|
|
1199
|
+
width: number;
|
|
1200
|
+
height: number;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
rtcManager: {
|
|
1204
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1205
|
+
activeBreakout: any;
|
|
1206
|
+
clientId: any;
|
|
1207
|
+
shouldAddLocalVideo: any;
|
|
1208
|
+
streamId: any;
|
|
1209
|
+
}) => void;
|
|
1210
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1211
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1212
|
+
disconnectAll: () => void;
|
|
1213
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1214
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1215
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1216
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1217
|
+
width: number;
|
|
1218
|
+
height: number;
|
|
1219
|
+
}) => void;
|
|
1220
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1221
|
+
} | null;
|
|
1222
|
+
rtcManagerDispatcher: {} | null;
|
|
1223
|
+
rtcManagerInitialized: boolean;
|
|
1224
|
+
status: "" | "ready" | "reconnect";
|
|
1225
|
+
isAcceptingStreams: boolean;
|
|
1226
|
+
}, action: PayloadAction<boolean>) => {
|
|
1227
|
+
isAcceptingStreams: boolean;
|
|
1228
|
+
dispatcherCreated: boolean;
|
|
1229
|
+
error: unknown;
|
|
1230
|
+
isCreatingDispatcher: boolean;
|
|
1231
|
+
reportedStreamResolutions: {
|
|
1232
|
+
[x: string]: {
|
|
1233
|
+
width: number;
|
|
1234
|
+
height: number;
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
rtcManager: {
|
|
1238
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1239
|
+
activeBreakout: any;
|
|
1240
|
+
clientId: any;
|
|
1241
|
+
shouldAddLocalVideo: any;
|
|
1242
|
+
streamId: any;
|
|
1243
|
+
}) => void;
|
|
1244
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1245
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1246
|
+
disconnectAll: () => void;
|
|
1247
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1248
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1249
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1250
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1251
|
+
width: number;
|
|
1252
|
+
height: number;
|
|
1253
|
+
}) => void;
|
|
1254
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1255
|
+
} | null;
|
|
1256
|
+
rtcManagerDispatcher: {} | null;
|
|
1257
|
+
rtcManagerInitialized: boolean;
|
|
1258
|
+
status: "" | "ready" | "reconnect";
|
|
1259
|
+
};
|
|
1260
|
+
resolutionReported: (state: {
|
|
1261
|
+
dispatcherCreated: boolean;
|
|
1262
|
+
error: unknown;
|
|
1263
|
+
isCreatingDispatcher: boolean;
|
|
1264
|
+
reportedStreamResolutions: {
|
|
1265
|
+
[x: string]: {
|
|
1266
|
+
width: number;
|
|
1267
|
+
height: number;
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
rtcManager: {
|
|
1271
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1272
|
+
activeBreakout: any;
|
|
1273
|
+
clientId: any;
|
|
1274
|
+
shouldAddLocalVideo: any;
|
|
1275
|
+
streamId: any;
|
|
1276
|
+
}) => void;
|
|
1277
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1278
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1279
|
+
disconnectAll: () => void;
|
|
1280
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1281
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1282
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1283
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1284
|
+
width: number;
|
|
1285
|
+
height: number;
|
|
1286
|
+
}) => void;
|
|
1287
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1288
|
+
} | null;
|
|
1289
|
+
rtcManagerDispatcher: {} | null;
|
|
1290
|
+
rtcManagerInitialized: boolean;
|
|
1291
|
+
status: "" | "ready" | "reconnect";
|
|
1292
|
+
isAcceptingStreams: boolean;
|
|
1293
|
+
}, action: PayloadAction<StreamResolutionUpdate>) => {
|
|
1294
|
+
reportedStreamResolutions: {
|
|
1295
|
+
[x: string]: {
|
|
1296
|
+
width: number;
|
|
1297
|
+
height: number;
|
|
1298
|
+
} | {
|
|
1299
|
+
width: number;
|
|
1300
|
+
height: number;
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
dispatcherCreated: boolean;
|
|
1304
|
+
error: unknown;
|
|
1305
|
+
isCreatingDispatcher: boolean;
|
|
1306
|
+
rtcManager: {
|
|
1307
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1308
|
+
activeBreakout: any;
|
|
1309
|
+
clientId: any;
|
|
1310
|
+
shouldAddLocalVideo: any;
|
|
1311
|
+
streamId: any;
|
|
1312
|
+
}) => void;
|
|
1313
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1314
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1315
|
+
disconnectAll: () => void;
|
|
1316
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1317
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1318
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1319
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1320
|
+
width: number;
|
|
1321
|
+
height: number;
|
|
1322
|
+
}) => void;
|
|
1323
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1324
|
+
} | null;
|
|
1325
|
+
rtcManagerDispatcher: {} | null;
|
|
1326
|
+
rtcManagerInitialized: boolean;
|
|
1327
|
+
status: "" | "ready" | "reconnect";
|
|
1328
|
+
isAcceptingStreams: boolean;
|
|
1329
|
+
};
|
|
1330
|
+
rtcDisconnected: () => {
|
|
1331
|
+
dispatcherCreated: boolean;
|
|
1332
|
+
error: unknown;
|
|
1333
|
+
isCreatingDispatcher: boolean;
|
|
1334
|
+
reportedStreamResolutions: {
|
|
1335
|
+
[streamId: string]: Omit<StreamResolutionUpdate, "streamId">;
|
|
1336
|
+
};
|
|
1337
|
+
rtcManager: RtcManager | null;
|
|
1338
|
+
rtcManagerDispatcher: RtcManagerDispatcher | null;
|
|
1339
|
+
rtcManagerInitialized: boolean;
|
|
1340
|
+
status: "" | "ready" | "reconnect";
|
|
1341
|
+
isAcceptingStreams: boolean;
|
|
1342
|
+
};
|
|
1343
|
+
rtcDispatcherCreated: (state: {
|
|
1344
|
+
dispatcherCreated: boolean;
|
|
1345
|
+
error: unknown;
|
|
1346
|
+
isCreatingDispatcher: boolean;
|
|
1347
|
+
reportedStreamResolutions: {
|
|
1348
|
+
[x: string]: {
|
|
1349
|
+
width: number;
|
|
1350
|
+
height: number;
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
rtcManager: {
|
|
1354
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1355
|
+
activeBreakout: any;
|
|
1356
|
+
clientId: any;
|
|
1357
|
+
shouldAddLocalVideo: any;
|
|
1358
|
+
streamId: any;
|
|
1359
|
+
}) => void;
|
|
1360
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1361
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1362
|
+
disconnectAll: () => void;
|
|
1363
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1364
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1365
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1366
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1367
|
+
width: number;
|
|
1368
|
+
height: number;
|
|
1369
|
+
}) => void;
|
|
1370
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1371
|
+
} | null;
|
|
1372
|
+
rtcManagerDispatcher: {} | null;
|
|
1373
|
+
rtcManagerInitialized: boolean;
|
|
1374
|
+
status: "" | "ready" | "reconnect";
|
|
1375
|
+
isAcceptingStreams: boolean;
|
|
1376
|
+
}, action: PayloadAction<RtcManagerDispatcher>) => {
|
|
1377
|
+
dispatcherCreated: true;
|
|
1378
|
+
rtcManagerDispatcher: RtcManagerDispatcher;
|
|
1379
|
+
error: unknown;
|
|
1380
|
+
isCreatingDispatcher: boolean;
|
|
1381
|
+
reportedStreamResolutions: {
|
|
1382
|
+
[x: string]: {
|
|
1383
|
+
width: number;
|
|
1384
|
+
height: number;
|
|
1385
|
+
};
|
|
1386
|
+
};
|
|
1387
|
+
rtcManager: {
|
|
1388
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1389
|
+
activeBreakout: any;
|
|
1390
|
+
clientId: any;
|
|
1391
|
+
shouldAddLocalVideo: any;
|
|
1392
|
+
streamId: any;
|
|
1393
|
+
}) => void;
|
|
1394
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1395
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1396
|
+
disconnectAll: () => void;
|
|
1397
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1398
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1399
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1400
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1401
|
+
width: number;
|
|
1402
|
+
height: number;
|
|
1403
|
+
}) => void;
|
|
1404
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1405
|
+
} | null;
|
|
1406
|
+
rtcManagerInitialized: boolean;
|
|
1407
|
+
status: "" | "ready" | "reconnect";
|
|
1408
|
+
isAcceptingStreams: boolean;
|
|
1409
|
+
};
|
|
1410
|
+
rtcManagerCreated: (state: {
|
|
1411
|
+
dispatcherCreated: boolean;
|
|
1412
|
+
error: unknown;
|
|
1413
|
+
isCreatingDispatcher: boolean;
|
|
1414
|
+
reportedStreamResolutions: {
|
|
1415
|
+
[x: string]: {
|
|
1416
|
+
width: number;
|
|
1417
|
+
height: number;
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
rtcManager: {
|
|
1421
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1422
|
+
activeBreakout: any;
|
|
1423
|
+
clientId: any;
|
|
1424
|
+
shouldAddLocalVideo: any;
|
|
1425
|
+
streamId: any;
|
|
1426
|
+
}) => void;
|
|
1427
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1428
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1429
|
+
disconnectAll: () => void;
|
|
1430
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1431
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1432
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1433
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
}) => void;
|
|
1437
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1438
|
+
} | null;
|
|
1439
|
+
rtcManagerDispatcher: {} | null;
|
|
1440
|
+
rtcManagerInitialized: boolean;
|
|
1441
|
+
status: "" | "ready" | "reconnect";
|
|
1442
|
+
isAcceptingStreams: boolean;
|
|
1443
|
+
}, action: PayloadAction<RtcManager>) => {
|
|
1444
|
+
rtcManager: RtcManager;
|
|
1445
|
+
status: "ready";
|
|
1446
|
+
dispatcherCreated: boolean;
|
|
1447
|
+
error: unknown;
|
|
1448
|
+
isCreatingDispatcher: boolean;
|
|
1449
|
+
reportedStreamResolutions: {
|
|
1450
|
+
[x: string]: {
|
|
1451
|
+
width: number;
|
|
1452
|
+
height: number;
|
|
1453
|
+
};
|
|
1454
|
+
};
|
|
1455
|
+
rtcManagerDispatcher: {} | null;
|
|
1456
|
+
rtcManagerInitialized: boolean;
|
|
1457
|
+
isAcceptingStreams: boolean;
|
|
1458
|
+
};
|
|
1459
|
+
rtcManagerDestroyed: (state: {
|
|
1460
|
+
dispatcherCreated: boolean;
|
|
1461
|
+
error: unknown;
|
|
1462
|
+
isCreatingDispatcher: boolean;
|
|
1463
|
+
reportedStreamResolutions: {
|
|
1464
|
+
[x: string]: {
|
|
1465
|
+
width: number;
|
|
1466
|
+
height: number;
|
|
1467
|
+
};
|
|
1468
|
+
};
|
|
1469
|
+
rtcManager: {
|
|
1470
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1471
|
+
activeBreakout: any;
|
|
1472
|
+
clientId: any;
|
|
1473
|
+
shouldAddLocalVideo: any;
|
|
1474
|
+
streamId: any;
|
|
1475
|
+
}) => void;
|
|
1476
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1477
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1478
|
+
disconnectAll: () => void;
|
|
1479
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1480
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1481
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1482
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1483
|
+
width: number;
|
|
1484
|
+
height: number;
|
|
1485
|
+
}) => void;
|
|
1486
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1487
|
+
} | null;
|
|
1488
|
+
rtcManagerDispatcher: {} | null;
|
|
1489
|
+
rtcManagerInitialized: boolean;
|
|
1490
|
+
status: "" | "ready" | "reconnect";
|
|
1491
|
+
isAcceptingStreams: boolean;
|
|
1492
|
+
}) => {
|
|
1493
|
+
rtcManager: null;
|
|
1494
|
+
dispatcherCreated: boolean;
|
|
1495
|
+
error: unknown;
|
|
1496
|
+
isCreatingDispatcher: boolean;
|
|
1497
|
+
reportedStreamResolutions: {
|
|
1498
|
+
[x: string]: {
|
|
1499
|
+
width: number;
|
|
1500
|
+
height: number;
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
rtcManagerDispatcher: {} | null;
|
|
1504
|
+
rtcManagerInitialized: boolean;
|
|
1505
|
+
status: "" | "ready" | "reconnect";
|
|
1506
|
+
isAcceptingStreams: boolean;
|
|
1507
|
+
};
|
|
1508
|
+
rtcManagerInitialized: (state: {
|
|
1509
|
+
dispatcherCreated: boolean;
|
|
1510
|
+
error: unknown;
|
|
1511
|
+
isCreatingDispatcher: boolean;
|
|
1512
|
+
reportedStreamResolutions: {
|
|
1513
|
+
[x: string]: {
|
|
1514
|
+
width: number;
|
|
1515
|
+
height: number;
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
rtcManager: {
|
|
1519
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1520
|
+
activeBreakout: any;
|
|
1521
|
+
clientId: any;
|
|
1522
|
+
shouldAddLocalVideo: any;
|
|
1523
|
+
streamId: any;
|
|
1524
|
+
}) => void;
|
|
1525
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1526
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1527
|
+
disconnectAll: () => void;
|
|
1528
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1529
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1530
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1531
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1532
|
+
width: number;
|
|
1533
|
+
height: number;
|
|
1534
|
+
}) => void;
|
|
1535
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1536
|
+
} | null;
|
|
1537
|
+
rtcManagerDispatcher: {} | null;
|
|
1538
|
+
rtcManagerInitialized: boolean;
|
|
1539
|
+
status: "" | "ready" | "reconnect";
|
|
1540
|
+
isAcceptingStreams: boolean;
|
|
1541
|
+
}) => {
|
|
1542
|
+
rtcManagerInitialized: true;
|
|
1543
|
+
dispatcherCreated: boolean;
|
|
1544
|
+
error: unknown;
|
|
1545
|
+
isCreatingDispatcher: boolean;
|
|
1546
|
+
reportedStreamResolutions: {
|
|
1547
|
+
[x: string]: {
|
|
1548
|
+
width: number;
|
|
1549
|
+
height: number;
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
rtcManager: {
|
|
1553
|
+
acceptNewStream: ({ activeBreakout: boolean, clientId: string, shouldAddLocalVideo: boolean, streamId: string, }: {
|
|
1554
|
+
activeBreakout: any;
|
|
1555
|
+
clientId: any;
|
|
1556
|
+
shouldAddLocalVideo: any;
|
|
1557
|
+
streamId: any;
|
|
1558
|
+
}) => void;
|
|
1559
|
+
addNewStream: (streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean) => void;
|
|
1560
|
+
disconnect: (streamId: string, activeBreakout: boolean) => void;
|
|
1561
|
+
disconnectAll: () => void;
|
|
1562
|
+
replaceTrack: (oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack) => Promise<void>;
|
|
1563
|
+
removeStream: (streamId: string, _stream: MediaStream, requestedByClientId: string | null) => void;
|
|
1564
|
+
shouldAcceptStreamsFromBothSides?: (() => boolean) | undefined;
|
|
1565
|
+
updateStreamResolution: (streamId: string, ignored: null, resolution: {
|
|
1566
|
+
width: number;
|
|
1567
|
+
height: number;
|
|
1568
|
+
}) => void;
|
|
1569
|
+
sendStatsCustomEvent: (eventName: string, data: unknown) => void;
|
|
1570
|
+
} | null;
|
|
1571
|
+
rtcManagerDispatcher: {} | null;
|
|
1572
|
+
status: "" | "ready" | "reconnect";
|
|
1573
|
+
isAcceptingStreams: boolean;
|
|
1574
|
+
};
|
|
1575
|
+
}, "rtcConnection", "rtcConnection", _reduxjs_toolkit.SliceSelectors<RtcConnectionState>>;
|
|
1576
|
+
/**
|
|
1577
|
+
* Action creators
|
|
1578
|
+
*/
|
|
1579
|
+
declare const resolutionReported: _reduxjs_toolkit.ActionCreatorWithPayload<StreamResolutionUpdate, "rtcConnection/resolutionReported">;
|
|
1580
|
+
declare const rtcDispatcherCreated: _reduxjs_toolkit.ActionCreatorWithPayload<RtcManagerDispatcher, "rtcConnection/rtcDispatcherCreated">;
|
|
1581
|
+
declare const rtcDisconnected: _reduxjs_toolkit.ActionCreatorWithoutPayload<"rtcConnection/rtcDisconnected">;
|
|
1582
|
+
declare const rtcManagerCreated: _reduxjs_toolkit.ActionCreatorWithPayload<RtcManager, "rtcConnection/rtcManagerCreated">;
|
|
1583
|
+
declare const rtcManagerDestroyed: _reduxjs_toolkit.ActionCreatorWithoutPayload<"rtcConnection/rtcManagerDestroyed">;
|
|
1584
|
+
declare const rtcManagerInitialized: _reduxjs_toolkit.ActionCreatorWithoutPayload<"rtcConnection/rtcManagerInitialized">;
|
|
1585
|
+
declare const isAcceptingStreams: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "rtcConnection/isAcceptingStreams">;
|
|
1586
|
+
declare const doConnectRtc: (args: void) => AppThunk<void>;
|
|
1587
|
+
declare const doDisconnectRtc: (args: void) => AppThunk<void>;
|
|
1588
|
+
declare const doHandleAcceptStreams: (args: StreamStatusUpdate[]) => AppThunk<void>;
|
|
1589
|
+
declare const doRtcReportStreamResolution: (args: StreamResolutionUpdate) => AppThunk<void>;
|
|
1590
|
+
declare const doRtcManagerCreated: (args: RtcManagerCreatedPayload) => AppThunk<void>;
|
|
1591
|
+
declare const doRtcManagerInitialize: (args: void) => AppThunk<void>;
|
|
1592
|
+
/**
|
|
1593
|
+
* Selectors
|
|
1594
|
+
*/
|
|
1595
|
+
declare const selectRtcConnectionRaw: (state: RootState) => RtcConnectionState;
|
|
1596
|
+
declare const selectRtcManagerInitialized: (state: RootState) => boolean;
|
|
1597
|
+
declare const selectRtcManager: (state: RootState) => RtcManager | null;
|
|
1598
|
+
declare const selectRtcDispatcherCreated: (state: RootState) => boolean;
|
|
1599
|
+
declare const selectRtcIsCreatingDispatcher: (state: RootState) => boolean;
|
|
1600
|
+
declare const selectRtcStatus: (state: RootState) => "" | "reconnect" | "ready";
|
|
1601
|
+
declare const selectIsAcceptingStreams: (state: RootState) => boolean;
|
|
1602
|
+
declare const selectShouldConnectRtc: ((state: {
|
|
1603
|
+
app: AppState;
|
|
1604
|
+
chat: ChatState;
|
|
1605
|
+
cloudRecording: CloudRecordingState;
|
|
1606
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1607
|
+
localMedia: LocalMediaState;
|
|
1608
|
+
localParticipant: LocalParticipantState;
|
|
1609
|
+
localScreenshare: LocalScreenshareState;
|
|
1610
|
+
organization: OrganizationState;
|
|
1611
|
+
remoteParticipants: RemoteParticipantState;
|
|
1612
|
+
roomConnection: RoomConnectionState;
|
|
1613
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1614
|
+
rtcConnection: RtcConnectionState;
|
|
1615
|
+
signalConnection: SignalConnectionState;
|
|
1616
|
+
streaming: StreamingState;
|
|
1617
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1618
|
+
}) => boolean) & {
|
|
1619
|
+
clearCache: () => void;
|
|
1620
|
+
resultsCount: () => number;
|
|
1621
|
+
resetResultsCount: () => void;
|
|
1622
|
+
} & {
|
|
1623
|
+
resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: _whereby_jslib_media_src_utils_ServerSocket.default | null) => boolean;
|
|
1624
|
+
memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: boolean, resultFuncArgs_2: _whereby_jslib_media_src_utils_ServerSocket.default | null) => boolean) & {
|
|
1625
|
+
clearCache: () => void;
|
|
1626
|
+
resultsCount: () => number;
|
|
1627
|
+
resetResultsCount: () => void;
|
|
1628
|
+
};
|
|
1629
|
+
lastResult: () => boolean;
|
|
1630
|
+
dependencies: [(state: RootState) => boolean, (state: RootState) => boolean, (state: {
|
|
1631
|
+
app: AppState;
|
|
1632
|
+
chat: ChatState;
|
|
1633
|
+
cloudRecording: CloudRecordingState;
|
|
1634
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1635
|
+
localMedia: LocalMediaState;
|
|
1636
|
+
localParticipant: LocalParticipantState;
|
|
1637
|
+
localScreenshare: LocalScreenshareState;
|
|
1638
|
+
organization: OrganizationState;
|
|
1639
|
+
remoteParticipants: RemoteParticipantState;
|
|
1640
|
+
roomConnection: RoomConnectionState;
|
|
1641
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1642
|
+
rtcConnection: RtcConnectionState;
|
|
1643
|
+
signalConnection: SignalConnectionState;
|
|
1644
|
+
streaming: StreamingState;
|
|
1645
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1646
|
+
}) => _whereby_jslib_media_src_utils_ServerSocket.default | null];
|
|
1647
|
+
recomputations: () => number;
|
|
1648
|
+
resetRecomputations: () => void;
|
|
1649
|
+
dependencyRecomputations: () => number;
|
|
1650
|
+
resetDependencyRecomputations: () => void;
|
|
1651
|
+
} & {
|
|
1652
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1653
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1654
|
+
};
|
|
1655
|
+
declare const selectShouldInitializeRtc: ((state: {
|
|
1656
|
+
app: AppState;
|
|
1657
|
+
chat: ChatState;
|
|
1658
|
+
cloudRecording: CloudRecordingState;
|
|
1659
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1660
|
+
localMedia: LocalMediaState;
|
|
1661
|
+
localParticipant: LocalParticipantState;
|
|
1662
|
+
localScreenshare: LocalScreenshareState;
|
|
1663
|
+
organization: OrganizationState;
|
|
1664
|
+
remoteParticipants: RemoteParticipantState;
|
|
1665
|
+
roomConnection: RoomConnectionState;
|
|
1666
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1667
|
+
rtcConnection: RtcConnectionState;
|
|
1668
|
+
signalConnection: SignalConnectionState;
|
|
1669
|
+
streaming: StreamingState;
|
|
1670
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1671
|
+
}) => boolean) & {
|
|
1672
|
+
clearCache: () => void;
|
|
1673
|
+
resultsCount: () => number;
|
|
1674
|
+
resetResultsCount: () => void;
|
|
1675
|
+
} & {
|
|
1676
|
+
resultFunc: (resultFuncArgs_0: RtcManager | null, resultFuncArgs_1: boolean, resultFuncArgs_2: "" | "error" | "stopped" | "starting" | "started") => boolean;
|
|
1677
|
+
memoizedResultFunc: ((resultFuncArgs_0: RtcManager | null, resultFuncArgs_1: boolean, resultFuncArgs_2: "" | "error" | "stopped" | "starting" | "started") => boolean) & {
|
|
1678
|
+
clearCache: () => void;
|
|
1679
|
+
resultsCount: () => number;
|
|
1680
|
+
resetResultsCount: () => void;
|
|
1681
|
+
};
|
|
1682
|
+
lastResult: () => boolean;
|
|
1683
|
+
dependencies: [(state: RootState) => RtcManager | null, (state: RootState) => boolean, (state: {
|
|
1684
|
+
app: AppState;
|
|
1685
|
+
chat: ChatState;
|
|
1686
|
+
cloudRecording: CloudRecordingState;
|
|
1687
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1688
|
+
localMedia: LocalMediaState;
|
|
1689
|
+
localParticipant: LocalParticipantState;
|
|
1690
|
+
localScreenshare: LocalScreenshareState;
|
|
1691
|
+
organization: OrganizationState;
|
|
1692
|
+
remoteParticipants: RemoteParticipantState;
|
|
1693
|
+
roomConnection: RoomConnectionState;
|
|
1694
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1695
|
+
rtcConnection: RtcConnectionState;
|
|
1696
|
+
signalConnection: SignalConnectionState;
|
|
1697
|
+
streaming: StreamingState;
|
|
1698
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1699
|
+
}) => "" | "error" | "stopped" | "starting" | "started"];
|
|
1700
|
+
recomputations: () => number;
|
|
1701
|
+
resetRecomputations: () => void;
|
|
1702
|
+
dependencyRecomputations: () => number;
|
|
1703
|
+
resetDependencyRecomputations: () => void;
|
|
1704
|
+
} & {
|
|
1705
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1706
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1707
|
+
};
|
|
1708
|
+
declare const selectShouldDisconnectRtc: ((state: {
|
|
1709
|
+
app: AppState;
|
|
1710
|
+
chat: ChatState;
|
|
1711
|
+
cloudRecording: CloudRecordingState;
|
|
1712
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1713
|
+
localMedia: LocalMediaState;
|
|
1714
|
+
localParticipant: LocalParticipantState;
|
|
1715
|
+
localScreenshare: LocalScreenshareState;
|
|
1716
|
+
organization: OrganizationState;
|
|
1717
|
+
remoteParticipants: RemoteParticipantState;
|
|
1718
|
+
roomConnection: RoomConnectionState;
|
|
1719
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1720
|
+
rtcConnection: RtcConnectionState;
|
|
1721
|
+
signalConnection: SignalConnectionState;
|
|
1722
|
+
streaming: StreamingState;
|
|
1723
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1724
|
+
}) => boolean) & {
|
|
1725
|
+
clearCache: () => void;
|
|
1726
|
+
resultsCount: () => number;
|
|
1727
|
+
resetResultsCount: () => void;
|
|
1728
|
+
} & {
|
|
1729
|
+
resultFunc: (resultFuncArgs_0: "" | "reconnect" | "ready", resultFuncArgs_1: boolean) => boolean;
|
|
1730
|
+
memoizedResultFunc: ((resultFuncArgs_0: "" | "reconnect" | "ready", resultFuncArgs_1: boolean) => boolean) & {
|
|
1731
|
+
clearCache: () => void;
|
|
1732
|
+
resultsCount: () => number;
|
|
1733
|
+
resetResultsCount: () => void;
|
|
1734
|
+
};
|
|
1735
|
+
lastResult: () => boolean;
|
|
1736
|
+
dependencies: [(state: RootState) => "" | "reconnect" | "ready", (state: {
|
|
1737
|
+
app: AppState;
|
|
1738
|
+
chat: ChatState;
|
|
1739
|
+
cloudRecording: CloudRecordingState;
|
|
1740
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1741
|
+
localMedia: LocalMediaState;
|
|
1742
|
+
localParticipant: LocalParticipantState;
|
|
1743
|
+
localScreenshare: LocalScreenshareState;
|
|
1744
|
+
organization: OrganizationState;
|
|
1745
|
+
remoteParticipants: RemoteParticipantState;
|
|
1746
|
+
roomConnection: RoomConnectionState;
|
|
1747
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1748
|
+
rtcConnection: RtcConnectionState;
|
|
1749
|
+
signalConnection: SignalConnectionState;
|
|
1750
|
+
streaming: StreamingState;
|
|
1751
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1752
|
+
}) => boolean];
|
|
1753
|
+
recomputations: () => number;
|
|
1754
|
+
resetRecomputations: () => void;
|
|
1755
|
+
dependencyRecomputations: () => number;
|
|
1756
|
+
resetDependencyRecomputations: () => void;
|
|
1757
|
+
} & {
|
|
1758
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1759
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1760
|
+
};
|
|
1761
|
+
declare const selectStreamsToAccept: ((state: {
|
|
1762
|
+
app: AppState;
|
|
1763
|
+
chat: ChatState;
|
|
1764
|
+
cloudRecording: CloudRecordingState;
|
|
1765
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1766
|
+
localMedia: LocalMediaState;
|
|
1767
|
+
localParticipant: LocalParticipantState;
|
|
1768
|
+
localScreenshare: LocalScreenshareState;
|
|
1769
|
+
organization: OrganizationState;
|
|
1770
|
+
remoteParticipants: RemoteParticipantState;
|
|
1771
|
+
roomConnection: RoomConnectionState;
|
|
1772
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1773
|
+
rtcConnection: RtcConnectionState;
|
|
1774
|
+
signalConnection: SignalConnectionState;
|
|
1775
|
+
streaming: StreamingState;
|
|
1776
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1777
|
+
}) => {
|
|
1778
|
+
clientId: string;
|
|
1779
|
+
streamId: string;
|
|
1780
|
+
state: StreamState;
|
|
1781
|
+
}[]) & {
|
|
1782
|
+
clearCache: () => void;
|
|
1783
|
+
resultsCount: () => number;
|
|
1784
|
+
resetResultsCount: () => void;
|
|
1785
|
+
} & {
|
|
1786
|
+
resultFunc: (resultFuncArgs_0: "" | "reconnect" | "ready", resultFuncArgs_1: RemoteParticipant[]) => {
|
|
1787
|
+
clientId: string;
|
|
1788
|
+
streamId: string;
|
|
1789
|
+
state: StreamState;
|
|
1790
|
+
}[];
|
|
1791
|
+
memoizedResultFunc: ((resultFuncArgs_0: "" | "reconnect" | "ready", resultFuncArgs_1: RemoteParticipant[]) => {
|
|
1792
|
+
clientId: string;
|
|
1793
|
+
streamId: string;
|
|
1794
|
+
state: StreamState;
|
|
1795
|
+
}[]) & {
|
|
1796
|
+
clearCache: () => void;
|
|
1797
|
+
resultsCount: () => number;
|
|
1798
|
+
resetResultsCount: () => void;
|
|
1799
|
+
};
|
|
1800
|
+
lastResult: () => {
|
|
1801
|
+
clientId: string;
|
|
1802
|
+
streamId: string;
|
|
1803
|
+
state: StreamState;
|
|
1804
|
+
}[];
|
|
1805
|
+
dependencies: [(state: RootState) => "" | "reconnect" | "ready", (state: {
|
|
1806
|
+
app: AppState;
|
|
1807
|
+
chat: ChatState;
|
|
1808
|
+
cloudRecording: CloudRecordingState;
|
|
1809
|
+
deviceCredentials: DeviceCredentialsState;
|
|
1810
|
+
localMedia: LocalMediaState;
|
|
1811
|
+
localParticipant: LocalParticipantState;
|
|
1812
|
+
localScreenshare: LocalScreenshareState;
|
|
1813
|
+
organization: OrganizationState;
|
|
1814
|
+
remoteParticipants: RemoteParticipantState;
|
|
1815
|
+
roomConnection: RoomConnectionState;
|
|
1816
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
1817
|
+
rtcConnection: RtcConnectionState;
|
|
1818
|
+
signalConnection: SignalConnectionState;
|
|
1819
|
+
streaming: StreamingState;
|
|
1820
|
+
waitingParticipants: WaitingParticipantsState;
|
|
1821
|
+
}) => RemoteParticipant[]];
|
|
1822
|
+
recomputations: () => number;
|
|
1823
|
+
resetRecomputations: () => void;
|
|
1824
|
+
dependencyRecomputations: () => number;
|
|
1825
|
+
resetDependencyRecomputations: () => void;
|
|
1826
|
+
} & {
|
|
1827
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
1828
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Reducer
|
|
1833
|
+
*/
|
|
1834
|
+
interface SignalConnectionState {
|
|
1835
|
+
deviceIdentified: boolean;
|
|
1836
|
+
isIdentifyingDevice: boolean;
|
|
1837
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1838
|
+
socket: _whereby_jslib_media_src_utils_ServerSocket__default | null;
|
|
1839
|
+
}
|
|
1840
|
+
declare const signalConnectionSlice: _reduxjs_toolkit.Slice<SignalConnectionState, {
|
|
1841
|
+
socketConnecting: (state: {
|
|
1842
|
+
deviceIdentified: boolean;
|
|
1843
|
+
isIdentifyingDevice: boolean;
|
|
1844
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1845
|
+
socket: {
|
|
1846
|
+
connect: () => void;
|
|
1847
|
+
disconnect: () => void;
|
|
1848
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1849
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1850
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1851
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1852
|
+
} | null;
|
|
1853
|
+
}) => {
|
|
1854
|
+
status: "connecting";
|
|
1855
|
+
deviceIdentified: boolean;
|
|
1856
|
+
isIdentifyingDevice: boolean;
|
|
1857
|
+
socket: {
|
|
1858
|
+
connect: () => void;
|
|
1859
|
+
disconnect: () => void;
|
|
1860
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1861
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1862
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1863
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1864
|
+
} | null;
|
|
1865
|
+
};
|
|
1866
|
+
socketConnected: (state: {
|
|
1867
|
+
deviceIdentified: boolean;
|
|
1868
|
+
isIdentifyingDevice: boolean;
|
|
1869
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1870
|
+
socket: {
|
|
1871
|
+
connect: () => void;
|
|
1872
|
+
disconnect: () => void;
|
|
1873
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1874
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1875
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1876
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1877
|
+
} | null;
|
|
1878
|
+
}, action: PayloadAction<_whereby_jslib_media_src_utils_ServerSocket__default>) => {
|
|
1879
|
+
socket: _whereby_jslib_media_src_utils_ServerSocket__default;
|
|
1880
|
+
status: "connected";
|
|
1881
|
+
deviceIdentified: boolean;
|
|
1882
|
+
isIdentifyingDevice: boolean;
|
|
1883
|
+
};
|
|
1884
|
+
socketDisconnected: (state: {
|
|
1885
|
+
deviceIdentified: boolean;
|
|
1886
|
+
isIdentifyingDevice: boolean;
|
|
1887
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1888
|
+
socket: {
|
|
1889
|
+
connect: () => void;
|
|
1890
|
+
disconnect: () => void;
|
|
1891
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1892
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1893
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1894
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1895
|
+
} | null;
|
|
1896
|
+
}) => {
|
|
1897
|
+
status: "disconnected";
|
|
1898
|
+
deviceIdentified: boolean;
|
|
1899
|
+
isIdentifyingDevice: boolean;
|
|
1900
|
+
socket: {
|
|
1901
|
+
connect: () => void;
|
|
1902
|
+
disconnect: () => void;
|
|
1903
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1904
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1905
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1906
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1907
|
+
} | null;
|
|
1908
|
+
};
|
|
1909
|
+
socketReconnecting: (state: {
|
|
1910
|
+
deviceIdentified: boolean;
|
|
1911
|
+
isIdentifyingDevice: boolean;
|
|
1912
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1913
|
+
socket: {
|
|
1914
|
+
connect: () => void;
|
|
1915
|
+
disconnect: () => void;
|
|
1916
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1917
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1918
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1919
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1920
|
+
} | null;
|
|
1921
|
+
}) => {
|
|
1922
|
+
status: "reconnect";
|
|
1923
|
+
deviceIdentified: boolean;
|
|
1924
|
+
isIdentifyingDevice: boolean;
|
|
1925
|
+
socket: {
|
|
1926
|
+
connect: () => void;
|
|
1927
|
+
disconnect: () => void;
|
|
1928
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1929
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1930
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1931
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1932
|
+
} | null;
|
|
1933
|
+
};
|
|
1934
|
+
deviceIdentifying: (state: {
|
|
1935
|
+
deviceIdentified: boolean;
|
|
1936
|
+
isIdentifyingDevice: boolean;
|
|
1937
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1938
|
+
socket: {
|
|
1939
|
+
connect: () => void;
|
|
1940
|
+
disconnect: () => void;
|
|
1941
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1942
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1943
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1944
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1945
|
+
} | null;
|
|
1946
|
+
}) => {
|
|
1947
|
+
isIdentifyingDevice: true;
|
|
1948
|
+
deviceIdentified: boolean;
|
|
1949
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1950
|
+
socket: {
|
|
1951
|
+
connect: () => void;
|
|
1952
|
+
disconnect: () => void;
|
|
1953
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1954
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1955
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1956
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1957
|
+
} | null;
|
|
1958
|
+
};
|
|
1959
|
+
deviceIdentified: (state: {
|
|
1960
|
+
deviceIdentified: boolean;
|
|
1961
|
+
isIdentifyingDevice: boolean;
|
|
1962
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1963
|
+
socket: {
|
|
1964
|
+
connect: () => void;
|
|
1965
|
+
disconnect: () => void;
|
|
1966
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1967
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1968
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1969
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1970
|
+
} | null;
|
|
1971
|
+
}) => {
|
|
1972
|
+
deviceIdentified: true;
|
|
1973
|
+
isIdentifyingDevice: false;
|
|
1974
|
+
status: "connected" | "connecting" | "disconnected" | "reconnect" | "";
|
|
1975
|
+
socket: {
|
|
1976
|
+
connect: () => void;
|
|
1977
|
+
disconnect: () => void;
|
|
1978
|
+
getManager: () => _whereby_jslib_media_src_utils_ServerSocket.SocketManager;
|
|
1979
|
+
emit: <K extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalRequests>(eventName: K, payload?: any) => any;
|
|
1980
|
+
on: <K_1 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_1, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_1]) => void) => any;
|
|
1981
|
+
once: <K_2 extends keyof _whereby_jslib_media_src_utils_ServerSocket.SignalEvents>(eventName: K_2, callback: (args: _whereby_jslib_media_src_utils_ServerSocket.SignalEvents[K_2]) => void) => any;
|
|
1982
|
+
} | null;
|
|
1983
|
+
};
|
|
1984
|
+
}, "signalConnection", "signalConnection", _reduxjs_toolkit.SliceSelectors<SignalConnectionState>>;
|
|
1985
|
+
declare const deviceIdentifying: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/deviceIdentifying">;
|
|
1986
|
+
declare const deviceIdentified: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/deviceIdentified">;
|
|
1987
|
+
declare const socketConnected: _reduxjs_toolkit.ActionCreatorWithPayload<_whereby_jslib_media_src_utils_ServerSocket__default, "signalConnection/socketConnected">;
|
|
1988
|
+
declare const socketConnecting: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketConnecting">;
|
|
1989
|
+
declare const socketDisconnected: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketDisconnected">;
|
|
1990
|
+
/**
|
|
1991
|
+
* Action creators
|
|
1992
|
+
*/
|
|
1993
|
+
declare const doSignalSocketConnect: (args: void) => AppThunk<void>;
|
|
1994
|
+
declare const doSignalIdentifyDevice: (args: {
|
|
1995
|
+
deviceCredentials: Credentials;
|
|
1996
|
+
}) => AppThunk<void>;
|
|
1997
|
+
declare const doSignalDisconnect: (args: void) => AppThunk<void>;
|
|
1998
|
+
declare const doSignalReconnect: (args: void) => AppThunk<void>;
|
|
1999
|
+
declare const socketReconnecting: _reduxjs_toolkit.ActionCreatorWithoutPayload<"signalConnection/socketReconnecting">;
|
|
2000
|
+
/**
|
|
2001
|
+
* Selectors
|
|
2002
|
+
*/
|
|
2003
|
+
declare const selectSignalConnectionRaw: (state: RootState) => SignalConnectionState;
|
|
2004
|
+
declare const selectSignalIsIdentifyingDevice: (state: RootState) => boolean;
|
|
2005
|
+
declare const selectSignalConnectionDeviceIdentified: (state: RootState) => boolean;
|
|
2006
|
+
declare const selectSignalStatus: (state: RootState) => "" | "connecting" | "connected" | "reconnect" | "disconnected";
|
|
2007
|
+
declare const selectSignalConnectionSocket: (state: RootState) => _whereby_jslib_media_src_utils_ServerSocket__default | null;
|
|
2008
|
+
declare const selectShouldConnectSignal: ((state: {
|
|
2009
|
+
app: AppState;
|
|
2010
|
+
chat: ChatState;
|
|
2011
|
+
cloudRecording: CloudRecordingState;
|
|
2012
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2013
|
+
localMedia: LocalMediaState;
|
|
2014
|
+
localParticipant: LocalParticipantState;
|
|
2015
|
+
localScreenshare: LocalScreenshareState;
|
|
2016
|
+
organization: OrganizationState;
|
|
2017
|
+
remoteParticipants: RemoteParticipantState;
|
|
2018
|
+
roomConnection: RoomConnectionState;
|
|
2019
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2020
|
+
rtcConnection: RtcConnectionState;
|
|
2021
|
+
signalConnection: SignalConnectionState;
|
|
2022
|
+
streaming: StreamingState;
|
|
2023
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2024
|
+
}) => boolean) & {
|
|
2025
|
+
clearCache: () => void;
|
|
2026
|
+
resultsCount: () => number;
|
|
2027
|
+
resetResultsCount: () => void;
|
|
2028
|
+
} & {
|
|
2029
|
+
resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: "" | "connecting" | "connected" | "reconnect" | "disconnected") => boolean;
|
|
2030
|
+
memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: "" | "connecting" | "connected" | "reconnect" | "disconnected") => boolean) & {
|
|
2031
|
+
clearCache: () => void;
|
|
2032
|
+
resultsCount: () => number;
|
|
2033
|
+
resetResultsCount: () => void;
|
|
2034
|
+
};
|
|
2035
|
+
lastResult: () => boolean;
|
|
2036
|
+
dependencies: [(state: {
|
|
2037
|
+
app: AppState;
|
|
2038
|
+
chat: ChatState;
|
|
2039
|
+
cloudRecording: CloudRecordingState;
|
|
2040
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2041
|
+
localMedia: LocalMediaState;
|
|
2042
|
+
localParticipant: LocalParticipantState;
|
|
2043
|
+
localScreenshare: LocalScreenshareState;
|
|
2044
|
+
organization: OrganizationState;
|
|
2045
|
+
remoteParticipants: RemoteParticipantState;
|
|
2046
|
+
roomConnection: RoomConnectionState;
|
|
2047
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2048
|
+
rtcConnection: RtcConnectionState;
|
|
2049
|
+
signalConnection: SignalConnectionState;
|
|
2050
|
+
streaming: StreamingState;
|
|
2051
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2052
|
+
}) => boolean, (state: RootState) => "" | "connecting" | "connected" | "reconnect" | "disconnected"];
|
|
2053
|
+
recomputations: () => number;
|
|
2054
|
+
resetRecomputations: () => void;
|
|
2055
|
+
dependencyRecomputations: () => number;
|
|
2056
|
+
resetDependencyRecomputations: () => void;
|
|
2057
|
+
} & {
|
|
2058
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
2059
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
2060
|
+
};
|
|
2061
|
+
declare const selectShouldIdentifyDevice: ((state: {
|
|
2062
|
+
app: AppState;
|
|
2063
|
+
chat: ChatState;
|
|
2064
|
+
cloudRecording: CloudRecordingState;
|
|
2065
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2066
|
+
localMedia: LocalMediaState;
|
|
2067
|
+
localParticipant: LocalParticipantState;
|
|
2068
|
+
localScreenshare: LocalScreenshareState;
|
|
2069
|
+
organization: OrganizationState;
|
|
2070
|
+
remoteParticipants: RemoteParticipantState;
|
|
2071
|
+
roomConnection: RoomConnectionState;
|
|
2072
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2073
|
+
rtcConnection: RtcConnectionState;
|
|
2074
|
+
signalConnection: SignalConnectionState;
|
|
2075
|
+
streaming: StreamingState;
|
|
2076
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2077
|
+
}) => boolean) & {
|
|
2078
|
+
clearCache: () => void;
|
|
2079
|
+
resultsCount: () => number;
|
|
2080
|
+
resetResultsCount: () => void;
|
|
2081
|
+
} & {
|
|
2082
|
+
resultFunc: (resultFuncArgs_0: DeviceCredentialsState, resultFuncArgs_1: "" | "connecting" | "connected" | "reconnect" | "disconnected", resultFuncArgs_2: boolean, resultFuncArgs_3: boolean) => boolean;
|
|
2083
|
+
memoizedResultFunc: ((resultFuncArgs_0: DeviceCredentialsState, resultFuncArgs_1: "" | "connecting" | "connected" | "reconnect" | "disconnected", resultFuncArgs_2: boolean, resultFuncArgs_3: boolean) => boolean) & {
|
|
2084
|
+
clearCache: () => void;
|
|
2085
|
+
resultsCount: () => number;
|
|
2086
|
+
resetResultsCount: () => void;
|
|
2087
|
+
};
|
|
2088
|
+
lastResult: () => boolean;
|
|
2089
|
+
dependencies: [(state: {
|
|
2090
|
+
app: AppState;
|
|
2091
|
+
chat: ChatState;
|
|
2092
|
+
cloudRecording: CloudRecordingState;
|
|
2093
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2094
|
+
localMedia: LocalMediaState;
|
|
2095
|
+
localParticipant: LocalParticipantState;
|
|
2096
|
+
localScreenshare: LocalScreenshareState;
|
|
2097
|
+
organization: OrganizationState;
|
|
2098
|
+
remoteParticipants: RemoteParticipantState;
|
|
2099
|
+
roomConnection: RoomConnectionState;
|
|
2100
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2101
|
+
rtcConnection: RtcConnectionState;
|
|
2102
|
+
signalConnection: SignalConnectionState;
|
|
2103
|
+
streaming: StreamingState;
|
|
2104
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2105
|
+
}) => DeviceCredentialsState, (state: RootState) => "" | "connecting" | "connected" | "reconnect" | "disconnected", (state: RootState) => boolean, (state: RootState) => boolean];
|
|
2106
|
+
recomputations: () => number;
|
|
2107
|
+
resetRecomputations: () => void;
|
|
2108
|
+
dependencyRecomputations: () => number;
|
|
2109
|
+
resetDependencyRecomputations: () => void;
|
|
2110
|
+
} & {
|
|
2111
|
+
argsMemoize: typeof reselect.weakMapMemoize;
|
|
2112
|
+
memoize: typeof reselect.weakMapMemoize;
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
declare function createServices(): {
|
|
2116
|
+
credentialsService: CredentialsService;
|
|
2117
|
+
apiClient: ApiClient;
|
|
2118
|
+
organizationService: OrganizationService;
|
|
2119
|
+
fetchOrganizationFromRoomUrl: (roomUrl: string) => Promise<Organization | null>;
|
|
2120
|
+
};
|
|
2121
|
+
|
|
2122
|
+
declare const rootReducer: redux.Reducer<{
|
|
2123
|
+
app: AppState;
|
|
2124
|
+
chat: ChatState;
|
|
2125
|
+
cloudRecording: CloudRecordingState;
|
|
2126
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2127
|
+
localMedia: LocalMediaState;
|
|
2128
|
+
localParticipant: LocalParticipantState;
|
|
2129
|
+
localScreenshare: LocalScreenshareState;
|
|
2130
|
+
organization: OrganizationState;
|
|
2131
|
+
remoteParticipants: RemoteParticipantState;
|
|
2132
|
+
roomConnection: RoomConnectionState;
|
|
2133
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2134
|
+
rtcConnection: RtcConnectionState;
|
|
2135
|
+
signalConnection: SignalConnectionState;
|
|
2136
|
+
streaming: StreamingState;
|
|
2137
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2138
|
+
}, redux.UnknownAction, Partial<{
|
|
2139
|
+
app: AppState | undefined;
|
|
2140
|
+
chat: ChatState | undefined;
|
|
2141
|
+
cloudRecording: CloudRecordingState | undefined;
|
|
2142
|
+
deviceCredentials: DeviceCredentialsState | undefined;
|
|
2143
|
+
localMedia: LocalMediaState | undefined;
|
|
2144
|
+
localParticipant: LocalParticipantState | undefined;
|
|
2145
|
+
localScreenshare: LocalScreenshareState | undefined;
|
|
2146
|
+
organization: OrganizationState | undefined;
|
|
2147
|
+
remoteParticipants: RemoteParticipantState | undefined;
|
|
2148
|
+
roomConnection: RoomConnectionState | undefined;
|
|
2149
|
+
rtcAnalytics: rtcAnalyticsState | undefined;
|
|
2150
|
+
rtcConnection: RtcConnectionState | undefined;
|
|
2151
|
+
signalConnection: SignalConnectionState | undefined;
|
|
2152
|
+
streaming: StreamingState | undefined;
|
|
2153
|
+
waitingParticipants: WaitingParticipantsState | undefined;
|
|
2154
|
+
}>>;
|
|
2155
|
+
declare const createStore: ({ preloadedState, injectServices, }: {
|
|
2156
|
+
preloadedState?: Partial<{
|
|
2157
|
+
app: AppState;
|
|
2158
|
+
chat: ChatState;
|
|
2159
|
+
cloudRecording: CloudRecordingState;
|
|
2160
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2161
|
+
localMedia: LocalMediaState;
|
|
2162
|
+
localParticipant: LocalParticipantState;
|
|
2163
|
+
localScreenshare: LocalScreenshareState;
|
|
2164
|
+
organization: OrganizationState;
|
|
2165
|
+
remoteParticipants: RemoteParticipantState;
|
|
2166
|
+
roomConnection: RoomConnectionState;
|
|
2167
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2168
|
+
rtcConnection: RtcConnectionState;
|
|
2169
|
+
signalConnection: SignalConnectionState;
|
|
2170
|
+
streaming: StreamingState;
|
|
2171
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2172
|
+
}> | undefined;
|
|
2173
|
+
injectServices: ReturnType<typeof createServices>;
|
|
2174
|
+
}) => _reduxjs_toolkit.EnhancedStore<{
|
|
2175
|
+
app: AppState;
|
|
2176
|
+
chat: ChatState;
|
|
2177
|
+
cloudRecording: CloudRecordingState;
|
|
2178
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2179
|
+
localMedia: LocalMediaState;
|
|
2180
|
+
localParticipant: LocalParticipantState;
|
|
2181
|
+
localScreenshare: LocalScreenshareState;
|
|
2182
|
+
organization: OrganizationState;
|
|
2183
|
+
remoteParticipants: RemoteParticipantState;
|
|
2184
|
+
roomConnection: RoomConnectionState;
|
|
2185
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2186
|
+
rtcConnection: RtcConnectionState;
|
|
2187
|
+
signalConnection: SignalConnectionState;
|
|
2188
|
+
streaming: StreamingState;
|
|
2189
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2190
|
+
}, redux.UnknownAction, _reduxjs_toolkit.Tuple<[redux.StoreEnhancer<{
|
|
2191
|
+
dispatch: ((action: redux.Action<"listenerMiddleware/add">) => _reduxjs_toolkit.UnsubscribeListener) & redux_thunk.ThunkDispatch<{
|
|
2192
|
+
app: AppState;
|
|
2193
|
+
chat: ChatState;
|
|
2194
|
+
cloudRecording: CloudRecordingState;
|
|
2195
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2196
|
+
localMedia: LocalMediaState;
|
|
2197
|
+
localParticipant: LocalParticipantState;
|
|
2198
|
+
localScreenshare: LocalScreenshareState;
|
|
2199
|
+
organization: OrganizationState;
|
|
2200
|
+
remoteParticipants: RemoteParticipantState;
|
|
2201
|
+
roomConnection: RoomConnectionState;
|
|
2202
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2203
|
+
rtcConnection: RtcConnectionState;
|
|
2204
|
+
signalConnection: SignalConnectionState;
|
|
2205
|
+
streaming: StreamingState;
|
|
2206
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2207
|
+
}, {
|
|
2208
|
+
services: {
|
|
2209
|
+
credentialsService: CredentialsService;
|
|
2210
|
+
apiClient: ApiClient;
|
|
2211
|
+
organizationService: OrganizationService;
|
|
2212
|
+
fetchOrganizationFromRoomUrl: (roomUrl: string) => Promise<Organization | null>;
|
|
2213
|
+
};
|
|
2214
|
+
}, redux.UnknownAction>;
|
|
2215
|
+
}>, redux.StoreEnhancer]>>;
|
|
2216
|
+
type RootReducer = typeof rootReducer;
|
|
2217
|
+
type RootState = ReturnType<typeof rootReducer>;
|
|
2218
|
+
type AppDispatch = ReturnType<typeof createStore>["dispatch"];
|
|
2219
|
+
type Store = ReturnType<typeof createStore>;
|
|
2220
|
+
declare const observeStore: <T>(store: Store, select: (state: RootState) => T, onChange: (result: T) => void) => redux.Unsubscribe;
|
|
2221
|
+
|
|
2222
|
+
type ThunkConfig = {
|
|
2223
|
+
state: RootState;
|
|
2224
|
+
dispatch: AppDispatch;
|
|
2225
|
+
extra: {
|
|
2226
|
+
services: ReturnType<typeof createServices>;
|
|
2227
|
+
};
|
|
2228
|
+
};
|
|
2229
|
+
declare function createAppAsyncThunk<ReturnType, ArgType = undefined>(typePrefix: string, payloadCreator: AsyncThunkPayloadCreator<ReturnType, ArgType, ThunkConfig>): AsyncThunk<ReturnType, ArgType, ThunkConfig>;
|
|
2230
|
+
type AppThunk<R = void> = (dispatch: AppDispatch, getState: () => RootState, extra: {
|
|
2231
|
+
services: ReturnType<typeof createServices>;
|
|
2232
|
+
}) => R;
|
|
2233
|
+
declare function createAppThunk<A = void>(thunk: (args: A) => AppThunk): (args: A) => AppThunk;
|
|
2234
|
+
|
|
2235
|
+
declare const listenerMiddleware: _reduxjs_toolkit.ListenerMiddlewareInstance<unknown, redux_thunk.ThunkDispatch<unknown, unknown, redux.UnknownAction>, unknown>;
|
|
2236
|
+
type AppStartListening = TypedStartListening<RootState, AppDispatch, ReturnType<typeof createServices>>;
|
|
2237
|
+
declare const startAppListening: AppStartListening;
|
|
2238
|
+
declare const addAppListener: TypedAddListener<{
|
|
2239
|
+
app: AppState;
|
|
2240
|
+
chat: ChatState;
|
|
2241
|
+
cloudRecording: CloudRecordingState;
|
|
2242
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2243
|
+
localMedia: LocalMediaState;
|
|
2244
|
+
localParticipant: LocalParticipantState;
|
|
2245
|
+
localScreenshare: LocalScreenshareState;
|
|
2246
|
+
organization: OrganizationState;
|
|
2247
|
+
remoteParticipants: RemoteParticipantState;
|
|
2248
|
+
roomConnection: RoomConnectionState;
|
|
2249
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2250
|
+
rtcConnection: RtcConnectionState;
|
|
2251
|
+
signalConnection: SignalConnectionState;
|
|
2252
|
+
streaming: StreamingState;
|
|
2253
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2254
|
+
}, ((action: redux.Action<"listenerMiddleware/add">) => _reduxjs_toolkit.UnsubscribeListener) & redux_thunk.ThunkDispatch<{
|
|
2255
|
+
app: AppState;
|
|
2256
|
+
chat: ChatState;
|
|
2257
|
+
cloudRecording: CloudRecordingState;
|
|
2258
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2259
|
+
localMedia: LocalMediaState;
|
|
2260
|
+
localParticipant: LocalParticipantState;
|
|
2261
|
+
localScreenshare: LocalScreenshareState;
|
|
2262
|
+
organization: OrganizationState;
|
|
2263
|
+
remoteParticipants: RemoteParticipantState;
|
|
2264
|
+
roomConnection: RoomConnectionState;
|
|
2265
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2266
|
+
rtcConnection: RtcConnectionState;
|
|
2267
|
+
signalConnection: SignalConnectionState;
|
|
2268
|
+
streaming: StreamingState;
|
|
2269
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2270
|
+
}, {
|
|
2271
|
+
services: {
|
|
2272
|
+
credentialsService: CredentialsService;
|
|
2273
|
+
apiClient: ApiClient;
|
|
2274
|
+
organizationService: OrganizationService;
|
|
2275
|
+
fetchOrganizationFromRoomUrl: (roomUrl: string) => Promise<Organization | null>;
|
|
2276
|
+
};
|
|
2277
|
+
}, redux.UnknownAction> & redux.Dispatch<redux.UnknownAction>>;
|
|
2278
|
+
type SelectorResults<Selectors extends Selector<RootState, unknown>[]> = {
|
|
2279
|
+
[K in keyof Selectors]: Selectors[K] extends Selector<RootState, infer R> ? R : never;
|
|
2280
|
+
};
|
|
2281
|
+
/**
|
|
2282
|
+
* Creates a reactor that will be called whenever the provided selectors change.
|
|
2283
|
+
* Every reactor needs to update a piece of state that it depends on, to avoid infinite loops.
|
|
2284
|
+
* example:
|
|
2285
|
+
* ```ts
|
|
2286
|
+
* createReactor(
|
|
2287
|
+
* [selectAppWantsToJoin, selectDeviceCredentialsRaw],
|
|
2288
|
+
* ({ dispatch }, wantsToJoin, deviceCredentialsRaw) => {
|
|
2289
|
+
* if (wantsToJoin && deviceCredentialsRaw.data) {
|
|
2290
|
+
* dispatch(doSignalIdentifyDevice({ deviceCredentials: deviceCredentialsRaw.data }));
|
|
2291
|
+
* }
|
|
2292
|
+
* });
|
|
2293
|
+
* ```
|
|
2294
|
+
* @param selectors. The selectors to be used to check if the state has changed.
|
|
2295
|
+
* @param callback. The callback to be called on every action. The first argument is the listenerApi, the second argument is the result of the selectors.
|
|
2296
|
+
* @returns The unsubscribe function.
|
|
2297
|
+
*/
|
|
2298
|
+
declare const createReactor: <Selectors extends Selector<{
|
|
2299
|
+
app: AppState;
|
|
2300
|
+
chat: ChatState;
|
|
2301
|
+
cloudRecording: CloudRecordingState;
|
|
2302
|
+
deviceCredentials: DeviceCredentialsState;
|
|
2303
|
+
localMedia: LocalMediaState;
|
|
2304
|
+
localParticipant: LocalParticipantState;
|
|
2305
|
+
localScreenshare: LocalScreenshareState;
|
|
2306
|
+
organization: OrganizationState;
|
|
2307
|
+
remoteParticipants: RemoteParticipantState;
|
|
2308
|
+
roomConnection: RoomConnectionState;
|
|
2309
|
+
rtcAnalytics: rtcAnalyticsState;
|
|
2310
|
+
rtcConnection: RtcConnectionState;
|
|
2311
|
+
signalConnection: SignalConnectionState;
|
|
2312
|
+
streaming: StreamingState;
|
|
2313
|
+
waitingParticipants: WaitingParticipantsState;
|
|
2314
|
+
}, unknown>[]>(selectors: readonly [...Selectors], callback: (api: {
|
|
2315
|
+
dispatch: AppDispatch;
|
|
2316
|
+
getState: () => RootState;
|
|
2317
|
+
extra: ReturnType<typeof createServices>;
|
|
2318
|
+
}, ...selectorValues: SelectorResults<Selectors>) => void | Promise<void>) => _reduxjs_toolkit.UnsubscribeListener;
|
|
2319
|
+
|
|
2320
|
+
export { type AppDispatch, type AppStartListening, type AppState, type AppThunk, type ConnectionStatus, LocalParticipant, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, type RootReducer, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type ThunkConfig, type WaitingParticipant, addAppListener, appLeft, appSlice, createAppAsyncThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, deviceIdentified, deviceIdentifying, doAppJoin, doConnectRoom, doConnectRtc, doDisconnectRtc, doHandleAcceptStreams, doKnockRoom, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSignalDisconnect, doSignalIdentifyDevice, doSignalReconnect, doSignalSocketConnect, isAcceptingStreams, listenerMiddleware, observeStore, participantStreamAdded, participantStreamIdAdded, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, rootReducer, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, sdkVersion, selectAppDisplayName, selectAppExternalId, selectAppIsNodeSdk, selectAppRaw, selectAppRoomKey, selectAppRoomName, selectAppRoomUrl, selectAppSdkVersion, selectAppWantsToJoin, selectIsAcceptingStreams, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectStreamsToAccept, setRoomKey, signalConnectionSlice, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, streamStatusUpdated };
|