@webex/plugin-meetings 3.13.0-next.15 → 3.13.0-next.17
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/index.js +1 -1
- package/dist/common/events/typed-events-scope.js +135 -0
- package/dist/common/events/typed-events-scope.js.map +1 -0
- package/dist/common/types.js +7 -0
- package/dist/common/types.js.map +1 -0
- package/dist/config.js +1 -1
- package/dist/constants.js +5 -0
- package/dist/constants.js.map +1 -1
- package/dist/e2ee/E2eeController.js +581 -0
- package/dist/e2ee/E2eeController.js.map +1 -0
- package/dist/e2ee/E2eeManager.js +50 -31
- package/dist/e2ee/E2eeManager.js.map +1 -1
- package/dist/e2ee/E2eeSignaling.js +18 -21
- package/dist/e2ee/E2eeSignaling.js.map +1 -1
- package/dist/e2ee/MediaEncryptionService.js +2 -5
- package/dist/e2ee/MediaEncryptionService.js.map +1 -1
- package/dist/e2ee/constants.js +28 -0
- package/dist/e2ee/constants.js.map +1 -0
- package/dist/e2ee/mls.js +85 -67
- package/dist/e2ee/mls.js.map +1 -1
- package/dist/e2ee/types.js +52 -13
- package/dist/e2ee/types.js.map +1 -1
- package/dist/e2ee/wasm.d.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +394 -249
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +69 -58
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +4 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +87 -61
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +10 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/types/common/events/typed-events-scope.d.ts +73 -0
- package/dist/types/common/types.d.ts +9 -0
- package/dist/types/constants.d.ts +5 -0
- package/dist/types/e2ee/E2eeController.d.ts +130 -0
- package/dist/types/e2ee/E2eeManager.d.ts +26 -6
- package/dist/types/e2ee/E2eeSignaling.d.ts +1 -7
- package/dist/types/e2ee/MediaEncryptionService.d.ts +1 -3
- package/dist/types/e2ee/constants.d.ts +12 -0
- package/dist/types/e2ee/mls.d.ts +16 -10
- package/dist/types/e2ee/types.d.ts +92 -35
- package/dist/types/hashTree/hashTreeParser.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/meeting/index.d.ts +34 -0
- package/dist/types/meeting/util.d.ts +1 -1
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/events/typed-events-scope.ts +110 -0
- package/src/common/types.ts +10 -0
- package/src/constants.ts +6 -0
- package/src/e2ee/DESIGN.md +363 -0
- package/src/e2ee/E2eeController.ts +487 -0
- package/src/e2ee/E2eeManager.ts +48 -27
- package/src/e2ee/E2eeSignaling.ts +13 -28
- package/src/e2ee/MediaEncryptionService.ts +2 -4
- package/src/e2ee/constants.ts +34 -0
- package/src/e2ee/mls.ts +62 -32
- package/src/e2ee/types.ts +99 -34
- package/src/e2ee/wasm.d.ts +18 -14
- package/src/hashTree/hashTreeParser.ts +1 -1
- package/src/index.ts +1 -0
- package/src/meeting/index.ts +155 -0
- package/src/meeting/request.ts +16 -0
- package/src/meeting/util.ts +2 -1
- package/src/meetings/index.ts +30 -5
- package/src/meetings/util.ts +8 -0
- package/src/metrics/constants.ts +1 -0
- package/test/unit/spec/common/events/typed-events-scope.ts +88 -0
- package/test/unit/spec/e2ee/E2eeController.ts +662 -0
- package/test/unit/spec/e2ee/E2eeManager.ts +53 -29
- package/test/unit/spec/e2ee/E2eeSignaling.ts +19 -10
- package/test/unit/spec/e2ee/mls.ts +84 -32
- package/test/unit/spec/meeting/index.js +662 -0
- package/test/unit/spec/meeting/request.js +35 -0
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meetings/index.js +36 -1
- package/test/unit/spec/meetings/utils.js +15 -0
- package/test/utils/webex-config.js +1 -0
package/dist/meetings/index.js
CHANGED
|
@@ -48,8 +48,9 @@ var _media = _interopRequireDefault(require("../media"));
|
|
|
48
48
|
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
49
49
|
var _wasmLoader = _interopRequireDefault(require("../common/wasm-loader"));
|
|
50
50
|
var _E2eeManager = _interopRequireDefault(require("../e2ee/E2eeManager"));
|
|
51
|
-
var _constants = require("../constants");
|
|
52
|
-
var _constants2 =
|
|
51
|
+
var _constants = require("../e2ee/constants");
|
|
52
|
+
var _constants2 = require("../constants");
|
|
53
|
+
var _constants3 = _interopRequireDefault(require("../metrics/constants"));
|
|
53
54
|
var _meetingInfo = _interopRequireDefault(require("../meeting-info"));
|
|
54
55
|
var _meetingInfoV = _interopRequireDefault(require("../meeting-info/meeting-info-v2"));
|
|
55
56
|
var _meeting = _interopRequireWildcard(require("../meeting"));
|
|
@@ -72,7 +73,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var
|
|
|
72
73
|
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; }
|
|
73
74
|
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; }
|
|
74
75
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
75
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
|
|
76
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint no-shadow: ["error", { "allow": ["eventType"] }] */
|
|
76
77
|
var mediaLogger;
|
|
77
78
|
var MediaLogger = /*#__PURE__*/function () {
|
|
78
79
|
function MediaLogger() {
|
|
@@ -206,7 +207,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
206
207
|
(0, _defineProperty2.default)(_this, "meetingInfo", void 0);
|
|
207
208
|
(0, _defineProperty2.default)(_this, "mediaHelpers", void 0);
|
|
208
209
|
(0, _defineProperty2.default)(_this, "breakoutLocusForHandleLater", void 0);
|
|
209
|
-
(0, _defineProperty2.default)(_this, "namespace",
|
|
210
|
+
(0, _defineProperty2.default)(_this, "namespace", _constants2.MEETINGS);
|
|
210
211
|
(0, _defineProperty2.default)(_this, "registrationStatus", void 0);
|
|
211
212
|
(0, _defineProperty2.default)(_this, "wasmLoader", void 0);
|
|
212
213
|
(0, _defineProperty2.default)(_this, "e2eeManager", void 0);
|
|
@@ -239,7 +240,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
239
240
|
sqrtMedianMs = _ref$sqrtMedianMs === void 0 ? null : _ref$sqrtMedianMs;
|
|
240
241
|
var measurementsLog = (0, _stringify.default)(measurements);
|
|
241
242
|
_loggerProxy.default.logger.log("Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ".concat(status, ", capability: ").concat(capability, ", reason: ").concat(reason, ", measurements: ").concat(measurementsLog));
|
|
242
|
-
return _metrics.default.sendBehavioralMetric(
|
|
243
|
+
return _metrics.default.sendBehavioralMetric(_constants3.default.WASM_RUNTIME_PERFORMANCE, {
|
|
243
244
|
status: status,
|
|
244
245
|
capability: capability,
|
|
245
246
|
reason: reason,
|
|
@@ -390,7 +391,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
390
391
|
getUserMedia: _media.default.getUserMedia
|
|
391
392
|
};
|
|
392
393
|
|
|
393
|
-
|
|
394
|
+
/**
|
|
395
|
+
* Loads and caches WASM modules (for example needed for E2EE).
|
|
396
|
+
* Safe to create here as it has no dependency on webex.request.
|
|
397
|
+
* @instance
|
|
398
|
+
* @type {WasmLoader}
|
|
399
|
+
* @private
|
|
400
|
+
* @memberof Meetings
|
|
401
|
+
*/
|
|
394
402
|
_this.wasmLoader = new _wasmLoader.default();
|
|
395
403
|
_this.onReady();
|
|
396
404
|
return _this;
|
|
@@ -411,11 +419,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
411
419
|
var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _breakoutLocus$joined, _newLocus$self2;
|
|
412
420
|
var breakoutUrl = (_newLocus$controls = newLocus.controls) === null || _newLocus$controls === void 0 ? void 0 : (_newLocus$controls$br = _newLocus$controls.breakout) === null || _newLocus$controls$br === void 0 ? void 0 : _newLocus$controls$br.url;
|
|
413
421
|
var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
414
|
-
var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) ===
|
|
422
|
+
var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) === _constants2._JOINED_;
|
|
415
423
|
var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
|
|
416
424
|
// @ts-ignore
|
|
417
425
|
var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
418
|
-
var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) ===
|
|
426
|
+
var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants2._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants2._MOVED_;
|
|
419
427
|
var isNewLocusJoinThisDevice = _util2.default.joinedOnThisDevice(meeting, newLocus,
|
|
420
428
|
// @ts-ignore
|
|
421
429
|
this.webex.internal.device.url);
|
|
@@ -464,12 +472,12 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
464
472
|
var _newLocus$self3, _newLocus$self3$devic, _newLocus$self3$devic2, _newLocus$self4, _newLocus$self4$devic, _newLocus$self4$devic2;
|
|
465
473
|
var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
|
|
466
474
|
var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
|
|
467
|
-
var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : (_newLocus$self3$devic = _newLocus$self3.devices[0]) === null || _newLocus$self3$devic === void 0 ? void 0 : (_newLocus$self3$devic2 = _newLocus$self3$devic.intent) === null || _newLocus$self3$devic2 === void 0 ? void 0 : _newLocus$self3$devic2.reason) ===
|
|
475
|
+
var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : (_newLocus$self3$devic = _newLocus$self3.devices[0]) === null || _newLocus$self3$devic === void 0 ? void 0 : (_newLocus$self3$devic2 = _newLocus$self3$devic.intent) === null || _newLocus$self3$devic2 === void 0 ? void 0 : _newLocus$self3$devic2.reason) === _constants2._ON_HOLD_LOBBY_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self4 = newLocus.self) === null || _newLocus$self4 === void 0 ? void 0 : (_newLocus$self4$devic = _newLocus$self4.devices[0]) === null || _newLocus$self4$devic === void 0 ? void 0 : (_newLocus$self4$devic2 = _newLocus$self4$devic.intent) === null || _newLocus$self4$devic2 === void 0 ? void 0 : _newLocus$self4$devic2.type) === _constants2._WAIT_;
|
|
468
476
|
if (!meeting) {
|
|
469
477
|
if (isNewLocusAsBreakout) {
|
|
470
478
|
var _newLocus$fullState, _newLocus$self5;
|
|
471
479
|
_loggerProxy.default.logger.log("Meetings:index#isNeedHandleLocusDTO --> the first breakout session locusDTO active status: ".concat((_newLocus$fullState = newLocus.fullState) === null || _newLocus$fullState === void 0 ? void 0 : _newLocus$fullState.active));
|
|
472
|
-
return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) ===
|
|
480
|
+
return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants2._JOINED_;
|
|
473
481
|
}
|
|
474
482
|
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
475
483
|
}
|
|
@@ -503,7 +511,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
503
511
|
if (existingMeeting) {
|
|
504
512
|
return existingMeeting;
|
|
505
513
|
}
|
|
506
|
-
if (data.eventType ===
|
|
514
|
+
if (data.eventType === _constants2.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
507
515
|
// need to check if maybe this event indicates a move to/from breakout
|
|
508
516
|
var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data === null || data === void 0 ? void 0 : data.stateElementsMessage, this.meetingCollection);
|
|
509
517
|
if (meetingForHashTreeMessage) {
|
|
@@ -553,7 +561,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
553
561
|
// Special case when locus has got replaced, This only happend once if a replace locus exists
|
|
554
562
|
// https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
|
|
555
563
|
|
|
556
|
-
if (data.eventType !==
|
|
564
|
+
if (data.eventType !== _constants2.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
557
565
|
var _data$locus5, _data$locus5$replaces;
|
|
558
566
|
if (!meeting && ((_data$locus5 = data.locus) === null || _data$locus5 === void 0 ? void 0 : (_data$locus5$replaces = _data$locus5.replaces) === null || _data$locus5$replaces === void 0 ? void 0 : _data$locus5$replaces.length) > 0) {
|
|
559
567
|
// Always the last element in the replace is the active one
|
|
@@ -587,7 +595,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
587
595
|
// };
|
|
588
596
|
// rather then locus object change to locus url
|
|
589
597
|
|
|
590
|
-
if (data.eventType ===
|
|
598
|
+
if (data.eventType === _constants2.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
591
599
|
// We're about to create a new meeting object from this hash tree message.
|
|
592
600
|
// There is some existing (pre-hash trees) SDK logic here that requires a locus object
|
|
593
601
|
// (at the very minimum we need locus.url to be set)
|
|
@@ -597,7 +605,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
597
605
|
locus = _createLocusFromHashT.locus;
|
|
598
606
|
data.locus = locus;
|
|
599
607
|
}
|
|
600
|
-
if (data.locus && data.locus.fullState && data.locus.fullState.state ===
|
|
608
|
+
if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants2.LOCUS.STATE.INACTIVE) {
|
|
601
609
|
// just ignore the event as its already ended and not active
|
|
602
610
|
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
603
611
|
return;
|
|
@@ -606,12 +614,12 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
606
614
|
// When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
|
|
607
615
|
// Any future events will be neglected
|
|
608
616
|
|
|
609
|
-
if (data.locus && data.locus.self && data.locus.self.state ===
|
|
617
|
+
if (data.locus && data.locus.self && data.locus.self.state === _constants2._LEFT_ && data.locus.self.removed === true) {
|
|
610
618
|
// just ignore the event as its already ended and not active
|
|
611
619
|
_loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
|
|
612
620
|
return;
|
|
613
621
|
}
|
|
614
|
-
this.create(data.locus,
|
|
622
|
+
this.create(data.locus, _constants2.DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo).then(/*#__PURE__*/function () {
|
|
615
623
|
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
|
|
616
624
|
var _t;
|
|
617
625
|
return _regenerator.default.wrap(function (_context3) {
|
|
@@ -621,7 +629,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
621
629
|
_context3.prev = 1;
|
|
622
630
|
_context3.next = 2;
|
|
623
631
|
return meeting.locusInfo.initialSetup({
|
|
624
|
-
trigger: data.eventType ===
|
|
632
|
+
trigger: data.eventType === _constants2.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS ? 'get-loci-response' : 'locus-message',
|
|
625
633
|
locus: data.locus,
|
|
626
634
|
hashTreeMessage: data.stateElementsMessage
|
|
627
635
|
}, function (locus) {
|
|
@@ -635,7 +643,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
635
643
|
_t = _context3["catch"](1);
|
|
636
644
|
_loggerProxy.default.logger.warn("Meetings:index#handleLocusEvent --> Error initializing locus data: ".concat(_t.message));
|
|
637
645
|
// @ts-ignore
|
|
638
|
-
_this2.destroy(meeting,
|
|
646
|
+
_this2.destroy(meeting, _constants2.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
|
639
647
|
case 4:
|
|
640
648
|
_this2.checkHandleBreakoutLocus(data.locus);
|
|
641
649
|
case 5:
|
|
@@ -653,7 +661,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
653
661
|
// There will be cases where locus event comes in gets created and deleted because its a 1:1 and meeting gets deleted
|
|
654
662
|
// because the other user left so before sending 'added' event make sure it exists in the collection
|
|
655
663
|
|
|
656
|
-
if (_this2.getMeetingByType(
|
|
664
|
+
if (_this2.getMeetingByType(_constants2._ID_, meeting.id)) {
|
|
657
665
|
// @ts-ignore
|
|
658
666
|
_this2.webex.internal.newMetrics.submitClientEvent({
|
|
659
667
|
name: 'client.call.remote-started',
|
|
@@ -667,9 +675,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
667
675
|
_triggerProxy.default.trigger(_this2, {
|
|
668
676
|
file: 'meetings',
|
|
669
677
|
function: 'handleLocusEvent'
|
|
670
|
-
},
|
|
678
|
+
}, _constants2.EVENT_TRIGGERS.MEETING_ADDED, {
|
|
671
679
|
meeting: meeting,
|
|
672
|
-
type: meeting.type ===
|
|
680
|
+
type: meeting.type === _constants2._MEETING_ ? _constants2._JOIN_ : _constants2._INCOMING_
|
|
673
681
|
});
|
|
674
682
|
} else {
|
|
675
683
|
// Meeting got added but was not found in the collection. It might have got destroyed
|
|
@@ -696,7 +704,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
696
704
|
var data = envelope.data;
|
|
697
705
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
698
706
|
var eventType = data.eventType;
|
|
699
|
-
if (eventType && eventType !==
|
|
707
|
+
if (eventType && eventType !== _constants2.LOCUSEVENT.MESSAGE_ROAP && eventType !== _constants2.LOCUSEVENT.APPROVAL_REQUEST) {
|
|
700
708
|
this.handleLocusEvent(data, true);
|
|
701
709
|
}
|
|
702
710
|
}
|
|
@@ -713,7 +721,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
713
721
|
_triggerProxy.default.trigger(this, {
|
|
714
722
|
file: 'meetings/index',
|
|
715
723
|
function: 'handleMercuryOffline'
|
|
716
|
-
},
|
|
724
|
+
}, _constants2.EVENT_TRIGGERS.MEETINGS_NETWORK_DISCONNECTED);
|
|
717
725
|
}
|
|
718
726
|
|
|
719
727
|
/**
|
|
@@ -727,16 +735,16 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
727
735
|
value: function listenForEvents() {
|
|
728
736
|
var _this3 = this;
|
|
729
737
|
// @ts-ignore
|
|
730
|
-
this.webex.internal.mercury.on(
|
|
738
|
+
this.webex.internal.mercury.on(_constants2.LOCUSEVENT.LOCUS_MERCURY, function (envelope) {
|
|
731
739
|
_this3.handleLocusMercury(envelope);
|
|
732
740
|
});
|
|
733
741
|
// @ts-ignore
|
|
734
|
-
this.webex.internal.mercury.on(
|
|
742
|
+
this.webex.internal.mercury.on(_constants2.ROAP.ROAP_MERCURY, function (envelope) {
|
|
735
743
|
_util2.default.handleRoapMercury(envelope, _this3.meetingCollection);
|
|
736
744
|
});
|
|
737
745
|
|
|
738
746
|
// @ts-ignore
|
|
739
|
-
this.webex.internal.mercury.on(
|
|
747
|
+
this.webex.internal.mercury.on(_constants2.ONLINE, function () {
|
|
740
748
|
// Fire-and-forget sync on socket recovery. Unlike the reconnection manager (which awaits and
|
|
741
749
|
// retries), nothing consumes this promise, so catch its rejection to avoid an unhandled
|
|
742
750
|
// promise rejection (a transient guest classic-sync failure would otherwise crash Node hosts).
|
|
@@ -748,7 +756,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
748
756
|
});
|
|
749
757
|
|
|
750
758
|
// @ts-ignore
|
|
751
|
-
this.webex.internal.mercury.on(
|
|
759
|
+
this.webex.internal.mercury.on(_constants2.OFFLINE, function () {
|
|
752
760
|
_this3.handleMercuryOffline();
|
|
753
761
|
});
|
|
754
762
|
}
|
|
@@ -763,11 +771,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
763
771
|
key: "stopListeningForEvents",
|
|
764
772
|
value: function stopListeningForEvents() {
|
|
765
773
|
// @ts-ignore
|
|
766
|
-
this.webex.internal.mercury.off(
|
|
774
|
+
this.webex.internal.mercury.off(_constants2.LOCUSEVENT.LOCUS_MERCURY);
|
|
767
775
|
// @ts-ignore
|
|
768
|
-
this.webex.internal.mercury.off(
|
|
776
|
+
this.webex.internal.mercury.off(_constants2.ROAP.ROAP_MERCURY);
|
|
769
777
|
// @ts-ignore
|
|
770
|
-
this.webex.internal.mercury.off(
|
|
778
|
+
this.webex.internal.mercury.off(_constants2.ONLINE);
|
|
771
779
|
}
|
|
772
780
|
|
|
773
781
|
/**
|
|
@@ -780,7 +788,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
780
788
|
value: function onReady() {
|
|
781
789
|
var _this4 = this;
|
|
782
790
|
// @ts-ignore
|
|
783
|
-
this.webex.once(
|
|
791
|
+
this.webex.once(_constants2.READY, function () {
|
|
784
792
|
// @ts-ignore
|
|
785
793
|
_config.default.set(_this4.config);
|
|
786
794
|
// @ts-ignore
|
|
@@ -790,11 +798,28 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
790
798
|
mediaLogger = new MediaLogger();
|
|
791
799
|
(0, _internalMediaCore.setLogger)(mediaLogger);
|
|
792
800
|
|
|
793
|
-
//
|
|
801
|
+
// Resolved here rather than in the constructor because WebexCore assigns webex.config in its
|
|
802
|
+
// initialize(), which runs after plugin children (including Meetings) are constructed.
|
|
803
|
+
var assetLoader = new _webexCore.StaticAssetLoader(
|
|
804
|
+
// @ts-ignore
|
|
805
|
+
{
|
|
806
|
+
baseUrl: _this4.config.assetsBaseUrl
|
|
807
|
+
},
|
|
808
|
+
// @ts-ignore
|
|
809
|
+
{
|
|
810
|
+
parent: _this4.webex
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
// E2eeManager is created here (not in the constructor) because webex.request isn't available
|
|
814
|
+
// yet at plugin-construction time, so webex.request.bind() inside E2eeManager would throw.
|
|
794
815
|
// @ts-ignore
|
|
795
816
|
_this4.e2eeManager = new _E2eeManager.default({
|
|
817
|
+
// @ts-ignore - parent is provided by WebexPlugin.
|
|
796
818
|
webex: _this4.webex,
|
|
797
|
-
|
|
819
|
+
// @ts-ignore - initialized in the Meetings constructor.
|
|
820
|
+
wasmLoader: _this4.wasmLoader,
|
|
821
|
+
// @ts-ignore - initialized in the Meetings constructor.
|
|
822
|
+
wasmUrl: assetLoader.getUrl(_constants.E2EE_WASM_ASSET)
|
|
798
823
|
});
|
|
799
824
|
|
|
800
825
|
/**
|
|
@@ -821,7 +846,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
821
846
|
_triggerProxy.default.trigger(_this4, {
|
|
822
847
|
file: 'meetings',
|
|
823
848
|
function: 'onReady'
|
|
824
|
-
},
|
|
849
|
+
}, _constants2.EVENT_TRIGGERS.MEETINGS_READY);
|
|
825
850
|
_util2.default.checkH264Support({
|
|
826
851
|
disableNotifications: true
|
|
827
852
|
});
|
|
@@ -1058,7 +1083,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1058
1083
|
return _promise.default.resolve();
|
|
1059
1084
|
}
|
|
1060
1085
|
_loggerProxy.default.logger.info('Meetings:index#register --> INFO, Registering Meetings plugin');
|
|
1061
|
-
this.registrationStatus = (0, _lodash.clone)(
|
|
1086
|
+
this.registrationStatus = (0, _lodash.clone)(_constants2.INITIAL_REGISTRATION_STATUS);
|
|
1062
1087
|
this.registrationPromise = _promise.default.all([this.executeRegistrationStep(function () {
|
|
1063
1088
|
return _this6.fetchUserPreferredWebexSite();
|
|
1064
1089
|
}, 'fetchWebexSite'), this.executeRegistrationStep(function () {
|
|
@@ -1091,9 +1116,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1091
1116
|
_triggerProxy.default.trigger(_this6, {
|
|
1092
1117
|
file: 'meetings',
|
|
1093
1118
|
function: 'register'
|
|
1094
|
-
},
|
|
1119
|
+
}, _constants2.EVENT_TRIGGERS.MEETINGS_REGISTERED);
|
|
1095
1120
|
_this6.registered = true;
|
|
1096
|
-
_metrics.default.sendBehavioralMetric(
|
|
1121
|
+
_metrics.default.sendBehavioralMetric(_constants3.default.MEETINGS_REGISTRATION_SUCCESS);
|
|
1097
1122
|
|
|
1098
1123
|
// Preload is best-effort and must not delay or fail Meetings registration.
|
|
1099
1124
|
(_this6$e2eeManager = _this6.e2eeManager) === null || _this6$e2eeManager === void 0 ? void 0 : _this6$e2eeManager.preload().catch(function (error) {
|
|
@@ -1101,7 +1126,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1101
1126
|
});
|
|
1102
1127
|
}).catch(function (error) {
|
|
1103
1128
|
_loggerProxy.default.logger.error("Meetings:index#register --> ERROR, Unable to register, ".concat(error.message));
|
|
1104
|
-
_metrics.default.sendBehavioralMetric(
|
|
1129
|
+
_metrics.default.sendBehavioralMetric(_constants3.default.MEETINGS_REGISTRATION_FAILED, {
|
|
1105
1130
|
reason: error.message,
|
|
1106
1131
|
stack: error.stack
|
|
1107
1132
|
});
|
|
@@ -1172,9 +1197,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1172
1197
|
_triggerProxy.default.trigger(_this7, {
|
|
1173
1198
|
file: 'meetings',
|
|
1174
1199
|
function: 'unregister'
|
|
1175
|
-
},
|
|
1200
|
+
}, _constants2.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
|
|
1176
1201
|
_this7.registered = false;
|
|
1177
|
-
_this7.registrationStatus = (0, _lodash.clone)(
|
|
1202
|
+
_this7.registrationStatus = (0, _lodash.clone)(_constants2.INITIAL_REGISTRATION_STATUS);
|
|
1178
1203
|
}).finally(function () {
|
|
1179
1204
|
_this7.unregistrationPromise = null;
|
|
1180
1205
|
});
|
|
@@ -1201,11 +1226,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1201
1226
|
_loggerProxy.default.logger.info('Meetings:index#uploadLogs --> uploading logs');
|
|
1202
1227
|
return this.loggerRequest.uploadLogs(options).then(function (uploadResult) {
|
|
1203
1228
|
_loggerProxy.default.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);
|
|
1204
|
-
_metrics.default.sendBehavioralMetric(
|
|
1229
|
+
_metrics.default.sendBehavioralMetric(_constants3.default.UPLOAD_LOGS_SUCCESS, options);
|
|
1205
1230
|
_triggerProxy.default.trigger(_this8, {
|
|
1206
1231
|
file: 'meetings',
|
|
1207
1232
|
function: 'uploadLogs'
|
|
1208
|
-
},
|
|
1233
|
+
}, _constants2.EVENT_TRIGGERS.MEETING_LOG_UPLOAD_SUCCESS, {
|
|
1209
1234
|
meetingId: options.meetingId,
|
|
1210
1235
|
details: uploadResult
|
|
1211
1236
|
});
|
|
@@ -1215,11 +1240,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1215
1240
|
_triggerProxy.default.trigger(_this8, {
|
|
1216
1241
|
file: 'meetings',
|
|
1217
1242
|
function: 'uploadLogs'
|
|
1218
|
-
},
|
|
1243
|
+
}, _constants2.EVENT_TRIGGERS.MEETING_LOG_UPLOAD_FAILURE, {
|
|
1219
1244
|
meetingId: options.meetingId,
|
|
1220
1245
|
reason: uploadError
|
|
1221
1246
|
});
|
|
1222
|
-
_metrics.default.sendBehavioralMetric(
|
|
1247
|
+
_metrics.default.sendBehavioralMetric(_constants3.default.UPLOAD_LOGS_FAILURE, _objectSpread(_objectSpread({}, options), {}, {
|
|
1223
1248
|
reason: uploadError.message,
|
|
1224
1249
|
stack: uploadError.stack,
|
|
1225
1250
|
code: uploadError.code
|
|
@@ -1411,7 +1436,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1411
1436
|
_triggerProxy.default.trigger(this, {
|
|
1412
1437
|
file: 'meetings',
|
|
1413
1438
|
function: 'destroy'
|
|
1414
|
-
},
|
|
1439
|
+
}, _constants2.EVENT_TRIGGERS.MEETING_REMOVED, {
|
|
1415
1440
|
meetingId: meeting.id,
|
|
1416
1441
|
reason: reason
|
|
1417
1442
|
});
|
|
@@ -1499,7 +1524,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1499
1524
|
|
|
1500
1525
|
// check for the conversation URL then sip Url
|
|
1501
1526
|
var meeting = null;
|
|
1502
|
-
if (type ===
|
|
1527
|
+
if (type === _constants2.DESTINATION_TYPE.CONVERSATION_URL || options.type === _constants2.DESTINATION_TYPE.CONVERSATION_URL) {
|
|
1503
1528
|
var foundMeeting = _this1.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, targetDest);
|
|
1504
1529
|
if (foundMeeting) {
|
|
1505
1530
|
var foundMeetingIsNotCalendarMeeting = !foundMeeting.locusInfo.scheduledMeeting;
|
|
@@ -1524,7 +1549,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1524
1549
|
// If the meeting was successfully created.
|
|
1525
1550
|
if (createdMeeting && createdMeeting.on) {
|
|
1526
1551
|
// Create a destruction event for the meeting.
|
|
1527
|
-
createdMeeting.on(
|
|
1552
|
+
createdMeeting.on(_constants2.EVENTS.DESTROY_MEETING, function (payload) {
|
|
1528
1553
|
// @ts-ignore
|
|
1529
1554
|
if (_this1.config.autoUploadLogs) {
|
|
1530
1555
|
var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4, _createdMeeting$locus5, _createdMeeting$locus6;
|
|
@@ -1540,7 +1565,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1540
1565
|
}
|
|
1541
1566
|
_this1.destroy(createdMeeting, payload.reason);
|
|
1542
1567
|
});
|
|
1543
|
-
createdMeeting.on(
|
|
1568
|
+
createdMeeting.on(_constants2.EVENTS.REQUEST_UPLOAD_LOGS, function (meetingInstance) {
|
|
1544
1569
|
// @ts-ignore
|
|
1545
1570
|
if (_this1.config.autoUploadLogs) {
|
|
1546
1571
|
var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4, _meetingInstance$locu5, _meetingInstance$locu6;
|
|
@@ -1676,12 +1701,13 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1676
1701
|
deviceUrl: this.webex.internal.device.url,
|
|
1677
1702
|
// @ts-ignore
|
|
1678
1703
|
orgId: this.webex.internal.device.orgId,
|
|
1679
|
-
locus: type ===
|
|
1704
|
+
locus: type === _constants2.DESTINATION_TYPE.LOCUS_ID ? destination : null,
|
|
1680
1705
|
// pass the locus object if present
|
|
1681
1706
|
meetingInfoProvider: this.meetingInfo,
|
|
1682
1707
|
destination: destination,
|
|
1683
1708
|
destinationType: type,
|
|
1684
|
-
callStateForMetrics: callStateForMetrics
|
|
1709
|
+
callStateForMetrics: callStateForMetrics,
|
|
1710
|
+
e2eeManager: this.e2eeManager
|
|
1685
1711
|
}, {
|
|
1686
1712
|
// @ts-ignore
|
|
1687
1713
|
parent: this.webex
|
|
@@ -1699,7 +1725,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1699
1725
|
startTimeDate = new Date(startTime);
|
|
1700
1726
|
startTimeDatestamp = startTimeDate.getTime();
|
|
1701
1727
|
timeToStart = startTimeDatestamp - (0, _now.default)();
|
|
1702
|
-
maxWaitingTime = Math.max(Math.min(timeToStart,
|
|
1728
|
+
maxWaitingTime = Math.max(Math.min(timeToStart, _constants2.MAX_RANDOM_DELAY_FOR_MEETING_INFO), 0);
|
|
1703
1729
|
waitingTime = Math.round(Math.random() * maxWaitingTime);
|
|
1704
1730
|
}
|
|
1705
1731
|
isMeetingActive = !!((_destination$fullStat = destination.fullState) !== null && _destination$fullStat !== void 0 && _destination$fullStat.active); // @ts-ignore
|
|
@@ -1709,8 +1735,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1709
1735
|
extraParams: infoExtraParams,
|
|
1710
1736
|
sendCAevents: !!(callStateForMetrics !== null && callStateForMetrics !== void 0 && callStateForMetrics.correlationId) // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
|
|
1711
1737
|
};
|
|
1712
|
-
shouldDeferMeetingInfoFetch = type ===
|
|
1713
|
-
isOneOnOneCallLocus = type ===
|
|
1738
|
+
shouldDeferMeetingInfoFetch = type === _constants2.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
|
|
1739
|
+
isOneOnOneCallLocus = type === _constants2.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
|
|
1714
1740
|
if (!meetingInfo) {
|
|
1715
1741
|
_context4.next = 2;
|
|
1716
1742
|
break;
|
|
@@ -1719,7 +1745,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1719
1745
|
_context4.next = 6;
|
|
1720
1746
|
break;
|
|
1721
1747
|
case 2:
|
|
1722
|
-
if (!(type !==
|
|
1748
|
+
if (!(type !== _constants2.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
|
|
1723
1749
|
_context4.next = 6;
|
|
1724
1750
|
break;
|
|
1725
1751
|
}
|
|
@@ -1762,7 +1788,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1762
1788
|
}
|
|
1763
1789
|
_loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
|
|
1764
1790
|
// @ts-ignore
|
|
1765
|
-
this.destroy(meeting,
|
|
1791
|
+
this.destroy(meeting, _constants2.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
|
|
1766
1792
|
throw new _noMeetingInfo.default();
|
|
1767
1793
|
case 8:
|
|
1768
1794
|
// if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
|
|
@@ -1778,7 +1804,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1778
1804
|
// If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
|
|
1779
1805
|
// skip emitting to prevent orphaned meeting references on the consumer side.
|
|
1780
1806
|
// @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
|
|
1781
|
-
if (type !==
|
|
1807
|
+
if (type !== _constants2.DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_constants2._ID_, meeting.id)) {
|
|
1782
1808
|
if (!meeting.sipUri) {
|
|
1783
1809
|
meeting.setSipUri(destination);
|
|
1784
1810
|
}
|
|
@@ -1789,7 +1815,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1789
1815
|
_triggerProxy.default.trigger(this, {
|
|
1790
1816
|
file: 'meetings',
|
|
1791
1817
|
function: 'createMeeting'
|
|
1792
|
-
},
|
|
1818
|
+
}, _constants2.EVENT_TRIGGERS.MEETING_ADDED, {
|
|
1793
1819
|
meeting: meeting,
|
|
1794
1820
|
type: meetingAddedType
|
|
1795
1821
|
});
|
|
@@ -1896,7 +1922,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1896
1922
|
lociToUpdate.forEach(function (locus) {
|
|
1897
1923
|
activeLocusUrl.push(locus.url);
|
|
1898
1924
|
_this11.handleLocusEvent({
|
|
1899
|
-
eventType:
|
|
1925
|
+
eventType: _constants2.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
|
|
1900
1926
|
locus: locus,
|
|
1901
1927
|
locusUrl: locus.url
|
|
1902
1928
|
});
|
|
@@ -1927,7 +1953,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1927
1953
|
} else {
|
|
1928
1954
|
// destroy function also uploads logs
|
|
1929
1955
|
// @ts-ignore
|
|
1930
|
-
_this11.destroy(meeting,
|
|
1956
|
+
_this11.destroy(meeting, _constants2.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
1931
1957
|
}
|
|
1932
1958
|
}
|
|
1933
1959
|
case 1:
|
|
@@ -2011,7 +2037,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
2011
2037
|
return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
|
|
2012
2038
|
});
|
|
2013
2039
|
var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
|
|
2014
|
-
eventType:
|
|
2040
|
+
eventType: _constants2.LOCUSEVENT.SDK_NO_EVENT,
|
|
2015
2041
|
locus: breakoutLocus,
|
|
2016
2042
|
locusUrl: breakoutLocus.url
|
|
2017
2043
|
});
|
|
@@ -2051,7 +2077,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
2051
2077
|
}
|
|
2052
2078
|
var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
|
|
2053
2079
|
this.handleLocusEvent({
|
|
2054
|
-
eventType:
|
|
2080
|
+
eventType: _constants2.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
|
|
2055
2081
|
locus: associateBreakoutLocus,
|
|
2056
2082
|
locusUrl: associateBreakoutLocus.url
|
|
2057
2083
|
});
|