@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0-test.1

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 (239) hide show
  1. package/README.md +12 -0
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/no-meeting-info.js +51 -0
  5. package/dist/common/errors/no-meeting-info.js.map +1 -0
  6. package/dist/common/errors/reclaim-host-role-errors.js +158 -0
  7. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  8. package/dist/common/errors/webex-errors.js +23 -3
  9. package/dist/common/errors/webex-errors.js.map +1 -1
  10. package/dist/common/logs/request.js +5 -1
  11. package/dist/common/logs/request.js.map +1 -1
  12. package/dist/config.js +1 -1
  13. package/dist/config.js.map +1 -1
  14. package/dist/constants.js +69 -9
  15. package/dist/constants.js.map +1 -1
  16. package/dist/index.js +11 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/interceptors/index.js +15 -0
  19. package/dist/interceptors/index.js.map +1 -0
  20. package/dist/interceptors/locusRetry.js +93 -0
  21. package/dist/interceptors/locusRetry.js.map +1 -0
  22. package/dist/interpretation/index.js +16 -2
  23. package/dist/interpretation/index.js.map +1 -1
  24. package/dist/interpretation/siLanguage.js +1 -1
  25. package/dist/locus-info/index.js +40 -11
  26. package/dist/locus-info/index.js.map +1 -1
  27. package/dist/locus-info/mediaSharesUtils.js +15 -1
  28. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  29. package/dist/locus-info/parser.js +42 -21
  30. package/dist/locus-info/parser.js.map +1 -1
  31. package/dist/media/index.js +10 -6
  32. package/dist/media/index.js.map +1 -1
  33. package/dist/media/properties.js +13 -3
  34. package/dist/media/properties.js.map +1 -1
  35. package/dist/mediaQualityMetrics/config.js +135 -330
  36. package/dist/mediaQualityMetrics/config.js.map +1 -1
  37. package/dist/meeting/in-meeting-actions.js +4 -0
  38. package/dist/meeting/in-meeting-actions.js.map +1 -1
  39. package/dist/meeting/index.js +2187 -1074
  40. package/dist/meeting/index.js.map +1 -1
  41. package/dist/meeting/muteState.js +37 -25
  42. package/dist/meeting/muteState.js.map +1 -1
  43. package/dist/meeting/request.js +34 -19
  44. package/dist/meeting/request.js.map +1 -1
  45. package/dist/meeting/util.js +71 -0
  46. package/dist/meeting/util.js.map +1 -1
  47. package/dist/meeting-info/index.js +48 -23
  48. package/dist/meeting-info/index.js.map +1 -1
  49. package/dist/meeting-info/meeting-info-v2.js +25 -4
  50. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  51. package/dist/meeting-info/utilv2.js +1 -1
  52. package/dist/meeting-info/utilv2.js.map +1 -1
  53. package/dist/meetings/collection.js +17 -0
  54. package/dist/meetings/collection.js.map +1 -1
  55. package/dist/meetings/index.js +142 -57
  56. package/dist/meetings/index.js.map +1 -1
  57. package/dist/meetings/util.js +2 -6
  58. package/dist/meetings/util.js.map +1 -1
  59. package/dist/member/index.js +9 -0
  60. package/dist/member/index.js.map +1 -1
  61. package/dist/member/util.js +11 -0
  62. package/dist/member/util.js.map +1 -1
  63. package/dist/members/index.js +17 -1
  64. package/dist/members/index.js.map +1 -1
  65. package/dist/members/types.js.map +1 -1
  66. package/dist/members/util.js +15 -4
  67. package/dist/members/util.js.map +1 -1
  68. package/dist/metrics/constants.js +15 -1
  69. package/dist/metrics/constants.js.map +1 -1
  70. package/dist/multistream/mediaRequestManager.js +1 -1
  71. package/dist/multistream/mediaRequestManager.js.map +1 -1
  72. package/dist/multistream/remoteMediaGroup.js +16 -2
  73. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  74. package/dist/multistream/remoteMediaManager.js +222 -73
  75. package/dist/multistream/remoteMediaManager.js.map +1 -1
  76. package/dist/multistream/sendSlotManager.js +22 -0
  77. package/dist/multistream/sendSlotManager.js.map +1 -1
  78. package/dist/reachability/clusterReachability.js +356 -0
  79. package/dist/reachability/clusterReachability.js.map +1 -0
  80. package/dist/reachability/index.js +262 -432
  81. package/dist/reachability/index.js.map +1 -1
  82. package/dist/reachability/request.js +1 -1
  83. package/dist/reachability/request.js.map +1 -1
  84. package/dist/reachability/util.js +29 -0
  85. package/dist/reachability/util.js.map +1 -0
  86. package/dist/reconnection-manager/index.js +113 -96
  87. package/dist/reconnection-manager/index.js.map +1 -1
  88. package/dist/roap/index.js +57 -25
  89. package/dist/roap/index.js.map +1 -1
  90. package/dist/roap/request.js +5 -13
  91. package/dist/roap/request.js.map +1 -1
  92. package/dist/roap/turnDiscovery.js +173 -81
  93. package/dist/roap/turnDiscovery.js.map +1 -1
  94. package/dist/rtcMetrics/index.js +68 -6
  95. package/dist/rtcMetrics/index.js.map +1 -1
  96. package/dist/statsAnalyzer/index.js +338 -289
  97. package/dist/statsAnalyzer/index.js.map +1 -1
  98. package/dist/statsAnalyzer/mqaUtil.js +296 -156
  99. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  100. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  101. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  102. package/dist/types/common/errors/webex-errors.d.ts +13 -1
  103. package/dist/types/common/logs/request.d.ts +2 -0
  104. package/dist/types/config.d.ts +1 -1
  105. package/dist/types/constants.d.ts +66 -13
  106. package/dist/types/index.d.ts +1 -1
  107. package/dist/types/interceptors/index.d.ts +2 -0
  108. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  109. package/dist/types/locus-info/index.d.ts +1 -1
  110. package/dist/types/locus-info/parser.d.ts +3 -2
  111. package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
  112. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  113. package/dist/types/meeting/index.d.ts +285 -34
  114. package/dist/types/meeting/locusMediaRequest.d.ts +1 -2
  115. package/dist/types/meeting/muteState.d.ts +2 -8
  116. package/dist/types/meeting/request.d.ts +4 -1
  117. package/dist/types/meeting/util.d.ts +25 -1
  118. package/dist/types/meeting-info/index.d.ts +7 -0
  119. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  120. package/dist/types/meetings/collection.d.ts +9 -0
  121. package/dist/types/meetings/index.d.ts +42 -14
  122. package/dist/types/member/index.d.ts +1 -0
  123. package/dist/types/members/types.d.ts +1 -0
  124. package/dist/types/members/util.d.ts +5 -0
  125. package/dist/types/metrics/constants.d.ts +15 -0
  126. package/dist/types/multistream/mediaRequestManager.d.ts +2 -0
  127. package/dist/types/multistream/remoteMediaGroup.d.ts +2 -0
  128. package/dist/types/multistream/remoteMediaManager.d.ts +25 -1
  129. package/dist/types/multistream/sendSlotManager.d.ts +9 -0
  130. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  131. package/dist/types/reachability/index.d.ts +59 -112
  132. package/dist/types/reachability/request.d.ts +1 -1
  133. package/dist/types/reachability/util.d.ts +8 -0
  134. package/dist/types/reconnection-manager/index.d.ts +10 -0
  135. package/dist/types/roap/index.d.ts +2 -1
  136. package/dist/types/roap/request.d.ts +2 -1
  137. package/dist/types/roap/turnDiscovery.d.ts +21 -4
  138. package/dist/types/rtcMetrics/index.d.ts +15 -1
  139. package/dist/types/statsAnalyzer/index.d.ts +28 -11
  140. package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
  141. package/dist/types/webinar/collection.d.ts +16 -0
  142. package/dist/types/webinar/index.d.ts +5 -0
  143. package/dist/webinar/collection.js +44 -0
  144. package/dist/webinar/collection.js.map +1 -0
  145. package/dist/webinar/index.js +69 -0
  146. package/dist/webinar/index.js.map +1 -0
  147. package/package.json +3 -2
  148. package/src/common/errors/no-meeting-info.ts +24 -0
  149. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  150. package/src/common/errors/webex-errors.ts +19 -2
  151. package/src/common/logs/request.ts +5 -1
  152. package/src/config.ts +1 -1
  153. package/src/constants.ts +71 -6
  154. package/src/index.ts +5 -0
  155. package/src/interceptors/index.ts +3 -0
  156. package/src/interceptors/locusRetry.ts +67 -0
  157. package/src/interpretation/index.ts +18 -1
  158. package/src/locus-info/index.ts +52 -16
  159. package/src/locus-info/mediaSharesUtils.ts +16 -0
  160. package/src/locus-info/parser.ts +47 -21
  161. package/src/media/index.ts +8 -6
  162. package/src/media/properties.ts +17 -2
  163. package/src/mediaQualityMetrics/config.ts +103 -238
  164. package/src/meeting/in-meeting-actions.ts +8 -0
  165. package/src/meeting/index.ts +1510 -529
  166. package/src/meeting/muteState.ts +34 -20
  167. package/src/meeting/request.ts +19 -1
  168. package/src/meeting/util.ts +97 -0
  169. package/src/meeting-info/index.ts +47 -20
  170. package/src/meeting-info/meeting-info-v2.ts +27 -5
  171. package/src/meeting-info/utilv2.ts +1 -1
  172. package/src/meetings/collection.ts +13 -0
  173. package/src/meetings/index.ts +112 -31
  174. package/src/meetings/util.ts +2 -8
  175. package/src/member/index.ts +9 -0
  176. package/src/member/util.ts +14 -0
  177. package/src/members/index.ts +29 -2
  178. package/src/members/types.ts +1 -0
  179. package/src/members/util.ts +15 -1
  180. package/src/metrics/constants.ts +14 -0
  181. package/src/multistream/mediaRequestManager.ts +4 -1
  182. package/src/multistream/remoteMediaGroup.ts +19 -0
  183. package/src/multistream/remoteMediaManager.ts +141 -18
  184. package/src/multistream/sendSlotManager.ts +29 -0
  185. package/src/reachability/clusterReachability.ts +320 -0
  186. package/src/reachability/index.ts +221 -382
  187. package/src/reachability/request.ts +1 -1
  188. package/src/reachability/util.ts +24 -0
  189. package/src/reconnection-manager/index.ts +87 -83
  190. package/src/roap/index.ts +60 -24
  191. package/src/roap/request.ts +3 -16
  192. package/src/roap/turnDiscovery.ts +112 -39
  193. package/src/rtcMetrics/index.ts +71 -5
  194. package/src/statsAnalyzer/index.ts +430 -427
  195. package/src/statsAnalyzer/mqaUtil.ts +317 -168
  196. package/src/webinar/collection.ts +31 -0
  197. package/src/webinar/index.ts +62 -0
  198. package/test/integration/spec/converged-space-meetings.js +7 -7
  199. package/test/integration/spec/journey.js +86 -104
  200. package/test/integration/spec/space-meeting.js +9 -9
  201. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  202. package/test/unit/spec/interpretation/index.ts +36 -3
  203. package/test/unit/spec/locus-info/index.js +205 -12
  204. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  205. package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
  206. package/test/unit/spec/locus-info/parser.js +54 -13
  207. package/test/unit/spec/media/index.ts +20 -4
  208. package/test/unit/spec/media/properties.ts +2 -2
  209. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  210. package/test/unit/spec/meeting/index.js +4027 -1075
  211. package/test/unit/spec/meeting/muteState.js +219 -67
  212. package/test/unit/spec/meeting/request.js +63 -12
  213. package/test/unit/spec/meeting/utils.js +93 -0
  214. package/test/unit/spec/meeting-info/index.js +180 -61
  215. package/test/unit/spec/meeting-info/meetinginfov2.js +196 -53
  216. package/test/unit/spec/meetings/collection.js +12 -0
  217. package/test/unit/spec/meetings/index.js +619 -206
  218. package/test/unit/spec/meetings/utils.js +35 -12
  219. package/test/unit/spec/member/index.js +8 -7
  220. package/test/unit/spec/member/util.js +32 -0
  221. package/test/unit/spec/members/index.js +130 -17
  222. package/test/unit/spec/members/utils.js +26 -0
  223. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  224. package/test/unit/spec/multistream/remoteMediaGroup.ts +80 -1
  225. package/test/unit/spec/multistream/remoteMediaManager.ts +210 -3
  226. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  227. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  228. package/test/unit/spec/reachability/index.ts +505 -135
  229. package/test/unit/spec/reachability/util.ts +40 -0
  230. package/test/unit/spec/reconnection-manager/index.js +74 -17
  231. package/test/unit/spec/roap/index.ts +181 -61
  232. package/test/unit/spec/roap/request.ts +27 -3
  233. package/test/unit/spec/roap/turnDiscovery.ts +362 -101
  234. package/test/unit/spec/rtcMetrics/index.ts +57 -3
  235. package/test/unit/spec/stats-analyzer/index.js +1225 -12
  236. package/test/unit/spec/webinar/collection.ts +13 -0
  237. package/test/unit/spec/webinar/index.ts +60 -0
  238. package/test/utils/integrationTestUtils.js +4 -4
  239. package/test/utils/webex-test-users.js +12 -4
