@webex/plugin-meetings 3.8.0-web-workers-keepalive.1 → 3.8.1-next.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 (168) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +70 -6
  3. package/dist/breakouts/index.js.map +1 -1
  4. package/dist/common/errors/webex-errors.js +12 -2
  5. package/dist/common/errors/webex-errors.js.map +1 -1
  6. package/dist/config.js +4 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/constants.js +22 -123
  9. package/dist/constants.js.map +1 -1
  10. package/dist/controls-options-manager/enums.js +2 -0
  11. package/dist/controls-options-manager/enums.js.map +1 -1
  12. package/dist/controls-options-manager/types.js.map +1 -1
  13. package/dist/controls-options-manager/util.js +52 -0
  14. package/dist/controls-options-manager/util.js.map +1 -1
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/controlsUtils.js +30 -10
  18. package/dist/locus-info/controlsUtils.js.map +1 -1
  19. package/dist/locus-info/index.js +83 -12
  20. package/dist/locus-info/index.js.map +1 -1
  21. package/dist/locus-info/selfUtils.js +432 -418
  22. package/dist/locus-info/selfUtils.js.map +1 -1
  23. package/dist/media/index.js +17 -17
  24. package/dist/media/index.js.map +1 -1
  25. package/dist/media/properties.js +94 -6
  26. package/dist/media/properties.js.map +1 -1
  27. package/dist/meeting/brbState.js +9 -2
  28. package/dist/meeting/brbState.js.map +1 -1
  29. package/dist/meeting/in-meeting-actions.js +17 -1
  30. package/dist/meeting/in-meeting-actions.js.map +1 -1
  31. package/dist/meeting/index.js +568 -328
  32. package/dist/meeting/index.js.map +1 -1
  33. package/dist/meeting/locusMediaRequest.js +0 -17
  34. package/dist/meeting/locusMediaRequest.js.map +1 -1
  35. package/dist/meeting/muteState.js +4 -4
  36. package/dist/meeting/muteState.js.map +1 -1
  37. package/dist/meeting/request.js +30 -0
  38. package/dist/meeting/request.js.map +1 -1
  39. package/dist/meeting/request.type.js.map +1 -1
  40. package/dist/meeting/util.js +9 -1
  41. package/dist/meeting/util.js.map +1 -1
  42. package/dist/meeting-info/meeting-info-v2.js +19 -13
  43. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  44. package/dist/meeting-info/utilv2.js +5 -1
  45. package/dist/meeting-info/utilv2.js.map +1 -1
  46. package/dist/meetings/index.js +76 -0
  47. package/dist/meetings/index.js.map +1 -1
  48. package/dist/meetings/util.js +14 -0
  49. package/dist/meetings/util.js.map +1 -1
  50. package/dist/member/index.js +45 -9
  51. package/dist/member/index.js.map +1 -1
  52. package/dist/member/types.js +3 -0
  53. package/dist/member/types.js.map +1 -1
  54. package/dist/member/util.js +335 -356
  55. package/dist/member/util.js.map +1 -1
  56. package/dist/members/collection.js.map +1 -1
  57. package/dist/members/index.js +137 -29
  58. package/dist/members/index.js.map +1 -1
  59. package/dist/members/request.js +38 -0
  60. package/dist/members/request.js.map +1 -1
  61. package/dist/members/util.js +36 -1
  62. package/dist/members/util.js.map +1 -1
  63. package/dist/metrics/constants.js +1 -0
  64. package/dist/metrics/constants.js.map +1 -1
  65. package/dist/reachability/clusterReachability.js +23 -31
  66. package/dist/reachability/clusterReachability.js.map +1 -1
  67. package/dist/reachability/index.js +42 -2
  68. package/dist/reachability/index.js.map +1 -1
  69. package/dist/reconnection-manager/index.js +2 -2
  70. package/dist/reconnection-manager/index.js.map +1 -1
  71. package/dist/roap/index.js.map +1 -1
  72. package/dist/roap/turnDiscovery.js +45 -27
  73. package/dist/roap/turnDiscovery.js.map +1 -1
  74. package/dist/roap/types.js +17 -0
  75. package/dist/roap/types.js.map +1 -0
  76. package/dist/types/common/errors/webex-errors.d.ts +7 -1
  77. package/dist/types/config.d.ts +2 -0
  78. package/dist/types/constants.d.ts +15 -85
  79. package/dist/types/controls-options-manager/enums.d.ts +3 -1
  80. package/dist/types/controls-options-manager/types.d.ts +7 -1
  81. package/dist/types/locus-info/index.d.ts +3 -3
  82. package/dist/types/locus-info/selfUtils.d.ts +216 -1
  83. package/dist/types/media/properties.d.ts +15 -0
  84. package/dist/types/meeting/in-meeting-actions.d.ts +16 -0
  85. package/dist/types/meeting/index.d.ts +35 -1
  86. package/dist/types/meeting/muteState.d.ts +0 -1
  87. package/dist/types/meeting/request.d.ts +12 -1
  88. package/dist/types/meeting/request.type.d.ts +6 -0
  89. package/dist/types/meeting/util.d.ts +3 -1
  90. package/dist/types/meeting-info/meeting-info-v2.d.ts +2 -1
  91. package/dist/types/meetings/index.d.ts +28 -0
  92. package/dist/types/member/index.d.ts +20 -6
  93. package/dist/types/member/types.d.ts +73 -14
  94. package/dist/types/member/util.d.ts +156 -1
  95. package/dist/types/members/collection.d.ts +6 -5
  96. package/dist/types/members/index.d.ts +32 -43
  97. package/dist/types/members/request.d.ts +26 -0
  98. package/dist/types/members/util.d.ts +27 -0
  99. package/dist/types/metrics/constants.d.ts +1 -0
  100. package/dist/types/reachability/clusterReachability.d.ts +2 -6
  101. package/dist/types/reachability/index.d.ts +8 -0
  102. package/dist/types/roap/index.d.ts +3 -2
  103. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  104. package/dist/types/roap/types.d.ts +16 -0
  105. package/dist/webinar/index.js +1 -1
  106. package/package.json +24 -23
  107. package/src/breakouts/index.ts +69 -0
  108. package/src/common/errors/webex-errors.ts +8 -1
  109. package/src/config.ts +2 -0
  110. package/src/constants.ts +23 -90
  111. package/src/controls-options-manager/enums.ts +2 -0
  112. package/src/controls-options-manager/types.ts +11 -1
  113. package/src/controls-options-manager/util.ts +62 -0
  114. package/src/locus-info/controlsUtils.ts +48 -12
  115. package/src/locus-info/index.ts +88 -13
  116. package/src/locus-info/selfUtils.ts +496 -442
  117. package/src/media/index.ts +23 -21
  118. package/src/media/properties.ts +96 -0
  119. package/src/meeting/brbState.ts +11 -2
  120. package/src/meeting/in-meeting-actions.ts +32 -0
  121. package/src/meeting/index.ts +356 -87
  122. package/src/meeting/locusMediaRequest.ts +0 -18
  123. package/src/meeting/muteState.ts +4 -4
  124. package/src/meeting/request.ts +36 -1
  125. package/src/meeting/request.type.ts +7 -0
  126. package/src/meeting/util.ts +9 -1
  127. package/src/meeting-info/meeting-info-v2.ts +7 -2
  128. package/src/meeting-info/utilv2.ts +5 -0
  129. package/src/meetings/index.ts +76 -0
  130. package/src/meetings/util.ts +18 -0
  131. package/src/member/index.ts +57 -22
  132. package/src/member/types.ts +82 -16
  133. package/src/member/util.ts +357 -353
  134. package/src/members/collection.ts +4 -3
  135. package/src/members/index.ts +137 -18
  136. package/src/members/request.ts +44 -0
  137. package/src/members/util.ts +43 -1
  138. package/src/metrics/constants.ts +1 -0
  139. package/src/reachability/clusterReachability.ts +26 -25
  140. package/src/reachability/index.ts +55 -1
  141. package/src/reconnection-manager/index.ts +2 -2
  142. package/src/roap/index.ts +3 -7
  143. package/src/roap/turnDiscovery.ts +34 -39
  144. package/src/roap/types.ts +23 -0
  145. package/test/unit/spec/breakouts/index.ts +167 -95
  146. package/test/unit/spec/controls-options-manager/util.js +120 -0
  147. package/test/unit/spec/locus-info/controlsUtils.js +131 -9
  148. package/test/unit/spec/locus-info/index.js +195 -73
  149. package/test/unit/spec/locus-info/selfUtils.js +98 -24
  150. package/test/unit/spec/media/index.ts +150 -18
  151. package/test/unit/spec/media/properties.ts +130 -0
  152. package/test/unit/spec/meeting/brbState.ts +40 -2
  153. package/test/unit/spec/meeting/in-meeting-actions.ts +19 -4
  154. package/test/unit/spec/meeting/index.js +553 -36
  155. package/test/unit/spec/meeting/locusMediaRequest.ts +0 -30
  156. package/test/unit/spec/meeting/muteState.js +73 -2
  157. package/test/unit/spec/meeting/request.js +32 -1
  158. package/test/unit/spec/meeting/utils.js +79 -33
  159. package/test/unit/spec/meeting-info/meetinginfov2.js +41 -0
  160. package/test/unit/spec/meeting-info/utilv2.js +19 -0
  161. package/test/unit/spec/meetings/index.js +68 -1
  162. package/test/unit/spec/members/index.js +304 -78
  163. package/test/unit/spec/members/request.js +68 -22
  164. package/test/unit/spec/members/utils.js +75 -0
  165. package/test/unit/spec/reachability/clusterReachability.ts +41 -55
  166. package/test/unit/spec/reachability/index.ts +89 -0
  167. package/test/unit/spec/reconnection-manager/index.js +4 -4
  168. package/test/unit/spec/roap/turnDiscovery.ts +110 -28
