@webex/plugin-meetings 3.8.1-web-workers-keepalive.1 → 3.9.0-multipleLLM.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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +26 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +77 -95
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +4 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/properties.js +53 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +14 -12
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +8 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +443 -225
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +2 -5
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +44 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/type.js +7 -0
- package/dist/meeting/type.js.map +1 -0
- package/dist/meeting/util.js +98 -13
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +29 -21
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +18 -10
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/members/collection.js +13 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +53 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +25 -8
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +42 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +32 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/index.js +3 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/constants.d.ts +24 -0
- package/dist/types/locus-info/index.d.ts +54 -10
- package/dist/types/media/properties.d.ts +21 -0
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/types/meeting/index.d.ts +51 -20
- package/dist/types/meeting/request.d.ts +18 -1
- package/dist/types/meeting/request.type.d.ts +74 -0
- package/dist/types/meeting/type.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +13 -3
- package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/members/collection.d.ts +6 -0
- package/dist/types/members/index.d.ts +22 -9
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +13 -6
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/multistream/remoteMedia.d.ts +20 -1
- package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
- package/dist/types/multistream/sendSlotManager.d.ts +16 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -24
- package/src/constants.ts +25 -2
- package/src/locus-info/index.ts +133 -96
- package/src/locus-info/parser.ts +5 -1
- package/src/media/properties.ts +43 -0
- package/src/meeting/brbState.ts +9 -7
- package/src/meeting/in-meeting-actions.ts +17 -0
- package/src/meeting/index.ts +273 -42
- package/src/meeting/muteState.ts +2 -6
- package/src/meeting/request.ts +39 -0
- package/src/meeting/request.type.ts +64 -0
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +114 -22
- package/src/meeting-info/meeting-info-v2.ts +24 -5
- package/src/meetings/index.ts +12 -5
- package/src/member/index.ts +1 -0
- package/src/member/types.ts +1 -0
- package/src/members/collection.ts +11 -0
- package/src/members/index.ts +51 -15
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +34 -6
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +7 -7
- package/src/multistream/remoteMedia.ts +34 -4
- package/src/multistream/remoteMediaGroup.ts +37 -2
- package/src/multistream/sendSlotManager.ts +34 -2
- package/src/reachability/index.ts +3 -3
- package/test/unit/spec/locus-info/index.js +229 -98
- package/test/unit/spec/locus-info/parser.js +3 -2
- package/test/unit/spec/media/properties.ts +137 -0
- package/test/unit/spec/meeting/brbState.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
- package/test/unit/spec/meeting/index.js +1022 -93
- package/test/unit/spec/meeting/muteState.js +32 -6
- package/test/unit/spec/meeting/request.js +92 -0
- package/test/unit/spec/meeting/utils.js +167 -17
- package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
- package/test/unit/spec/meetings/index.js +12 -1
- package/test/unit/spec/members/collection.js +120 -0
- package/test/unit/spec/members/index.js +140 -12
- package/test/unit/spec/members/request.js +57 -2
- package/test/unit/spec/members/utils.js +139 -17
- package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
- package/test/unit/spec/multistream/remoteMedia.ts +66 -2
- package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
- package/test/unit/spec/reachability/index.ts +158 -1
package/dist/locus-info/index.js
CHANGED
@@ -11,7 +11,6 @@ _Object$defineProperty(exports, "__esModule", {
|
|
11
11
|
value: true
|
12
12
|
});
|
13
13
|
exports.default = void 0;
|
14
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
15
14
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
|
16
15
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
17
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
@@ -69,7 +68,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
69
68
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aclUrl", void 0);
|
70
69
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "baseSequence", void 0);
|
71
70
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "created", void 0);
|
72
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deltaParticipants", void 0);
|
73
71
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "identities", void 0);
|
74
72
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "membership", void 0);
|
75
73
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participants", void 0);
|
@@ -107,20 +105,29 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
107
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.
|
108
106
|
*
|
109
107
|
* @param {Meeting} meeting
|
108
|
+
* @param {boolean} isLocusUrlChanged
|
109
|
+
* @param {Locus} locus
|
110
110
|
* @returns {undefined}
|
111
111
|
*/
|
112
112
|
(0, _createClass2.default)(LocusInfo, [{
|
113
113
|
key: "doLocusSync",
|
114
|
-
value: function doLocusSync(meeting) {
|
115
|
-
var
|
116
|
-
|
114
|
+
value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
|
115
|
+
var _this$locusParser$wor,
|
116
|
+
_this2 = this;
|
117
117
|
var url;
|
118
|
-
|
118
|
+
var isDelta = false;
|
119
|
+
var meetingDestroyed = false;
|
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) {
|
119
127
|
url = this.locusParser.workingCopy.syncUrl;
|
120
128
|
isDelta = true;
|
121
129
|
} else {
|
122
130
|
url = meeting.locusUrl;
|
123
|
-
isDelta = false;
|
124
131
|
}
|
125
132
|
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
|
126
133
|
|
@@ -139,27 +146,43 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
139
146
|
code: e.code
|
140
147
|
});
|
141
148
|
isDelta = false;
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
+
|
150
|
+
// Locus sometimes returns 403, for example if meeting has ended, no point trying the fallback to full sync in that case
|
151
|
+
if (e.statusCode !== 403) {
|
152
|
+
return meeting.meetingRequest.getLocusDTO({
|
153
|
+
url: meeting.locusUrl
|
154
|
+
}).catch(function (err) {
|
155
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
156
|
+
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
157
|
+
meetingDestroyed = true;
|
158
|
+
throw err;
|
159
|
+
});
|
160
|
+
}
|
161
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> got 403 from Locus, skipping fallback to full sync, destroying the meeting');
|
162
|
+
} else {
|
163
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
149
164
|
}
|
150
|
-
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
151
165
|
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
166
|
+
meetingDestroyed = true;
|
152
167
|
throw e;
|
153
168
|
}).then(function (res) {
|
169
|
+
if ((0, _lodash.isEmpty)(res.body)) {
|
170
|
+
if (isDelta) {
|
171
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
|
172
|
+
} else {
|
173
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from full DTO sync request');
|
174
|
+
}
|
175
|
+
return;
|
176
|
+
}
|
154
177
|
if (isDelta) {
|
155
|
-
if (
|
178
|
+
if (res.body.baseSequence) {
|
156
179
|
meeting.locusInfo.handleLocusDelta(res.body, meeting);
|
157
|
-
|
158
|
-
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
|
180
|
+
return;
|
159
181
|
}
|
160
|
-
|
161
|
-
|
182
|
+
// in some cases Locus might return us full DTO even when we asked for a delta
|
183
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> got full DTO when we asked for delta');
|
162
184
|
}
|
185
|
+
meeting.locusInfo.onFullLocus(res.body);
|
163
186
|
}).catch(function (e) {
|
164
187
|
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> getLocusDTO succeeded but failed to handle result, locus parser will resume but not all data may be synced (".concat(e.toString(), ")"));
|
165
188
|
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_SYNC_HANDLING_FAILED, {
|
@@ -171,9 +194,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
171
194
|
code: e.code
|
172
195
|
});
|
173
196
|
}).finally(function () {
|
174
|
-
|
175
|
-
|
176
|
-
|
197
|
+
if (!meetingDestroyed) {
|
198
|
+
// Notify parser to resume processing delta events.
|
199
|
+
// Any deltas in the queue that have now been superseded by this sync will simply be ignored
|
200
|
+
_this2.locusParser.resume();
|
201
|
+
}
|
177
202
|
});
|
178
203
|
}
|
179
204
|
|
@@ -193,6 +218,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
193
218
|
USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING,
|
194
219
|
WAIT = _LocusDeltaParser$loc.WAIT,
|
195
220
|
LOCUS_URL_CHANGED = _LocusDeltaParser$loc.LOCUS_URL_CHANGED;
|
221
|
+
var isLocusUrlChanged = action === LOCUS_URL_CHANGED;
|
196
222
|
switch (action) {
|
197
223
|
case USE_INCOMING:
|
198
224
|
meeting.locusInfo.onDeltaLocus(locus);
|
@@ -203,7 +229,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
203
229
|
break;
|
204
230
|
case DESYNC:
|
205
231
|
case LOCUS_URL_CHANGED:
|
206
|
-
this.doLocusSync(meeting);
|
232
|
+
this.doLocusSync(meeting, isLocusUrlChanged, locus);
|
207
233
|
break;
|
208
234
|
default:
|
209
235
|
_loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
|
@@ -263,20 +289,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
263
289
|
* @property {Object} person - Contains person data.
|
264
290
|
*/
|
265
291
|
|
266
|
-
/**
|
267
|
-
* Stored participant changes between the last event and the current event.
|
268
|
-
* All previously stored events are overwritten between events.
|
269
|
-
*
|
270
|
-
* @instance
|
271
|
-
* @type {Array<DeltaParticipant>}
|
272
|
-
* @private
|
273
|
-
* @member LocusInfo
|
274
|
-
*/
|
275
|
-
this.deltaParticipants = [];
|
276
292
|
this.updateLocusCache(locus);
|
277
293
|
// above section only updates the locusInfo object
|
278
294
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
279
|
-
this.updateParticipants(locus.participants);
|
295
|
+
this.updateParticipants(locus.participants, []);
|
280
296
|
// For 1:1 space meeting the conversation Url does not exist in locus.conversation
|
281
297
|
this.updateConversationUrl(locus.conversationUrl, locus.info);
|
282
298
|
this.updateControls(locus.controls, locus.self);
|
@@ -307,6 +323,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
307
323
|
this.emitChange = true;
|
308
324
|
}
|
309
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
|
+
|
310
338
|
/**
|
311
339
|
* @param {Meeting} meeting
|
312
340
|
* @param {Object} data
|
@@ -320,6 +348,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
320
348
|
var eventType = data.eventType;
|
321
349
|
var locus = this.getTheLocusToUpdate(data.locus);
|
322
350
|
_loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
|
351
|
+
locus.jsSdkMeta = {
|
352
|
+
removedParticipantIds: []
|
353
|
+
};
|
323
354
|
switch (eventType) {
|
324
355
|
case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
|
325
356
|
case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
|
@@ -370,6 +401,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
370
401
|
}, {
|
371
402
|
key: "onFullLocus",
|
372
403
|
value: function onFullLocus(locus, eventType) {
|
404
|
+
var _locus$jsSdkMeta;
|
373
405
|
if (!locus) {
|
374
406
|
_loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
|
375
407
|
}
|
@@ -377,12 +409,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
377
409
|
_loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
|
378
410
|
return;
|
379
411
|
}
|
380
|
-
this.updateParticipantDeltas(locus.participants);
|
381
412
|
this.scheduledMeeting = locus.meeting || null;
|
382
413
|
this.participants = locus.participants;
|
383
414
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
384
415
|
this.updateLocusInfo(locus);
|
385
|
-
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);
|
386
417
|
this.isMeetingActive();
|
387
418
|
this.handleOneOnOneEvent(eventType);
|
388
419
|
this.updateEmbeddedApps(locus.embeddedApps);
|
@@ -434,10 +465,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
434
465
|
}, {
|
435
466
|
key: "onDeltaLocus",
|
436
467
|
value: function onDeltaLocus(locus) {
|
468
|
+
var _locus$jsSdkMeta2;
|
437
469
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
438
470
|
this.mergeParticipants(this.participants, locus.participants);
|
439
471
|
this.updateLocusInfo(locus);
|
440
|
-
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);
|
441
473
|
this.isMeetingActive();
|
442
474
|
}
|
443
475
|
|
@@ -461,12 +493,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
461
493
|
this.updateCreated(locus.created);
|
462
494
|
this.updateFullState(locus.fullState);
|
463
495
|
this.updateHostInfo(locus.host);
|
496
|
+
this.updateLocusUrl(locus.url);
|
464
497
|
this.updateMeetingInfo(locus.info, locus.self);
|
465
498
|
this.updateMediaShares(locus.mediaShares);
|
466
499
|
this.updateParticipantsUrl(locus.participantsUrl);
|
467
500
|
this.updateReplace(locus.replace);
|
468
501
|
this.updateSelf(locus.self);
|
469
|
-
this.updateLocusUrl(locus.url);
|
470
502
|
this.updateAclUrl(locus.aclUrl);
|
471
503
|
this.updateBasequence(locus.baseSequence);
|
472
504
|
this.updateSequence(locus.sequence);
|
@@ -668,74 +700,24 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
668
700
|
}
|
669
701
|
}
|
670
702
|
|
671
|
-
/**
|
672
|
-
* Update the deltaParticipants property of this object based on a list of
|
673
|
-
* provided participants.
|
674
|
-
*
|
675
|
-
* @param {Array} [participants] - The participants to update against.
|
676
|
-
* @returns {void}
|
677
|
-
*/
|
678
|
-
}, {
|
679
|
-
key: "updateParticipantDeltas",
|
680
|
-
value: function updateParticipantDeltas() {
|
681
|
-
var _this4 = this;
|
682
|
-
var participants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
683
|
-
// Used to find a participant within a participants collection.
|
684
|
-
var findParticipant = function findParticipant(participant, collection) {
|
685
|
-
return collection.find(function (item) {
|
686
|
-
return item.person.id === participant.person.id;
|
687
|
-
});
|
688
|
-
};
|
689
|
-
|
690
|
-
// Generates an object that indicates which state properties have changed.
|
691
|
-
var generateDelta = function generateDelta() {
|
692
|
-
var prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
693
|
-
var newState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
694
|
-
// Setup deltas.
|
695
|
-
var deltas = {
|
696
|
-
audioStatus: prevState.audioStatus !== newState.audioStatus,
|
697
|
-
videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
|
698
|
-
videoStatus: prevState.videoStatus !== newState.videoStatus
|
699
|
-
};
|
700
|
-
|
701
|
-
// Clean the object
|
702
|
-
(0, _keys.default)(deltas).forEach(function (key) {
|
703
|
-
if (deltas[key] !== true) {
|
704
|
-
delete deltas[key];
|
705
|
-
}
|
706
|
-
});
|
707
|
-
return deltas;
|
708
|
-
};
|
709
|
-
this.deltaParticipants = participants.reduce(function (collection, participant) {
|
710
|
-
var existingParticipant = findParticipant(participant, _this4.participants || []) || {};
|
711
|
-
var delta = generateDelta(existingParticipant.status, participant.status);
|
712
|
-
var changed = (0, _keys.default)(delta).length > 0;
|
713
|
-
if (changed) {
|
714
|
-
collection.push({
|
715
|
-
person: participant.person,
|
716
|
-
delta: delta
|
717
|
-
});
|
718
|
-
}
|
719
|
-
return collection;
|
720
|
-
}, []);
|
721
|
-
}
|
722
|
-
|
723
703
|
/**
|
724
704
|
* update meeting's members
|
725
705
|
* @param {Object} participants new participants object
|
706
|
+
* @param {Array} removedParticipantIds list of removed participants
|
726
707
|
* @param {Boolean} isReplace is replace the whole members
|
727
708
|
* @returns {Array} updatedParticipants
|
728
709
|
* @memberof LocusInfo
|
729
710
|
*/
|
730
711
|
}, {
|
731
712
|
key: "updateParticipants",
|
732
|
-
value: function updateParticipants(participants, isReplace) {
|
713
|
+
value: function updateParticipants(participants, removedParticipantIds, isReplace) {
|
733
714
|
var _this$parsedLocus$con;
|
734
715
|
this.emitScoped({
|
735
716
|
file: 'locus-info',
|
736
717
|
function: 'updateParticipants'
|
737
718
|
}, _constants.EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, {
|
738
719
|
participants: participants,
|
720
|
+
removedParticipantIds: removedParticipantIds,
|
739
721
|
recordingId: this.parsedLocus.controls && ((_this$parsedLocus$con = this.parsedLocus.controls.record) === null || _this$parsedLocus$con === void 0 ? void 0 : _this$parsedLocus$con.modifiedBy),
|
740
722
|
selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
|
741
723
|
selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
|
@@ -1175,7 +1157,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1175
1157
|
value: function updateMeetingInfo(info, self) {
|
1176
1158
|
var _this$parsedLocus$sel;
|
1177
1159
|
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) || [];
|
1178
|
-
if (info && !(0, _lodash.isEqual)(this.info, info) ||
|
1160
|
+
if (info && !(0, _lodash.isEqual)(this.info, info) || !(0, _lodash.isEqual)(this.roles, roles) && info) {
|
1179
1161
|
var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
|
1180
1162
|
var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
1181
1163
|
if (parsedInfo.updates.isLocked) {
|
@@ -1637,7 +1619,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1637
1619
|
}, {
|
1638
1620
|
key: "updateMainSessionLocusCache",
|
1639
1621
|
value: function updateMainSessionLocusCache(mainLocus) {
|
1640
|
-
var
|
1622
|
+
var _this4 = this;
|
1641
1623
|
if (!mainLocus) {
|
1642
1624
|
return;
|
1643
1625
|
}
|
@@ -1646,7 +1628,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1646
1628
|
// shallow merge and do special merge for participants
|
1647
1629
|
(0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
1648
1630
|
if (key === 'participants') {
|
1649
|
-
return
|
1631
|
+
return _this4.mergeParticipants(objValue, srcValue);
|
1650
1632
|
}
|
1651
1633
|
return srcValue || objValue;
|
1652
1634
|
});
|