@webex/plugin-meetings 3.8.0-next.69 → 3.8.0-next.70

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.
@@ -27,384 +27,384 @@ import {
27
27
  } from '../constants';
28
28
  import ParameterError from '../common/errors/parameter';
29
29
 
30
- const MemberUtil: any = {};
31
-
32
- /**
33
- * @param {Object} participant - The locus participant object.
34
- * @returns {Boolean}
35
- */
36
- MemberUtil.canReclaimHost = (participant) => {
37
- if (!participant) {
38
- throw new ParameterError(
39
- 'canReclaimHostRole could not be processed, participant is undefined.'
40
- );
41
- }
42
-
43
- return participant.canReclaimHostRole || false;
44
- };
45
-
46
- /**
47
- * @param {Object} participant - The locus participant object.
48
- * @returns {[ServerRoleShape]}
49
- */
50
- MemberUtil.getControlsRoles = (participant: ParticipantWithRoles): Array<ServerRoleShape> =>
51
- participant?.controls?.role?.roles;
52
-
53
- /**
54
- * Checks if the participant has the brb status enabled.
55
- *
56
- * @param {ParticipantWithBrb} participant - The locus participant object.
57
- * @returns {boolean} - True if the participant has brb enabled, false otherwise.
58
- */
59
- MemberUtil.isBrb = (participant: ParticipantWithBrb): boolean =>
60
- participant.controls?.brb?.enabled || false;
61
-
62
- /**
63
- * @param {Object} participant - The locus participant object.
64
- * @param {ServerRoles} controlRole the search role
65
- * @returns {Boolean}
66
- */
67
- MemberUtil.hasRole = (participant: any, controlRole: ServerRoles): boolean =>
68
- MemberUtil.getControlsRoles(participant)?.some(
69
- (role) => role.type === controlRole && role.hasRole
70
- );
71
-
72
- /**
73
- * @param {Object} participant - The locus participant object.
74
- * @returns {Boolean}
75
- */
76
- MemberUtil.hasCohost = (participant: ParticipantWithRoles): boolean =>
77
- MemberUtil.hasRole(participant, ServerRoles.Cohost) || false;
78
-
79
- /**
80
- * @param {Object} participant - The locus participant object.
81
- * @returns {Boolean}
82
- */
83
- MemberUtil.hasModerator = (participant: ParticipantWithRoles): boolean =>
84
- MemberUtil.hasRole(participant, ServerRoles.Moderator) || false;
85
-
86
- /**
87
- * @param {Object} participant - The locus participant object.
88
- * @returns {Boolean}
89
- */
90
- MemberUtil.hasPresenter = (participant: ParticipantWithRoles): boolean =>
91
- MemberUtil.hasRole(participant, ServerRoles.Presenter) || false;
92
-
93
- /**
94
- * @param {Object} participant - The locus participant object.
95
- * @returns {IExternalRoles}
96
- */
97
- MemberUtil.extractControlRoles = (participant: ParticipantWithRoles): IExternalRoles => {
98
- const roles = {
99
- cohost: MemberUtil.hasCohost(participant),
100
- moderator: MemberUtil.hasModerator(participant),
101
- presenter: MemberUtil.hasPresenter(participant),
102
- };
103
-
104
- return roles;
105
- };
30
+ const MemberUtil = {
31
+ /**
32
+ * @param {Object} participant - The locus participant object.
33
+ * @returns {Boolean}
34
+ */
35
+ canReclaimHost: (participant) => {
36
+ if (!participant) {
37
+ throw new ParameterError(
38
+ 'canReclaimHostRole could not be processed, participant is undefined.'
39
+ );
40
+ }
106
41
 
107
- /**
108
- * @param {Object} participant - The locus participant object.
109
- * @returns {Boolean}
110
- */
111
- MemberUtil.isUser = (participant: any) => participant && participant.type === _USER_;
112
-
113
- MemberUtil.isModerator = (participant) => participant && participant.moderator;
114
-
115
- /**
116
- * @param {Object} participant - The locus participant object.
117
- * @returns {Boolean}
118
- */
119
- MemberUtil.isGuest = (participant: any) => participant && participant.guest;
120
-
121
- /**
122
- * @param {Object} participant - The locus participant object.
123
- * @returns {Boolean}
124
- */
125
- MemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;
126
-
127
- MemberUtil.isModeratorAssignmentProhibited = (participant) =>
128
- participant && participant.moderatorAssignmentNotAllowed;
129
-
130
- MemberUtil.isPresenterAssignmentProhibited = (participant) =>
131
- participant && participant.presenterAssignmentNotAllowed;
132
-
133
- /**
134
- * checks to see if the participant id is the same as the passed id
135
- * there are multiple ids that can be used
136
- * @param {Object} participant - The locus participant object.
137
- * @param {String} id
138
- * @returns {Boolean}
139
- */
140
- MemberUtil.isSame = (participant: any, id: string) =>
141
- participant && (participant.id === id || (participant.person && participant.person.id === id));
142
-
143
- /**
144
- * checks to see if the participant id is the same as the passed id for associated devices
145
- * there are multiple ids that can be used
146
- * @param {Object} participant - The locus participant object.
147
- * @param {String} id
148
- * @returns {Boolean}
149
- */
150
- MemberUtil.isAssociatedSame = (participant: any, id: string) =>
151
- participant &&
152
- participant.associatedUsers &&
153
- participant.associatedUsers.some(
154
- (user) => user.id === id || (user.person && user.person.id === id)
155
- );
156
-
157
- /**
158
- * @param {Object} participant - The locus participant object.
159
- * @param {Boolean} isGuest
160
- * @param {String} status
161
- * @returns {Boolean}
162
- */
163
- MemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string): boolean =>
164
- participant &&
165
- participant.guest &&
166
- ((participant.devices &&
167
- participant.devices[0] &&
168
- participant.devices[0].intent &&
169
- participant.devices[0].intent.type === _WAIT_ &&
170
- // @ts-ignore
171
- isGuest &&
172
- status === _IN_LOBBY_) ||
173
- // @ts-ignore
174
- !status === _IN_MEETING_);
175
-
176
- /**
177
- * @param {Object} participant - The locus participant object.
178
- * @returns {Boolean}
179
- */
180
- MemberUtil.isAudioMuted = (participant: any) => {
181
- if (!participant) {
182
- throw new ParameterError('Audio could not be processed, participant is undefined.');
183
- }
184
-
185
- return MemberUtil.isMuted(participant, AUDIO_STATUS, AUDIO);
186
- };
42
+ return participant.canReclaimHostRole || false;
43
+ },
44
+
45
+ /**
46
+ * @param {Object} participant - The locus participant object.
47
+ * @returns {[ServerRoleShape]}
48
+ */
49
+ getControlsRoles: (participant: ParticipantWithRoles): Array<ServerRoleShape> =>
50
+ participant?.controls?.role?.roles,
51
+
52
+ /**
53
+ * Checks if the participant has the brb status enabled.
54
+ *
55
+ * @param {ParticipantWithBrb} participant - The locus participant object.
56
+ * @returns {boolean} - True if the participant has brb enabled, false otherwise.
57
+ */
58
+ isBrb: (participant: ParticipantWithBrb): boolean => participant.controls?.brb?.enabled || false,
59
+
60
+ /**
61
+ * @param {Object} participant - The locus participant object.
62
+ * @param {ServerRoles} controlRole the search role
63
+ * @returns {Boolean}
64
+ */
65
+ hasRole: (participant: any, controlRole: ServerRoles): boolean =>
66
+ MemberUtil.getControlsRoles(participant)?.some(
67
+ (role) => role.type === controlRole && role.hasRole
68
+ ),
69
+
70
+ /**
71
+ * @param {Object} participant - The locus participant object.
72
+ * @returns {Boolean}
73
+ */
74
+ hasCohost: (participant: ParticipantWithRoles): boolean =>
75
+ MemberUtil.hasRole(participant, ServerRoles.Cohost) || false,
76
+
77
+ /**
78
+ * @param {Object} participant - The locus participant object.
79
+ * @returns {Boolean}
80
+ */
81
+ hasModerator: (participant: ParticipantWithRoles): boolean =>
82
+ MemberUtil.hasRole(participant, ServerRoles.Moderator) || false,
83
+
84
+ /**
85
+ * @param {Object} participant - The locus participant object.
86
+ * @returns {Boolean}
87
+ */
88
+ hasPresenter: (participant: ParticipantWithRoles): boolean =>
89
+ MemberUtil.hasRole(participant, ServerRoles.Presenter) || false,
90
+
91
+ /**
92
+ * @param {Object} participant - The locus participant object.
93
+ * @returns {IExternalRoles}
94
+ */
95
+ extractControlRoles: (participant: ParticipantWithRoles): IExternalRoles => {
96
+ const roles = {
97
+ cohost: MemberUtil.hasCohost(participant),
98
+ moderator: MemberUtil.hasModerator(participant),
99
+ presenter: MemberUtil.hasPresenter(participant),
100
+ };
101
+
102
+ return roles;
103
+ },
104
+
105
+ /**
106
+ * @param {Object} participant - The locus participant object.
107
+ * @returns {Boolean}
108
+ */
109
+ isUser: (participant: any) => participant && participant.type === _USER_,
110
+
111
+ isModerator: (participant) => participant && participant.moderator,
112
+
113
+ /**
114
+ * @param {Object} participant - The locus participant object.
115
+ * @returns {Boolean}
116
+ */
117
+ isGuest: (participant: any) => participant && participant.guest,
118
+
119
+ /**
120
+ * @param {Object} participant - The locus participant object.
121
+ * @returns {Boolean}
122
+ */
123
+ isDevice: (participant: any) => participant && participant.type === _RESOURCE_ROOM_,
124
+
125
+ isModeratorAssignmentProhibited: (participant) =>
126
+ participant && participant.moderatorAssignmentNotAllowed,
127
+
128
+ isPresenterAssignmentProhibited: (participant) =>
129
+ participant && participant.presenterAssignmentNotAllowed,
130
+
131
+ /**
132
+ * checks to see if the participant id is the same as the passed id
133
+ * there are multiple ids that can be used
134
+ * @param {Object} participant - The locus participant object.
135
+ * @param {String} id
136
+ * @returns {Boolean}
137
+ */
138
+ isSame: (participant: any, id: string) =>
139
+ participant && (participant.id === id || (participant.person && participant.person.id === id)),
140
+
141
+ /**
142
+ * checks to see if the participant id is the same as the passed id for associated devices
143
+ * there are multiple ids that can be used
144
+ * @param {Object} participant - The locus participant object.
145
+ * @param {String} id
146
+ * @returns {Boolean}
147
+ */
148
+ isAssociatedSame: (participant: any, id: string) =>
149
+ participant &&
150
+ participant.associatedUsers &&
151
+ participant.associatedUsers.some(
152
+ (user) => user.id === id || (user.person && user.person.id === id)
153
+ ),
154
+
155
+ /**
156
+ * @param {Object} participant - The locus participant object.
157
+ * @param {Boolean} isGuest
158
+ * @param {String} status
159
+ * @returns {Boolean}
160
+ */
161
+ isNotAdmitted: (participant: any, isGuest: boolean, status: string): boolean =>
162
+ participant &&
163
+ participant.guest &&
164
+ ((participant.devices &&
165
+ participant.devices[0] &&
166
+ participant.devices[0].intent &&
167
+ participant.devices[0].intent.type === _WAIT_ &&
168
+ // @ts-ignore
169
+ isGuest &&
170
+ status === _IN_LOBBY_) ||
171
+ // @ts-ignore
172
+ !status === _IN_MEETING_),
173
+
174
+ /**
175
+ * @param {Object} participant - The locus participant object.
176
+ * @returns {Boolean}
177
+ */
178
+ isAudioMuted: (participant: any) => {
179
+ if (!participant) {
180
+ throw new ParameterError('Audio could not be processed, participant is undefined.');
181
+ }
187
182
 
188
- /**
189
- * @param {Object} participant - The locus participant object.
190
- * @returns {Boolean}
191
- */
192
- MemberUtil.isVideoMuted = (participant: any): boolean => {
193
- if (!participant) {
194
- throw new ParameterError('Video could not be processed, participant is undefined.');
195
- }
183
+ return MemberUtil.isMuted(participant, AUDIO_STATUS, AUDIO);
184
+ },
196
185
 
197
- return MemberUtil.isMuted(participant, VIDEO_STATUS, VIDEO);
198
- };
186
+ /**
187
+ * @param {Object} participant - The locus participant object.
188
+ * @returns {Boolean}
189
+ */
190
+ isVideoMuted: (participant: any): boolean => {
191
+ if (!participant) {
192
+ throw new ParameterError('Video could not be processed, participant is undefined.');
193
+ }
199
194
 
200
- /**
201
- * @param {Object} participant - The locus participant object.
202
- * @returns {Boolean}
203
- */
204
- MemberUtil.isHandRaised = (participant: any) => {
205
- if (!participant) {
206
- throw new ParameterError('Raise hand could not be processed, participant is undefined.');
207
- }
195
+ return MemberUtil.isMuted(participant, VIDEO_STATUS, VIDEO);
196
+ },
208
197
 
209
- return participant.controls?.hand?.raised || false;
210
- };
198
+ /**
199
+ * @param {Object} participant - The locus participant object.
200
+ * @returns {Boolean}
201
+ */
202
+ isHandRaised: (participant: any) => {
203
+ if (!participant) {
204
+ throw new ParameterError('Raise hand could not be processed, participant is undefined.');
205
+ }
211
206
 
212
- /**
213
- * @param {Object} participant - The locus participant object.
214
- * @returns {Boolean}
215
- */
216
- MemberUtil.isBreakoutsSupported = (participant) => {
217
- if (!participant) {
218
- throw new ParameterError('Breakout support could not be processed, participant is undefined.');
219
- }
207
+ return participant.controls?.hand?.raised || false;
208
+ },
209
+
210
+ /**
211
+ * @param {Object} participant - The locus participant object.
212
+ * @returns {Boolean}
213
+ */
214
+ isBreakoutsSupported: (participant) => {
215
+ if (!participant) {
216
+ throw new ParameterError(
217
+ 'Breakout support could not be processed, participant is undefined.'
218
+ );
219
+ }
220
220
 
221
- return !participant.doesNotSupportBreakouts;
222
- };
221
+ return !participant.doesNotSupportBreakouts;
222
+ },
223
+
224
+ /**
225
+ * @param {Object} participant - The locus participant object.
226
+ * @returns {Boolean}
227
+ */
228
+ isInterpretationSupported: (participant) => {
229
+ if (!participant) {
230
+ throw new ParameterError(
231
+ 'Interpretation support could not be processed, participant is undefined.'
232
+ );
233
+ }
223
234
 
224
- /**
225
- * @param {Object} participant - The locus participant object.
226
- * @returns {Boolean}
227
- */
228
- MemberUtil.isInterpretationSupported = (participant) => {
229
- if (!participant) {
230
- throw new ParameterError(
231
- 'Interpretation support could not be processed, participant is undefined.'
232
- );
233
- }
234
-
235
- return !participant.doesNotSupportSiInterpreter;
236
- };
235
+ return !participant.doesNotSupportSiInterpreter;
236
+ },
237
+
238
+ /**
239
+ * @param {Object} participant - The locus participant object.
240
+ * @returns {Boolean}
241
+ */
242
+ isLiveAnnotationSupported: (participant) => {
243
+ if (!participant) {
244
+ throw new ParameterError(
245
+ 'LiveAnnotation support could not be processed, participant is undefined.'
246
+ );
247
+ }
237
248
 
238
- /**
239
- * @param {Object} participant - The locus participant object.
240
- * @returns {Boolean}
241
- */
242
- MemberUtil.isLiveAnnotationSupported = (participant) => {
243
- if (!participant) {
244
- throw new ParameterError(
245
- 'LiveAnnotation support could not be processed, participant is undefined.'
246
- );
247
- }
248
-
249
- return !participant.annotatorAssignmentNotAllowed;
250
- };
249
+ return !participant.annotatorAssignmentNotAllowed;
250
+ },
251
+
252
+ /**
253
+ * utility method for audio/video muted status
254
+ * @param {any} participant
255
+ * @param {String} statusAccessor
256
+ * @param {String} controlsAccessor
257
+ * @returns {Boolean | undefined}
258
+ */
259
+ isMuted: (participant: any, statusAccessor: string, controlsAccessor: string) => {
260
+ // check remote mute
261
+ const remoteMute = participant?.controls?.[controlsAccessor]?.muted;
262
+ if (remoteMute === true) {
263
+ return true;
264
+ }
251
265
 
252
- /**
253
- * utility method for audio/video muted status
254
- * @param {any} participant
255
- * @param {String} statusAccessor
256
- * @param {String} controlsAccessor
257
- * @returns {Boolean | undefined}
258
- */
259
- MemberUtil.isMuted = (participant: any, statusAccessor: string, controlsAccessor: string) => {
260
- // check remote mute
261
- const remoteMute = participant?.controls?.[controlsAccessor]?.muted;
262
- if (remoteMute === true) {
263
- return true;
264
- }
265
-
266
- // check local mute
267
- const localStatus = participant?.status?.[statusAccessor];
268
- if (localStatus === _RECEIVE_ONLY_) {
269
- return true;
270
- }
271
- if (localStatus === _SEND_RECEIVE_) {
272
- return false;
273
- }
266
+ // check local mute
267
+ const localStatus = participant?.status?.[statusAccessor];
268
+ if (localStatus === _RECEIVE_ONLY_) {
269
+ return true;
270
+ }
271
+ if (localStatus === _SEND_RECEIVE_) {
272
+ return false;
273
+ }
274
274
 
275
- return remoteMute;
276
- };
275
+ return remoteMute;
276
+ },
277
+
278
+ /**
279
+ * utility method for getting the recording member for later comparison
280
+ * @param {Object} controls
281
+ * @returns {String|null}
282
+ */
283
+ getRecordingMember: (controls: any) => {
284
+ if (!controls) {
285
+ return null;
286
+ }
287
+ if (controls.record && controls.record.recording && controls.record.meta) {
288
+ return controls.record.meta.modifiedBy;
289
+ }
277
290
 
278
- /**
279
- * utility method for getting the recording member for later comparison
280
- * @param {Object} controls
281
- * @returns {String|null}
282
- */
283
- MemberUtil.getRecordingMember = (controls: any) => {
284
- if (!controls) {
285
291
  return null;
286
- }
287
- if (controls.record && controls.record.recording && controls.record.meta) {
288
- return controls.record.meta.modifiedBy;
289
- }
292
+ },
293
+
294
+ /**
295
+ * @param {Object} participant - The locus participant object.
296
+ * @returns {Boolean}
297
+ */
298
+ isRecording: (participant: any) => {
299
+ if (!participant) {
300
+ throw new ParameterError('Recording could not be processed, participant is undefined.');
301
+ }
302
+ if (participant.controls && participant.controls.localRecord) {
303
+ return participant.controls.localRecord.recording;
304
+ }
290
305
 
291
- return null;
292
- };
306
+ return false;
307
+ },
293
308
 