@@ -150,15 +150,30 @@ export class MuteState {
150
150
  * @param {Boolean} [mute] true for muting, false for unmuting request
151
151
  * @returns {void}
152
152
  */
153
- public handleLocalStreamMuteStateChange(meeting?: object, mute?: boolean) {
153
+ public handleLocalStreamMuteStateChange(meeting?: any) {
154
154
  if (this.ignoreMuteStateChange) {
155
155
  return;
156
156
  }
157
+
158
+ // either user or system may have triggered a mute state change, but localMute should reflect both
159
+ let newMuteState: boolean;
160
+ let userMuteState: boolean;
161
+ let systemMuteState: boolean;
162
+ if (this.type === AUDIO) {
163
+ newMuteState = meeting.mediaProperties.audioStream?.muted;
164
+ userMuteState = meeting.mediaProperties.audioStream?.userMuted;
165
+ systemMuteState = meeting.mediaProperties.audioStream?.systemMuted;
166
+ } else {
167
+ newMuteState = meeting.mediaProperties.videoStream?.muted;
168
+ userMuteState = meeting.mediaProperties.videoStream?.userMuted;
169
+ systemMuteState = meeting.mediaProperties.videoStream?.systemMuted;
170
+ }
171
+
157
172
  LoggerProxy.logger.info(
158
- `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${mute}`
173
+ `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${newMuteState} (user mute: ${userMuteState}, system mute: ${systemMuteState})`
159
174
  );
160
175
 
161
- this.state.client.localMute = mute;
176
+ this.state.client.localMute = newMuteState;
162
177
 
163
178
  this.applyClientStateToServer(meeting);
164
179
  }
@@ -249,7 +264,12 @@ export class MuteState {
249
264
  `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`
250
265
  );
251
266
 
252
- this.applyServerMuteToLocalStream(meeting, 'clientRequestFailed');
267
+ // failed to apply client state to server, so revert stream mute state to server state
268
+ this.muteLocalStream(
269
+ meeting,
270
+ this.state.server.localMute || this.state.server.remoteMute,
271
+ 'clientRequestFailed'
272
+ );
253
273
  });
