@webex/plugin-meetings 3.9.0-next.2 → 3.9.0-next.20

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 (85) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +2 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/interpretation/index.js +1 -1
  6. package/dist/interpretation/siLanguage.js +1 -1
  7. package/dist/locus-info/index.js +38 -10
  8. package/dist/locus-info/index.js.map +1 -1
  9. package/dist/locus-info/parser.js +4 -1
  10. package/dist/locus-info/parser.js.map +1 -1
  11. package/dist/media/properties.js +53 -5
  12. package/dist/media/properties.js.map +1 -1
  13. package/dist/meeting/in-meeting-actions.js +2 -0
  14. package/dist/meeting/in-meeting-actions.js.map +1 -1
  15. package/dist/meeting/index.js +189 -122
  16. package/dist/meeting/index.js.map +1 -1
  17. package/dist/meeting/muteState.js +2 -5
  18. package/dist/meeting/muteState.js.map +1 -1
  19. package/dist/meeting/request.js +25 -0
  20. package/dist/meeting/request.js.map +1 -1
  21. package/dist/meeting/util.js +30 -11
  22. package/dist/meeting/util.js.map +1 -1
  23. package/dist/meeting-info/meeting-info-v2.js +29 -21
  24. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  25. package/dist/meetings/index.js +31 -25
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/member/types.js.map +1 -1
  28. package/dist/members/collection.js +13 -0
  29. package/dist/members/collection.js.map +1 -1
  30. package/dist/members/index.js +42 -20
  31. package/dist/members/index.js.map +1 -1
  32. package/dist/members/util.js +7 -2
  33. package/dist/members/util.js.map +1 -1
  34. package/dist/metrics/constants.js +2 -1
  35. package/dist/metrics/constants.js.map +1 -1
  36. package/dist/reachability/index.js +3 -3
  37. package/dist/reachability/index.js.map +1 -1
  38. package/dist/types/constants.d.ts +2 -0
  39. package/dist/types/locus-info/index.d.ts +54 -1
  40. package/dist/types/media/properties.d.ts +21 -0
  41. package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
  42. package/dist/types/meeting/index.d.ts +11 -1
  43. package/dist/types/meeting/request.d.ts +9 -0
  44. package/dist/types/meeting/util.d.ts +10 -3
  45. package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
  46. package/dist/types/meetings/index.d.ts +3 -1
  47. package/dist/types/member/types.d.ts +1 -0
  48. package/dist/types/members/collection.d.ts +6 -0
  49. package/dist/types/members/index.d.ts +12 -2
  50. package/dist/types/members/util.d.ts +6 -3
  51. package/dist/types/metrics/constants.d.ts +1 -0
  52. package/dist/webinar/index.js +1 -1
  53. package/package.json +16 -16
  54. package/src/constants.ts +2 -0
  55. package/src/locus-info/index.ts +84 -9
  56. package/src/locus-info/parser.ts +5 -1
  57. package/src/media/properties.ts +43 -0
  58. package/src/meeting/in-meeting-actions.ts +4 -0
  59. package/src/meeting/index.ts +91 -4
  60. package/src/meeting/muteState.ts +2 -6
  61. package/src/meeting/request.ts +23 -0
  62. package/src/meeting/util.ts +41 -20
  63. package/src/meeting-info/meeting-info-v2.ts +24 -5
  64. package/src/meetings/index.ts +9 -3
  65. package/src/member/types.ts +1 -0
  66. package/src/members/collection.ts +11 -0
  67. package/src/members/index.ts +38 -5
  68. package/src/members/util.ts +18 -2
  69. package/src/metrics/constants.ts +1 -0
  70. package/src/reachability/index.ts +3 -3
  71. package/test/unit/spec/locus-info/index.js +30 -15
  72. package/test/unit/spec/locus-info/parser.js +3 -2
  73. package/test/unit/spec/media/properties.ts +137 -0
  74. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
  75. package/test/unit/spec/meeting/index.js +255 -27
  76. package/test/unit/spec/meeting/muteState.js +32 -6
  77. package/test/unit/spec/meeting/request.js +21 -0
  78. package/test/unit/spec/meeting/utils.js +45 -16
  79. package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
  80. package/test/unit/spec/meetings/index.js +10 -1
  81. package/test/unit/spec/members/collection.js +120 -0
  82. package/test/unit/spec/members/index.js +72 -3
  83. package/test/unit/spec/members/request.js +55 -0
  84. package/test/unit/spec/members/utils.js +116 -14
  85. package/test/unit/spec/reachability/index.ts +158 -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,7 +292,7 @@ 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);
@@ -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
 
@@ -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,