@webex/plugin-meetings 3.8.1-web-workers-keepalive.1 → 3.9.0-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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +24 -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 +39 -85
- package/dist/locus-info/index.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 +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +274 -140
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +19 -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 +68 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +35 -33
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/members/index.js +11 -9
- 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 +18 -6
- package/dist/members/util.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/types/constants.d.ts +22 -0
- package/dist/types/locus-info/index.d.ts +0 -9
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +40 -19
- package/dist/types/meeting/request.d.ts +9 -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 +3 -0
- package/dist/types/members/index.d.ts +10 -7
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +7 -3
- 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 +22 -23
- package/src/constants.ts +23 -2
- package/src/locus-info/index.ts +48 -86
- package/src/meeting/brbState.ts +9 -7
- package/src/meeting/in-meeting-actions.ts +13 -0
- package/src/meeting/index.ts +165 -38
- package/src/meeting/request.ts +16 -0
- package/src/meeting/request.type.ts +64 -0
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +73 -2
- package/src/meetings/index.ts +3 -2
- package/src/member/index.ts +1 -0
- package/src/members/index.ts +13 -10
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +16 -4
- 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/test/unit/spec/locus-info/index.js +199 -83
- package/test/unit/spec/meeting/brbState.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +729 -80
- package/test/unit/spec/meeting/request.js +71 -0
- package/test/unit/spec/meeting/utils.js +122 -1
- package/test/unit/spec/meetings/index.js +2 -0
- package/test/unit/spec/members/index.js +68 -9
- package/test/unit/spec/members/request.js +2 -2
- package/test/unit/spec/members/utils.js +27 -7
- 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 +3 -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);
|
@@ -115,6 +113,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
115
113
|
var _this2 = this;
|
116
114
|
var isDelta;
|
117
115
|
var url;
|
116
|
+
var meetingDestroyed = false;
|
118
117
|
if (this.locusParser.workingCopy.syncUrl) {
|
119
118
|
url = this.locusParser.workingCopy.syncUrl;
|
120
119
|
isDelta = true;
|
@@ -139,27 +138,43 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
139
138
|
code: e.code
|
140
139
|
});
|
141
140
|
isDelta = false;
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
141
|
+
|
142
|
+
// Locus sometimes returns 403, for example if meeting has ended, no point trying the fallback to full sync in that case
|
143
|
+
if (e.statusCode !== 403) {
|
144
|
+
return meeting.meetingRequest.getLocusDTO({
|
145
|
+
url: meeting.locusUrl
|
146
|
+
}).catch(function (err) {
|
147
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
148
|
+
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
149
|
+
meetingDestroyed = true;
|
150
|
+
throw err;
|
151
|
+
});
|
152
|
+
}
|
153
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> got 403 from Locus, skipping fallback to full sync, destroying the meeting');
|
154
|
+
} else {
|
155
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
149
156
|
}
|
150
|
-
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
|
151
157
|
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
158
|
+
meetingDestroyed = true;
|
152
159
|
throw e;
|
153
160
|
}).then(function (res) {
|
161
|
+
if ((0, _lodash.isEmpty)(res.body)) {
|
162
|
+
if (isDelta) {
|
163
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
|
164
|
+
} else {
|
165
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from full DTO sync request');
|
166
|
+
}
|
167
|
+
return;
|
168
|
+
}
|
154
169
|
if (isDelta) {
|
155
|
-
if (
|
170
|
+
if (res.body.baseSequence) {
|
156
171
|
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');
|
172
|
+
return;
|
159
173
|
}
|
160
|
-
|
161
|
-
|
174
|
+
// in some cases Locus might return us full DTO even when we asked for a delta
|
175
|
+
_loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> got full DTO when we asked for delta');
|
162
176
|
}
|
177
|
+
meeting.locusInfo.onFullLocus(res.body);
|
163
178
|
}).catch(function (e) {
|
164
179
|
_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
180
|
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_SYNC_HANDLING_FAILED, {
|
@@ -171,9 +186,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
171
186
|
code: e.code
|
172
187
|
});
|
173
188
|
}).finally(function () {
|
174
|
-
|
175
|
-
|
176
|
-
|
189
|
+
if (!meetingDestroyed) {
|
190
|
+
// Notify parser to resume processing delta events.
|
191
|
+
// Any deltas in the queue that have now been superseded by this sync will simply be ignored
|
192
|
+
_this2.locusParser.resume();
|
193
|
+
}
|
177
194
|
});
|
178
195
|
}
|
179
196
|
|
@@ -263,16 +280,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
263
280
|
* @property {Object} person - Contains person data.
|
264
281
|
*/
|
265
282
|
|
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
283
|
this.updateLocusCache(locus);
|
277
284
|
// above section only updates the locusInfo object
|
278
285
|
// The below section makes sure it updates the locusInfo as well as updates the meeting object
|
@@ -377,7 +384,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
377
384
|
_loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
|
378
385
|
return;
|
379
386
|
}
|
380
|
-
this.updateParticipantDeltas(locus.participants);
|
381
387
|
this.scheduledMeeting = locus.meeting || null;
|
382
388
|
this.participants = locus.participants;
|
383
389
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
@@ -461,12 +467,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
461
467
|
this.updateCreated(locus.created);
|
462
468
|
this.updateFullState(locus.fullState);
|
463
469
|
this.updateHostInfo(locus.host);
|
470
|
+
this.updateLocusUrl(locus.url);
|
464
471
|
this.updateMeetingInfo(locus.info, locus.self);
|
465
472
|
this.updateMediaShares(locus.mediaShares);
|
466
473
|
this.updateParticipantsUrl(locus.participantsUrl);
|
467
474
|
this.updateReplace(locus.replace);
|
468
475
|
this.updateSelf(locus.self);
|
469
|
-
this.updateLocusUrl(locus.url);
|
470
476
|
this.updateAclUrl(locus.aclUrl);
|
471
477
|
this.updateBasequence(locus.baseSequence);
|
472
478
|
this.updateSequence(locus.sequence);
|
@@ -668,58 +674,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
668
674
|
}
|
669
675
|
}
|
670
676
|
|
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
677
|
/**
|
724
678
|
* update meeting's members
|
725
679
|
* @param {Object} participants new participants object
|
@@ -1175,7 +1129,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1175
1129
|
value: function updateMeetingInfo(info, self) {
|
1176
1130
|
var _this$parsedLocus$sel;
|
1177
1131
|
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) ||
|
1132
|
+
if (info && !(0, _lodash.isEqual)(this.info, info) || !(0, _lodash.isEqual)(this.roles, roles) && info) {
|
1179
1133
|
var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
|
1180
1134
|
var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
|
1181
1135
|
if (parsedInfo.updates.isLocked) {
|
@@ -1637,7 +1591,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1637
1591
|
}, {
|
1638
1592
|
key: "updateMainSessionLocusCache",
|
1639
1593
|
value: function updateMainSessionLocusCache(mainLocus) {
|
1640
|
-
var
|
1594
|
+
var _this4 = this;
|
1641
1595
|
if (!mainLocus) {
|
1642
1596
|
return;
|
1643
1597
|
}
|
@@ -1646,7 +1600,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
1646
1600
|
// shallow merge and do special merge for participants
|
1647
1601
|
(0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
1648
1602
|
if (key === 'participants') {
|
1649
|
-
return
|
1603
|
+
return _this4.mergeParticipants(objValue, srcValue);
|
1650
1604
|
}
|
1651
1605
|
return srcValue || objValue;
|
1652
1606
|
});
|