254
274
  }
255
275
 
@@ -325,18 +345,6 @@ export class MuteState {
325
345
  });
326
346
  }
327
347
 
328
- /** Sets the mute state of the local stream according to what server thinks is our state
329
- * @param {Object} meeting - the meeting object
330
- * @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local stream
331
- * @returns {void}
332
- */
333
- private applyServerMuteToLocalStream(meeting: any, serverMuteReason: ServerMuteReason) {
334
- const muted = this.state.server.localMute || this.state.server.remoteMute;
335
-
336
- // update the local stream mute state, but not this.state.client.localMute
337
- this.muteLocalStream(meeting, muted, serverMuteReason);
338
- }
339
-
340
348
  /** Applies the current value for unmute allowed to the underlying stream
341
349
  *
342
350
  * @param {Meeting} meeting
@@ -371,7 +379,7 @@ export class MuteState {
371
379
  }
372
380
  if (muted !== undefined) {
373
381
  this.state.server.remoteMute = muted;
374
- this.applyServerMuteToLocalStream(meeting, 'remotelyMuted');
382
+ this.muteLocalStream(meeting, muted, 'remotelyMuted');
375
383
  }
376
384
  }
377
385
 
@@ -383,7 +391,7 @@ export class MuteState {
383
391
  * @param {Object} [meeting] the meeting object
384
392
  * @returns {undefined}
385
393
  */
