@webex/plugin-meetings 3.10.0-multi-llms.1 → 3.10.0-next.10
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/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +20 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +11 -8
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +165 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +15 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +6 -8
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +532 -94
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/media/MediaConnectionAwaiter.js +1 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +0 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +15 -17
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1555 -1527
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +24 -23
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +179 -141
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +25 -23
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +36 -39
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +203 -205
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/constants.d.ts +26 -21
- package/dist/types/hashTree/hashTreeParser.d.ts +109 -0
- package/dist/types/hashTree/types.d.ts +16 -0
- package/dist/types/locus-info/index.d.ts +91 -42
- package/dist/types/locus-info/types.d.ts +45 -0
- package/dist/types/meeting/index.d.ts +22 -9
- package/dist/types/meetings/index.d.ts +9 -2
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +148 -158
- package/dist/webinar/index.js.map +1 -1
- package/package.json +21 -21
- package/src/constants.ts +13 -1
- package/src/hashTree/hashTreeParser.ts +146 -0
- package/src/hashTree/types.ts +20 -0
- package/src/locus-info/index.ts +534 -85
- package/src/locus-info/types.ts +46 -0
- package/src/meeting/index.ts +58 -26
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +104 -51
- package/src/metrics/constants.ts +2 -0
- package/test/unit/spec/locus-info/index.js +576 -1
- package/test/unit/spec/meeting/index.js +91 -20
- package/test/unit/spec/meeting/utils.js +77 -0
- package/test/unit/spec/meetings/index.js +71 -26
package/dist/locus-info/index.js
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
|
|
3
4
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
5
|
+
var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
|
|
6
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
|
|
7
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
9
|
+
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
10
|
+
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
11
|
var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
|
|
5
12
|
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
|
|
6
13
|
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
|
|
7
14
|
var _Array$isArray2 = require("@babel/runtime-corejs2/core-js/array/is-array");
|
|
8
|
-
var
|
|
15
|
+
var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
|
|
9
16
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
10
17
|
_Object$defineProperty(exports, "__esModule", {
|
|
11
18
|
value: true
|
|
12
19
|
});
|
|
13
20
|
exports.default = void 0;
|
|
21
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
22
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
|
|
23
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
|
|
24
|
+
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
14
25
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
|
|
26
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
15
27
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
16
28
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
17
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
19
29
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
20
30
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
31
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
21
32
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
22
33
|
var _lodash = require("lodash");
|
|
23
34
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
@@ -33,11 +44,23 @@ var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
|
|
|
33
44
|
var _parser = _interopRequireDefault(require("./parser"));
|
|
34
45
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
35
46
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
function
|
|
40
|
-
function
|
|
47
|
+
var _hashTreeParser = _interopRequireWildcard(require("../hashTree/hashTreeParser"));
|
|
48
|
+
var _types = require("../hashTree/types");
|
|
49
|
+
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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
50
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray2(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
51
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
52
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
53
|
+
function ownKeys(e, r) { var t = _Object$keys(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; }
|
|
54
|
+
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; }
|
|
55
|
+
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)); }
|
|
56
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
57
|
+
var LocusDtoTopLevelKeys = ['controls', 'fullState', 'host', 'info', 'links', 'mediaShares', 'meetings', 'participants', 'replaces', 'self', 'sequence', 'syncUrl', 'url', 'htMeta' // only exists when hash trees are used
|
|
58
|
+
];
|
|
59
|
+
var LocusObjectStateAfterUpdates = {
|
|
60
|
+
unchanged: 'unchanged',
|
|
61
|
+
removed: 'removed',
|
|
62
|
+
updated: 'updated'
|
|
63
|
+
};
|
|
41
64
|
/**
|
|
42
65
|
* @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
|
|
43
66
|
* @export
|
|
@@ -45,8 +68,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
45
68
|
* @class LocusInfo
|
|
46
69
|
*/
|
|
47
70
|
var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
48
|
-
(0, _inherits2.default)(LocusInfo, _EventsScope);
|
|
49
|
-
var _super = _createSuper(LocusInfo);
|
|
50
71
|
/**
|
|
51
72
|
* Constructor
|
|
52
73
|
* @param {function} updateMeeting callback to update the meeting object from an object
|
|
@@ -57,38 +78,42 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
57
78
|
function LocusInfo(updateMeeting, webex, meetingId) {
|
|
58
79
|
var _this;
|
|
59
80
|
(0, _classCallCheck2.default)(this, LocusInfo);
|
|
60
|
-
_this =
|
|
61
|
-
(0, _defineProperty2.default)(
|
|
62
|
-
(0, _defineProperty2.default)(
|
|
63
|
-
(0, _defineProperty2.default)(
|
|
64
|
-
(0, _defineProperty2.default)(
|
|
65
|
-
(0, _defineProperty2.default)(
|
|
66
|
-
(0, _defineProperty2.default)(
|
|
67
|
-
(0, _defineProperty2.default)(
|
|
68
|
-
(0, _defineProperty2.default)(
|
|
69
|
-
(0, _defineProperty2.default)(
|
|
70
|
-
(0, _defineProperty2.default)(
|
|
71
|
-
(0, _defineProperty2.default)(
|
|
72
|
-
(0, _defineProperty2.default)(
|
|
73
|
-
(0, _defineProperty2.default)(
|
|
74
|
-
(0, _defineProperty2.default)(
|
|
75
|
-
(0, _defineProperty2.default)(
|
|
76
|
-
(0, _defineProperty2.default)(
|
|
77
|
-
(0, _defineProperty2.default)(
|
|
78
|
-
(0, _defineProperty2.default)(
|
|
79
|
-
(0, _defineProperty2.default)(
|
|
80
|
-
(0, _defineProperty2.default)(
|
|
81
|
-
(0, _defineProperty2.default)(
|
|
82
|
-
(0, _defineProperty2.default)(
|
|
83
|
-
(0, _defineProperty2.default)(
|
|
84
|
-
(0, _defineProperty2.default)(
|
|
85
|
-
(0, _defineProperty2.default)(
|
|
86
|
-
(0, _defineProperty2.default)(
|
|
87
|
-
(0, _defineProperty2.default)(
|
|
88
|
-
(0, _defineProperty2.default)(
|
|
89
|
-
(0, _defineProperty2.default)(
|
|
90
|
-
(0, _defineProperty2.default)(
|
|
91
|
-
(0, _defineProperty2.default)(
|
|
81
|
+
_this = _callSuper(this, LocusInfo);
|
|
82
|
+
(0, _defineProperty2.default)(_this, "compareAndUpdateFlags", void 0);
|
|
83
|
+
(0, _defineProperty2.default)(_this, "emitChange", void 0);
|
|
84
|
+
(0, _defineProperty2.default)(_this, "locusParser", void 0);
|
|
85
|
+
(0, _defineProperty2.default)(_this, "meetingId", void 0);
|
|
86
|
+
(0, _defineProperty2.default)(_this, "parsedLocus", void 0);
|
|
87
|
+
(0, _defineProperty2.default)(_this, "updateMeeting", void 0);
|
|
88
|
+
(0, _defineProperty2.default)(_this, "webex", void 0);
|
|
89
|
+
(0, _defineProperty2.default)(_this, "aclUrl", void 0);
|
|
90
|
+
(0, _defineProperty2.default)(_this, "baseSequence", void 0);
|
|
91
|
+
(0, _defineProperty2.default)(_this, "created", void 0);
|
|
92
|
+
(0, _defineProperty2.default)(_this, "identities", void 0);
|
|
93
|
+
(0, _defineProperty2.default)(_this, "membership", void 0);
|
|
94
|
+
(0, _defineProperty2.default)(_this, "participants", void 0);
|
|
95
|
+
(0, _defineProperty2.default)(_this, "participantsUrl", void 0);
|
|
96
|
+
(0, _defineProperty2.default)(_this, "replaces", void 0);
|
|
97
|
+
(0, _defineProperty2.default)(_this, "scheduledMeeting", void 0);
|
|
98
|
+
(0, _defineProperty2.default)(_this, "sequence", void 0);
|
|
99
|
+
(0, _defineProperty2.default)(_this, "controls", void 0);
|
|
100
|
+
(0, _defineProperty2.default)(_this, "conversationUrl", void 0);
|
|
101
|
+
(0, _defineProperty2.default)(_this, "embeddedApps", void 0);
|
|
102
|
+
(0, _defineProperty2.default)(_this, "fullState", void 0);
|
|
103
|
+
(0, _defineProperty2.default)(_this, "host", void 0);
|
|
104
|
+
(0, _defineProperty2.default)(_this, "info", void 0);
|
|
105
|
+
(0, _defineProperty2.default)(_this, "roles", void 0);
|
|
106
|
+
(0, _defineProperty2.default)(_this, "mediaShares", void 0);
|
|
107
|
+
(0, _defineProperty2.default)(_this, "replace", void 0);
|
|
108
|
+
(0, _defineProperty2.default)(_this, "url", void 0);
|
|
109
|
+
(0, _defineProperty2.default)(_this, "services", void 0);
|
|
110
|
+
(0, _defineProperty2.default)(_this, "resources", void 0);
|
|
111
|
+
(0, _defineProperty2.default)(_this, "mainSessionLocusCache", void 0);
|
|
112
|
+
(0, _defineProperty2.default)(_this, "self", void 0);
|
|
113
|
+
(0, _defineProperty2.default)(_this, "hashTreeParser", void 0);
|
|
114
|
+
(0, _defineProperty2.default)(_this, "hashTreeObjectId2ParticipantId", void 0);
|
|
115
|
+
// mapping of hash tree object ids to participant ids
|
|
116
|
+
(0, _defineProperty2.default)(_this, "classicVsHashTreeMismatchMetricCounter", 0);
|
|
92
117
|
_this.parsedLocus = {
|
|
93
118
|
states: []
|
|
94
119
|
};
|
|
@@ -98,18 +123,21 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
98
123
|
_this.meetingId = meetingId;
|
|
99
124
|
_this.updateMeeting = updateMeeting;
|
|
100
125
|
_this.locusParser = new _parser.default();
|
|
126
|
+
_this.hashTreeObjectId2ParticipantId = new _map.default();
|
|
101
127
|
return _this;
|
|
102
128
|
}
|
|
103
129
|
|
|
104
130
|
/**
|
|
105
131
|
* Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
|
|
132
|
+
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
106
133
|
*
|
|
107
134
|
* @param {Meeting} meeting
|
|
108
135
|
* @param {boolean} isLocusUrlChanged
|
|
109
136
|
* @param {Locus} locus
|
|
110
137
|
* @returns {undefined}
|
|
111
138
|
*/
|
|
112
|
-
(0,
|
|
139
|
+
(0, _inherits2.default)(LocusInfo, _EventsScope);
|
|
140
|
+
return (0, _createClass2.default)(LocusInfo, [{
|
|
113
141
|
key: "doLocusSync",
|
|
114
142
|
value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
|
|
115
143
|
var _this$locusParser$wor,
|
|
@@ -309,30 +337,364 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
309
337
|
}
|
|
310
338
|
|
|
311
339
|
/**
|
|
312
|
-
*
|
|
340
|
+
* Creates the HashTreeParser instance.
|
|
341
|
+
* @param {Object} initial locus data
|
|
342
|
+
* @returns {void}
|
|
343
|
+
*/
|
|
344
|
+
}, {
|
|
345
|
+
key: "createHashTreeParser",
|
|
346
|
+
value: function createHashTreeParser(_ref) {
|
|
347
|
+
var initialLocus = _ref.initialLocus;
|
|
348
|
+
return new _hashTreeParser.default({
|
|
349
|
+
initialLocus: initialLocus,
|
|
350
|
+
webexRequest: this.webex.request.bind(this.webex),
|
|
351
|
+
locusInfoUpdateCallback: this.updateFromHashTree.bind(this),
|
|
352
|
+
debugId: "HT-".concat(this.meetingId.substring(0, 4))
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* @param {Object} data - data to initialize locus info with. It may be from a join or GET /loci response or from a Mercury event that triggers a creation of meeting object
|
|
313
358
|
* @returns {undefined}
|
|
314
359
|
* @memberof LocusInfo
|
|
315
360
|
*/
|
|
316
361
|
}, {
|
|
317
362
|
key: "initialSetup",
|
|
318
|
-
value: function
|
|
319
|
-
|
|
320
|
-
|
|
363
|
+
value: (function () {
|
|
364
|
+
var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(data) {
|
|
365
|
+
var _data$locus, _data$locus$links, _data$locus$links$res, _data$locus$links$res2;
|
|
366
|
+
var _data$hashTreeMessage, _selfObject$data, selfObject, _data$locus2, _data$locus2$self, _t;
|
|
367
|
+
return _regenerator.default.wrap(function (_context) {
|
|
368
|
+
while (1) switch (_context.prev = _context.next) {
|
|
369
|
+
case 0:
|
|
370
|
+
_t = data.trigger;
|
|
371
|
+
_context.next = _t === 'locus-message' ? 1 : _t === 'join-response' ? 6 : _t === 'get-loci-response' ? 7 : 10;
|
|
372
|
+
break;
|
|
373
|
+
case 1:
|
|
374
|
+
if (!data.hashTreeMessage) {
|
|
375
|
+
_context.next = 4;
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
// we need the SELF object to be in the received message, because it contains visibleDataSets
|
|
379
|
+
// and these are needed to initialize all the hash trees
|
|
380
|
+
selfObject = (_data$hashTreeMessage = data.hashTreeMessage.locusStateElements) === null || _data$hashTreeMessage === void 0 ? void 0 : _data$hashTreeMessage.find(function (el) {
|
|
381
|
+
return (0, _hashTreeParser.isSelf)(el);
|
|
382
|
+
});
|
|
383
|
+
if (selfObject !== null && selfObject !== void 0 && (_selfObject$data = selfObject.data) !== null && _selfObject$data !== void 0 && _selfObject$data.visibleDataSets) {
|
|
384
|
+
_context.next = 2;
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
_loggerProxy.default.logger.warn("Locus-info:index#initialSetup --> cannot initialize HashTreeParser, SELF object with visibleDataSets is missing in the message");
|
|
388
|
+
throw new Error('SELF object with visibleDataSets is missing in the message');
|
|
389
|
+
case 2:
|
|
390
|
+
_loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from message');
|
|
391
|
+
// first create the HashTreeParser, but don't initialize it with any data yet
|
|
392
|
+
// pass just a fake locus that contains only the visibleDataSets
|
|
393
|
+
this.hashTreeParser = this.createHashTreeParser({
|
|
394
|
+
initialLocus: {
|
|
395
|
+
locus: {
|
|
396
|
+
self: {
|
|
397
|
+
visibleDataSets: selfObject.data.visibleDataSets
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
dataSets: [] // empty, because they will be populated in initializeFromMessage() call // dataSets: data.hashTreeMessage.dataSets,
|
|
401
|
+
}
|
|
402
|
+
});
|
|
321
403
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
404
|
+
// now handle the message - that should populate all the visible datasets
|
|
405
|
+
_context.next = 3;
|
|
406
|
+
return this.hashTreeParser.initializeFromMessage(data.hashTreeMessage);
|
|
407
|
+
case 3:
|
|
408
|
+
_context.next = 5;
|
|
409
|
+
break;
|
|
410
|
+
case 4:
|
|
411
|
+
// "classic" Locus case, no hash trees involved
|
|
412
|
+
this.updateLocusCache(data.locus);
|
|
413
|
+
this.onFullLocus(data.locus, undefined);
|
|
414
|
+
case 5:
|
|
415
|
+
return _context.abrupt("continue", 10);
|
|
416
|
+
case 6:
|
|
417
|
+
this.updateLocusCache(data.locus);
|
|
418
|
+
this.onFullLocus(data.locus, undefined, data.dataSets);
|
|
419
|
+
return _context.abrupt("continue", 10);
|
|
420
|
+
case 7:
|
|
421
|
+
if (!((_data$locus = data.locus) !== null && _data$locus !== void 0 && (_data$locus$links = _data$locus.links) !== null && _data$locus$links !== void 0 && (_data$locus$links$res = _data$locus$links.resources) !== null && _data$locus$links$res !== void 0 && (_data$locus$links$res2 = _data$locus$links$res.visibleDataSets) !== null && _data$locus$links$res2 !== void 0 && _data$locus$links$res2.url)) {
|
|
422
|
+
_context.next = 9;
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
_loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from get-loci-response');
|
|
426
|
+
// first create the HashTreeParser, but don't initialize it with any data yet
|
|
427
|
+
// pass just a fake locus that contains only the visibleDataSets
|
|
428
|
+
this.hashTreeParser = this.createHashTreeParser({
|
|
429
|
+
initialLocus: {
|
|
430
|
+
locus: {
|
|
431
|
+
self: {
|
|
432
|
+
visibleDataSets: (_data$locus2 = data.locus) === null || _data$locus2 === void 0 ? void 0 : (_data$locus2$self = _data$locus2.self) === null || _data$locus2$self === void 0 ? void 0 : _data$locus2$self.visibleDataSets
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
dataSets: [] // empty, because we don't have them yet
|
|
436
|
+
}
|
|
437
|
+
});
|
|
325
438
|
|
|
439
|
+
// now initialize all the data
|
|
440
|
+
_context.next = 8;
|
|
441
|
+
return this.hashTreeParser.initializeFromGetLociResponse(data.locus);
|
|
442
|
+
case 8:
|
|
443
|
+
_context.next = 10;
|
|
444
|
+
break;
|
|
445
|
+
case 9:
|
|
446
|
+
// "classic" Locus case, no hash trees involved
|
|
447
|
+
this.updateLocusCache(data.locus);
|
|
448
|
+
this.onFullLocus(data.locus, undefined);
|
|
449
|
+
case 10:
|
|
450
|
+
// Change it to true after it receives it first locus object
|
|
451
|
+
this.emitChange = true;
|
|
452
|
+
case 11:
|
|
453
|
+
case "end":
|
|
454
|
+
return _context.stop();
|
|
455
|
+
}
|
|
456
|
+
}, _callee, this);
|
|
457
|
+
}));
|
|
458
|
+
function initialSetup(_x) {
|
|
459
|
+
return _initialSetup.apply(this, arguments);
|
|
460
|
+
}
|
|
461
|
+
return initialSetup;
|
|
462
|
+
}()
|
|
326
463
|
/**
|
|
327
464
|
* Handles HTTP response from Locus API call.
|
|
328
465
|
* @param {Meeting} meeting meeting object
|
|
329
466
|
* @param {LocusApiResponseBody} responseBody body of the http response from Locus API call
|
|
330
467
|
* @returns {void}
|
|
331
468
|
*/
|
|
469
|
+
)
|
|
332
470
|
}, {
|
|
333
471
|
key: "handleLocusAPIResponse",
|
|
334
472
|
value: function handleLocusAPIResponse(meeting, responseBody) {
|
|
335
|
-
this.
|
|
473
|
+
if (this.hashTreeParser) {
|
|
474
|
+
// API responses with hash tree are a bit problematic and not fully confirmed how they will look like
|
|
475
|
+
// we don't really need them, because all updates are guaranteed to come via Mercury or LLM messages anyway
|
|
476
|
+
// so it's OK to skip them for now
|
|
477
|
+
_loggerProxy.default.logger.info('Locus-info:index#handleLocusAPIResponse: skipping handling of API http response with hashTreeParser');
|
|
478
|
+
} else {
|
|
479
|
+
if (responseBody.dataSets) {
|
|
480
|
+
this.sendClassicVsHashTreeMismatchMetric(meeting, "unexpected hash tree dataSets in API response");
|
|
481
|
+
}
|
|
482
|
+
// classic Locus delta
|
|
483
|
+
this.handleLocusDelta(responseBody.locus, meeting);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
*
|
|
489
|
+
* @param {HashTreeObject} object data set object
|
|
490
|
+
* @param {any} locus
|
|
491
|
+
* @returns {void}
|
|
492
|
+
*/
|
|
493
|
+
}, {
|
|
494
|
+
key: "updateLocusFromHashTreeObject",
|
|
495
|
+
value: function updateLocusFromHashTreeObject(object, locus) {
|
|
496
|
+
var type = object.htMeta.elementId.type.toLowerCase();
|
|
497
|
+
switch (type) {
|
|
498
|
+
case _types.ObjectType.locus:
|
|
499
|
+
{
|
|
500
|
+
if (!object.data) {
|
|
501
|
+
// not doing anything here, as we need Locus to always be there (at least some fields)
|
|
502
|
+
// and that's already taken care of in updateFromHashTree()
|
|
503
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> LOCUS object removed");
|
|
504
|
+
return locus;
|
|
505
|
+
}
|
|
506
|
+
// replace the main locus
|
|
507
|
+
|
|
508
|
+
// The Locus object we receive from backend has empty participants, so removing them to avoid it overriding the ones in our current locus object
|
|
509
|
+
// Also, other fields like mediaShares are managed by other ObjectType updates, so removing them too
|
|
510
|
+
// BTW, it also doesn't have "self". That's OK as it won't override existing locus.self and also existing SDK code can handle that missing self in Locus updates
|
|
511
|
+
var locusObjectFromData = object.data;
|
|
512
|
+
delete locusObjectFromData.participants;
|
|
513
|
+
delete locusObjectFromData.mediaShares;
|
|
514
|
+
locus = _objectSpread(_objectSpread({}, locus), locusObjectFromData);
|
|
515
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> LOCUS object updated");
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
case _types.ObjectType.mediaShare:
|
|
519
|
+
if (object.data) {
|
|
520
|
+
var _object$data$floor, _object$data$floor2, _object$data$floor2$b, _locus$mediaShares;
|
|
521
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> mediaShare id=".concat(object.htMeta.elementId.id, " name='").concat(object.data.name, "' updated ").concat(object.data.name === 'content' ? "floor=".concat((_object$data$floor = object.data.floor) === null || _object$data$floor === void 0 ? void 0 : _object$data$floor.disposition, ", ").concat((_object$data$floor2 = object.data.floor) === null || _object$data$floor2 === void 0 ? void 0 : (_object$data$floor2$b = _object$data$floor2.beneficiary) === null || _object$data$floor2$b === void 0 ? void 0 : _object$data$floor2$b.id) : ''));
|
|
522
|
+
var existingMediaShare = (_locus$mediaShares = locus.mediaShares) === null || _locus$mediaShares === void 0 ? void 0 : _locus$mediaShares.find(function (ms) {
|
|
523
|
+
return ms.htMeta.elementId.id === object.htMeta.elementId.id;
|
|
524
|
+
});
|
|
525
|
+
if (existingMediaShare) {
|
|
526
|
+
(0, _assign.default)(existingMediaShare, object.data);
|
|
527
|
+
} else {
|
|
528
|
+
locus.mediaShares = locus.mediaShares || [];
|
|
529
|
+
locus.mediaShares.push(object.data);
|
|
530
|
+
}
|
|
531
|
+
} else {
|
|
532
|
+
var _locus$mediaShares2;
|
|
533
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> mediaShare id=".concat(object.htMeta.elementId.id, " removed"));
|
|
534
|
+
locus.mediaShares = (_locus$mediaShares2 = locus.mediaShares) === null || _locus$mediaShares2 === void 0 ? void 0 : _locus$mediaShares2.filter(function (ms) {
|
|
535
|
+
return ms.htMeta.elementId.id !== object.htMeta.elementId.id;
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
break;
|
|
539
|
+
case _types.ObjectType.participant:
|
|
540
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> participant id=".concat(object.htMeta.elementId.id, " ").concat(object.data ? 'updated' : 'removed'));
|
|
541
|
+
if (object.data) {
|
|
542
|
+
if (!locus.participants) {
|
|
543
|
+
locus.participants = [];
|
|
544
|
+
}
|
|
545
|
+
var participantObject = object.data;
|
|
546
|
+
participantObject.htMeta = object.htMeta;
|
|
547
|
+
locus.participants.push(participantObject);
|
|
548
|
+
this.hashTreeObjectId2ParticipantId.set(object.htMeta.elementId.id, participantObject.id);
|
|
549
|
+
} else {
|
|
550
|
+
var participantId = this.hashTreeObjectId2ParticipantId.get(object.htMeta.elementId.id);
|
|
551
|
+
if (!locus.jsSdkMeta) {
|
|
552
|
+
locus.jsSdkMeta = {
|
|
553
|
+
removedParticipantIds: []
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
locus.jsSdkMeta.removedParticipantIds.push(participantId);
|
|
557
|
+
this.hashTreeObjectId2ParticipantId.delete(object.htMeta.elementId.id);
|
|
558
|
+
}
|
|
559
|
+
break;
|
|
560
|
+
case _types.ObjectType.self:
|
|
561
|
+
if (!object.data) {
|
|
562
|
+
// self without data is handled inside HashTreeParser and results in LocusInfoUpdateType.MEETING_ENDED, so we should never get here
|
|
563
|
+
_loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received SELF object without data, this is not expected!");
|
|
564
|
+
return locus;
|
|
565
|
+
}
|
|
566
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> SELF object updated");
|
|
567
|
+
locus.self = object.data;
|
|
568
|
+
break;
|
|
569
|
+
default:
|
|
570
|
+
_loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received unsupported object type ".concat(type));
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
return locus;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Sends a metric when we receive something from Locus that uses hash trees while we
|
|
578
|
+
* expect classic deltas or the other way around.
|
|
579
|
+
* @param {Meeting} meeting
|
|
580
|
+
* @param {string} message
|
|
581
|
+
* @returns {void}
|
|
582
|
+
*/
|
|
583
|
+
}, {
|
|
584
|
+
key: "sendClassicVsHashTreeMismatchMetric",
|
|
585
|
+
value: function sendClassicVsHashTreeMismatchMetric(meeting, message) {
|
|
586
|
+
_loggerProxy.default.logger.warn("Locus-info:index#sendClassicVsHashTreeMismatchMetric --> classic vs hash tree mismatch! ".concat(message));
|
|
587
|
+
|
|
588
|
+
// we don't want to flood the metrics system
|
|
589
|
+
if (this.classicVsHashTreeMismatchMetricCounter < 5) {
|
|
590
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH, {
|
|
591
|
+
correlationId: meeting.correlationId,
|
|
592
|
+
message: message
|
|
593
|
+
});
|
|
594
|
+
this.classicVsHashTreeMismatchMetricCounter += 1;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Handles a hash tree message received from Locus.
|
|
600
|
+
*
|
|
601
|
+
* @param {Meeting} meeting - The meeting object
|
|
602
|
+
* @param {eventType} eventType - The event type
|
|
603
|
+
* @param {HashTreeMessage} message incoming hash tree message
|
|
604
|
+
* @returns {void}
|
|
605
|
+
*/
|
|
606
|
+
}, {
|
|
607
|
+
key: "handleHashTreeMessage",
|
|
608
|
+
value: function handleHashTreeMessage(meeting, eventType, message) {
|
|
609
|
+
if (eventType !== _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
610
|
+
this.sendClassicVsHashTreeMismatchMetric(meeting, "got ".concat(eventType, ", expected ").concat(_constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED));
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
this.hashTreeParser.handleMessage(message);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Callback registered with HashTreeParser to receive locus info updates.
|
|
618
|
+
* Updates our locus info based on the data parsed by the hash tree parser.
|
|
619
|
+
*
|
|
620
|
+
* @param {LocusInfoUpdateType} updateType - The type of update received.
|
|
621
|
+
* @param {Object} [data] - Additional data for the update, if applicable.
|
|
622
|
+
* @returns {void}
|
|
623
|
+
*/
|
|
624
|
+
}, {
|
|
625
|
+
key: "updateFromHashTree",
|
|
626
|
+
value: function updateFromHashTree(updateType, data) {
|
|
627
|
+
var _this4 = this;
|
|
628
|
+
switch (updateType) {
|
|
629
|
+
case _hashTreeParser.LocusInfoUpdateType.OBJECTS_UPDATED:
|
|
630
|
+
{
|
|
631
|
+
// initialize our new locus
|
|
632
|
+
var locus = {
|
|
633
|
+
participants: [],
|
|
634
|
+
jsSdkMeta: {
|
|
635
|
+
removedParticipantIds: []
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
// first go over all the updates and check what happens with the main locus object
|
|
640
|
+
var locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.unchanged;
|
|
641
|
+
data.updatedObjects.forEach(function (object) {
|
|
642
|
+
if (object.htMeta.elementId.type.toLowerCase() === _types.ObjectType.locus) {
|
|
643
|
+
if (locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.updated) {
|
|
644
|
+
var _object$data;
|
|
645
|
+
// this code doesn't supported it right now,
|
|
646
|
+
// cases for "updated" followed by "removed", or multiple "updated" would need more handling
|
|
647
|
+
// but these should never happen
|
|
648
|
+
_loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
|
|
649
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
|
|
650
|
+
locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this4.url,
|
|
651
|
+
message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
if (object.data) {
|
|
655
|
+
locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.updated;
|
|
656
|
+
} else {
|
|
657
|
+
locusObjectStateAfterUpdates = LocusObjectStateAfterUpdates.removed;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
// if Locus object is unchanged or removed, we need to keep using the existing locus
|
|
663
|
+
// because the rest of the locusInfo code expects locus to always be present (with at least some of the fields)
|
|
664
|
+
// if it gets updated, we don't need to do anything and we start with an empty one
|
|
665
|
+
// so that when it gets updated, if the new one is missing some field, that field will
|
|
666
|
+
// be removed from our locusInfo
|
|
667
|
+
if (locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.unchanged || locusObjectStateAfterUpdates === LocusObjectStateAfterUpdates.removed) {
|
|
668
|
+
// copy over existing locus
|
|
669
|
+
LocusDtoTopLevelKeys.forEach(function (key) {
|
|
670
|
+
if (key !== 'participants') {
|
|
671
|
+
locus[key] = (0, _lodash.cloneDeep)(_this4[key]);
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> LOCUS object is ".concat(locusObjectStateAfterUpdates, ", all updates: ").concat((0, _stringify.default)(data.updatedObjects.map(function (o) {
|
|
676
|
+
return {
|
|
677
|
+
type: o.htMeta.elementId.type,
|
|
678
|
+
id: o.htMeta.elementId.id,
|
|
679
|
+
hasData: o.data !== undefined
|
|
680
|
+
};
|
|
681
|
+
}))));
|
|
682
|
+
// now apply all the updates from the hash tree onto the locus
|
|
683
|
+
data.updatedObjects.forEach(function (object) {
|
|
684
|
+
locus = _this4.updateLocusFromHashTreeObject(object, locus);
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
// update our locus info with the new locus
|
|
688
|
+
this.onDeltaLocus(locus);
|
|
689
|
+
break;
|
|
690
|
+
}
|
|
691
|
+
case _hashTreeParser.LocusInfoUpdateType.MEETING_ENDED:
|
|
692
|
+
{
|
|
693
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received signal that meeting ended, destroying meeting ".concat(this.meetingId));
|
|
694
|
+
var meeting = this.webex.meetings.meetingCollection.get(this.meetingId);
|
|
695
|
+
this.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.SELF_REMOVED);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
336
698
|
}
|
|
337
699
|
|
|
338
700
|
/**
|
|
@@ -344,37 +706,44 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
344
706
|
}, {
|
|
345
707
|
key: "parse",
|
|
346
708
|
value: function parse(meeting, data) {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
709
|
+
if (this.hashTreeParser) {
|
|
710
|
+
this.handleHashTreeMessage(meeting, data.eventType, data.stateElementsMessage);
|
|
711
|
+
} else {
|
|
712
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
713
|
+
var eventType = data.eventType;
|
|
714
|
+
var locus = this.getTheLocusToUpdate(data.locus);
|
|
715
|
+
_loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
|
|
716
|
+
locus.jsSdkMeta = {
|
|
717
|
+
removedParticipantIds: []
|
|
718
|
+
};
|
|
719
|
+
switch (eventType) {
|
|
720
|
+
case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
|
|
721
|
+
case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
|
|
722
|
+
case _constants.LOCUSEVENT.CONTROLS_UPDATED:
|
|
723
|
+
case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_MUTED:
|
|
724
|
+
case _constants.LOCUSEVENT.PARTICIPANT_AUDIO_UNMUTED:
|
|
725
|
+
case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_MUTED:
|
|
726
|
+
case _constants.LOCUSEVENT.PARTICIPANT_VIDEO_UNMUTED:
|
|
727
|
+
case _constants.LOCUSEVENT.SELF_CHANGED:
|
|
728
|
+
case _constants.LOCUSEVENT.PARTICIPANT_UPDATED:
|
|
729
|
+
case _constants.LOCUSEVENT.PARTICIPANT_CONTROLS_UPDATED:
|
|
730
|
+
case _constants.LOCUSEVENT.PARTICIPANT_ROLES_UPDATED:
|
|
731
|
+
case _constants.LOCUSEVENT.PARTICIPANT_DECLINED:
|
|
732
|
+
case _constants.LOCUSEVENT.FLOOR_GRANTED:
|
|
733
|
+
case _constants.LOCUSEVENT.FLOOR_RELEASED:
|
|
734
|
+
this.onFullLocus(locus, eventType);
|
|
735
|
+
break;
|
|
736
|
+
case _constants.LOCUSEVENT.DIFFERENCE:
|
|
737
|
+
this.handleLocusDelta(locus, meeting);
|
|
738
|
+
break;
|
|
739
|
+
case _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED:
|
|
740
|
+
this.sendClassicVsHashTreeMismatchMetric(meeting, "got ".concat(eventType, ", expected classic events"));
|
|
741
|
+
break;
|
|
742
|
+
default:
|
|
743
|
+
// Why will there be a event with no eventType ????
|
|
744
|
+
// we may not need this, we can get full locus
|
|
745
|
+
this.handleLocusDelta(locus, meeting);
|
|
746
|
+
}
|
|
378
747
|
}
|
|
379
748
|
}
|
|
380
749
|
|
|
@@ -391,26 +760,99 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
391
760
|
return this.emit(scope, eventName, args);
|
|
392
761
|
}
|
|
393
762
|
|
|
763
|
+
/**
|
|
764
|
+
* Function for handling full locus when it's using hash trees (so not the "classic" one).
|
|
765
|
+
*
|
|
766
|
+
* @param {object} locus locus object
|
|
767
|
+
* @param {string} eventType locus event
|
|
768
|
+
* @param {DataSet[]} dataSets
|
|
769
|
+
* @returns {void}
|
|
770
|
+
*/
|
|
771
|
+
}, {
|
|
772
|
+
key: "onFullLocusWithHashTrees",
|
|
773
|
+
value: function onFullLocusWithHashTrees(locus, eventType, dataSets) {
|
|
774
|
+
if (!this.hashTreeParser) {
|
|
775
|
+
_loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> creating hash tree parser");
|
|
776
|
+
_loggerProxy.default.logger.info('Locus-info:index#onFullLocus --> dataSets:', dataSets, ' and locus:', locus);
|
|
777
|
+
this.hashTreeParser = this.createHashTreeParser({
|
|
778
|
+
initialLocus: {
|
|
779
|
+
locus: locus,
|
|
780
|
+
dataSets: dataSets
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
this.onFullLocusCommon(locus, eventType);
|
|
784
|
+
} else {
|
|
785
|
+
// in this case the Locus we're getting is not necessarily the full one
|
|
786
|
+
// so treat it like if we just got it in any api response
|
|
787
|
+
|
|
788
|
+
_loggerProxy.default.logger.info('Locus-info:index#onFullLocus --> hash tree parser already exists, handling it like a normal API response');
|
|
789
|
+
this.handleLocusAPIResponse(undefined, {
|
|
790
|
+
dataSets: dataSets,
|
|
791
|
+
locus: locus
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Function for handling full locus when it's the "classic" one (not hash trees)
|
|
798
|
+
*
|
|
799
|
+
* @param {object} locus locus object
|
|
800
|
+
* @param {string} eventType locus event
|
|
801
|
+
* @returns {void}
|
|
802
|
+
*/
|
|
803
|
+
}, {
|
|
804
|
+
key: "onFullLocusClassic",
|
|
805
|
+
value: function onFullLocusClassic(locus, eventType) {
|
|
806
|
+
if (!this.locusParser.isNewFullLocus(locus)) {
|
|
807
|
+
_loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
this.onFullLocusCommon(locus, eventType);
|
|
811
|
+
}
|
|
812
|
+
|
|
394
813
|
/**
|
|
395
814
|
* updates the locus with full locus object
|
|
396
815
|
* @param {object} locus locus object
|
|
397
|
-
* @param {string} eventType
|
|
816
|
+
* @param {string} eventType locus event
|
|
817
|
+
* @param {DataSet[]} dataSets
|
|
398
818
|
* @returns {object} null
|
|
399
819
|
* @memberof LocusInfo
|
|
400
820
|
*/
|
|
401
821
|
}, {
|
|
402
822
|
key: "onFullLocus",
|
|
403
|
-
value: function onFullLocus(locus, eventType) {
|
|
404
|
-
var _locus$jsSdkMeta;
|
|
823
|
+
value: function onFullLocus(locus, eventType, dataSets) {
|
|
405
824
|
if (!locus) {
|
|
406
825
|
_loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
|
|
407
826
|
}
|
|
408
|
-
if (
|
|
409
|
-
|
|
410
|
-
|
|
827
|
+
if (dataSets) {
|
|
828
|
+
// this is the new hashmap Locus DTO format (only applicable to webinars for now)
|
|
829
|
+
this.onFullLocusWithHashTrees(locus, eventType, dataSets);
|
|
830
|
+
} else {
|
|
831
|
+
this.onFullLocusClassic(locus, eventType);
|
|
411
832
|
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Common part of handling full locus, used by both classic and hash tree based locus handling
|
|
837
|
+
* @param {object} locus locus object
|
|
838
|
+
* @param {string} eventType locus event
|
|
839
|
+
* @returns {void}
|
|
840
|
+
*/
|
|
841
|
+
}, {
|
|
842
|
+
key: "onFullLocusCommon",
|
|
843
|
+
value: function onFullLocusCommon(locus, eventType) {
|
|
844
|
+
var _this$participants,
|
|
845
|
+
_this5 = this,
|
|
846
|
+
_locus$jsSdkMeta;
|
|
412
847
|
this.scheduledMeeting = locus.meeting || null;
|
|
413
848
|
this.participants = locus.participants;
|
|
849
|
+
(_this$participants = this.participants) === null || _this$participants === void 0 ? void 0 : _this$participants.forEach(function (participant) {
|
|
850
|
+
var _participant$htMeta;
|
|
851
|
+
// participant.htMeta is set only for hash tree based locus
|
|
852
|
+
if ((_participant$htMeta = participant.htMeta) !== null && _participant$htMeta !== void 0 && _participant$htMeta.elementId.id) {
|
|
853
|
+
_this5.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
|
|
854
|
+
}
|
|
855
|
+
});
|
|
414
856
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
|
415
857
|
this.updateLocusInfo(locus);
|
|
416
858
|
this.updateParticipants(locus.participants, (_locus$jsSdkMeta = locus.jsSdkMeta) === null || _locus$jsSdkMeta === void 0 ? void 0 : _locus$jsSdkMeta.removedParticipantIds, isReplaceMembers);
|
|
@@ -1192,7 +1634,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1192
1634
|
isInitializing: !self // if self is undefined, then the update is caused by locus init
|
|
1193
1635
|
});
|
|
1194
1636
|
}
|
|
1195
|
-
|
|
1196
1637
|
this.roles = roles;
|
|
1197
1638
|
}
|
|
1198
1639
|
|
|
@@ -1287,7 +1728,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1287
1728
|
// @ts-ignore
|
|
1288
1729
|
var parsedSelves = _selfUtils.default.getSelves(this.parsedLocus.self, self, this.webex.internal.device.url, this.participants // using this.participants instead of locus.participants here, because with delta DTOs locus.participants will only contain a small subset of participants
|
|
1289
1730
|
);
|
|
1290
|
-
|
|
1291
1731
|
this.updateMeeting(parsedSelves.current);
|
|
1292
1732
|
this.parsedLocus.self = parsedSelves.current;
|
|
1293
1733
|
var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
|
|
@@ -1372,7 +1812,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1372
1812
|
// unmuteAllowed: not part of .self
|
|
1373
1813
|
});
|
|
1374
1814
|
}
|
|
1375
|
-
|
|
1376
1815
|
if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
|
|
1377
1816
|
this.emitScoped({
|
|
1378
1817
|
file: 'locus-info',
|
|
@@ -1633,7 +2072,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1633
2072
|
}, {
|
|
1634
2073
|
key: "updateMainSessionLocusCache",
|
|
1635
2074
|
value: function updateMainSessionLocusCache(mainLocus) {
|
|
1636
|
-
var
|
|
2075
|
+
var _this6 = this;
|
|
1637
2076
|
if (!mainLocus) {
|
|
1638
2077
|
return;
|
|
1639
2078
|
}
|
|
@@ -1642,7 +2081,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1642
2081
|
// shallow merge and do special merge for participants
|
|
1643
2082
|
(0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
|
1644
2083
|
if (key === 'participants') {
|
|
1645
|
-
return
|
|
2084
|
+
return _this6.mergeParticipants(objValue, srcValue);
|
|
1646
2085
|
}
|
|
1647
2086
|
return srcValue || objValue;
|
|
1648
2087
|
});
|
|
@@ -1662,6 +2101,5 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1662
2101
|
this.mainSessionLocusCache = null;
|
|
1663
2102
|
}
|
|
1664
2103
|
}]);
|
|
1665
|
-
return LocusInfo;
|
|
1666
2104
|
}(_eventsScope.default);
|
|
1667
2105
|
//# sourceMappingURL=index.js.map
|