@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-task-refactor.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/annotation/index.js +5 -14
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -29
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +29 -1563
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +3 -13
- package/dist/hashTree/types.js.map +1 -1
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +0 -7
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +5 -27
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/index.js +2 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +3 -7
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +247 -642
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +0 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -57
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +2 -4
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +1 -7
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1036 -1481
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +0 -50
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +3 -133
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +59 -142
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +7 -11
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +0 -10
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +0 -10
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +1 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +60 -9
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +0 -11
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +2 -116
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +18 -171
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +11 -21
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +1 -1
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -0
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/types/common/browser-detection.d.ts +0 -1
- package/dist/types/common/events/events-scope.d.ts +0 -1
- package/dist/types/common/events/events.d.ts +0 -1
- package/dist/types/config.d.ts +0 -5
- package/dist/types/constants.d.ts +1 -24
- package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
- package/dist/types/hashTree/types.d.ts +0 -20
- package/dist/types/index.d.ts +0 -1
- package/dist/types/interceptors/index.d.ts +1 -2
- package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
- package/dist/types/locus-info/index.d.ts +47 -68
- package/dist/types/locus-info/types.d.ts +12 -28
- package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
- package/dist/types/media/properties.d.ts +1 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
- package/dist/types/meeting/index.d.ts +7 -86
- package/dist/types/meeting/request.d.ts +1 -16
- package/dist/types/meeting/request.type.d.ts +0 -5
- package/dist/types/meeting/util.d.ts +0 -31
- package/dist/types/meeting-info/util.d.ts +0 -1
- package/dist/types/meeting-info/utilv2.d.ts +0 -1
- package/dist/types/meetings/index.d.ts +2 -4
- package/dist/types/member/index.d.ts +0 -1
- package/dist/types/member/types.d.ts +4 -4
- package/dist/types/member/util.d.ts +0 -5
- package/dist/types/metrics/constants.d.ts +0 -6
- package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
- package/dist/types/multistream/sendSlotManager.d.ts +1 -23
- package/dist/types/reachability/clusterReachability.d.ts +3 -30
- package/dist/types/reactions/reactions.type.d.ts +0 -1
- package/dist/types/recording-controller/util.d.ts +5 -5
- package/dist/types/roap/index.d.ts +1 -1
- package/dist/webinar/index.js +163 -438
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -26
- package/src/annotation/index.ts +7 -27
- package/src/config.ts +0 -5
- package/src/constants.ts +1 -30
- package/src/hashTree/hashTreeParser.ts +25 -1523
- package/src/hashTree/types.ts +1 -24
- package/src/index.ts +1 -8
- package/src/interceptors/index.ts +1 -2
- package/src/interceptors/locusRouteToken.ts +5 -22
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/controlsUtils.ts +0 -17
- package/src/locus-info/index.ts +213 -707
- package/src/locus-info/selfUtils.ts +0 -1
- package/src/locus-info/types.ts +12 -27
- package/src/media/MediaConnectionAwaiter.ts +1 -41
- package/src/media/properties.ts +1 -3
- package/src/meeting/in-meeting-actions.ts +0 -12
- package/src/meeting/index.ts +84 -461
- package/src/meeting/request.ts +0 -42
- package/src/meeting/request.type.ts +0 -6
- package/src/meeting/util.ts +2 -160
- package/src/meetings/index.ts +60 -180
- package/src/meetings/util.ts +9 -10
- package/src/member/index.ts +0 -10
- package/src/member/util.ts +0 -12
- package/src/metrics/constants.ts +0 -7
- package/src/multistream/mediaRequestManager.ts +54 -4
- package/src/multistream/remoteMediaManager.ts +0 -13
- package/src/multistream/sendSlotManager.ts +3 -97
- package/src/reachability/clusterReachability.ts +27 -153
- package/src/reachability/index.ts +1 -15
- package/src/reachability/reachabilityPeerConnection.ts +1 -3
- package/src/reactions/reactions.type.ts +0 -1
- package/src/reconnection-manager/index.ts +1 -0
- package/src/webinar/index.ts +6 -265
- package/test/unit/spec/annotation/index.ts +7 -69
- package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
- package/test/unit/spec/locus-info/controlsUtils.js +1 -56
- package/test/unit/spec/locus-info/index.js +90 -1457
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
- package/test/unit/spec/media/properties.ts +3 -12
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
- package/test/unit/spec/meeting/index.js +128 -981
- package/test/unit/spec/meeting/request.js +0 -70
- package/test/unit/spec/meeting/utils.js +26 -438
- package/test/unit/spec/meetings/index.js +33 -845
- package/test/unit/spec/meetings/utils.js +1 -51
- package/test/unit/spec/member/index.js +4 -28
- package/test/unit/spec/member/util.js +27 -65
- package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
- package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
- package/test/unit/spec/reachability/clusterReachability.ts +1 -125
- package/test/unit/spec/reachability/index.ts +3 -26
- package/test/unit/spec/reconnection-manager/index.js +8 -4
- package/test/unit/spec/webinar/index.ts +37 -534
- package/dist/aiEnableRequest/index.js +0 -184
- package/dist/aiEnableRequest/index.js.map +0 -1
- package/dist/aiEnableRequest/utils.js +0 -36
- package/dist/aiEnableRequest/utils.js.map +0 -1
- package/dist/hashTree/constants.js +0 -22
- package/dist/hashTree/constants.js.map +0 -1
- package/dist/hashTree/hashTree.js +0 -533
- package/dist/hashTree/hashTree.js.map +0 -1
- package/dist/hashTree/utils.js +0 -69
- package/dist/hashTree/utils.js.map +0 -1
- package/dist/interceptors/constant.js +0 -12
- package/dist/interceptors/constant.js.map +0 -1
- package/dist/interceptors/dataChannelAuthToken.js +0 -290
- package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
- package/dist/interceptors/utils.js +0 -27
- package/dist/interceptors/utils.js.map +0 -1
- package/dist/types/aiEnableRequest/index.d.ts +0 -5
- package/dist/types/aiEnableRequest/utils.d.ts +0 -2
- package/dist/types/hashTree/constants.d.ts +0 -9
- package/dist/types/hashTree/hashTree.d.ts +0 -136
- package/dist/types/hashTree/utils.d.ts +0 -22
- package/dist/types/interceptors/constant.d.ts +0 -5
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
- package/dist/types/interceptors/utils.d.ts +0 -1
- package/dist/types/webinar/utils.d.ts +0 -6
- package/dist/webinar/utils.js +0 -25
- package/dist/webinar/utils.js.map +0 -1
- package/src/aiEnableRequest/README.md +0 -84
- package/src/aiEnableRequest/index.ts +0 -170
- package/src/aiEnableRequest/utils.ts +0 -25
- package/src/hashTree/constants.ts +0 -10
- package/src/hashTree/hashTree.ts +0 -480
- package/src/hashTree/utils.ts +0 -62
- package/src/interceptors/constant.ts +0 -6
- package/src/interceptors/dataChannelAuthToken.ts +0 -170
- package/src/interceptors/utils.ts +0 -16
- package/src/webinar/utils.ts +0 -16
- package/test/unit/spec/aiEnableRequest/index.ts +0 -981
- package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
- package/test/unit/spec/hashTree/hashTree.ts +0 -721
- package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
- package/test/unit/spec/hashTree/utils.ts +0 -140
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
- package/test/unit/spec/interceptors/utils.ts +0 -75
- package/test/unit/spec/webinar/utils.ts +0 -39
package/dist/meetings/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var _constants = require("../constants");
|
|
|
48
48
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
49
49
|
var _meetingInfo = _interopRequireDefault(require("../meeting-info"));
|
|
50
50
|
var _meetingInfoV = _interopRequireDefault(require("../meeting-info/meeting-info-v2"));
|
|
51
|
-
var _meeting =
|
|
51
|
+
var _meeting = _interopRequireDefault(require("../meeting"));
|
|
52
52
|
var _personalMeetingRoom = _interopRequireDefault(require("../personal-meeting-room"));
|
|
53
53
|
var _reachability = _interopRequireDefault(require("../reachability"));
|
|
54
54
|
var _request2 = _interopRequireDefault(require("./request"));
|
|
@@ -62,8 +62,6 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
|
|
|
62
62
|
var _webexErrors = require("../common/errors/webex-errors");
|
|
63
63
|
var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting-info"));
|
|
64
64
|
var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
|
|
65
|
-
var _utils = require("../hashTree/utils");
|
|
66
|
-
var _locusInfo = require("../locus-info");
|
|
67
65
|
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
|
|
68
66
|
function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
69
67
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -195,8 +193,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
195
193
|
(0, _defineProperty2.default)(_this, "preferredWebexSite", void 0);
|
|
196
194
|
(0, _defineProperty2.default)(_this, "reachability", void 0);
|
|
197
195
|
(0, _defineProperty2.default)(_this, "registered", void 0);
|
|
198
|
-
(0, _defineProperty2.default)(_this, "registrationPromise", void 0);
|
|
199
|
-
(0, _defineProperty2.default)(_this, "unregistrationPromise", void 0);
|
|
200
196
|
(0, _defineProperty2.default)(_this, "request", void 0);
|
|
201
197
|
(0, _defineProperty2.default)(_this, "geoHintInfo", void 0);
|
|
202
198
|
(0, _defineProperty2.default)(_this, "meetingInfo", void 0);
|
|
@@ -439,41 +435,19 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
439
435
|
}, {
|
|
440
436
|
key: "getCorrespondingMeetingByLocus",
|
|
441
437
|
value: function getCorrespondingMeetingByLocus(data) {
|
|
442
|
-
var _data$stateElementsMe, _data$
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
data.locusUrl; // classic event
|
|
446
|
-
|
|
447
|
-
// first try to find by locusUrl - that's the simplest and quickest way
|
|
448
|
-
var existingMeeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, locusUrl);
|
|
449
|
-
if (existingMeeting) {
|
|
450
|
-
return existingMeeting;
|
|
451
|
-
}
|
|
452
|
-
if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
453
|
-
// need to check if maybe this event indicates a move to/from breakout
|
|
454
|
-
var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data.stateElementsMessage, this.meetingCollection,
|
|
455
|
-
// @ts-ignore
|
|
456
|
-
this.webex.internal.device.url);
|
|
457
|
-
if (meetingForHashTreeMessage) {
|
|
458
|
-
return meetingForHashTreeMessage;
|
|
459
|
-
}
|
|
438
|
+
var _data$stateElementsMe, _data$locus, _data$locus$self, _data$locus$self$call, _data$locus2, _data$locus2$info, _data$locus3, _data$locus4, _data$locus4$info;
|
|
439
|
+
if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED && (_data$stateElementsMe = data.stateElementsMessage) !== null && _data$stateElementsMe !== void 0 && _data$stateElementsMe.locusUrl) {
|
|
440
|
+
return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.stateElementsMessage.locusUrl);
|
|
460
441
|
}
|
|
461
442
|
|
|
462
|
-
//
|
|
463
|
-
|
|
464
|
-
//
|
|
465
|
-
|
|
466
|
-
//
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
var self = hashTreeEventSelf || ((_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : _data$locus.self);
|
|
471
|
-
return (
|
|
472
|
-
// @ts-ignore
|
|
473
|
-
this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
|
|
474
|
-
// @ts-ignore
|
|
475
|
-
_util2.default.getCorrelationIdForDevice(this.webex.internal.device.url, self)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, self === null || self === void 0 ? void 0 : (_self$callbackInfo = self.callbackInfo) === null || _self$callbackInfo === void 0 ? void 0 : _self$callbackInfo.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId)
|
|
476
|
-
);
|
|
443
|
+
// getting meeting by correlationId. This will happen for the new event
|
|
444
|
+
// Either the locus
|
|
445
|
+
// TODO : Add check for the callBack Address
|
|
446
|
+
return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locusUrl) ||
|
|
447
|
+
// @ts-ignore
|
|
448
|
+
this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
|
|
449
|
+
// @ts-ignore
|
|
450
|
+
_util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, (_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$self = _data$locus.self) === null || _data$locus$self === void 0 ? void 0 : (_data$locus$self$call = _data$locus$self.callbackInfo) === null || _data$locus$self$call === void 0 ? void 0 : _data$locus$self$call.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId);
|
|
477
451
|
}
|
|
478
452
|
|
|
479
453
|
/**
|
|
@@ -494,11 +468,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
494
468
|
var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
495
469
|
var meeting = this.getCorrespondingMeetingByLocus(data);
|
|
496
470
|
|
|
497
|
-
// @ts-ignore
|
|
498
|
-
if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
|
|
499
|
-
(0, _meeting.storeEventForDebugging)('mercury', data);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
471
|
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
503
472
|
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
504
473
|
|
|
@@ -509,7 +478,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
509
478
|
meeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
|
|
510
479
|
}
|
|
511
480
|
if (meeting && !_util2.default.isBreakoutLocusDTO(data.locus)) {
|
|
512
|
-
meeting.locusInfo.updateMainSessionLocusCache(data.locus);
|
|
481
|
+
meeting.locusInfo.updateMainSessionLocusCache(data.locus);
|
|
513
482
|
}
|
|
514
483
|
if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
|
|
515
484
|
_loggerProxy.default.logger.log("Meetings:index#handleLocusEvent --> doesn't need to process locus event");
|
|
@@ -536,29 +505,25 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
536
505
|
// };
|
|
537
506
|
// rather then locus object change to locus url
|
|
538
507
|
|
|
539
|
-
if (data.eventType
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
var _createLocusFromHashT = (0, _locusInfo.createLocusFromHashTreeMessage)(data.stateElementsMessage),
|
|
546
|
-
locus = _createLocusFromHashT.locus;
|
|
547
|
-
data.locus = locus;
|
|
548
|
-
}
|
|
549
|
-
if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
|
|
550
|
-
// just ignore the event as its already ended and not active
|
|
551
|
-
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
508
|
+
if (data.eventType !== _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
509
|
+
if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
|
|
510
|
+
// just ignore the event as its already ended and not active
|
|
511
|
+
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
554
514
|
|
|
555
|
-
|
|
556
|
-
|
|
515
|
+
// When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
|
|
516
|
+
// Any future events will be neglected
|
|
557
517
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
518
|
+
if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
|
|
519
|
+
// just ignore the event as its already ended and not active
|
|
520
|
+
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
525
|
+
// in hash tree messages we don't ge the locus object, but the meeting constructor needs at least locus.url
|
|
526
|
+
(0, _lodash.set)(data, 'locus.url', data.stateElementsMessage.locusUrl);
|
|
562
527
|
}
|
|
563
528
|
this.create(data.locus, _constants.DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo).then(/*#__PURE__*/function () {
|
|
564
529
|
var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
|
|
@@ -629,7 +594,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
629
594
|
}
|
|
630
595
|
|
|
631
596
|
/**
|
|
632
|
-
* handles locus events through mercury that are not roap
|
|
597
|
+
* handles locus events through mercury that are not roap
|
|
633
598
|
* @param {Object} envelope
|
|
634
599
|
* @param {Object} envelope.data
|
|
635
600
|
* @param {String} envelope.data.eventType
|
|
@@ -643,7 +608,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
643
608
|
var data = envelope.data;
|
|
644
609
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
645
610
|
var eventType = data.eventType;
|
|
646
|
-
if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP
|
|
611
|
+
if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP) {
|
|
647
612
|
this.handleLocusEvent(data, true);
|
|
648
613
|
}
|
|
649
614
|
}
|
|
@@ -964,11 +929,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
964
929
|
value: function executeRegistrationStep(step, stepName) {
|
|
965
930
|
var _this5 = this;
|
|
966
931
|
return step().then(function () {
|
|
967
|
-
_loggerProxy.default.logger.info("Meetings:index#executeRegistrationStep --> INFO, ".concat(stepName, " completed"));
|
|
968
932
|
_this5.registrationStatus[stepName] = true;
|
|
969
|
-
}).catch(function (error) {
|
|
970
|
-
_loggerProxy.default.logger.error("Meetings:index#executeRegistrationStep --> ERROR, ".concat(stepName, " failed: ").concat(error.message));
|
|
971
|
-
return _promise.default.reject(error);
|
|
972
933
|
});
|
|
973
934
|
}
|
|
974
935
|
|
|
@@ -985,20 +946,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
985
946
|
key: "register",
|
|
986
947
|
value: function register(deviceRegistrationOptions) {
|
|
987
948
|
var _this6 = this;
|
|
988
|
-
|
|
989
|
-
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration in progress, waiting to register');
|
|
990
|
-
this.registrationPromise = this.unregistrationPromise.catch(function () {}) // It doesn't matter what happened during unregistration
|
|
991
|
-
.finally(function () {
|
|
992
|
-
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration completed, proceeding to register');
|
|
993
|
-
_this6.registrationPromise = null;
|
|
994
|
-
return _this6.register(deviceRegistrationOptions);
|
|
995
|
-
});
|
|
996
|
-
return this.registrationPromise;
|
|
997
|
-
}
|
|
998
|
-
if (this.registrationPromise) {
|
|
999
|
-
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin registration in progress, returning existing promise');
|
|
1000
|
-
return this.registrationPromise;
|
|
1001
|
-
}
|
|
949
|
+
this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
1002
950
|
|
|
1003
951
|
// @ts-ignore
|
|
1004
952
|
if (!this.webex.canAuthorize) {
|
|
@@ -1009,9 +957,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1009
957
|
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
|
|
1010
958
|
return _promise.default.resolve();
|
|
1011
959
|
}
|
|
1012
|
-
|
|
1013
|
-
this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
1014
|
-
this.registrationPromise = _promise.default.all([this.executeRegistrationStep(function () {
|
|
960
|
+
return _promise.default.all([this.executeRegistrationStep(function () {
|
|
1015
961
|
return _this6.fetchUserPreferredWebexSite();
|
|
1016
962
|
}, 'fetchWebexSite'), this.executeRegistrationStep(function () {
|
|
1017
963
|
return _this6.getGeoHint();
|
|
@@ -1052,10 +998,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1052
998
|
stack: error.stack
|
|
1053
999
|
});
|
|
1054
1000
|
return _promise.default.reject(error);
|
|
1055
|
-
}).finally(function () {
|
|
1056
|
-
_this6.registrationPromise = null;
|
|
1057
1001
|
});
|
|
1058
|
-
return this.registrationPromise;
|
|
1059
1002
|
}
|
|
1060
1003
|
|
|
1061
1004
|
/**
|
|
@@ -1070,61 +1013,35 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1070
1013
|
key: "unregister",
|
|
1071
1014
|
value: function unregister() {
|
|
1072
1015
|
var _this7 = this;
|
|
1073
|
-
if (this.unregistrationPromise) {
|
|
1074
|
-
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin unregistration in progress, returning existing promise');
|
|
1075
|
-
return this.unregistrationPromise;
|
|
1076
|
-
}
|
|
1077
|
-
if (this.registrationPromise) {
|
|
1078
|
-
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration in progress, waiting to unregister');
|
|
1079
|
-
|
|
1080
|
-
// Wait for registration to complete (success or failure), then call unregister again
|
|
1081
|
-
this.unregistrationPromise = this.registrationPromise.catch(function () {}) // It doesn't matter what happened during registration
|
|
1082
|
-
.finally(function () {
|
|
1083
|
-
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration completed, proceeding to unregister');
|
|
1084
|
-
_this7.unregistrationPromise = null;
|
|
1085
|
-
return _this7.unregister();
|
|
1086
|
-
});
|
|
1087
|
-
return this.unregistrationPromise;
|
|
1088
|
-
}
|
|
1089
1016
|
if (!this.registered) {
|
|
1090
1017
|
_loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
|
|
1091
1018
|
return _promise.default.resolve();
|
|
1092
1019
|
}
|
|
1093
1020
|
this.stopListeningForEvents();
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
_triggerProxy.default.trigger(_this7, {
|
|
1119
|
-
file: 'meetings',
|
|
1120
|
-
function: 'unregister'
|
|
1121
|
-
}, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
|
|
1122
|
-
_this7.registered = false;
|
|
1123
|
-
_this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
1124
|
-
}).finally(function () {
|
|
1125
|
-
_this7.unregistrationPromise = null;
|
|
1126
|
-
});
|
|
1127
|
-
return this.unregistrationPromise;
|
|
1021
|
+
return (
|
|
1022
|
+
// @ts-ignore
|
|
1023
|
+
this.webex.internal.mercury.disconnect()
|
|
1024
|
+
// @ts-ignore
|
|
1025
|
+
.then(function () {
|
|
1026
|
+
return _this7.webex.internal.device.unregister();
|
|
1027
|
+
}).catch(function (error) {
|
|
1028
|
+
// If error status code is 404, continue the chain
|
|
1029
|
+
if (error.statusCode === 404) {
|
|
1030
|
+
_loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
|
|
1031
|
+
return; // returning undefined allows the chain to continue
|
|
1032
|
+
}
|
|
1033
|
+
// For any other status code, break the chain by rethrowing
|
|
1034
|
+
_loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
|
|
1035
|
+
throw error; // rethrow to break the promise chain
|
|
1036
|
+
}).then(function () {
|
|
1037
|
+
_triggerProxy.default.trigger(_this7, {
|
|
1038
|
+
file: 'meetings',
|
|
1039
|
+
function: 'unregister'
|
|
1040
|
+
}, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
|
|
1041
|
+
_this7.registered = false;
|
|
1042
|
+
_this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
|
|
1043
|
+
})
|
|
1044
|
+
);
|
|
1128
1045
|
}
|
|
1129
1046
|
}, {
|
|
1130
1047
|
key: "uploadLogs",
|
|
@@ -1852,7 +1769,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1852
1769
|
}
|
|
1853
1770
|
var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
|
|
1854
1771
|
this.handleLocusEvent({
|
|
1855
|
-
eventType: _constants.LOCUSEVENT.
|
|
1772
|
+
eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
|
|
1856
1773
|
locus: associateBreakoutLocus,
|
|
1857
1774
|
locusUrl: associateBreakoutLocus.url
|
|
1858
1775
|
});
|