386
- public handleServerLocalUnmuteRequired(meeting?: object) {
394
+ public handleServerLocalUnmuteRequired(meeting?: any) {
387
395
  if (!this.state.client.enabled) {
388
396
  LoggerProxy.logger.warn(
389
397
  `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`
@@ -396,9 +404,15 @@ export class MuteState {
396
404
 
397
405
  // todo: I'm seeing "you can now unmute yourself " popup when this happens - but same thing happens on web.w.c so we can ignore for now
398
406
  this.state.server.remoteMute = false;
399
- this.state.client.localMute = false;
400
407
 
401
- this.applyClientStateLocally(meeting, 'localUnmuteRequired');
408
+ // change user mute state to false, but keep localMute true if overall mute state is still true
409
+ this.muteLocalStream(meeting, false, 'localUnmuteRequired');
410
+ if (this.type === AUDIO) {
411
+ this.state.client.localMute = meeting.mediaProperties.audioStream?.muted;
412
+ } else {
413
+ this.state.client.localMute = meeting.mediaProperties.videoStream?.muted;
414
+ }
415
+
402
416
  this.applyClientStateToServer(meeting);
403
417
  }
404
418
 
@@ -4,6 +4,7 @@ import {debounce} from 'lodash';
4
4
  import {StatelessWebexPlugin} from '@webex/webex-core';
5
5
  // @ts-ignore
6
6
  import {deviceType} from '@webex/common';
7
+ import {CallDiagnosticUtils} from '@webex/internal-plugin-metrics';
7
8
 
8
9
  import LoggerProxy from '../common/logs/logger-proxy';
9
10
  import {
@@ -184,6 +185,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
184
185
  deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
185
186
  }
186
187
 
188
+ // append installationId to device config if it exists
189
+ // @ts-ignore
190
+ if (this.webex.internal.device.config.installationId) {
191
+ // @ts-ignore
192
+ body.device.installationId = this.webex.internal.device.config.installationId;
193
+ }
194
+
187
195
  if (locale) {
188
196
  body.locale = locale;
189
197
  }
@@ -198,6 +206,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
198
206
  body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;
199
207
  // @ts-ignore
200
208
  body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;
209
+ body.device.localIp =
210
+ // @ts-ignore
211
+ CallDiagnosticUtils.anonymizeIPAddress(this.webex.meetings.geoHintInfo.clientAddress) ||
212
+ undefined;
201
213
  }
202
214
 
203
215
  if (moderator !== undefined) {
@@ -416,7 +428,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
416
428
  `Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`
417
429
  );
418
430
 
419
- return err;
431
+ throw err;
420
432
  });
421
433
  }