294
- /**
295
- * @param {Object} participant - The locus participant object.
296
- * @returns {Boolean}
297
- */
298
- MemberUtil.isRecording = (participant: any) => {
299
- if (!participant) {
300
- throw new ParameterError('Recording could not be processed, participant is undefined.');
301
- }
302
- if (participant.controls && participant.controls.localRecord) {
303
- return participant.controls.localRecord.recording;
304
- }
305
-
306
- return false;
307
- };
309
+ isRemovable: (isSelf, isGuest, isInMeeting, type) => {
310
+ if (isGuest || isSelf) {
311
+ return false;
312
+ }
313
+ if (type === _CALL_) {
314
+ return false;
315
+ }
316
+ if (isInMeeting) {
317
+ return true;
318
+ }
308
319
 
309
- MemberUtil.isRemovable = (isSelf, isGuest, isInMeeting, type) => {
310
- if (isGuest || isSelf) {
311
- return false;
312
- }
313
- if (type === _CALL_) {
314
320
  return false;
315
- }
316
- if (isInMeeting) {
317
- return true;
318
- }
321
+ },
319
322
 
320
- return false;
321
- };
323
+ isMutable: (isSelf, isDevice, isInMeeting, isMuted, type) => {
324
+ if (!isInMeeting) {
325
+ return false;
326
+ }
327
+ if (isMuted) {
328
+ return false;
329
+ }
330
+ if (type === _CALL_) {
331
+ return false;
332
+ }
333
+ if (isSelf || isDevice) {
334
+ return true;
335
+ }
322
336
 
323
- MemberUtil.isMutable = (isSelf, isDevice, isInMeeting, isMuted, type) => {
324
- if (!isInMeeting) {
325
- return false;
326
- }
327
- if (isMuted) {
328
337
  return false;
329
- }
330
- if (type === _CALL_) {
331
- return false;
332
- }
333
- if (isSelf || isDevice) {
334
- return true;
335
- }
338
+ },
339
+
340
+ /**
341
+ * @param {Object} participant - The locus participant object.
342
+ * @returns {String}
343
+ */
344
+ extractStatus: (participant: any) => {
345
+ if (!(participant && participant.devices && participant.devices.length)) {
346
+ return _NOT_IN_MEETING_;
347
+ }
348
+ if (participant.state === _JOINED_) {
349
+ return _IN_MEETING_;
350
+ }
351
+ if (participant.state === _IDLE_) {
352
+ if (participant.devices && participant.devices.length > 0) {
353
+ const foundDevice = participant.devices.find(
354
+ (device) =>
355
+ device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)
356
+ );
336
357
 
337
- return false;
338
- };
358
+ return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;
359
+ }
339
360
 
340
- /**
341
- * @param {Object} participant - The locus participant object.
342
- * @returns {String}
343
- */
344
- MemberUtil.extractStatus = (participant: any) => {
345
- if (!(participant && participant.devices && participant.devices.length)) {
346
- return _NOT_IN_MEETING_;
347
- }
348
- if (participant.state === _JOINED_) {
349
- return _IN_MEETING_;
350
- }
351
- if (participant.state === _IDLE_) {
352
- if (participant.devices && participant.devices.length > 0) {
353
- const foundDevice = participant.devices.find(
354
- (device) =>
355
- device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)
356
- );
357
-
358
- return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;
361
+ return _NOT_IN_MEETING_;
362
+ }
363
+ if (participant.state === _LEFT_) {
364
+ return _NOT_IN_MEETING_;
359
365
  }
360
366
 
361
367
  return _NOT_IN_MEETING_;
362
- }
363
- if (participant.state === _LEFT_) {
364
- return _NOT_IN_MEETING_;
365
- }
366
-
367
- return _NOT_IN_MEETING_;
368
- };
369
-
370
- /**
371
- * @param {Object} participant - The locus participant object.
372
- * @returns {String}
373
- */
374
- MemberUtil.extractId = (participant: any) => {
375
- if (participant) {
376
- return participant.id;
377
- }
378
-
379
- return null;
380
- };
368
+ },
369
+
370
+ /**
371
+ * @param {Object} participant - The locus participant object.
372
+ * @returns {String}
373
+ */
374
+ extractId: (participant: any) => {
375
+ if (participant) {
376
+ return participant.id;
377
+ }
381
378
 
382
- /**
383
- * extracts the media status from nested participant object
384
- * @param {Object} participant - The locus participant object.
385
- * @returns {Object}
386
- */
387
- MemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {
388
- if (!participant) {
389
- throw new ParameterError('Media status could not be extracted, participant is undefined.');
390
- }
391
-
392
- return {
393
- audio: participant.status?.audioStatus,
394
- video: participant.status?.videoStatus,
395
- };
396
- };
379
+ return null;
380
+ },
381
+
382
+ /**
383
+ * extracts the media status from nested participant object
384
+ * @param {Object} participant - The locus participant object.
385
+ * @returns {Object}
386
+ */
387
+ extractMediaStatus: (participant: any): IMediaStatus => {
388
+ if (!participant) {
389
+ throw new ParameterError('Media status could not be extracted, participant is undefined.');
390
+ }
397
391
 
398
- /**
399
- * @param {Object} participant - The locus participant object.
400
- * @returns {String}
401
- */
402
- MemberUtil.extractName = (participant: any) => {
403
- if (participant && participant.person) {
404
- return participant.person.name;
405
- }
392
+ return {
393
+ audio: participant.status?.audioStatus,
394
+ video: participant.status?.videoStatus,
395
+ };
396
+ },
397
+
398
+ /**
399
+ * @param {Object} participant - The locus participant object.
400
+ * @returns {String}
401
+ */
402
+ extractName: (participant: any) => {
403
+ if (participant && participant.person) {
404
+ return participant.person.name;
405
+ }
406
406
 
407
- return null;
407
+ return null;
408
+ },
408
409
  };
409
-
410
410
  export default MemberUtil;