@webex/plugin-meetings 3.12.0-next.6 → 3.12.0-next.60
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +26 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -3
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +38 -24
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +10 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +716 -370
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +22 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +289 -87
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/index.js +3 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +1 -0
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +3 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +907 -535
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +19 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +231 -78
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +79 -5
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +3 -0
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +10 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +92 -16
- package/dist/types/hashTree/utils.d.ts +11 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/locus-info/index.d.ts +46 -6
- package/dist/types/locus-info/types.d.ts +21 -1
- package/dist/types/media/properties.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +87 -3
- package/dist/types/meeting/util.d.ts +8 -0
- package/dist/types/meetings/index.d.ts +30 -2
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +1 -0
- package/dist/types/metrics/constants.d.ts +3 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +361 -235
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/index.ts +31 -0
- package/src/config.ts +2 -0
- package/src/constants.ts +5 -1
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +47 -24
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTreeParser.ts +429 -183
- package/src/hashTree/utils.ts +17 -0
- package/src/index.ts +5 -0
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +25 -8
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +291 -97
- package/src/locus-info/types.ts +25 -1
- package/src/media/index.ts +3 -0
- package/src/media/properties.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +388 -33
- package/src/meeting/util.ts +20 -2
- package/src/meetings/index.ts +134 -44
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +97 -1
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +3 -0
- package/src/metrics/constants.ts +3 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/webinar/index.ts +162 -21
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/index.ts +49 -0
- package/test/unit/spec/controls-options-manager/index.js +140 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1508 -149
- package/test/unit/spec/hashTree/utils.ts +88 -1
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +475 -81
- package/test/unit/spec/media/index.ts +31 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +1131 -49
- package/test/unit/spec/meeting/muteState.js +3 -0
- package/test/unit/spec/meeting/utils.js +33 -0
- package/test/unit/spec/meetings/index.js +360 -10
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +189 -0
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/webinar/index.ts +141 -16
package/dist/meetings/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting
|
|
|
64
64
|
var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
|
|
65
65
|
var _utils = require("../hashTree/utils");
|
|
66
66
|
var _locusInfo = require("../locus-info");
|
|
67
|
-
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
|
|
67
|
+
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 _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
|
|
68
68
|
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
69
|
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; }
|
|
70
70
|
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)); }
|
|
@@ -354,11 +354,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
354
354
|
return (0, _createClass2.default)(Meetings, [{
|
|
355
355
|
key: "isNeedHandleMainLocus",
|
|
356
356
|
value: function isNeedHandleMainLocus(meeting, newLocus) {
|
|
357
|
-
var _newLocus$controls, _newLocus$controls$br, _newLocus$self,
|
|
357
|
+
var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _breakoutLocus$joined, _newLocus$self2;
|
|
358
358
|
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;
|
|
359
359
|
var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
|
|
360
360
|
var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) === _constants._JOINED_;
|
|
361
|
-
var isSelfMoved =
|
|
361
|
+
var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
|
|
362
362
|
// @ts-ignore
|
|
363
363
|
var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
|
|
364
364
|
var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants._MOVED_;
|
|
@@ -383,7 +383,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
383
383
|
_loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> there is active breakout session and joined on this device, and don't need to handle main session: ".concat(breakoutUrl));
|
|
384
384
|
return false;
|
|
385
385
|
}
|
|
386
|
-
if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$
|
|
386
|
+
if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self2 = newLocus.self) !== null && _newLocus$self2 !== void 0 && _newLocus$self2.removed || isResourceMovedOnThisDevice)) {
|
|
387
387
|
_loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status or with device resource moved, not need to handle');
|
|
388
388
|
return false;
|
|
389
389
|
}
|
|
@@ -407,15 +407,15 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
407
407
|
key: "isNeedHandleLocusDTO",
|
|
408
408
|
value: function isNeedHandleLocusDTO(meeting, newLocus) {
|
|
409
409
|
if (newLocus) {
|
|
410
|
-
var _newLocus$
|
|
410
|
+
var _newLocus$self3, _newLocus$self3$devic, _newLocus$self3$devic2, _newLocus$self4, _newLocus$self4$devic, _newLocus$self4$devic2;
|
|
411
411
|
var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
|
|
412
|
-
var isSelfMoved =
|
|
413
|
-
var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$
|
|
412
|
+
var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
|
|
413
|
+
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) === _constants._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) === _constants._WAIT_;
|
|
414
414
|
if (!meeting) {
|
|
415
415
|
if (isNewLocusAsBreakout) {
|
|
416
|
-
var _newLocus$fullState, _newLocus$
|
|
416
|
+
var _newLocus$fullState, _newLocus$self5;
|
|
417
417
|
_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));
|
|
418
|
-
return ((_newLocus$
|
|
418
|
+
return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._JOINED_;
|
|
419
419
|
}
|
|
420
420
|
return this.isNeedHandleMainLocus(meeting, newLocus);
|
|
421
421
|
}
|
|
@@ -451,9 +451,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
451
451
|
}
|
|
452
452
|
if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
453
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);
|
|
454
|
+
var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data === null || data === void 0 ? void 0 : data.stateElementsMessage, this.meetingCollection);
|
|
457
455
|
if (meetingForHashTreeMessage) {
|
|
458
456
|
return meetingForHashTreeMessage;
|
|
459
457
|
}
|
|
@@ -493,7 +491,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
493
491
|
var _this2 = this;
|
|
494
492
|
var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
495
493
|
var meeting = this.getCorrespondingMeetingByLocus(data);
|
|
496
|
-
|
|
497
494
|
// @ts-ignore
|
|
498
495
|
if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
|
|
499
496
|
(0, _meeting.storeEventForDebugging)('mercury', data);
|
|
@@ -573,6 +570,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
573
570
|
trigger: data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS ? 'get-loci-response' : 'locus-message',
|
|
574
571
|
locus: data.locus,
|
|
575
572
|
hashTreeMessage: data.stateElementsMessage
|
|
573
|
+
}, function (locus) {
|
|
574
|
+
meeting.finalizeMeetingAfterInitialLocusSetup(locus);
|
|
576
575
|
});
|
|
577
576
|
case 2:
|
|
578
577
|
_context3.next = 4;
|
|
@@ -930,6 +929,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
930
929
|
}
|
|
931
930
|
}
|
|
932
931
|
|
|
932
|
+
/**
|
|
933
|
+
* API to toggle AV1 codec support for video slides in multistream,
|
|
934
|
+
* needs to be called before webex.meetings.joinWithMedia()
|
|
935
|
+
*
|
|
936
|
+
* @param {Boolean} newValue
|
|
937
|
+
* @private
|
|
938
|
+
* @memberof Meetings
|
|
939
|
+
* @returns {undefined}
|
|
940
|
+
*/
|
|
941
|
+
}, {
|
|
942
|
+
key: "_toggleEnableAv1SlidesSupport",
|
|
943
|
+
value: function _toggleEnableAv1SlidesSupport(newValue) {
|
|
944
|
+
if (typeof newValue !== 'boolean') {
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
// @ts-ignore
|
|
949
|
+
if (this.config.enableAv1SlidesSupport !== newValue) {
|
|
950
|
+
// @ts-ignore
|
|
951
|
+
this.config.enableAv1SlidesSupport = newValue;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
933
955
|
/**
|
|
934
956
|
* API to toggle stopping ICE Candidates Gathering after first relay candidate,
|
|
935
957
|
* needs to be called before webex.meetings.joinWithMedia()
|
|
@@ -1275,6 +1297,31 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1275
1297
|
return this.personalMeetingRoom;
|
|
1276
1298
|
}
|
|
1277
1299
|
|
|
1300
|
+
/**
|
|
1301
|
+
* Fetches site preferences for the provided Webex site, or the preferred Webex site.
|
|
1302
|
+
* This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
|
|
1303
|
+
*
|
|
1304
|
+
* @param {object} [options]
|
|
1305
|
+
* @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
|
|
1306
|
+
* @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
|
|
1307
|
+
* @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
|
|
1308
|
+
* @returns {Promise<SitePreferencesResponse>} site preferences response body
|
|
1309
|
+
* @throws {ParameterError}
|
|
1310
|
+
* @public
|
|
1311
|
+
* @memberof Meetings
|
|
1312
|
+
* @example
|
|
1313
|
+
* const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
|
|
1314
|
+
* const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
|
|
1315
|
+
*/
|
|
1316
|
+
}, {
|
|
1317
|
+
key: "fetchSitePreferencesMeViaSite",
|
|
1318
|
+
value: function fetchSitePreferencesMeViaSite() {
|
|
1319
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1320
|
+
return this.request.fetchSitePreferencesMeViaSite(_objectSpread(_objectSpread({}, options), {}, {
|
|
1321
|
+
siteUrl: options.siteUrl || this.preferredWebexSite
|
|
1322
|
+
}));
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1278
1325
|
/**
|
|
1279
1326
|
* Returns basic information about a meeting that exists or
|
|
1280
1327
|
* used to exist in the MeetingCollection
|
|
@@ -1567,6 +1614,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1567
1614
|
isMeetingActive,
|
|
1568
1615
|
enableUnifiedMeetings,
|
|
1569
1616
|
meetingInfoOptions,
|
|
1617
|
+
shouldDeferMeetingInfoFetch,
|
|
1618
|
+
isOneOnOneCallLocus,
|
|
1570
1619
|
meetingAddedType,
|
|
1571
1620
|
_args4 = arguments,
|
|
1572
1621
|
_t2;
|
|
@@ -1621,16 +1670,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1621
1670
|
extraParams: infoExtraParams,
|
|
1622
1671
|
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
|
|
1623
1672
|
};
|
|
1673
|
+
shouldDeferMeetingInfoFetch = type === _constants.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
|
|
1674
|
+
isOneOnOneCallLocus = type === _constants.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
|
|
1624
1675
|
if (!meetingInfo) {
|
|
1625
1676
|
_context4.next = 2;
|
|
1626
1677
|
break;
|
|
1627
1678
|
}
|
|
1628
1679
|
meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
|
|
1629
|
-
_context4.next =
|
|
1680
|
+
_context4.next = 6;
|
|
1630
1681
|
break;
|
|
1631
1682
|
case 2:
|
|
1632
|
-
if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
|
|
1633
|
-
_context4.next =
|
|
1683
|
+
if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
|
|
1684
|
+
_context4.next = 6;
|
|
1634
1685
|
break;
|
|
1635
1686
|
}
|
|
1636
1687
|
if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
|
|
@@ -1641,41 +1692,54 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1641
1692
|
return meeting.fetchMeetingInfo(meetingInfoOptions);
|
|
1642
1693
|
}, waitingTime);
|
|
1643
1694
|
meeting.parseMeetingInfo(undefined, destination);
|
|
1644
|
-
_context4.next =
|
|
1695
|
+
_context4.next = 6;
|
|
1645
1696
|
break;
|
|
1646
1697
|
case 3:
|
|
1698
|
+
if (shouldDeferMeetingInfoFetch) {
|
|
1699
|
+
_context4.next = 5;
|
|
1700
|
+
break;
|
|
1701
|
+
}
|
|
1647
1702
|
_context4.next = 4;
|
|
1648
1703
|
return meeting.fetchMeetingInfo(meetingInfoOptions);
|
|
1649
1704
|
case 4:
|
|
1650
|
-
_context4.next =
|
|
1705
|
+
_context4.next = 6;
|
|
1651
1706
|
break;
|
|
1652
1707
|
case 5:
|
|
1653
|
-
|
|
1708
|
+
_loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
|
|
1709
|
+
case 6:
|
|
1710
|
+
_context4.next = 10;
|
|
1711
|
+
break;
|
|
1712
|
+
case 7:
|
|
1713
|
+
_context4.prev = 7;
|
|
1654
1714
|
_t2 = _context4["catch"](1);
|
|
1655
1715
|
if (!(!(_t2 instanceof _captchaError.default) && !(_t2 instanceof _passwordError.default) && !(_t2 instanceof _permission.default) && !(_t2 instanceof _joinWebinarError.default) && !(_t2 instanceof _joinForbiddenError.default))) {
|
|
1656
|
-
_context4.next =
|
|
1716
|
+
_context4.next = 9;
|
|
1657
1717
|
break;
|
|
1658
1718
|
}
|
|
1659
1719
|
_loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
|
|
1660
1720
|
if (!failOnMissingMeetingInfo) {
|
|
1661
|
-
_context4.next =
|
|
1721
|
+
_context4.next = 8;
|
|
1662
1722
|
break;
|
|
1663
1723
|
}
|
|
1664
1724
|
_loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
|
|
1665
1725
|
// @ts-ignore
|
|
1666
1726
|
this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
|
|
1667
1727
|
throw new _noMeetingInfo.default();
|
|
1668
|
-
case
|
|
1728
|
+
case 8:
|
|
1669
1729
|
// if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
|
|
1670
1730
|
_loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
|
|
1671
|
-
case
|
|
1731
|
+
case 9:
|
|
1672
1732
|
_loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
|
|
1673
|
-
case
|
|
1674
|
-
_context4.prev =
|
|
1733
|
+
case 10:
|
|
1734
|
+
_context4.prev = 10;
|
|
1675
1735
|
// For type LOCUS_ID we need to parse the locus object to get the information
|
|
1676
1736
|
// about the caller and callee
|
|
1677
1737
|
// Meeting Added event will be created in `handleLocusEvent`
|
|
1678
|
-
if
|
|
1738
|
+
// Only emit MEETING_ADDED if the meeting still exists in the collection.
|
|
1739
|
+
// If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
|
|
1740
|
+
// skip emitting to prevent orphaned meeting references on the consumer side.
|
|
1741
|
+
// @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
|
|
1742
|
+
if (type !== _constants.DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_constants._ID_, meeting.id)) {
|
|
1679
1743
|
if (!meeting.sipUri) {
|
|
1680
1744
|
meeting.setSipUri(destination);
|
|
1681
1745
|
}
|
|
@@ -1691,14 +1755,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1691
1755
|
type: meetingAddedType
|
|
1692
1756
|
});
|
|
1693
1757
|
}
|
|
1694
|
-
return _context4.finish(
|
|
1695
|
-
case
|
|
1758
|
+
return _context4.finish(10);
|
|
1759
|
+
case 11:
|
|
1696
1760
|
return _context4.abrupt("return", meeting);
|
|
1697
|
-
case
|
|
1761
|
+
case 12:
|
|
1698
1762
|
case "end":
|
|
1699
1763
|
return _context4.stop();
|
|
1700
1764
|
}
|
|
1701
|
-
}, _callee4, this, [[1,
|
|
1765
|
+
}, _callee4, this, [[1, 7, 10, 11]]);
|
|
1702
1766
|
}));
|
|
1703
1767
|
function createMeeting(_x4) {
|
|
1704
1768
|
return _createMeeting.apply(this, arguments);
|
|
@@ -1741,51 +1805,141 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1741
1805
|
*/
|
|
1742
1806
|
}, {
|
|
1743
1807
|
key: "syncMeetings",
|
|
1744
|
-
value: function
|
|
1745
|
-
var
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1808
|
+
value: (function () {
|
|
1809
|
+
var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
1810
|
+
var _this11 = this;
|
|
1811
|
+
var _ref4,
|
|
1812
|
+
_ref4$keepOnlyLocusMe,
|
|
1813
|
+
keepOnlyLocusMeetings,
|
|
1814
|
+
_ref4$skipHashTreeSyn,
|
|
1815
|
+
skipHashTreeSync,
|
|
1816
|
+
locusArray,
|
|
1817
|
+
activeLocusUrl,
|
|
1818
|
+
lociToUpdate,
|
|
1819
|
+
meetingsCollection,
|
|
1820
|
+
_loop,
|
|
1821
|
+
_i,
|
|
1822
|
+
_Object$values,
|
|
1823
|
+
remainingMeetings,
|
|
1824
|
+
syncPromises,
|
|
1825
|
+
_i2,
|
|
1826
|
+
_arr,
|
|
1827
|
+
meeting,
|
|
1828
|
+
_args6 = arguments,
|
|
1829
|
+
_t3;
|
|
1830
|
+
return _regenerator.default.wrap(function (_context6) {
|
|
1831
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
1832
|
+
case 0:
|
|
1833
|
+
_ref4 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe, _ref4$skipHashTreeSyn = _ref4.skipHashTreeSync, skipHashTreeSync = _ref4$skipHashTreeSyn === void 0 ? false : _ref4$skipHashTreeSyn;
|
|
1834
|
+
if (!this.webex.credentials.isUnverifiedGuest) {
|
|
1835
|
+
_context6.next = 1;
|
|
1836
|
+
break;
|
|
1837
|
+
}
|
|
1838
|
+
_loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
|
|
1839
|
+
_context6.next = 7;
|
|
1840
|
+
break;
|
|
1841
|
+
case 1:
|
|
1842
|
+
_context6.prev = 1;
|
|
1843
|
+
_context6.next = 2;
|
|
1844
|
+
return this.request.getActiveMeetings();
|
|
1845
|
+
case 2:
|
|
1846
|
+
locusArray = _context6.sent;
|
|
1847
|
+
activeLocusUrl = [];
|
|
1848
|
+
if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
|
|
1849
|
+
lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
|
|
1850
|
+
lociToUpdate.forEach(function (locus) {
|
|
1851
|
+
activeLocusUrl.push(locus.url);
|
|
1852
|
+
_this11.handleLocusEvent({
|
|
1853
|
+
eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
|
|
1854
|
+
locus: locus,
|
|
1855
|
+
locusUrl: locus.url
|
|
1856
|
+
});
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
meetingsCollection = this.meetingCollection.getAll();
|
|
1860
|
+
if (!((0, _keys.default)(meetingsCollection).length > 0)) {
|
|
1861
|
+
_context6.next = 5;
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
_loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
|
|
1865
|
+
var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
|
|
1866
|
+
return _regenerator.default.wrap(function (_context5) {
|
|
1867
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
1868
|
+
case 0:
|
|
1869
|
+
meeting = _Object$values[_i];
|
|
1870
|
+
// @ts-ignore
|
|
1871
|
+
locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
|
|
1872
|
+
if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
|
|
1873
|
+
globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
|
|
1874
|
+
if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
|
|
1875
|
+
var _locus$info;
|
|
1876
|
+
return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
|
|
1877
|
+
})) {
|
|
1878
|
+
// don't destroy the meeting as Locus API still returned some Locus that shares
|
|
1879
|
+
// the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
|
|
1880
|
+
// is in a breakout and gets moved to a different breakout while we were offline
|
|
1881
|
+
} else {
|
|
1882
|
+
// destroy function also uploads logs
|
|
1883
|
+
// @ts-ignore
|
|
1884
|
+
_this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
case 1:
|
|
1888
|
+
case "end":
|
|
1889
|
+
return _context5.stop();
|
|
1890
|
+
}
|
|
1891
|
+
}, _loop);
|
|
1892
|
+
});
|
|
1893
|
+
_i = 0, _Object$values = (0, _values.default)(meetingsCollection);
|
|
1894
|
+
case 3:
|
|
1895
|
+
if (!(_i < _Object$values.length)) {
|
|
1896
|
+
_context6.next = 5;
|
|
1897
|
+
break;
|
|
1898
|
+
}
|
|
1899
|
+
return _context6.delegateYield(_loop(), "t0", 4);
|
|
1900
|
+
case 4:
|
|
1901
|
+
_i++;
|
|
1902
|
+
_context6.next = 3;
|
|
1903
|
+
break;
|
|
1904
|
+
case 5:
|
|
1905
|
+
_context6.next = 7;
|
|
1906
|
+
break;
|
|
1907
|
+
case 6:
|
|
1908
|
+
_context6.prev = 6;
|
|
1909
|
+
_t3 = _context6["catch"](1);
|
|
1910
|
+
_loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
|
|
1911
|
+
throw _t3;
|
|
1912
|
+
case 7:
|
|
1913
|
+
if (skipHashTreeSync) {
|
|
1914
|
+
_context6.next = 8;
|
|
1915
|
+
break;
|
|
1916
|
+
}
|
|
1917
|
+
// Trigger hash tree syncs for all remaining meetings
|
|
1918
|
+
remainingMeetings = this.meetingCollection.getAll();
|
|
1919
|
+
syncPromises = [];
|
|
1920
|
+
for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
|
|
1921
|
+
meeting = _arr[_i2];
|
|
1922
|
+
if (meeting.locusInfo) {
|
|
1923
|
+
syncPromises.push(meeting.locusInfo.syncAllHashTreeDatasets());
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
if (!(syncPromises.length > 0)) {
|
|
1927
|
+
_context6.next = 8;
|
|
1928
|
+
break;
|
|
1929
|
+
}
|
|
1930
|
+
_context6.next = 8;
|
|
1931
|
+
return _promise.default.all(syncPromises);
|
|
1932
|
+
case 8:
|
|
1933
|
+
case "end":
|
|
1934
|
+
return _context6.stop();
|
|
1781
1935
|
}
|
|
1782
|
-
}
|
|
1783
|
-
})
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1936
|
+
}, _callee5, this, [[1, 6]]);
|
|
1937
|
+
}));
|
|
1938
|
+
function syncMeetings() {
|
|
1939
|
+
return _syncMeetings.apply(this, arguments);
|
|
1940
|
+
}
|
|
1941
|
+
return syncMeetings;
|
|
1942
|
+
}()
|
|
1789
1943
|
/**
|
|
1790
1944
|
* sort out locus array for initial creating
|
|
1791
1945
|
* @param {Array} loci original locus array
|
|
@@ -1793,6 +1947,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1793
1947
|
* @public
|
|
1794
1948
|
* @memberof Meetings
|
|
1795
1949
|
*/
|
|
1950
|
+
)
|
|
1796
1951
|
}, {
|
|
1797
1952
|
key: "sortLocusArrayToUpdate",
|
|
1798
1953
|
value: function sortLocusArrayToUpdate(loci) {
|
|
@@ -1807,8 +1962,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1807
1962
|
var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
|
|
1808
1963
|
breakoutLoci.forEach(function (breakoutLocus) {
|
|
1809
1964
|
var associateMainLocus = mainLoci.find(function (mainLocus) {
|
|
1810
|
-
|
|
1811
|
-
return ((_mainLocus$controls = mainLocus.controls) === null || _mainLocus$controls === void 0 ? void 0 : (_mainLocus$controls$b = _mainLocus$controls.breakout) === null || _mainLocus$controls$b === void 0 ? void 0 : _mainLocus$controls$b.url) === ((_breakoutLocus$contro = breakoutLocus.controls) === null || _breakoutLocus$contro === void 0 ? void 0 : (_breakoutLocus$contro2 = _breakoutLocus$contro.breakout) === null || _breakoutLocus$contro2 === void 0 ? void 0 : _breakoutLocus$contro2.url);
|
|
1965
|
+
return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
|
|
1812
1966
|
});
|
|
1813
1967
|
var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
|
|
1814
1968
|
eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
|
|
@@ -1844,8 +1998,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
1844
1998
|
return;
|
|
1845
1999
|
}
|
|
1846
2000
|
var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
|
|
1847
|
-
|
|
1848
|
-
return ((_breakoutLocus$contro3 = breakoutLocus.controls) === null || _breakoutLocus$contro3 === void 0 ? void 0 : (_breakoutLocus$contro4 = _breakoutLocus$contro3.breakout) === null || _breakoutLocus$contro4 === void 0 ? void 0 : _breakoutLocus$contro4.url) === ((_newCreatedLocus$cont = newCreatedLocus.controls) === null || _newCreatedLocus$cont === void 0 ? void 0 : (_newCreatedLocus$cont2 = _newCreatedLocus$cont.breakout) === null || _newCreatedLocus$cont2 === void 0 ? void 0 : _newCreatedLocus$cont2.url);
|
|
2001
|
+
return _util2.default.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus);
|
|
1849
2002
|
});
|
|
1850
2003
|
if (existIndex < 0) {
|
|
1851
2004
|
return;
|