422
434
 
@@ -641,6 +653,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
641
653
  * @param {String} options.deviceUrl Url of a device
642
654
  * @param {String} options.resourceId Populated if you are paired to a device
643
655
  * @param {String} options.uri floor grant uri
656
+ * @param {String} options.shareInstanceId id for current share
644
657
  * @returns {Promise}
645
658
  */
646
659
  changeMeetingFloor(
@@ -652,6 +665,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
652
665
  resourceId: string;
653
666
  uri: string;
654
667
  annotationInfo: AnnotationInfo;
668
+ shareInstanceId: string;
655
669
  }
656
670
  | any
657
671
  ) {
@@ -682,6 +696,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
682
696
  resourceUrl: options.resourceUrl,
683
697
  };
684
698
 
699
+ if (options?.shareInstanceId) {
700
+ body.floor.shareInstanceId = options.shareInstanceId;
701
+ }
702
+
685
703
  if (options?.resourceToken) {
686
704
  body.resourceToken = options?.resourceToken;
687
705
  }
@@ -13,6 +13,7 @@ import {
13
13
  FULL_STATE,
14
14
  SELF_POLICY,
15
15
  EVENT_TRIGGERS,
16
+ LOCAL_SHARE_ERRORS,
16
17
  IP_VERSION,
17
18
  } from '../constants';