@@ -1,4 +1,4 @@
1
- import {isEqual, assignWith, cloneDeep, isEmpty} from 'lodash';
1
+ import {isEqual, assignWith, cloneDeep, isEmpty, forEach} from 'lodash';
2
2
 
3
3
  import LoggerProxy from '../common/logs/logger-proxy';
4
4
  import EventsScope from '../common/events/events-scope';
@@ -17,7 +17,9 @@ import {
17
17
  MEETING_REMOVED_REASON,
18
18
  CALL_REMOVED_REASON,
19
19
  RECORDING_STATE,
20
+ BREAKOUTS,
20
21
  } from '../constants';
22
+
21
23
  import InfoUtils from './infoUtils';
22
24
  import FullState from './fullState';
23
25
  import SelfUtils from './selfUtils';
@@ -67,6 +69,7 @@ export default class LocusInfo extends EventsScope {
67
69
  services: any;
68
70
  resources: any;
69
71
  mainSessionLocusCache: any;
72
+ self: any;
70
73
  /**
71
74
  * Constructor
72
75
  * @param {function} updateMeeting callback to update the meeting object from an object
@@ -157,6 +160,22 @@ export default class LocusInfo extends EventsScope {
157
160
  } else {
158
161
  meeting.locusInfo.onFullLocus(res.body);
159
162
  }
163
+ })
164
+ .catch((e) => {
165
+ LoggerProxy.logger.info(
166
+ `Locus-info:index#doLocusSync --> getLocusDTO succeeded but failed to handle result, locus parser will resume but not all data may be synced (${e.toString()})`
167
+ );
168
+
169
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.LOCUS_SYNC_HANDLING_FAILED, {
170
+ correlationId: meeting.correlationId,
171
+ url,
172
+ reason: e.message,
173
+ errorName: e.name,
174
+ stack: e.stack,
175
+ code: e.code,
176
+ });
177
+ })
178
+ .finally(() => {
160
179
  // Notify parser to resume processing delta events.
161
180
  // Any deltas in the queue that have now been superseded by this sync will simply be ignored
162
181
  this.locusParser.resume();
@@ -261,7 +280,7 @@ export default class LocusInfo extends EventsScope {
261
280
  this.updateMeetingInfo(locus.info);
262
281
  this.updateEmbeddedApps(locus.embeddedApps);
263
282
  // self and participants generate sipUrl for 1:1 meeting
264
- this.updateSelf(locus.self, locus.participants);
283
+ this.updateSelf(locus.self);
265
284
  this.updateHostInfo(locus.host);
266
285
  this.updateMediaShares(locus.mediaShares);
267
286
  this.updateServices(locus.links?.services);
@@ -419,6 +438,7 @@ export default class LocusInfo extends EventsScope {
419
438
  */
420
439
  onDeltaLocus(locus: any) {
421
440
  const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
441
+ this.mergeParticipants(this.participants, locus.participants);
422
442
  this.updateLocusInfo(locus);
423
443
  this.updateParticipants(locus.participants, isReplaceMembers);
424
444
  this.isMeetingActive();
@@ -446,7 +466,7 @@ export default class LocusInfo extends EventsScope {
446
466
  this.updateMediaShares(locus.mediaShares);
447
467
  this.updateParticipantsUrl(locus.participantsUrl);
448
468
  this.updateReplace(locus.replace);
449
- this.updateSelf(locus.self, locus.participants);
469
+ this.updateSelf(locus.self);
450
470
  this.updateLocusUrl(locus.url);
451
471
  this.updateAclUrl(locus.aclUrl);
452
472
  this.updateBasequence(locus.baseSequence);
@@ -780,6 +800,23 @@ export default class LocusInfo extends EventsScope {
780
800
  isReplace,
781
801
  }
782
802
  );
803
+
804
+ if (participants && Array.isArray(participants) && participants.length > 0) {
805
+ for (const participant of participants) {
806
+ if (participant && participant?.reason === 'FAILURE') {
807
+ this.emitScoped(
808
+ {
809
+ file: 'locus-info',
810
+ function: 'updateParticipants',
811
+ },
812
+ LOCUSINFO.EVENTS.PARTICIPANT_REASON_CHANGED,
813
+ {
814
+ displayName: participant?.person?.primaryDisplayString,
815
+ }
816
+ );
817
+ }
818
+ }
819
+ }
783
820
  }
784
821
 
785
822
  /**
@@ -797,6 +834,7 @@ export default class LocusInfo extends EventsScope {
797
834
  hasRecordingPausedChanged,
798
835
  hasMeetingContainerChanged,
799
836
  hasTranscribeChanged,
837
+ hasTranscribeSpokenLanguageChanged,
800
838
  hasManualCaptionChanged,
801
839
  hasEntryExitToneChanged,
802
840
  hasBreakoutChanged,
@@ -814,6 +852,8 @@ export default class LocusInfo extends EventsScope {
814
852
  hasMeetingFullChanged,
815
853
  hasPracticeSessionEnabledChanged,
816
854
  hasStageViewChanged,
855
+ hasAnnotationControlChanged,
856
+ hasRemoteDesktopControlChanged,
817
857
  },
818
858
  current,
819
859
  } = ControlsUtils.getControls(this.controls, controls);
@@ -933,6 +973,21 @@ export default class LocusInfo extends EventsScope {
933
973
  );
934
974
  }
935
975
 
976
+ if (hasTranscribeSpokenLanguageChanged) {
977
+ const {spokenLanguage} = current.transcribe;
978
+
979
+ this.emitScoped(
980
+ {
981
+ file: 'locus-info',
982
+ function: 'updateControls',
983
+ },
984
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED,
985
+ {
986
+ spokenLanguage,
987
+ }
988
+ );
989
+ }
990
+
936
991
  if (hasManualCaptionChanged) {
937
992
  const {enabled} = current.manualCaptionControl;
938
993
 
@@ -1049,6 +1104,22 @@ export default class LocusInfo extends EventsScope {
1049
1104
  );
1050
1105
  }
1051
1106
 
1107
+ if (hasAnnotationControlChanged) {
1108
+ this.emitScoped(
1109
+ {file: 'locus-info', function: 'updateControls'},
1110
+ LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED,
1111
+ {state: current.annotationControl}
1112
+ );
1113
+ }
1114
+
1115
+ if (hasRemoteDesktopControlChanged) {
1116
+ this.emitScoped(
1117
+ {file: 'locus-info', function: 'updateControls'},
1118
+ LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED,
1119
+ {state: current.rdcControl}
1120
+ );
1121
+ }
1122
+
1052
1123
  this.controls = controls;
1053
1124
  }
1054
1125
  }
@@ -1336,17 +1407,20 @@ export default class LocusInfo extends EventsScope {
1336
1407
 
1337
1408
  /**
1338
1409
  * handles when the locus.self is updated
1339
- * @param {Object} self the locus.mediaShares property
1340
- * @param {Array} participants the locus.participants property
1410
+ * @param {Object} self the new locus.self
1341
1411
  * @returns {undefined}
1342
1412
  * @memberof LocusInfo
1343
1413
  * emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
1344
1414
  */
1345
- updateSelf(self: any, participants: Array<any>) {
1346
- // @ts-ignore - check where this.self come from
1347
- if (self && !isEqual(this.self, self)) {
1415
+ updateSelf(self: any) {
1416
+ if (self) {
1348
1417
  // @ts-ignore
1349
- const parsedSelves = SelfUtils.getSelves(this.self, self, this.webex.internal.device.url);
1418
+ const parsedSelves = SelfUtils.getSelves(
1419
+ this.parsedLocus.self,
1420
+ self,
1421
+ this.webex.internal.device.url,
1422
+ this.participants // using this.participants instead of locus.participants here, because with delta DTOs locus.participants will only contain a small subset of participants
1423
+ );
1350
1424
 
1351
1425
  this.updateMeeting(parsedSelves.current);
1352
1426
  this.parsedLocus.self = parsedSelves.current;
@@ -1360,7 +1434,7 @@ export default class LocusInfo extends EventsScope {
1360
1434
  // TODO: check if we need to save the sipUri here as well
1361
1435
  // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
1362
1436
  const result = SelfUtils.getSipUrl(
1363
- this.getLocusPartner(participants, self),
1437
+ this.getLocusPartner(this.participants, self),
1364
1438
  this.parsedLocus.fullState.type,
1365
1439
  this.parsedLocus.info.sipUri
1366
1440
  );
@@ -1506,7 +1580,7 @@ export default class LocusInfo extends EventsScope {
1506
1580
  {}
1507
1581
  );
1508
1582
  }
1509
- if (parsedSelves.updates.isUserUnadmitted) {
1583
+ if (parsedSelves.updates.hasUserEnteredLobby) {
1510
1584
  this.emitScoped(
1511
1585
  {
1512
1586
  file: 'locus-info',
@@ -1516,7 +1590,7 @@ export default class LocusInfo extends EventsScope {
1516
1590
  self
1517
1591
  );
1518
1592
  }
1519
- if (parsedSelves.updates.isUserAdmitted) {
1593
+ if (parsedSelves.updates.hasUserBeenAdmitted) {
1520
1594
  this.emitScoped(
1521
1595
  {
1522
1596
  file: 'locus-info',
@@ -1706,7 +1780,8 @@ export default class LocusInfo extends EventsScope {
1706
1780
  * @memberof LocusInfo
1707
1781
  */
1708
1782
  getTheLocusToUpdate(newLocus: any) {
1709
- const switchStatus = ControlsUtils.getSessionSwitchStatus(this.controls, newLocus?.controls);
1783
+ const switchStatus = ControlsUtils.getSessionSwitchStatus(this, newLocus);
1784
+
1710
1785
  if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
1711
1786
  return cloneDeep(this.mainSessionLocusCache);
1712
1787
  }