@webex/plugin-meetings 3.12.0-next.13 → 3.12.0-next.130
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +37 -10
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +46 -10
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/hashTree/constants.js +4 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1045 -393
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +20 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +409 -122
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1669 -835
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +34 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +9 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +281 -124
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +7 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +13 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +189 -22
- package/dist/types/hashTree/utils.d.ts +7 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +61 -7
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +21 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +175 -11
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +38 -18
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +6 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +307 -161
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/annotation/index.ts +6 -4
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +21 -3
- package/src/controls-options-manager/index.ts +62 -10
- package/src/hashTree/constants.ts +7 -0
- package/src/hashTree/hashTreeParser.ts +796 -192
- package/src/hashTree/utils.ts +19 -0
- package/src/index.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +27 -9
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +413 -130
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +25 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +923 -117
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +46 -5
- package/src/meeting-info/meeting-info-v2.ts +10 -4
- package/src/meetings/index.ts +178 -78
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +6 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +3 -3
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +223 -3
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +139 -32
- package/test/unit/spec/hashTree/hashTreeParser.ts +2299 -243
- package/test/unit/spec/hashTree/utils.ts +37 -0
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +671 -63
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +2733 -116
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +153 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
- package/test/unit/spec/meetings/index.js +486 -49
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +332 -31
package/src/meetings/util.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/* globals window */
|
|
2
2
|
|
|
3
|
+
import {CapabilityState, WebCapabilities} from '@webex/web-capabilities';
|
|
3
4
|
import {
|
|
5
|
+
_CALL_,
|
|
4
6
|
_CREATED_,
|
|
5
7
|
_INCOMING_,
|
|
6
8
|
_JOINED_,
|
|
7
9
|
_LEFT_,
|
|
8
10
|
DESTINATION_TYPE,
|
|
9
11
|
_MOVED_,
|
|
12
|
+
_SIP_BRIDGE_,
|
|
13
|
+
_SPACE_SHARE_,
|
|
10
14
|
BREAKOUTS,
|
|
11
15
|
EVENT_TRIGGERS,
|
|
12
16
|
LOCUS,
|
|
@@ -18,6 +22,7 @@ import Trigger from '../common/events/trigger-proxy';
|
|
|
18
22
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
19
23
|
import Metrics from '../metrics';
|
|
20
24
|
import {MEETING_KEY} from './meetings.types';
|
|
25
|
+
import {EndMeetingReason, LocusFullState} from '../locus-info/types';
|
|
21
26
|
|
|
22
27
|
/**
|
|
23
28
|
* Meetings Media Codec Missing Event
|
|
@@ -152,6 +157,30 @@ MeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {
|
|
|
152
157
|
return result;
|
|
153
158
|
};
|
|
154
159
|
|
|
160
|
+
MeetingsUtil.getSiteName = (site: string, multipartSitePrefixList: string[] = []) => {
|
|
161
|
+
if (!site) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
let siteName: string | undefined;
|
|
166
|
+
|
|
167
|
+
multipartSitePrefixList.forEach((multipartSitePrefix) => {
|
|
168
|
+
if (!siteName && site.includes(multipartSitePrefix)) {
|
|
169
|
+
const secondDot = site.indexOf('.', site.indexOf('.') + 1);
|
|
170
|
+
|
|
171
|
+
siteName = site.substring(0, secondDot);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
if (siteName) {
|
|
176
|
+
return siteName;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
siteName = site.substring(0, site.indexOf('.'));
|
|
180
|
+
|
|
181
|
+
return siteName;
|
|
182
|
+
};
|
|
183
|
+
|
|
155
184
|
/**
|
|
156
185
|
* Will check to see if the H.264 media codec is supported.
|
|
157
186
|
* @async
|
|
@@ -159,20 +188,36 @@ MeetingsUtil.parseDefaultSiteFromMeetingPreferences = (userPreferences) => {
|
|
|
159
188
|
* @returns {Promise<boolean>}
|
|
160
189
|
*/
|
|
161
190
|
MeetingsUtil.hasH264Codec = async () => {
|
|
191
|
+
try {
|
|
192
|
+
const codecCapability = WebCapabilities.isCapableOfReceivingVideoCodec('video/H264');
|
|
193
|
+
|
|
194
|
+
if (codecCapability === CapabilityState.CAPABLE) {
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (codecCapability === CapabilityState.NOT_CAPABLE) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
} catch (_) {
|
|
202
|
+
// NO-OP
|
|
203
|
+
}
|
|
204
|
+
|
|
162
205
|
let hasCodec = false;
|
|
163
206
|
|
|
207
|
+
let pc;
|
|
164
208
|
try {
|
|
165
|
-
|
|
209
|
+
pc = new window.RTCPeerConnection();
|
|
166
210
|
const offer = await pc.createOffer({offerToReceiveVideo: true});
|
|
167
211
|
|
|
168
|
-
if (offer.sdp
|
|
212
|
+
if (offer.sdp?.match(/^a=rtpmap:\d+\s+H264\/\d+/m)) {
|
|
169
213
|
hasCodec = true;
|
|
170
214
|
}
|
|
171
|
-
pc.close();
|
|
172
215
|
} catch (error) {
|
|
173
216
|
LoggerProxy.logger.warn(
|
|
174
217
|
'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'
|
|
175
218
|
);
|
|
219
|
+
} finally {
|
|
220
|
+
pc?.close();
|
|
176
221
|
}
|
|
177
222
|
|
|
178
223
|
return hasCodec;
|
|
@@ -266,6 +311,49 @@ MeetingsUtil.getThisDevice = (newLocus: any, deviceUrl: string) => {
|
|
|
266
311
|
return null;
|
|
267
312
|
};
|
|
268
313
|
|
|
314
|
+
/**
|
|
315
|
+
* Checks if the fullState indicates the meeting has fully ended (not just a breakout move).
|
|
316
|
+
* @param {Object} fullState locus fullState data
|
|
317
|
+
* @returns {boolean}
|
|
318
|
+
*/
|
|
319
|
+
MeetingsUtil.isWholeMeetingEnded = (fullState: LocusFullState): boolean => {
|
|
320
|
+
return (
|
|
321
|
+
fullState.state === LOCUS.STATE.INACTIVE &&
|
|
322
|
+
fullState.endMeetingReason !== EndMeetingReason.breakoutEnded
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Checks if the self state in a locus indicates a breakout move or breakout end.
|
|
328
|
+
* Returns true when:
|
|
329
|
+
* - self state is LEFT with reason MOVED (regular breakout move), OR
|
|
330
|
+
* - fullState is INACTIVE with endMeetingReason BREAKOUT_ENDED (breakout session ended)
|
|
331
|
+
* @param {Object} locus locus data
|
|
332
|
+
* @returns {boolean}
|
|
333
|
+
*/
|
|
334
|
+
MeetingsUtil.isSelfMovedOrBreakoutEnded = (locus: any): boolean => {
|
|
335
|
+
const isSelfLeftMoved = locus?.self?.state === _LEFT_ && locus?.self?.reason === _MOVED_;
|
|
336
|
+
const isBreakoutEnded =
|
|
337
|
+
locus?.fullState?.state === LOCUS.STATE.INACTIVE &&
|
|
338
|
+
locus?.fullState?.endMeetingReason === EndMeetingReason.breakoutEnded;
|
|
339
|
+
|
|
340
|
+
return isSelfLeftMoved || isBreakoutEnded;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Checks if a locus is a 1:1 call using locus.fullState.type.
|
|
345
|
+
* Returns true when fullState.type is CALL, SIP_BRIDGE, or SPACE_SHARE.
|
|
346
|
+
* @param {Object} locus locus data
|
|
347
|
+
* @returns {boolean}
|
|
348
|
+
*/
|
|
349
|
+
MeetingsUtil.isOneOnOneCall = (locus: any): boolean => {
|
|
350
|
+
const fullStateType = locus?.fullState?.type;
|
|
351
|
+
|
|
352
|
+
return (
|
|
353
|
+
fullStateType === _CALL_ || fullStateType === _SIP_BRIDGE_ || fullStateType === _SPACE_SHARE_
|
|
354
|
+
);
|
|
355
|
+
};
|
|
356
|
+
|
|
269
357
|
/**
|
|
270
358
|
* get self device joined status from locus data
|
|
271
359
|
* @param {Object} meeting current meeting data
|
|
@@ -294,7 +382,10 @@ MeetingsUtil.joinedOnThisDevice = (meeting: any, newLocus: any, deviceUrl: strin
|
|
|
294
382
|
* @private
|
|
295
383
|
*/
|
|
296
384
|
MeetingsUtil.isBreakoutLocusDTO = (newLocus: any) => {
|
|
297
|
-
return
|
|
385
|
+
return (
|
|
386
|
+
newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT ||
|
|
387
|
+
!!newLocus?.info?.isBreakout
|
|
388
|
+
);
|
|
298
389
|
};
|
|
299
390
|
|
|
300
391
|
/**
|
|
@@ -310,4 +401,26 @@ MeetingsUtil.isValidBreakoutLocus = (locus: any) => {
|
|
|
310
401
|
|
|
311
402
|
return isLocusAsBreakout && !inActiveStatus && selfJoined;
|
|
312
403
|
};
|
|
404
|
+
/**
|
|
405
|
+
* check if the breakout locus is associated with the main locus by comparing the breakout control url or the replaces info in self device
|
|
406
|
+
* @param {Object} mainLocus main locus data
|
|
407
|
+
* @param {Object} breakoutLocus breakout locus data
|
|
408
|
+
* @returns {boolean}
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
MeetingsUtil.isMainAssociatedWithBreakout = (mainLocus: any, breakoutLocus: any) => {
|
|
412
|
+
if (
|
|
413
|
+
mainLocus.controls?.breakout?.url &&
|
|
414
|
+
mainLocus.controls?.breakout?.url === breakoutLocus.controls?.breakout?.url
|
|
415
|
+
) {
|
|
416
|
+
return true;
|
|
417
|
+
}
|
|
418
|
+
const deviceUrl = breakoutLocus?.self?.deviceUrl;
|
|
419
|
+
const replaceInfo = MeetingsUtil.getThisDevice(breakoutLocus, deviceUrl)?.replaces?.[0];
|
|
420
|
+
if (replaceInfo?.locusUrl && replaceInfo.locusUrl === mainLocus.url) {
|
|
421
|
+
return true;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return false;
|
|
425
|
+
};
|
|
313
426
|
export default MeetingsUtil;
|
package/src/member/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ export default class Member {
|
|
|
27
27
|
isModerator: any;
|
|
28
28
|
isModeratorAssignmentProhibited: any;
|
|
29
29
|
isPresenterAssignmentProhibited: any;
|
|
30
|
+
isAttendeeAssignmentProhibited: any;
|
|
30
31
|
isMutable: any;
|
|
31
32
|
isNotAdmitted: any;
|
|
32
33
|
isRecording: any;
|
|
@@ -292,6 +293,14 @@ export default class Member {
|
|
|
292
293
|
*/
|
|
293
294
|
this.isPresenterAssignmentProhibited = null;
|
|
294
295
|
|
|
296
|
+
/**
|
|
297
|
+
* @instance
|
|
298
|
+
* @type {Boolean}
|
|
299
|
+
* @public
|
|
300
|
+
* @memberof Member
|
|
301
|
+
*/
|
|
302
|
+
this.isAttendeeAssignmentProhibited = null;
|
|
303
|
+
|
|
295
304
|
/**
|
|
296
305
|
* @instance
|
|
297
306
|
* @type {Boolean}
|
|
@@ -369,6 +378,7 @@ export default class Member {
|
|
|
369
378
|
MemberUtil.isModeratorAssignmentProhibited(participant);
|
|
370
379
|
this.isPresenterAssignmentProhibited =
|
|
371
380
|
MemberUtil.isPresenterAssignmentProhibited(participant);
|
|
381
|
+
this.isAttendeeAssignmentProhibited = MemberUtil.isAttendeeAssignmentProhibited(participant);
|
|
372
382
|
this.canApproveAIEnablement = MemberUtil.canApproveAIEnablement(participant);
|
|
373
383
|
this.processStatus(participant);
|
|
374
384
|
this.processRoles(participant);
|
package/src/member/types.ts
CHANGED
|
@@ -103,6 +103,7 @@ export interface Participant {
|
|
|
103
103
|
moderator: boolean; // Locus docs say this is deprecated and role control should be used instead
|
|
104
104
|
moderatorAssignmentNotAllowed: boolean;
|
|
105
105
|
presenterAssignmentNotAllowed: boolean;
|
|
106
|
+
attendeeAssignmentNotAllowed?: boolean;
|
|
106
107
|
person: ParticipantPerson;
|
|
107
108
|
resourceGuest: boolean;
|
|
108
109
|
state: string; // probably one of MEETING_STATE.STATES
|
package/src/member/util.ts
CHANGED
|
@@ -140,6 +140,9 @@ const MemberUtil = {
|
|
|
140
140
|
isPresenterAssignmentProhibited: (participant: Participant) =>
|
|
141
141
|
participant && participant.presenterAssignmentNotAllowed,
|
|
142
142
|
|
|
143
|
+
isAttendeeAssignmentProhibited: (participant: Participant) =>
|
|
144
|
+
!!(participant && participant.attendeeAssignmentNotAllowed),
|
|
145
|
+
|
|
143
146
|
/**
|
|
144
147
|
* checks to see if the participant id is the same as the passed id
|
|
145
148
|
* there are multiple ids that can be used
|
|
@@ -436,5 +439,31 @@ const MemberUtil = {
|
|
|
436
439
|
|
|
437
440
|
return participantUrl;
|
|
438
441
|
},
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Collects all CSIs reported for a participant across all their devices,
|
|
445
|
+
* looking at both the top-level `csis` array and any `mediaSessions[].csi` values.
|
|
446
|
+
*
|
|
447
|
+
* @param {Object} participant - The locus participant object.
|
|
448
|
+
* @returns {Array<number>} unique CSIs for this participant
|
|
449
|
+
*/
|
|
450
|
+
extractCsis: (participant: Participant): number[] => {
|
|
451
|
+
const csis = new Set<number>();
|
|
452
|
+
|
|
453
|
+
participant?.devices?.forEach((device: any) => {
|
|
454
|
+
device?.csis?.forEach((csi: number) => {
|
|
455
|
+
if (typeof csi === 'number') {
|
|
456
|
+
csis.add(csi);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
device?.mediaSessions?.forEach((mediaSession: any) => {
|
|
460
|
+
if (typeof mediaSession?.csi === 'number') {
|
|
461
|
+
csis.add(mediaSession.csi);
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
return Array.from(csis);
|
|
467
|
+
},
|
|
439
468
|
};
|
|
440
469
|
export default MemberUtil;
|
package/src/members/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
-
import {get, isEmpty, set} from 'lodash';
|
|
4
|
+
import {get, isEmpty, isEqual, set} from 'lodash';
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
7
7
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../constants';
|
|
16
16
|
import Trigger from '../common/events/trigger-proxy';
|
|
17
17
|
import Member from '../member';
|
|
18
|
+
import MemberUtil from '../member/util';
|
|
18
19
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
19
20
|
import ParameterError from '../common/errors/parameter';
|
|
20
21
|
import {
|
|
@@ -99,6 +100,15 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
99
100
|
selfId: any;
|
|
100
101
|
type: any;
|
|
101
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Map of CSI -> memberId that previously used the CSI in a Locus update.
|
|
105
|
+
* Keyed by CSI so findMemberByCsi can resolve it in O(1).
|
|
106
|
+
* Kept here (rather than on each Member) so it survives members being removed
|
|
107
|
+
* and re-added (e.g. when entering/leaving a breakout session).
|
|
108
|
+
* @private
|
|
109
|
+
*/
|
|
110
|
+
private memberIdByHistoryCsi: Map<number, string> = new Map();
|
|
111
|
+
|
|
102
112
|
namespace = MEETINGS;
|
|
103
113
|
|
|
104
114
|
/**
|
|
@@ -315,6 +325,14 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
315
325
|
* @memberof Members
|
|
316
326
|
*/
|
|
317
327
|
clearMembers() {
|
|
328
|
+
// capture CSIs of all current members before reset so findMemberByCsi can
|
|
329
|
+
// still resolve them if a member is later re-added (e.g. when leaving a
|
|
330
|
+
// breakout session)
|
|
331
|
+
Object.values(this.membersCollection.getAll()).forEach((member) => {
|
|
332
|
+
MemberUtil.extractCsis(member.participant).forEach((csi) =>
|
|
333
|
+
this.memberIdByHistoryCsi.set(csi, member.id)
|
|
334
|
+
);
|
|
335
|
+
});
|
|
318
336
|
this.membersCollection.reset();
|
|
319
337
|
Trigger.trigger(
|
|
320
338
|
this,
|
|
@@ -569,6 +587,15 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
569
587
|
*/
|
|
570
588
|
private removeMembers(removedMembers: Array<string>) {
|
|
571
589
|
removedMembers.forEach((memberId) => {
|
|
590
|
+
// capture CSIs before removal so findMemberByCsi can still resolve them
|
|
591
|
+
// if the member is later re-added (e.g. when leaving a breakout session)
|
|
592
|
+
// with a participant payload that no longer contains the original CSIs
|
|
593
|
+
const existingMember = this.membersCollection.get(memberId);
|
|
594
|
+
if (existingMember) {
|
|
595
|
+
MemberUtil.extractCsis(existingMember.participant).forEach((csi) =>
|
|
596
|
+
this.memberIdByHistoryCsi.set(csi, memberId)
|
|
597
|
+
);
|
|
598
|
+
}
|
|
572
599
|
this.membersCollection.remove(memberId);
|
|
573
600
|
});
|
|
574
601
|
}
|
|
@@ -598,6 +625,19 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
598
625
|
set(member, prop, existingValue);
|
|
599
626
|
}
|
|
600
627
|
});
|
|
628
|
+
|
|
629
|
+
// remember CSIs the member used previously so findMemberByCsi can still
|
|
630
|
+
// resolve a CSI even after participant.devices[].csis no longer contains it.
|
|
631
|
+
// Skip re-extracting when devices haven't changed - existing history already covers them.
|
|
632
|
+
const devicesUnchanged = isEqual(
|
|
633
|
+
existingMember.participant?.devices,
|
|
634
|
+
member.participant?.devices
|
|
635
|
+
);
|
|
636
|
+
if (!devicesUnchanged) {
|
|
637
|
+
MemberUtil.extractCsis(existingMember.participant).forEach((csi) =>
|
|
638
|
+
this.memberIdByHistoryCsi.set(csi, member.id)
|
|
639
|
+
);
|
|
640
|
+
}
|
|
601
641
|
}
|
|
602
642
|
}
|
|
603
643
|
this.membersCollection.set(member.id, member);
|
|
@@ -1096,12 +1136,16 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
1096
1136
|
* Transfers the host to another member
|
|
1097
1137
|
* @param {String} memberId
|
|
1098
1138
|
* @param {boolean} [moderator] default true
|
|
1139
|
+
* @param {String} [breakoutLocusUrl] when provided, the request is sent against this locus url
|
|
1140
|
+
* (i.e. the breakout session's locus) instead of the main session's locus url
|
|
1099
1141
|
* @returns {Promise}
|
|
1100
1142
|
* @public
|
|
1101
1143
|
* @memberof Members
|
|
1102
1144
|
*/
|
|
1103
|
-
public transferHostToMember(memberId: string, moderator = true) {
|
|
1104
|
-
|
|
1145
|
+
public transferHostToMember(memberId: string, moderator = true, breakoutLocusUrl = '') {
|
|
1146
|
+
const locusUrl = breakoutLocusUrl || this.locusUrl;
|
|
1147
|
+
|
|
1148
|
+
if (!locusUrl) {
|
|
1105
1149
|
return Promise.reject(
|
|
1106
1150
|
new ParameterError(
|
|
1107
1151
|
'The associated locus url for this meetings members object must be defined.'
|
|
@@ -1113,11 +1157,14 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
1113
1157
|
new ParameterError('The member id must be defined to transfer host to the member.')
|
|
1114
1158
|
);
|
|
1115
1159
|
}
|
|
1116
|
-
const options = MembersUtil.generateTransferHostMemberOptions(
|
|
1160
|
+
const options: Record<string, any> = MembersUtil.generateTransferHostMemberOptions(
|
|
1117
1161
|
memberId,
|
|
1118
1162
|
moderator,
|
|
1119
|
-
|
|
1163
|
+
locusUrl
|
|
1120
1164
|
);
|
|
1165
|
+
if (breakoutLocusUrl && breakoutLocusUrl !== this.locusUrl) {
|
|
1166
|
+
options.authorizingLocusUrl = this.locusUrl;
|
|
1167
|
+
}
|
|
1121
1168
|
|
|
1122
1169
|
return this.membersRequest.transferHostToMember(options);
|
|
1123
1170
|
}
|
|
@@ -1161,18 +1208,34 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
1161
1208
|
);
|
|
1162
1209
|
}
|
|
1163
1210
|
|
|
1164
|
-
/** Finds a member that has any device with a csi matching provided value
|
|
1211
|
+
/** Finds a member that has any device with a csi matching provided value.
|
|
1212
|
+
* Falls back to the `memberIdByHistoryCsi` map so that a CSI a member used in
|
|
1213
|
+
* a previous Locus update can still be resolved even if it is no longer
|
|
1214
|
+
* present in `participant.devices[].csis`.
|
|
1165
1215
|
*
|
|
1166
1216
|
* @param {number} csi
|
|
1167
1217
|
* @returns {Member}
|
|
1168
1218
|
*/
|
|
1169
1219
|
findMemberByCsi(csi) {
|
|
1170
|
-
|
|
1220
|
+
const members = Object.values(this.membersCollection.getAll());
|
|
1221
|
+
|
|
1222
|
+
const currentMatch = members.find((member) =>
|
|
1171
1223
|
// @ts-ignore
|
|
1172
1224
|
member.participant?.devices?.find((device) =>
|
|
1173
1225
|
device.csis?.find((memberCsi) => memberCsi === csi)
|
|
1174
1226
|
)
|
|
1175
1227
|
);
|
|
1228
|
+
|
|
1229
|
+
if (currentMatch) {
|
|
1230
|
+
return currentMatch;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
const historyMemberId = this.memberIdByHistoryCsi.get(csi);
|
|
1234
|
+
if (historyMemberId) {
|
|
1235
|
+
return this.membersCollection.get(historyMemberId);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
return undefined;
|
|
1176
1239
|
}
|
|
1177
1240
|
|
|
1178
1241
|
/**
|
package/src/members/util.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ALIAS,
|
|
14
14
|
} from '../constants';
|
|
15
15
|
|
|
16
|
-
import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape} from './types';
|
|
16
|
+
import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape, ServerRoles} from './types';
|
|
17
17
|
import {Invitee} from '../meeting/type';
|
|
18
18
|
|
|
19
19
|
const MembersUtil = {
|
|
@@ -330,12 +330,20 @@ const MembersUtil = {
|
|
|
330
330
|
};
|
|
331
331
|
},
|
|
332
332
|
|
|
333
|
-
getTransferHostToMemberRequestParams: (options) => {
|
|
334
|
-
const body = {
|
|
333
|
+
getTransferHostToMemberRequestParams: (options: any) => {
|
|
334
|
+
const body: Record<string, any> = {
|
|
335
335
|
role: {
|
|
336
|
-
|
|
336
|
+
roles: [
|
|
337
|
+
{
|
|
338
|
+
hasRole: true,
|
|
339
|
+
type: ServerRoles.Moderator,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
337
342
|
},
|
|
338
343
|
};
|
|
344
|
+
if (options.authorizingLocusUrl) {
|
|
345
|
+
body.authorizingLocusUrl = options.authorizingLocusUrl;
|
|
346
|
+
}
|
|
339
347
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;
|
|
340
348
|
|
|
341
349
|
return {
|
package/src/metrics/constants.ts
CHANGED
|
@@ -11,6 +11,7 @@ const BEHAVIORAL_METRICS = {
|
|
|
11
11
|
ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',
|
|
12
12
|
ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',
|
|
13
13
|
ADD_MEDIA_RETRY: 'js_sdk_add_media_retry',
|
|
14
|
+
LOCUS_MEDIA_REQUEST_RETRY: 'js_sdk_locus_media_request_retry',
|
|
14
15
|
ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',
|
|
15
16
|
CONNECTION_SUCCESS: 'js_sdk_connection_success',
|
|
16
17
|
CONNECTION_FAILURE: 'js_sdk_connection_failures',
|
|
@@ -96,6 +97,11 @@ const BEHAVIORAL_METRICS = {
|
|
|
96
97
|
SET_CUSTOM_CODEC_PARAMETERS_USED: 'js_sdk_set_custom_codec_parameters_used',
|
|
97
98
|
MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED:
|
|
98
99
|
'js_sdk_mark_custom_codec_parameters_for_deletion_used',
|
|
100
|
+
HASH_TREE_SYNC_FAILURE: 'js_sdk_hash_tree_sync_failure',
|
|
101
|
+
HASH_TREE_HEARTBEAT_WATCHDOG_EXPIRED: 'js_sdk_hash_tree_heartbeat_watchdog_expired',
|
|
102
|
+
HASH_TREE_EMPTY_LOCUS_STATE_ELEMENTS: 'js_sdk_hash_tree_empty_locus_state_elements',
|
|
103
|
+
DESTROY_MEETING_WHILE_SUSPENDED: 'js_sdk_destroy_meeting_while_suspended',
|
|
104
|
+
WASM_RUNTIME_PERFORMANCE: 'js_sdk_wasm_runtime_performance',
|
|
99
105
|
};
|
|
100
106
|
|
|
101
107
|
export {BEHAVIORAL_METRICS as default};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {AV1EncodingParams, SupportedResolution} from '@webex/internal-media-core';
|
|
2
|
+
|
|
3
|
+
export const AV1_CODEC_PARAMETERS: Record<SupportedResolution, AV1EncodingParams> = {
|
|
4
|
+
'90p': {
|
|
5
|
+
levelIdx: 0,
|
|
6
|
+
tier: 0,
|
|
7
|
+
maxWidth: 160,
|
|
8
|
+
maxHeight: 90,
|
|
9
|
+
maxPicSize: 147_456,
|
|
10
|
+
maxDecodeRate: 5_529_600,
|
|
11
|
+
},
|
|
12
|
+
'180p': {
|
|
13
|
+
levelIdx: 0,
|
|
14
|
+
tier: 0,
|
|
15
|
+
maxWidth: 320,
|
|
16
|
+
maxHeight: 180,
|
|
17
|
+
maxPicSize: 147_456,
|
|
18
|
+
maxDecodeRate: 5_529_600,
|
|
19
|
+
},
|
|
20
|
+
'360p': {
|
|
21
|
+
levelIdx: 1,
|
|
22
|
+
tier: 0,
|
|
23
|
+
maxWidth: 640,
|
|
24
|
+
maxHeight: 360,
|
|
25
|
+
maxPicSize: 278_784,
|
|
26
|
+
maxDecodeRate: 10_454_400,
|
|
27
|
+
},
|
|
28
|
+
'540p': {
|
|
29
|
+
levelIdx: 4,
|
|
30
|
+
tier: 0,
|
|
31
|
+
maxWidth: 960,
|
|
32
|
+
maxHeight: 540,
|
|
33
|
+
maxPicSize: 665_856,
|
|
34
|
+
maxDecodeRate: 24_969_600,
|
|
35
|
+
},
|
|
36
|
+
'720p': {
|
|
37
|
+
levelIdx: 5,
|
|
38
|
+
tier: 0,
|
|
39
|
+
maxWidth: 1280,
|
|
40
|
+
maxHeight: 720,
|
|
41
|
+
maxPicSize: 1_065_024,
|
|
42
|
+
maxDecodeRate: 39_938_400,
|
|
43
|
+
},
|
|
44
|
+
'1080p': {
|
|
45
|
+
levelIdx: 8,
|
|
46
|
+
tier: 0,
|
|
47
|
+
maxWidth: 1920,
|
|
48
|
+
maxHeight: 1080,
|
|
49
|
+
maxPicSize: 2_359_296,
|
|
50
|
+
maxDecodeRate: 77_856_768,
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const H264_CODEC_PARAMETERS = {
|
|
55
|
+
maxFs: 8192,
|
|
56
|
+
maxFps: 3000,
|
|
57
|
+
maxMbps: 245760,
|
|
58
|
+
};
|