18
19
  import BrowserDetection from '../common/browser-detection';
@@ -692,6 +693,102 @@ const MeetingUtil = {
692
693
  EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE
693
694
  );
694
695
  },
696
+
697
+ /**
698
+ * Returns a CA-recognized error payload for the specified raw error message/reason.
699
+ *
700
+ * New errors can be added to this function for handling in the future
701
+ *
702
+ * @param {String} reason the raw error message
703
+ * @returns {Array<object>} an array of payload objects
704
+ */
705
+ getChangeMeetingFloorErrorPayload: (reason: string) => {
706
+ const errorPayload = {
707
+ errorDescription: reason,
708
+ name: 'locus.response',
709
+ shownToUser: false,
710
+ };
711
+ if (reason.includes(LOCAL_SHARE_ERRORS.UNDEFINED)) {
712
+ return [
713
+ {
714
+ ...errorPayload,
715
+ fatal: true,
716
+ category: 'signaling',
717
+ errorCode: 1100,
718
+ },
719
+ ];
720
+ }
721
+ if (reason.includes(LOCAL_SHARE_ERRORS.DEVICE_NOT_JOINED)) {
722
+ return [
723
+ {
724
+ ...errorPayload,
725
+ fatal: true,
726
+ category: 'signaling',
727
+ errorCode: 4050,
728
+ },
729
+ ];
730
+ }
731
+ if (reason.includes(LOCAL_SHARE_ERRORS.NO_MEDIA_FOR_DEVICE)) {
732
+ return [
733
+ {
734
+ ...errorPayload,
735
+ fatal: true,
736
+ category: 'media',
737
+ errorCode: 2048,
738
+ },
739
+ ];
740
+ }
741
+ if (reason.includes(LOCAL_SHARE_ERRORS.NO_CONFLUENCE_ID)) {
742
+ return [
743
+ {
744
+ ...errorPayload,
745
+ fatal: true,
746
+ category: 'signaling',
747
+ errorCode: 4064,
748
+ },
749
+ ];
750
+ }
751
+ if (reason.includes(LOCAL_SHARE_ERRORS.CONTENT_SHARING_DISABLED)) {
752
+ return [
753
+ {
754
+ ...errorPayload,
755
+ fatal: true,
756
+ category: 'expected',
757
+ errorCode: 4065,
758
+ },
759
+ ];
760
+ }
761
+ if (reason.includes(LOCAL_SHARE_ERRORS.LOCUS_PARTICIPANT_DNE)) {
762
+ return [
763
+ {
764
+ ...errorPayload,
765
+ fatal: true,
766
+ category: 'signaling',
767
+ errorCode: 4066,
768
+ },
769
+ ];
770
+ }
771
+ if (reason.includes(LOCAL_SHARE_ERRORS.CONTENT_REQUEST_WHILE_PENDING_WHITEBOARD)) {
772
+ return [
773
+ {
774
+ ...errorPayload,
775
+ fatal: true,
776
+ category: 'expected',
777
+ errorCode: 4067,
778
+ },
779
+ ];
780
+ }
781
+
782
+ // return unknown error
783
+ return [
784
+ {
785
+ ...errorPayload,
786
+ fatal: true,
787
+ category: 'signaling',
788
+ errorCode: 1100,
789
+ },
790
+ ];
791
+ },
695
792
  };
696
793
 
697
794
  export default MeetingUtil;
