@webex/plugin-meetings 3.12.0-webex-services-ready.3 → 3.12.0-webex-services-ready.4
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +65 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +193 -23
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +141 -56
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +3 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +351 -52
- package/dist/meeting/index.js.map +1 -1
- package/dist/meetings/index.js +25 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +51 -3
- package/dist/types/locus-info/index.d.ts +19 -4
- package/dist/types/media/properties.d.ts +5 -2
- package/dist/types/meeting/index.d.ts +63 -1
- package/dist/types/meetings/index.d.ts +8 -0
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/webinar/index.js +4 -4
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +79 -1
- package/src/constants.ts +1 -0
- package/src/hashTree/hashTreeParser.ts +254 -18
- package/src/locus-info/index.ts +143 -51
- package/src/media/properties.ts +7 -3
- package/src/meeting/index.ts +329 -25
- package/src/meetings/index.ts +35 -1
- package/src/metrics/constants.ts +2 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +2 -2
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +142 -2
- package/test/unit/spec/hashTree/hashTreeParser.ts +556 -3
- package/test/unit/spec/locus-info/index.js +148 -5
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/index.js +832 -126
- package/test/unit/spec/meetings/index.js +116 -12
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +3 -3
|
@@ -381,7 +381,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
|
|
|
381
381
|
throw error;
|
|
382
382
|
});
|
|
383
383
|
},
|
|
384
|
-
version: "3.12.0-webex-services-ready.
|
|
384
|
+
version: "3.12.0-webex-services-ready.4"
|
|
385
385
|
});
|
|
386
386
|
var _default = exports.default = SimultaneousInterpretation;
|
|
387
387
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
|
|
|
18
18
|
languageCode: 'number',
|
|
19
19
|
languageName: 'string'
|
|
20
20
|
},
|
|
21
|
-
version: "3.12.0-webex-services-ready.
|
|
21
|
+
version: "3.12.0-webex-services-ready.4"
|
|
22
22
|
});
|
|
23
23
|
var _default = exports.default = SILanguage;
|
|
24
24
|
//# sourceMappingURL=siLanguage.js.map
|
package/dist/locus-info/index.js
CHANGED
|
@@ -23,6 +23,7 @@ exports.findMeetingForHashTreeMessage = findMeetingForHashTreeMessage;
|
|
|
23
23
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
24
24
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
25
25
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
26
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
26
27
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
27
28
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
28
29
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
@@ -36,6 +37,8 @@ var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/ar
|
|
|
36
37
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
37
38
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
38
39
|
var _lodash = require("lodash");
|
|
40
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
41
|
+
var _webexCore = require("@webex/webex-core");
|
|
39
42
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
40
43
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
41
44
|
var _constants = require("../constants");
|
|
@@ -244,12 +247,13 @@ function createLocusFromHashTreeMessage(message) {
|
|
|
244
247
|
var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
245
248
|
/**
|
|
246
249
|
* Constructor
|
|
247
|
-
* @param {
|
|
250
|
+
* @param {Object} callbacks callbacks used by LocusInfo
|
|
251
|
+
* @param {function} callbacks.updateMeeting callback to update the meeting object from an object
|
|
248
252
|
* @param {object} webex
|
|
249
253
|
* @param {string} meetingId
|
|
250
254
|
* @returns {undefined}
|
|
251
255
|
*/
|
|
252
|
-
function LocusInfo(
|
|
256
|
+
function LocusInfo(callbacks, webex, meetingId) {
|
|
253
257
|
var _this;
|
|
254
258
|
(0, _classCallCheck2.default)(this, LocusInfo);
|
|
255
259
|
_this = _callSuper(this, LocusInfo);
|
|
@@ -258,7 +262,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
258
262
|
(0, _defineProperty2.default)(_this, "locusParser", void 0);
|
|
259
263
|
(0, _defineProperty2.default)(_this, "meetingId", void 0);
|
|
260
264
|
(0, _defineProperty2.default)(_this, "parsedLocus", void 0);
|
|
261
|
-
(0, _defineProperty2.default)(_this, "updateMeeting", void 0);
|
|
262
265
|
(0, _defineProperty2.default)(_this, "webex", void 0);
|
|
263
266
|
(0, _defineProperty2.default)(_this, "aclUrl", void 0);
|
|
264
267
|
(0, _defineProperty2.default)(_this, "baseSequence", void 0);
|
|
@@ -283,14 +286,16 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
283
286
|
(0, _defineProperty2.default)(_this, "hashTreeObjectId2ParticipantId", void 0);
|
|
284
287
|
// mapping of hash tree object ids to participant ids
|
|
285
288
|
(0, _defineProperty2.default)(_this, "classicVsHashTreeMismatchMetricCounter", 0);
|
|
289
|
+
(0, _defineProperty2.default)(_this, "callbacks", void 0);
|
|
290
|
+
(0, _defineProperty2.default)(_this, "destroyMeetingSuspended", false);
|
|
286
291
|
_this.parsedLocus = {
|
|
287
292
|
states: []
|
|
288
293
|
};
|
|
294
|
+
_this.callbacks = callbacks;
|
|
289
295
|
_this.webex = webex;
|
|
290
296
|
_this.emitChange = false;
|
|
291
297
|
_this.compareAndUpdateFlags = {};
|
|
292
298
|
_this.meetingId = meetingId;
|
|
293
|
-
_this.updateMeeting = updateMeeting;
|
|
294
299
|
_this.locusParser = new _parser.default();
|
|
295
300
|
_this.hashTreeParsers = new _map.default();
|
|
296
301
|
_this.hashTreeObjectId2ParticipantId = new _map.default();
|
|
@@ -513,7 +518,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
513
518
|
}, {
|
|
514
519
|
key: "createHashTreeParser",
|
|
515
520
|
value: function createHashTreeParser(_ref) {
|
|
516
|
-
var
|
|
521
|
+
var _this4 = this,
|
|
522
|
+
_locusUrl$split,
|
|
523
|
+
_locusUrl$split$pop,
|
|
524
|
+
_this$webex$config$me;
|
|
517
525
|
var locusUrl = _ref.locusUrl,
|
|
518
526
|
initialLocus = _ref.initialLocus,
|
|
519
527
|
metadata = _ref.metadata,
|
|
@@ -522,9 +530,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
522
530
|
initialLocus: initialLocus,
|
|
523
531
|
metadata: metadata,
|
|
524
532
|
webexRequest: this.webex.request.bind(this.webex),
|
|
525
|
-
|
|
533
|
+
callbacks: {
|
|
534
|
+
locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
|
|
535
|
+
syncLatencyTracker: this.callbacks.syncLatencyTracker,
|
|
536
|
+
// Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
|
|
537
|
+
// webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
|
|
538
|
+
// ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
|
|
539
|
+
// back to a uuid on the rare chance the interceptor hasn't issued any request yet (and so
|
|
540
|
+
// isn't in the map). The value is opaque to the metrics layer and is forced onto the
|
|
541
|
+
// /hashtree and /sync request headers.
|
|
542
|
+
generateTrackingId: function generateTrackingId() {
|
|
543
|
+
var interceptor = (0, _toConsumableArray2.default)(_webexCore.webexTrackingIdSequenceNumbers.keys()).find(function (candidate) {
|
|
544
|
+
return (candidate === null || candidate === void 0 ? void 0 : candidate.webex) === _this4.webex;
|
|
545
|
+
});
|
|
546
|
+
return "".concat(_this4.webex.sessionId, "_").concat(interceptor ? interceptor.sequence : _uuid.default.v4());
|
|
547
|
+
}
|
|
548
|
+
},
|
|
526
549
|
debugId: "HT-".concat((_locusUrl$split = locusUrl.split('/')) === null || _locusUrl$split === void 0 ? void 0 : (_locusUrl$split$pop = _locusUrl$split.pop()) === null || _locusUrl$split$pop === void 0 ? void 0 : _locusUrl$split$pop.substring(0, 4)),
|
|
527
|
-
excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets
|
|
550
|
+
excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets,
|
|
551
|
+
syncLatencyMeetingId: this.meetingId
|
|
528
552
|
});
|
|
529
553
|
|
|
530
554
|
// When a new HashTreeParser is created, previous one should be stopped.
|
|
@@ -683,10 +707,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
683
707
|
}, {
|
|
684
708
|
key: "getCurrentLocusSnapshot",
|
|
685
709
|
value: function getCurrentLocusSnapshot() {
|
|
686
|
-
var
|
|
710
|
+
var _this5 = this;
|
|
687
711
|
var locus = {};
|
|
688
712
|
LocusDtoTopLevelKeys.forEach(function (key) {
|
|
689
|
-
var value =
|
|
713
|
+
var value = _this5[key];
|
|
690
714
|
if (value !== undefined && value !== null) {
|
|
691
715
|
locus[key] = (0, _lodash.cloneDeep)(value);
|
|
692
716
|
}
|
|
@@ -752,7 +776,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
752
776
|
}, {
|
|
753
777
|
key: "updateLocusFromHashTreeObject",
|
|
754
778
|
value: function updateLocusFromHashTreeObject(object, locus) {
|
|
755
|
-
var
|
|
779
|
+
var _this6 = this,
|
|
756
780
|
_locus$self;
|
|
757
781
|
var type = object.htMeta.elementId.type.toLowerCase();
|
|
758
782
|
var addParticipantObject = function addParticipantObject(obj) {
|
|
@@ -760,7 +784,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
760
784
|
locus.participants = [];
|
|
761
785
|
}
|
|
762
786
|
locus.participants.push(obj.data);
|
|
763
|
-
|
|
787
|
+
_this6.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
|
|
764
788
|
};
|
|
765
789
|
switch (type) {
|
|
766
790
|
case _types.ObjectType.locus:
|
|
@@ -1160,7 +1184,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1160
1184
|
}, {
|
|
1161
1185
|
key: "updateFromHashTree",
|
|
1162
1186
|
value: function updateFromHashTree(locusUrl, update) {
|
|
1163
|
-
var
|
|
1187
|
+
var _this7 = this;
|
|
1164
1188
|
switch (update.updateType) {
|
|
1165
1189
|
case _hashTreeParser2.LocusInfoUpdateType.OBJECTS_UPDATED:
|
|
1166
1190
|
{
|
|
@@ -1184,7 +1208,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1184
1208
|
// but these should never happen
|
|
1185
1209
|
_loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
|
|
1186
1210
|
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
|
|
1187
|
-
locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) ||
|
|
1211
|
+
locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this7.url,
|
|
1188
1212
|
message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
|
|
1189
1213
|
});
|
|
1190
1214
|
}
|
|
@@ -1218,7 +1242,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1218
1242
|
// copy over all of existing locus except participants
|
|
1219
1243
|
LocusDtoTopLevelKeys.forEach(function (key) {
|
|
1220
1244
|
if (key !== 'participants') {
|
|
1221
|
-
locus[key] = (0, _lodash.cloneDeep)(
|
|
1245
|
+
locus[key] = (0, _lodash.cloneDeep)(_this7[key]);
|
|
1222
1246
|
}
|
|
1223
1247
|
});
|
|
1224
1248
|
} else {
|
|
@@ -1226,7 +1250,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1226
1250
|
// (except participants, which need to stay empty - that means "no participant changes")
|
|
1227
1251
|
(0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
|
|
1228
1252
|
if (locusDtoKey !== 'participants') {
|
|
1229
|
-
locus[locusDtoKey] = (0, _lodash.cloneDeep)(
|
|
1253
|
+
locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this7[locusDtoKey]);
|
|
1230
1254
|
}
|
|
1231
1255
|
});
|
|
1232
1256
|
}
|
|
@@ -1239,7 +1263,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1239
1263
|
}))));
|
|
1240
1264
|
// now apply all the updates from the hash tree onto the locus
|
|
1241
1265
|
update.updatedObjects.forEach(function (object) {
|
|
1242
|
-
locus =
|
|
1266
|
+
locus = _this7.updateLocusFromHashTreeObject(object, locus);
|
|
1243
1267
|
});
|
|
1244
1268
|
|
|
1245
1269
|
// update our locus info with the new locus
|
|
@@ -1436,7 +1460,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1436
1460
|
key: "onFullLocusCommon",
|
|
1437
1461
|
value: function onFullLocusCommon(locus, eventType) {
|
|
1438
1462
|
var _this$participants,
|
|
1439
|
-
|
|
1463
|
+
_this8 = this,
|
|
1440
1464
|
_locus$jsSdkMeta;
|
|
1441
1465
|
this.scheduledMeeting = locus.meeting || null;
|
|
1442
1466
|
this.participants = locus.participants;
|
|
@@ -1444,7 +1468,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1444
1468
|
var _participant$htMeta;
|
|
1445
1469
|
// participant.htMeta is set only for hash tree based locus
|
|
1446
1470
|
if (typeof ((_participant$htMeta = participant.htMeta) === null || _participant$htMeta === void 0 ? void 0 : _participant$htMeta.elementId.id) === 'number') {
|
|
1447
|
-
|
|
1471
|
+
_this8.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
|
|
1448
1472
|
}
|
|
1449
1473
|
});
|
|
1450
1474
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
|
@@ -1610,7 +1634,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1610
1634
|
if (((_this$parsedLocus$ful3 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful3 === void 0 ? void 0 : _this$parsedLocus$ful3.type) === _constants._CALL_ || ((_this$parsedLocus$ful4 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful4 === void 0 ? void 0 : _this$parsedLocus$ful4.type) === _constants._SIP_BRIDGE_ || ((_this$parsedLocus$ful5 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful5 === void 0 ? void 0 : _this$parsedLocus$ful5.type) === _constants._SPACE_SHARE_) {
|
|
1611
1635
|
// @ts-ignore
|
|
1612
1636
|
var partner = this.getLocusPartner(this.participants, this.self);
|
|
1613
|
-
this.updateMeeting({
|
|
1637
|
+
this.callbacks.updateMeeting({
|
|
1614
1638
|
partner: partner
|
|
1615
1639
|
});
|
|
1616
1640
|
|
|
@@ -1630,8 +1654,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1630
1654
|
name: 'client.call.remote-ended',
|
|
1631
1655
|
options: {
|
|
1632
1656
|
meetingId: this.meetingId
|
|
1657
|
+
},
|
|
1658
|
+
payload: {
|
|
1659
|
+
eventData: {
|
|
1660
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1661
|
+
}
|
|
1633
1662
|
}
|
|
1634
1663
|
});
|
|
1664
|
+
if (this.destroyMeetingSuspended) {
|
|
1665
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1666
|
+
meetingId: this.meetingId,
|
|
1667
|
+
reason: 'CALL_INACTIVE'
|
|
1668
|
+
});
|
|
1669
|
+
}
|
|
1635
1670
|
this.emitScoped({
|
|
1636
1671
|
file: 'locus-info',
|
|
1637
1672
|
function: 'isMeetingActive'
|
|
@@ -1645,8 +1680,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1645
1680
|
name: 'client.call.remote-ended',
|
|
1646
1681
|
options: {
|
|
1647
1682
|
meetingId: this.meetingId
|
|
1683
|
+
},
|
|
1684
|
+
payload: {
|
|
1685
|
+
eventData: {
|
|
1686
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1687
|
+
}
|
|
1648
1688
|
}
|
|
1649
1689
|
});
|
|
1690
|
+
if (this.destroyMeetingSuspended) {
|
|
1691
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1692
|
+
meetingId: this.meetingId,
|
|
1693
|
+
reason: 'PARTNER_LEFT'
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1650
1696
|
this.emitScoped({
|
|
1651
1697
|
file: 'locus-info',
|
|
1652
1698
|
function: 'isMeetingActive'
|
|
@@ -1661,8 +1707,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1661
1707
|
name: 'client.call.remote-ended',
|
|
1662
1708
|
options: {
|
|
1663
1709
|
meetingId: this.meetingId
|
|
1710
|
+
},
|
|
1711
|
+
payload: {
|
|
1712
|
+
eventData: {
|
|
1713
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1714
|
+
}
|
|
1664
1715
|
}
|
|
1665
1716
|
});
|
|
1717
|
+
if (this.destroyMeetingSuspended) {
|
|
1718
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1719
|
+
meetingId: this.meetingId,
|
|
1720
|
+
reason: 'SELF_LEFT'
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1666
1723
|
this.emitScoped({
|
|
1667
1724
|
file: 'locus-info',
|
|
1668
1725
|
function: 'isMeetingActive'
|
|
@@ -1673,40 +1730,68 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1673
1730
|
}
|
|
1674
1731
|
} else if (((_this$parsedLocus$ful6 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful6 === void 0 ? void 0 : _this$parsedLocus$ful6.type) === _constants._MEETING_) {
|
|
1675
1732
|
if (this.fullState && _util.default.isWholeMeetingEnded(this.fullState)) {
|
|
1676
|
-
|
|
1733
|
+
if (this.destroyMeetingSuspended) {
|
|
1734
|
+
_loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (MEETING_INACTIVE_TERMINATING) because destroyMeeting is suspended');
|
|
1735
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1736
|
+
meetingId: this.meetingId,
|
|
1737
|
+
reason: 'MEETING_INACTIVE_TERMINATING'
|
|
1738
|
+
});
|
|
1739
|
+
} else {
|
|
1740
|
+
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive');
|
|
1677
1741
|
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1742
|
+
// @ts-ignore
|
|
1743
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
1744
|
+
name: 'client.call.remote-ended',
|
|
1745
|
+
options: {
|
|
1746
|
+
meetingId: this.meetingId
|
|
1747
|
+
}
|
|
1748
|
+
});
|
|
1749
|
+
this.emitScoped({
|
|
1750
|
+
file: 'locus-info',
|
|
1751
|
+
function: 'isMeetingActive'
|
|
1752
|
+
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
1753
|
+
reason: _constants.MEETING_REMOVED_REASON.MEETING_INACTIVE_TERMINATING,
|
|
1754
|
+
shouldLeave: false
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1692
1757
|
}
|
|
1693
1758
|
// If you are guest and you are removed from the meeting
|
|
1694
1759
|
// You wont get any further events
|
|
1695
1760
|
else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1761
|
+
if (this.destroyMeetingSuspended) {
|
|
1762
|
+
_loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (SELF_REMOVED) because destroyMeeting is suspended');
|
|
1763
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1764
|
+
meetingId: this.meetingId,
|
|
1765
|
+
reason: 'SELF_REMOVED'
|
|
1766
|
+
});
|
|
1767
|
+
} else {
|
|
1768
|
+
this.emitScoped({
|
|
1769
|
+
file: 'locus-info',
|
|
1770
|
+
function: 'isMeetingActive'
|
|
1771
|
+
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
1772
|
+
reason: _constants.MEETING_REMOVED_REASON.SELF_REMOVED,
|
|
1773
|
+
shouldLeave: false
|
|
1774
|
+
});
|
|
1775
|
+
}
|
|
1704
1776
|
}
|
|
1705
1777
|
} else {
|
|
1706
1778
|
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
|
|
1707
1779
|
}
|
|
1708
1780
|
}
|
|
1709
1781
|
|
|
1782
|
+
/**
|
|
1783
|
+
* Suspends or resumes the emission of DESTROY_MEETING events in certain situations.
|
|
1784
|
+
* Used by joinWithMedia to prevent meeting destruction during retry flows.
|
|
1785
|
+
* @param {boolean} suspend - true to suppress, false to resume
|
|
1786
|
+
* @returns {undefined}
|
|
1787
|
+
* @memberof LocusInfo
|
|
1788
|
+
*/
|
|
1789
|
+
}, {
|
|
1790
|
+
key: "suspendDestroyMeeting",
|
|
1791
|
+
value: function suspendDestroyMeeting(suspend) {
|
|
1792
|
+
this.destroyMeetingSuspended = suspend;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1710
1795
|
/**
|
|
1711
1796
|
* checks if the host permissions have changed while in the meeting
|
|
1712
1797
|
* This would be the case if your role as host or moderator has been updated
|
|
@@ -1996,7 +2081,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1996
2081
|
}
|
|
1997
2082
|
if (hasEntryExitToneChanged) {
|
|
1998
2083
|
var entryExitTone = current.entryExitTone;
|
|
1999
|
-
this.updateMeeting({
|
|
2084
|
+
this.callbacks.updateMeeting({
|
|
2000
2085
|
entryExitTone: entryExitTone
|
|
2001
2086
|
});
|
|
2002
2087
|
this.emitScoped({
|
|
@@ -2011,7 +2096,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2011
2096
|
// to fit with audio mute status logic
|
|
2012
2097
|
if (hasVideoEnabledChanged) {
|
|
2013
2098
|
var videoEnabled = current.videoEnabled;
|
|
2014
|
-
this.updateMeeting({
|
|
2099
|
+
this.callbacks.updateMeeting({
|
|
2015
2100
|
unmuteVideoAllowed: videoEnabled
|
|
2016
2101
|
});
|
|
2017
2102
|
this.emitScoped({
|
|
@@ -2101,12 +2186,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2101
2186
|
value: function updateConversationUrl(conversationUrl, info) {
|
|
2102
2187
|
if (conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, conversationUrl)) {
|
|
2103
2188
|
this.conversationUrl = conversationUrl;
|
|
2104
|
-
this.updateMeeting({
|
|
2189
|
+
this.callbacks.updateMeeting({
|
|
2105
2190
|
conversationUrl: conversationUrl
|
|
2106
2191
|
});
|
|
2107
2192
|
} else if (info && info.conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, info.conversationUrl)) {
|
|
2108
2193
|
this.conversationUrl = info.conversationUrl;
|
|
2109
|
-
this.updateMeeting({
|
|
2194
|
+
this.callbacks.updateMeeting({
|
|
2110
2195
|
conversationUrl: info.conversationUrl
|
|
2111
2196
|
});
|
|
2112
2197
|
}
|
|
@@ -2167,7 +2252,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2167
2252
|
value: function updateFullState(fullState) {
|
|
2168
2253
|
if (fullState && !(0, _lodash.isEqual)(this.fullState, fullState)) {
|
|
2169
2254
|
var result = _fullState.default.getFullState(this.fullState, fullState);
|
|
2170
|
-
this.updateMeeting(result.current);
|
|
2255
|
+
this.callbacks.updateMeeting(result.current);
|
|
2171
2256
|
if (result.updates.meetingStateChangedTo) {
|
|
2172
2257
|
this.emitScoped({
|
|
2173
2258
|
file: 'locus-info',
|
|
@@ -2202,7 +2287,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2202
2287
|
value: function updateHostInfo(host) {
|
|
2203
2288
|
if (host && !(0, _lodash.isEqual)(this.host, host)) {
|
|
2204
2289
|
var parsedHosts = _hostUtils.default.getHosts(this.host, host);
|
|
2205
|
-
this.updateMeeting(parsedHosts.current);
|
|
2290
|
+
this.callbacks.updateMeeting(parsedHosts.current);
|
|
2206
2291
|
this.parsedLocus.host = parsedHosts.current;
|
|
2207
2292
|
if (parsedHosts.updates.isNewHost) {
|
|
2208
2293
|
this.compareAndUpdateFlags.compareSelfAndHost = true;
|
|
@@ -2258,7 +2343,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2258
2343
|
this.info = infoToParse;
|
|
2259
2344
|
this.parsedLocus.info = parsedInfo.current;
|
|
2260
2345
|
// Parses the info and adds necessary values
|
|
2261
|
-
this.updateMeeting(parsedInfo.current);
|
|
2346
|
+
this.callbacks.updateMeeting(parsedInfo.current);
|
|
2262
2347
|
this.emitScoped({
|
|
2263
2348
|
file: 'locus-info',
|
|
2264
2349
|
function: 'updateMeetingInfo'
|
|
@@ -2282,7 +2367,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2282
2367
|
return;
|
|
2283
2368
|
}
|
|
2284
2369
|
var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
|
|
2285
|
-
this.updateMeeting({
|
|
2370
|
+
this.callbacks.updateMeeting({
|
|
2286
2371
|
embeddedApps: parsedEmbeddedApps
|
|
2287
2372
|
});
|
|
2288
2373
|
this.emitScoped({
|
|
@@ -2306,7 +2391,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2306
2391
|
var forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2307
2392
|
if (mediaShares && (!(0, _lodash.isEqual)(this.mediaShares, mediaShares) || forceUpdate)) {
|
|
2308
2393
|
var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
|
|
2309
|
-
this.updateMeeting(parsedMediaShares.current);
|
|
2394
|
+
this.callbacks.updateMeeting(parsedMediaShares.current);
|
|
2310
2395
|
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
2311
2396
|
this.mediaShares = mediaShares;
|
|
2312
2397
|
this.emitScoped({
|
|
@@ -2348,7 +2433,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2348
2433
|
// @ts-ignore
|
|
2349
2434
|
var parsedSelves = _selfUtils.default.getSelves(this.parsedLocus.self, self, this.webex.internal.device.url, this.participants // using this.participants instead of locus.participants here, because with delta DTOs locus.participants will only contain a small subset of participants
|
|
2350
2435
|
);
|
|
2351
|
-
this.updateMeeting(parsedSelves.current);
|
|
2436
|
+
this.callbacks.updateMeeting(parsedSelves.current);
|
|
2352
2437
|
this.parsedLocus.self = parsedSelves.current;
|
|
2353
2438
|
var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
|
|
2354
2439
|
if (element !== parsedSelves.current.state) {
|
|
@@ -2359,7 +2444,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2359
2444
|
// this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState?.type, this.parsedLocus.info?.sipUri));
|
|
2360
2445
|
var result = _selfUtils.default.getSipUrl(this.getLocusPartner(this.participants, self), (_this$parsedLocus$ful7 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful7 === void 0 ? void 0 : _this$parsedLocus$ful7.type, (_this$parsedLocus$inf = this.parsedLocus.info) === null || _this$parsedLocus$inf === void 0 ? void 0 : _this$parsedLocus$inf.sipUri);
|
|
2361
2446
|
if (result !== null && result !== void 0 && result.sipUri) {
|
|
2362
|
-
this.updateMeeting(result);
|
|
2447
|
+
this.callbacks.updateMeeting(result);
|
|
2363
2448
|
}
|
|
2364
2449
|
if (parsedSelves.updates.moderatorChanged) {
|
|
2365
2450
|
this.compareAndUpdateFlags.compareHostAndSelf = true;
|
|
@@ -2547,7 +2632,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2547
2632
|
var isMainLocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2548
2633
|
if (url && this.url !== url) {
|
|
2549
2634
|
this.url = url;
|
|
2550
|
-
this.updateMeeting({
|
|
2635
|
+
this.callbacks.updateMeeting({
|
|
2551
2636
|
locusUrl: url
|
|
2552
2637
|
});
|
|
2553
2638
|
this.emitScoped({
|
|
@@ -2676,7 +2761,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2676
2761
|
}, {
|
|
2677
2762
|
key: "updateMainSessionLocusCache",
|
|
2678
2763
|
value: function updateMainSessionLocusCache(mainLocus) {
|
|
2679
|
-
var
|
|
2764
|
+
var _this9 = this;
|
|
2680
2765
|
if (!mainLocus) {
|
|
2681
2766
|
return;
|
|
2682
2767
|
}
|
|
@@ -2685,7 +2770,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2685
2770
|
// shallow merge and do special merge for participants
|
|
2686
2771
|
(0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
|
2687
2772
|
if (key === 'participants') {
|
|
2688
|
-
return
|
|
2773
|
+
return _this9.mergeParticipants(objValue, srcValue);
|
|
2689
2774
|
}
|
|
2690
2775
|
return srcValue || objValue;
|
|
2691
2776
|
});
|