@webex/plugin-meetings 3.9.0 → 3.10.0

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 (117) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +8 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/controls-options-manager/index.js +22 -5
  6. package/dist/controls-options-manager/index.js.map +1 -1
  7. package/dist/index.js +2 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/interceptors/index.js +7 -0
  10. package/dist/interceptors/index.js.map +1 -1
  11. package/dist/interceptors/locusRouteToken.js +116 -0
  12. package/dist/interceptors/locusRouteToken.js.map +1 -0
  13. package/dist/interpretation/index.js +1 -1
  14. package/dist/interpretation/siLanguage.js +1 -1
  15. package/dist/locus-info/controlsUtils.js +11 -2
  16. package/dist/locus-info/controlsUtils.js.map +1 -1
  17. package/dist/locus-info/index.js +56 -14
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/parser.js +4 -1
  20. package/dist/locus-info/parser.js.map +1 -1
  21. package/dist/media/properties.js +53 -5
  22. package/dist/media/properties.js.map +1 -1
  23. package/dist/meeting/in-meeting-actions.js +8 -0
  24. package/dist/meeting/in-meeting-actions.js.map +1 -1
  25. package/dist/meeting/index.js +339 -185
  26. package/dist/meeting/index.js.map +1 -1
  27. package/dist/meeting/muteState.js +2 -5
  28. package/dist/meeting/muteState.js.map +1 -1
  29. package/dist/meeting/request.js +177 -14
  30. package/dist/meeting/request.js.map +1 -1
  31. package/dist/meeting/util.js +39 -11
  32. package/dist/meeting/util.js.map +1 -1
  33. package/dist/meeting-info/meeting-info-v2.js +29 -21
  34. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  35. package/dist/meetings/index.js +31 -25
  36. package/dist/meetings/index.js.map +1 -1
  37. package/dist/member/index.js +9 -0
  38. package/dist/member/index.js.map +1 -1
  39. package/dist/member/types.js.map +1 -1
  40. package/dist/member/util.js +10 -0
  41. package/dist/member/util.js.map +1 -1
  42. package/dist/members/collection.js +13 -0
  43. package/dist/members/collection.js.map +1 -1
  44. package/dist/members/index.js +42 -20
  45. package/dist/members/index.js.map +1 -1
  46. package/dist/members/util.js +7 -2
  47. package/dist/members/util.js.map +1 -1
  48. package/dist/metrics/constants.js +2 -1
  49. package/dist/metrics/constants.js.map +1 -1
  50. package/dist/reachability/index.js +3 -3
  51. package/dist/reachability/index.js.map +1 -1
  52. package/dist/types/constants.d.ts +7 -0
  53. package/dist/types/controls-options-manager/index.d.ts +9 -1
  54. package/dist/types/interceptors/index.d.ts +2 -1
  55. package/dist/types/interceptors/locusRouteToken.d.ts +38 -0
  56. package/dist/types/locus-info/index.d.ts +56 -2
  57. package/dist/types/media/properties.d.ts +21 -0
  58. package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
  59. package/dist/types/meeting/index.d.ts +41 -1
  60. package/dist/types/meeting/request.d.ts +42 -0
  61. package/dist/types/meeting/util.d.ts +13 -3
  62. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  63. package/dist/types/meetings/index.d.ts +3 -1
  64. package/dist/types/member/index.d.ts +1 -0
  65. package/dist/types/member/types.d.ts +1 -0
  66. package/dist/types/member/util.d.ts +5 -0
  67. package/dist/types/members/collection.d.ts +6 -0
  68. package/dist/types/members/index.d.ts +12 -2
  69. package/dist/types/members/util.d.ts +6 -3
  70. package/dist/types/metrics/constants.d.ts +1 -0
  71. package/dist/webinar/index.js +1 -1
  72. package/package.json +23 -23
  73. package/src/constants.ts +10 -0
  74. package/src/controls-options-manager/index.ts +26 -5
  75. package/src/index.ts +2 -1
  76. package/src/interceptors/index.ts +2 -1
  77. package/src/interceptors/locusRouteToken.ts +80 -0
  78. package/src/locus-info/controlsUtils.ts +18 -0
  79. package/src/locus-info/index.ts +99 -17
  80. package/src/locus-info/parser.ts +5 -1
  81. package/src/media/properties.ts +43 -0
  82. package/src/meeting/in-meeting-actions.ts +16 -0
  83. package/src/meeting/index.ts +204 -24
  84. package/src/meeting/muteState.ts +2 -6
  85. package/src/meeting/request.ts +141 -0
  86. package/src/meeting/util.ts +50 -20
  87. package/src/meeting-info/meeting-info-v2.ts +24 -5
  88. package/src/meetings/index.ts +9 -3
  89. package/src/member/index.ts +10 -0
  90. package/src/member/types.ts +1 -0
  91. package/src/member/util.ts +14 -0
  92. package/src/members/collection.ts +11 -0
  93. package/src/members/index.ts +38 -5
  94. package/src/members/util.ts +18 -2
  95. package/src/metrics/constants.ts +1 -0
  96. package/src/reachability/index.ts +3 -3
  97. package/test/unit/spec/common/browser-detection.js +0 -24
  98. package/test/unit/spec/controls-options-manager/index.js +47 -0
  99. package/test/unit/spec/fixture/locus.js +1 -0
  100. package/test/unit/spec/interceptors/locusRouteToken.ts +87 -0
  101. package/test/unit/spec/locus-info/index.js +91 -15
  102. package/test/unit/spec/locus-info/parser.js +3 -2
  103. package/test/unit/spec/media/properties.ts +137 -0
  104. package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
  105. package/test/unit/spec/meeting/index.js +398 -30
  106. package/test/unit/spec/meeting/muteState.js +32 -6
  107. package/test/unit/spec/meeting/request.js +21 -0
  108. package/test/unit/spec/meeting/utils.js +49 -17
  109. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  110. package/test/unit/spec/meetings/index.js +10 -5
  111. package/test/unit/spec/member/util.js +24 -0
  112. package/test/unit/spec/members/collection.js +120 -0
  113. package/test/unit/spec/members/index.js +72 -3
  114. package/test/unit/spec/members/request.js +55 -0
  115. package/test/unit/spec/members/utils.js +116 -14
  116. package/test/unit/spec/reachability/index.ts +158 -3
  117. package/test/unit/spec/roap/turnDiscovery.ts +3 -3