@@ -71,20 +71,39 @@ export default class MeetingInfo {
71
71
  * @memberof MeetingInfo
72
72
  */
73
73
  private requestFetchInfo(options: any) {
74
- const {meetingId} = options;
75
- if (meetingId) {
74
+ const {meetingId, sendCAevents} = options;
75
+ if (meetingId && sendCAevents) {
76
76
  this.webex.internal.newMetrics.submitInternalEvent({
77
77
  name: 'internal.client.meetinginfo.request',
78
78
  });
79
+ this.webex.internal.newMetrics.submitClientEvent({
80
+ name: 'client.meetinginfo.request',
81
+ options: {
82
+ meetingId,
83
+ },
84
+ });
79
85
  }
80
86
 
81
87
  return this.meetingInfoRequest
82
88
  .fetchMeetingInfo(options)
83
89
  .then((info) => {
84
- if (meetingId) {
90
+ if (meetingId && sendCAevents) {
85
91
  this.webex.internal.newMetrics.submitInternalEvent({
86
92
  name: 'internal.client.meetinginfo.response',
87
93
  });
94
+ this.webex.internal.newMetrics.submitClientEvent({
95
+ name: 'client.meetinginfo.response',
96
+ payload: {
97
+ identifiers: {
98
+ meetingLookupUrl: info?.url,
99
+ },
100
+ },
101
+ options: {
102
+ meetingId,
103
+ webexConferenceIdStr: info?.body?.confIdStr || info?.body?.confID,
104
+ globalMeetingId: info?.body?.meetingId,
105
+ },
106
+ });
88
107
  }
89
108
  if (info && info.body) {
90
109
  this.setMeetingInfo(info.body.sipMeetingUri || info.body.meetingLink, info.body);
@@ -96,21 +115,23 @@ export default class MeetingInfo {
96
115
  LoggerProxy.logger.error(
97
116
  `Meeting-info:index#requestFetchInfo --> ${error} fetch meetingInfo`
98
117
  );
99
- this.webex.internal.newMetrics.submitInternalEvent({
100
- name: 'internal.client.meetinginfo.response',
101
- });
102
- this.webex.internal.newMetrics.submitClientEvent({
103
- name: 'client.meetinginfo.response',
104
- payload: {
105
- identifiers: {
106
- meetingLookupUrl: error?.url,
118
+ if (meetingId && sendCAevents) {
119
+ this.webex.internal.newMetrics.submitInternalEvent({
120
+ name: 'internal.client.meetinginfo.response',
121
+ });
122
+ this.webex.internal.newMetrics.submitClientEvent({
123
+ name: 'client.meetinginfo.response',
124
+ payload: {
125
+ identifiers: {
126
+ meetingLookupUrl: error?.url,
127
+ },
128
+ },
129
+ options: {
130
+ meetingId,
131
+ rawError: error,
107
132
  },
108
- },
109
- options: {
110
- meetingId,
111
- rawError: error,
112
- },
113
- });
133
+ });
134
+ }
114
135
 
115
136
  return Promise.reject(error);
116
137
  });
@@ -137,6 +158,12 @@ export default class MeetingInfo {
137
158
  * Fetches meeting info from the server
138
159
  * @param {String} destination one of many different types of destinations to look up info for
139
160
  * @param {String} [type] to match up with the destination value
161
+ * @param {String} [password] meeting password
162
+ * @param {Object} [captchaInfo] captcha code and id
163
+ * @param {String} [installedOrgID]
164
+ * @param {String} [locusId]
165
+ * @param {Object} [extraParams]
166
+ * @param {Boolean} [options] meeting Id and whether Call Analyzer events should be sent
140
167
  * @returns {Promise} returns a meeting info object
141
168
  * @public
142
169
  * @memberof MeetingInfo
@@ -157,7 +184,7 @@ export default class MeetingInfo {
157
184
  locusId = null,
158
185
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
159
186
  extraParams: object = {},
160
- options: {meetingId?: string} = {}
187
+ options: {meetingId?: string; sendCAevents?: boolean} = {}
161
188
  ) {
162
189
  if (type === _PERSONAL_ROOM_ && !destination) {
163
190
  destination = this.webex.internal.device.userId;
@@ -166,13 +193,13 @@ export default class MeetingInfo {
166
193
  return this.fetchInfoOptions(MeetingInfoUtil.extractDestination(destination, type), type).then(
167
194
  (infoOptions) =>
168
195
  // fetch meeting info
169
- this.requestFetchInfo({...infoOptions, meetingId: options.meetingId}).catch((error) => {
196
+ this.requestFetchInfo({...infoOptions, ...options}).catch((error) => {
170
197
  // if it failed the first time as meeting link
171
198
  if (infoOptions.type === _MEETING_LINK_) {
172
199
  // convert the meeting link to sip URI and retry
173
200
  return this.requestFetchInfo({
174
201
  ...this.fetchInfoOptions(MeetingInfoUtil.convertLinkToSip(destination), _SIP_URI_),
175
- meetingId: options.meetingId,
202
+ ...options,
176
203
  });
177
204
  }
178
205
 
@@ -279,9 +279,9 @@ export default class MeetingInfoV2 {
279
279
  installedOrgID = null,
280
280
  locusId = null,
281
281
  extraParams: object = {},
282
- options: {meetingId?: string} = {}
282
+ options: {meetingId?: string; sendCAevents?: boolean} = {}
283
283
  ) {
284
- const {meetingId} = options;
284
+ const {meetingId, sendCAevents} = options;
285
285
 
286
286
  const destinationType = await MeetingInfoUtil.getDestinationType({
287
287
  destination,
@@ -336,29 +336,51 @@ export default class MeetingInfoV2 {
336
336
  requestOptions.resource = 'meetingInfo';
337
337
  }
338
338
 
339
- if (meetingId) {
339
+ if (meetingId && sendCAevents) {
340
340
  this.webex.internal.newMetrics.submitInternalEvent({
341
341
  name: 'internal.client.meetinginfo.request',
342
342
  });
343
+
344
+ this.webex.internal.newMetrics.submitClientEvent({
345
+ name: 'client.meetinginfo.request',
346
+ options: {
347
+ meetingId,
348
+ },
349
+ });
343
350
  }
344
351
 
345
352
  return this.webex
346
353
  .request(requestOptions)
347
354
  .then((response) => {
348
- if (meetingId) {
355
+ if (meetingId && sendCAevents) {
349
356
  this.webex.internal.newMetrics.submitInternalEvent({
350
357
  name: 'internal.client.meetinginfo.response',
351
358
  });
359
+
360
+ this.webex.internal.newMetrics.submitClientEvent({
361
+ name: 'client.meetinginfo.response',
362
+ payload: {
363
+ identifiers: {
364
+ meetingLookupUrl: response?.url,
365
+ },
366
+ },
367
+ options: {
368
+ meetingId,
369
+ webexConferenceIdStr: response?.body?.confIdStr || response?.body?.confID,
370
+ globalMeetingId: response?.body?.meetingId,
371
+ },
372
+ });
352
373
  }
353
374
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS);
354
375
 
355
376
  return response;
356
377
  })
357
378
  .catch((err) => {
358
- if (meetingId) {
379
+ if (meetingId && sendCAevents) {
359
380
  this.webex.internal.newMetrics.submitInternalEvent({
360
381
  name: 'internal.client.meetinginfo.response',
361
382
  });
383
+
362
384
  this.webex.internal.newMetrics.submitClientEvent({
363
385
  name: 'client.meetinginfo.response',
364
386
  payload: {
@@ -195,7 +195,7 @@ MeetingInfoUtil.getDestinationType = async (from) => {
195
195
  });
196
196
  } else if (hydraId.room) {
197
197
  LoggerProxy.logger.error(
198
- `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-guide-for-USM-meeting) to migrate to use the meeting ID or SIP address.`
198
+ `Meeting-info:util#getDestinationType --> Using the space ID as a destination is no longer supported. Please refer to the [migration guide](https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings) to migrate to use the meeting ID or SIP address.`
199
199
  );
200
200
  // Error code 30105 added as Space ID deprecated as of beta, Please refer migration guide.
201
201
  throw new SpaceIDDeprecatedError();
@@ -60,4 +60,17 @@ export default class MeetingCollection extends Collection {
60
60
 
61
61
  return null;
62
62
  }
63
+
64
+ /**
65
+ * Gets the meeting that has a webrtc media connection
66
+ * NOTE: this function assumes there is no more than 1 such meeting
67
+ *
68
+ * @returns {Meeting} first meeting found, else undefined
69
+ * @public
70
+ * @memberof MeetingCollection
71
+ */
72
+ public getActiveWebrtcMeeting() {
73
+ // @ts-ignore
74
+ return find(this.meetings, (meeting) => meeting.mediaProperties.webrtcMediaConnection);
75
+ }
63
76
  }