@webex/plugin-meetings 3.12.0-next.14 → 3.12.0-next.140

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.
Files changed (236) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/annotation/index.js +2 -2
  5. package/dist/annotation/index.js.map +1 -1
  6. package/dist/breakouts/breakout.js +8 -3
  7. package/dist/breakouts/breakout.js.map +1 -1
  8. package/dist/breakouts/events.js +29 -14
  9. package/dist/breakouts/events.js.map +1 -1
  10. package/dist/breakouts/index.js +99 -4
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +2 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +37 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/index.js +46 -10
  19. package/dist/controls-options-manager/index.js.map +1 -1
  20. package/dist/hashTree/constants.js +4 -1
  21. package/dist/hashTree/constants.js.map +1 -1
  22. package/dist/hashTree/hashTreeParser.js +1096 -391
  23. package/dist/hashTree/hashTreeParser.js.map +1 -1
  24. package/dist/hashTree/utils.js +20 -0
  25. package/dist/hashTree/utils.js.map +1 -1
  26. package/dist/index.js +7 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  29. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  30. package/dist/interceptors/locusRetry.js +23 -8
  31. package/dist/interceptors/locusRetry.js.map +1 -1
  32. package/dist/interpretation/index.js +10 -1
  33. package/dist/interpretation/index.js.map +1 -1
  34. package/dist/interpretation/interpretation.types.js +7 -0
  35. package/dist/interpretation/interpretation.types.js.map +1 -0
  36. package/dist/interpretation/siLanguage.js +1 -1
  37. package/dist/locus-info/controlsUtils.js +4 -1
  38. package/dist/locus-info/controlsUtils.js.map +1 -1
  39. package/dist/locus-info/index.js +615 -176
  40. package/dist/locus-info/index.js.map +1 -1
  41. package/dist/locus-info/infoUtils.js +36 -5
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/types.js +20 -0
  44. package/dist/locus-info/types.js.map +1 -1
  45. package/dist/media/MediaConnectionAwaiter.js +15 -2
  46. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  47. package/dist/media/index.js +8 -2
  48. package/dist/media/index.js.map +1 -1
  49. package/dist/media/properties.js +4 -5
  50. package/dist/media/properties.js.map +1 -1
  51. package/dist/meeting/in-meeting-actions.js +5 -1
  52. package/dist/meeting/in-meeting-actions.js.map +1 -1
  53. package/dist/meeting/index.js +1680 -835
  54. package/dist/meeting/index.js.map +1 -1
  55. package/dist/meeting/locusMediaRequest.js +229 -82
  56. package/dist/meeting/locusMediaRequest.js.map +1 -1
  57. package/dist/meeting/muteState.js +10 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +5 -2
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/util.js +34 -2
  62. package/dist/meeting/util.js.map +1 -1
  63. package/dist/meeting/voicea-meeting.js +2 -1
  64. package/dist/meeting/voicea-meeting.js.map +1 -1
  65. package/dist/meeting-info/meeting-info-v2.js +9 -3
  66. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  67. package/dist/meetings/index.js +293 -124
  68. package/dist/meetings/index.js.map +1 -1
  69. package/dist/meetings/meetings.types.js +6 -1
  70. package/dist/meetings/meetings.types.js.map +1 -1
  71. package/dist/meetings/request.js +39 -0
  72. package/dist/meetings/request.js.map +1 -1
  73. package/dist/meetings/util.js +116 -18
  74. package/dist/meetings/util.js.map +1 -1
  75. package/dist/member/index.js +10 -0
  76. package/dist/member/index.js.map +1 -1
  77. package/dist/member/types.js.map +1 -1
  78. package/dist/member/util.js +30 -0
  79. package/dist/member/util.js.map +1 -1
  80. package/dist/members/index.js +101 -43
  81. package/dist/members/index.js.map +1 -1
  82. package/dist/members/util.js +8 -1
  83. package/dist/members/util.js.map +1 -1
  84. package/dist/metrics/constants.js +7 -1
  85. package/dist/metrics/constants.js.map +1 -1
  86. package/dist/multistream/codec/constants.js +63 -0
  87. package/dist/multistream/codec/constants.js.map +1 -0
  88. package/dist/multistream/mediaRequestManager.js +62 -15
  89. package/dist/multistream/mediaRequestManager.js.map +1 -1
  90. package/dist/multistream/receiveSlot.js +9 -0
  91. package/dist/multistream/receiveSlot.js.map +1 -1
  92. package/dist/reachability/clusterReachability.js.map +1 -1
  93. package/dist/reachability/index.js +121 -83
  94. package/dist/reachability/index.js.map +1 -1
  95. package/dist/reachability/reachability.types.js +2 -0
  96. package/dist/reachability/reachability.types.js.map +1 -1
  97. package/dist/reachability/util.js +45 -0
  98. package/dist/reachability/util.js.map +1 -1
  99. package/dist/reactions/reactions.type.js.map +1 -1
  100. package/dist/recording-controller/index.js +1 -3
  101. package/dist/recording-controller/index.js.map +1 -1
  102. package/dist/roap/turnDiscovery.js +8 -1
  103. package/dist/roap/turnDiscovery.js.map +1 -1
  104. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/constants.d.ts +13 -1
  107. package/dist/types/controls-options-manager/index.d.ts +16 -0
  108. package/dist/types/hashTree/constants.d.ts +1 -0
  109. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  110. package/dist/types/hashTree/utils.d.ts +7 -0
  111. package/dist/types/index.d.ts +3 -0
  112. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  113. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  114. package/dist/types/locus-info/index.d.ts +106 -8
  115. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  116. package/dist/types/locus-info/types.d.ts +22 -1
  117. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  118. package/dist/types/media/properties.d.ts +6 -2
  119. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  120. package/dist/types/meeting/index.d.ts +176 -11
  121. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  122. package/dist/types/meeting/request.d.ts +1 -0
  123. package/dist/types/meeting/util.d.ts +9 -0
  124. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  125. package/dist/types/meetings/index.d.ts +40 -19
  126. package/dist/types/meetings/meetings.types.d.ts +15 -0
  127. package/dist/types/meetings/request.d.ts +14 -0
  128. package/dist/types/member/index.d.ts +1 -0
  129. package/dist/types/member/types.d.ts +1 -0
  130. package/dist/types/member/util.d.ts +9 -0
  131. package/dist/types/members/index.d.ts +15 -2
  132. package/dist/types/members/util.d.ts +1 -5
  133. package/dist/types/metrics/constants.d.ts +6 -0
  134. package/dist/types/multistream/codec/constants.d.ts +7 -0
  135. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  136. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  137. package/dist/types/reachability/index.d.ts +10 -3
  138. package/dist/types/reachability/reachability.types.d.ts +7 -0
  139. package/dist/types/reachability/util.d.ts +17 -0
  140. package/dist/types/reactions/reactions.type.d.ts +3 -0
  141. package/dist/webinar/index.js +307 -161
  142. package/dist/webinar/index.js.map +1 -1
  143. package/package.json +23 -23
  144. package/src/aiEnableRequest/index.ts +16 -0
  145. package/src/annotation/index.ts +6 -4
  146. package/src/breakouts/breakout.ts +3 -1
  147. package/src/breakouts/events.ts +33 -11
  148. package/src/breakouts/index.ts +122 -2
  149. package/src/common/errors/webex-errors.ts +50 -3
  150. package/src/config.ts +2 -2
  151. package/src/constants.ts +21 -3
  152. package/src/controls-options-manager/index.ts +62 -10
  153. package/src/hashTree/constants.ts +7 -0
  154. package/src/hashTree/hashTreeParser.ts +861 -193
  155. package/src/hashTree/utils.ts +19 -0
  156. package/src/index.ts +6 -0
  157. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  158. package/src/interceptors/locusRetry.ts +25 -4
  159. package/src/interpretation/index.ts +27 -9
  160. package/src/interpretation/interpretation.types.ts +11 -0
  161. package/src/locus-info/controlsUtils.ts +3 -1
  162. package/src/locus-info/index.ts +566 -164
  163. package/src/locus-info/infoUtils.ts +41 -6
  164. package/src/locus-info/types.ts +26 -1
  165. package/src/media/MediaConnectionAwaiter.ts +21 -4
  166. package/src/media/index.ts +10 -1
  167. package/src/media/properties.ts +8 -3
  168. package/src/meeting/in-meeting-actions.ts +8 -0
  169. package/src/meeting/index.ts +933 -119
  170. package/src/meeting/locusMediaRequest.ts +106 -6
  171. package/src/meeting/muteState.ts +10 -1
  172. package/src/meeting/request.ts +11 -0
  173. package/src/meeting/util.ts +46 -5
  174. package/src/meeting/voicea-meeting.ts +1 -1
  175. package/src/meeting-info/meeting-info-v2.ts +10 -4
  176. package/src/meetings/index.ts +197 -80
  177. package/src/meetings/meetings.types.ts +19 -0
  178. package/src/meetings/request.ts +43 -0
  179. package/src/meetings/util.ts +117 -4
  180. package/src/member/index.ts +10 -0
  181. package/src/member/types.ts +1 -0
  182. package/src/member/util.ts +29 -0
  183. package/src/members/index.ts +70 -7
  184. package/src/members/util.ts +12 -4
  185. package/src/metrics/constants.ts +6 -0
  186. package/src/multistream/codec/constants.ts +58 -0
  187. package/src/multistream/mediaRequestManager.ts +119 -28
  188. package/src/multistream/receiveSlot.ts +18 -0
  189. package/src/reachability/clusterReachability.ts +3 -2
  190. package/src/reachability/index.ts +47 -16
  191. package/src/reachability/reachability.types.ts +11 -0
  192. package/src/reachability/util.ts +36 -0
  193. package/src/reactions/reactions.type.ts +3 -0
  194. package/src/recording-controller/index.ts +1 -2
  195. package/src/roap/turnDiscovery.ts +9 -1
  196. package/src/webinar/index.ts +216 -38
  197. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  198. package/test/unit/spec/annotation/index.ts +3 -3
  199. package/test/unit/spec/breakouts/breakout.ts +9 -3
  200. package/test/unit/spec/breakouts/events.ts +120 -2
  201. package/test/unit/spec/breakouts/index.ts +223 -3
  202. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  203. package/test/unit/spec/controls-options-manager/index.js +139 -32
  204. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  205. package/test/unit/spec/hashTree/utils.ts +37 -0
  206. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  207. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  208. package/test/unit/spec/interpretation/index.ts +26 -4
  209. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  210. package/test/unit/spec/locus-info/index.js +1014 -58
  211. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  212. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  213. package/test/unit/spec/media/index.ts +92 -0
  214. package/test/unit/spec/media/properties.ts +23 -23
  215. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  216. package/test/unit/spec/meeting/index.js +2805 -116
  217. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  218. package/test/unit/spec/meeting/muteState.js +81 -0
  219. package/test/unit/spec/meeting/request.js +12 -0
  220. package/test/unit/spec/meeting/utils.js +153 -1
  221. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  222. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  223. package/test/unit/spec/meetings/index.js +533 -49
  224. package/test/unit/spec/meetings/request.js +141 -0
  225. package/test/unit/spec/meetings/utils.js +402 -51
  226. package/test/unit/spec/member/index.js +7 -0
  227. package/test/unit/spec/member/util.js +89 -0
  228. package/test/unit/spec/members/index.js +216 -0
  229. package/test/unit/spec/members/request.js +37 -1
  230. package/test/unit/spec/members/utils.js +63 -0
  231. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  232. package/test/unit/spec/reachability/index.ts +128 -46
  233. package/test/unit/spec/reachability/util.ts +31 -0
  234. package/test/unit/spec/recording-controller/index.js +9 -8
  235. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  236. package/test/unit/spec/webinar/index.ts +332 -31
@@ -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
- const pc = new window.RTCPeerConnection();
209
+ pc = new window.RTCPeerConnection();
166
210
  const offer = await pc.createOffer({offerToReceiveVideo: true});
167
211
 
168
- if (offer.sdp.match(/^a=rtpmap:\d+\s+H264\/\d+/m)) {
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 newLocus?.controls?.breakout?.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;
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;
@@ -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);
@@ -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
@@ -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;
@@ -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
- if (!this.locusUrl) {
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
- this.locusUrl
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
- return Object.values(this.membersCollection.getAll()).find((member) =>
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
  /**
@@ -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
- moderator: options.moderator,
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 {
@@ -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
+ };