@@ -105,21 +105,29 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
105
105
  * Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
106
106
  *
107
107
  * @param {Meeting} meeting
108
+ * @param {boolean} isLocusUrlChanged
109
+ * @param {Locus} locus
108
110
  * @returns {undefined}
109
111
  */
110
112
  (0, _createClass2.default)(LocusInfo, [{
111
113
  key: "doLocusSync",
112
- value: function doLocusSync(meeting) {
113
- var _this2 = this;
114
- var isDelta;
114
+ value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
115
+ var _this$locusParser$wor,
116
+ _this2 = this;
115
117
  var url;
118
+ var isDelta = false;
116
119
  var meetingDestroyed = false;
117
- if (this.locusParser.workingCopy.syncUrl) {
120
+ if (isLocusUrlChanged) {
121
+ // for the locus url changed case from breakout to main session, we should always do a full sync, in this case, the url from locus is always on main session,
122
+ // so use the main session locus url to get the full locus(full participants list in the response).
123
+ // for the locus url changed case from main session to breakout, we don't need to care about it here,
124
+ // because it is a USE_INCOMING case, it will not be executed here.
125
+ url = locus.url;
126
+ } else if ((_this$locusParser$wor = this.locusParser.workingCopy) !== null && _this$locusParser$wor !== void 0 && _this$locusParser$wor.syncUrl) {
118
127
  url = this.locusParser.workingCopy.syncUrl;
119
128
  isDelta = true;
120
129
  } else {
121
130
  url = meeting.locusUrl;
122
- isDelta = false;
123
131
  }
124
132
  _loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
125
133
 
@@ -210,6 +218,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
210
218
  USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING,
211
219
  WAIT = _LocusDeltaParser$loc.WAIT,
212
220
  LOCUS_URL_CHANGED = _LocusDeltaParser$loc.LOCUS_URL_CHANGED;
221
+ var isLocusUrlChanged = action === LOCUS_URL_CHANGED;
213
222
  switch (action) {
214
223
  case USE_INCOMING:
215
224
  meeting.locusInfo.onDeltaLocus(locus);
@@ -220,7 +229,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
220
229
  break;
221
230
  case DESYNC:
222
231
  case LOCUS_URL_CHANGED:
223
- this.doLocusSync(meeting);
232
+ this.doLocusSync(meeting, isLocusUrlChanged, locus);
224
233
  break;
225
234
  default:
226
235
  _loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
@@ -283,11 +292,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
283
292
  this.updateLocusCache(locus);
284
293
  // above section only updates the locusInfo object
285
294
  // The below section makes sure it updates the locusInfo as well as updates the meeting object
286
- this.updateParticipants(locus.participants);
295
+ this.updateParticipants(locus.participants, []);
287
296
  // For 1:1 space meeting the conversation Url does not exist in locus.conversation
288
297
  this.updateConversationUrl(locus.conversationUrl, locus.info);
289
298
  this.updateControls(locus.controls, locus.self);
290
- this.updateLocusUrl(locus.url);
299
+ this.updateLocusUrl(locus.url, _controlsUtils.default.isMainSessionDTO(locus));
291
300
  this.updateFullState(locus.fullState);
292
301
  this.updateMeetingInfo(locus.info);
293
302
  this.updateEmbeddedApps(locus.embeddedApps);
@@ -314,6 +323,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
314
323
  this.emitChange = true;
315
324
  }
316
325
 
326
+ /**
327
+ * Handles HTTP response from Locus API call.
328
+ * @param {Meeting} meeting meeting object
329
+ * @param {LocusApiResponseBody} responseBody body of the http response from Locus API call
330
+ * @returns {void}
331
+ */
332
+ }, {
333
+ key: "handleLocusAPIResponse",
334
+ value: function handleLocusAPIResponse(meeting, responseBody) {
335
+ this.handleLocusDelta(responseBody.locus, meeting);
336
+ }
337
+
317
338
  /**
318
339
  * @param {Meeting} meeting
319
340
  * @param {Object} data
@@ -327,6 +348,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
327
348
  var eventType = data.eventType;
328
349
  var locus = this.getTheLocusToUpdate(data.locus);
329
350
  _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
351
+ locus.jsSdkMeta = {
352
+ removedParticipantIds: []
353
+ };
330
354
  switch (eventType) {
331
355
  case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
332
356
  case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
@@ -377,6 +401,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
377
401
  }, {
378
402
  key: "onFullLocus",
379
403
  value: function onFullLocus(locus, eventType) {
404
+ var _locus$jsSdkMeta;
380
405
  if (!locus) {
381
406
  _loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
382
407
  }
@@ -388,7 +413,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
388
413
  this.participants = locus.participants;
389
414
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
390
415
  this.updateLocusInfo(locus);
391
- this.updateParticipants(locus.participants, isReplaceMembers);
416
+ this.updateParticipants(locus.participants, (_locus$jsSdkMeta = locus.jsSdkMeta) === null || _locus$jsSdkMeta === void 0 ? void 0 : _locus$jsSdkMeta.removedParticipantIds, isReplaceMembers);
392
417
  this.isMeetingActive();
393
418
  this.handleOneOnOneEvent(eventType);
394
419
  this.updateEmbeddedApps(locus.embeddedApps);
@@ -440,10 +465,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
440
465
  }, {
441
466
  key: "onDeltaLocus",
442
467
  value: function onDeltaLocus(locus) {
468
+ var _locus$jsSdkMeta2;
443
469
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
444
470
  this.mergeParticipants(this.participants, locus.participants);
445
471
  this.updateLocusInfo(locus);
446
- this.updateParticipants(locus.participants, isReplaceMembers);
472
+ this.updateParticipants(locus.participants, (_locus$jsSdkMeta2 = locus.jsSdkMeta) === null || _locus$jsSdkMeta2 === void 0 ? void 0 : _locus$jsSdkMeta2.removedParticipantIds, isReplaceMembers);
447
473
  this.isMeetingActive();
448
474
  }
449
475
 
@@ -467,7 +493,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
467
493
  this.updateCreated(locus.created);
468
494
  this.updateFullState(locus.fullState);
469
495
  this.updateHostInfo(locus.host);
470
- this.updateLocusUrl(locus.url);
496
+ this.updateLocusUrl(locus.url, _controlsUtils.default.isMainSessionDTO(locus));
471
497
  this.updateMeetingInfo(locus.info, locus.self);
472
498
  this.updateMediaShares(locus.mediaShares);
473
499
  this.updateParticipantsUrl(locus.participantsUrl);
@@ -677,19 +703,21 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
677
703
  /**
678
704
  * update meeting's members
679
705
  * @param {Object} participants new participants object
706
+ * @param {Array} removedParticipantIds list of removed participants
680
707
  * @param {Boolean} isReplace is replace the whole members
681
708
  * @returns {Array} updatedParticipants
682
709
  * @memberof LocusInfo
683
710
  */
684
711
  }, {
685
712
  key: "updateParticipants",
686
- value: function updateParticipants(participants, isReplace) {
713
+ value: function updateParticipants(participants, removedParticipantIds, isReplace) {
687
714
  var _this$parsedLocus$con;
688
715
  this.emitScoped({
689
716
  file: 'locus-info',
690
717
  function: 'updateParticipants'
691
718
  }, _constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, {
692
719
  participants: participants,
720
+ removedParticipantIds: removedParticipantIds,
693
721
  recordingId: this.parsedLocus.controls && ((_this$parsedLocus$con = this.parsedLocus.controls.record) === null || _this$parsedLocus$con === void 0 ? void 0 : _this$parsedLocus$con.modifiedBy),
694
722
  selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
695
723
  selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
@@ -758,6 +786,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
758
786
  hasAnnotationControlChanged = _ControlsUtils$getCon2.hasAnnotationControlChanged,
759
787
  hasRemoteDesktopControlChanged = _ControlsUtils$getCon2.hasRemoteDesktopControlChanged,
760
788
  hasPollingQAControlChanged = _ControlsUtils$getCon2.hasPollingQAControlChanged,
789
+ hasAutoEndMeetingChanged = _ControlsUtils$getCon2.hasAutoEndMeetingChanged,
761
790
  current = _ControlsUtils$getCon.current;
762
791
  if (hasMuteOnEntryChanged) {
763
792
  this.emitScoped({
@@ -978,6 +1007,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
978
1007
  state: current.pollingQAControl
979
1008
  });
980
1009
  }
1010
+ if (hasAutoEndMeetingChanged) {
1011
+ this.emitScoped({
1012
+ file: 'locus-info',
1013
+ function: 'updateControls'
1014
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_AUTO_END_MEETING_WARNING_CHANGED, {
1015
+ state: current.autoEndMeetingWarning
1016
+ });
1017
+ }
981
1018
  this.controls = controls;
982
1019
  }
983
1020
  }
@@ -1129,7 +1166,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1129
1166
  value: function updateMeetingInfo(info, self) {
1130
1167
  var _this$parsedLocus$sel;
1131
1168
  var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
1132
- if (info && !(0, _lodash.isEqual)(this.info, info) || roles.length && !(0, _lodash.isEqual)(this.roles, roles) && info) {
1169
+ if (info && !(0, _lodash.isEqual)(this.info, info) || !(0, _lodash.isEqual)(this.roles, roles) && info) {
1133
1170
  var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
1134
1171
  var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
1135
1172
  if (parsedInfo.updates.isLocked) {
@@ -1431,12 +1468,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1431
1468
  /**
1432
1469
  * handles when the locus.url is updated
1433
1470
  * @param {String} url
1471
+ * @param {Boolean} isMainLocus
1434
1472
  * @returns {undefined}
1435
1473
  * emits internal event locus_info_update_url
1436
1474
  */
1437
1475
  }, {
1438
1476
  key: "updateLocusUrl",
1439
1477
  value: function updateLocusUrl(url) {
1478
+ var isMainLocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1440
1479
  if (url && this.url !== url) {
1441
1480
  this.url = url;
1442
1481
  this.updateMeeting({
@@ -1445,7 +1484,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1445
1484
  this.emitScoped({
1446
1485
  file: 'locus-info',
1447
1486
  function: 'updateLocusUrl'
1448
- }, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, url);
1487
+ }, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, {
1488
+ url: url,
1489
+ isMainLocus: isMainLocus
1490
+ });
1449
1491
  }
1450
1492
  }
1451
1493