@webex/plugin-meetings 3.12.0-next.17 → 3.12.0-next.171
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/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +135 -0
- package/ai-docs/ARCHITECTURE.md +207 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +37 -10
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +46 -10
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/hashTree/constants.js +4 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1096 -391
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +20 -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/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +24 -9
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +55 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- 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 +615 -176
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +20 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1684 -835
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +37 -3
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +12 -5
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +300 -128
- 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 +116 -18
- 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 +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +7 -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/multistream/remoteMediaManager.js +32 -4
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.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/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +13 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
- package/dist/types/hashTree/utils.d.ts +7 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +106 -8
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +22 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +178 -11
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +40 -19
- 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 +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +6 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +307 -161
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +6 -4
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +21 -3
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/controls-options-manager/index.ts +62 -10
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +7 -0
- package/src/hashTree/hashTreeParser.ts +861 -193
- package/src/hashTree/utils.ts +19 -0
- package/src/index.ts +6 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +26 -5
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +65 -10
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +566 -164
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +26 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/ai-docs/meeting-spec.md +401 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +944 -120
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +51 -7
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +11 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +200 -80
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/metrics/constants.ts +6 -0
- package/src/multistream/ai-docs/multistream-spec.md +292 -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/multistream/remoteMediaManager.ts +23 -1
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +3 -3
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +223 -3
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +139 -32
- package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
- package/test/unit/spec/hashTree/utils.ts +37 -0
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +234 -5
- package/test/unit/spec/interpretation/index.ts +119 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +1014 -58
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +2834 -110
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +189 -17
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
- package/test/unit/spec/meetings/index.js +544 -49
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +332 -31
package/dist/locus-info/index.js
CHANGED
|
@@ -21,8 +21,9 @@ exports.createLocusFromHashTreeMessage = createLocusFromHashTreeMessage;
|
|
|
21
21
|
exports.default = void 0;
|
|
22
22
|
exports.findMeetingForHashTreeMessage = findMeetingForHashTreeMessage;
|
|
23
23
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
24
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
25
24
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
25
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
26
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
26
27
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
27
28
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
28
29
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
@@ -32,10 +33,12 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
32
33
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
33
34
|
var _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
|
|
34
35
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
|
|
36
|
+
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
|
|
35
37
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
36
38
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
37
|
-
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
|
|
38
39
|
var _lodash = require("lodash");
|
|
40
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
41
|
+
var _webexCore = require("@webex/webex-core");
|
|
39
42
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
40
43
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
41
44
|
var _constants = require("../constants");
|
|
@@ -53,7 +56,7 @@ var _hashTreeParser2 = _interopRequireWildcard(require("../hashTree/hashTreePars
|
|
|
53
56
|
var _types = require("../hashTree/types");
|
|
54
57
|
var _utils = require("../hashTree/utils");
|
|
55
58
|
var _util = _interopRequireDefault(require("../meetings/util"));
|
|
56
|
-
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
|
|
59
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t3 in e) "default" !== _t3 && {}.hasOwnProperty.call(e, _t3) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t3)) && (i.get || i.set) ? o(f, _t3, i) : f[_t3] = e[_t3]); return f; })(e, t); }
|
|
57
60
|
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)); }
|
|
58
61
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
59
62
|
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; }
|
|
@@ -76,7 +79,7 @@ var LocusObjectStateAfterUpdates = {
|
|
|
76
79
|
* Gets the replacement information
|
|
77
80
|
*
|
|
78
81
|
* @param {any} self - "self" object from Locus DTO
|
|
79
|
-
* @param {string} deviceUrl - The URL of the
|
|
82
|
+
* @param {string} deviceUrl - The URL of the specified device
|
|
80
83
|
* @returns {any} The replace information if available, otherwise undefined
|
|
81
84
|
*/
|
|
82
85
|
function getReplaceInfoFromSelf(self, deviceUrl) {
|
|
@@ -115,11 +118,13 @@ function findLocusUrlInAnyHashTreeParser(meetingCollection, locusUrl) {
|
|
|
115
118
|
*
|
|
116
119
|
* @param {HashTreeMessage} message - The hash tree message to find the meeting for
|
|
117
120
|
* @param {MeetingCollection} meetingCollection - The collection of meetings to search
|
|
118
|
-
* @param {string} deviceUrl - The URL of the user's device
|
|
119
121
|
* @returns {any} The meeting if found, otherwise undefined
|
|
120
122
|
*/
|
|
121
|
-
function findMeetingForHashTreeMessage(message, meetingCollection
|
|
123
|
+
function findMeetingForHashTreeMessage(message, meetingCollection) {
|
|
122
124
|
var _message$locusStateEl, _message$locusStateEl2;
|
|
125
|
+
if (!message) {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
123
128
|
var foundMeeting = findLocusUrlInAnyHashTreeParser(meetingCollection, message.locusUrl);
|
|
124
129
|
if (foundMeeting) {
|
|
125
130
|
return foundMeeting;
|
|
@@ -130,7 +135,7 @@ function findMeetingForHashTreeMessage(message, meetingCollection, deviceUrl) {
|
|
|
130
135
|
var self = (_message$locusStateEl = message.locusStateElements) === null || _message$locusStateEl === void 0 ? void 0 : (_message$locusStateEl2 = _message$locusStateEl.find(function (el) {
|
|
131
136
|
return (0, _utils.isSelf)(el);
|
|
132
137
|
})) === null || _message$locusStateEl2 === void 0 ? void 0 : _message$locusStateEl2.data;
|
|
133
|
-
var replaces = getReplaceInfoFromSelf(self, deviceUrl);
|
|
138
|
+
var replaces = getReplaceInfoFromSelf(self, self === null || self === void 0 ? void 0 : self.deviceUrl);
|
|
134
139
|
if (replaces !== null && replaces !== void 0 && replaces.locusUrl) {
|
|
135
140
|
foundMeeting = findLocusUrlInAnyHashTreeParser(meetingCollection, replaces.locusUrl);
|
|
136
141
|
return foundMeeting;
|
|
@@ -242,12 +247,13 @@ function createLocusFromHashTreeMessage(message) {
|
|
|
242
247
|
var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
243
248
|
/**
|
|
244
249
|
* Constructor
|
|
245
|
-
* @param {
|
|
250
|
+
* @param {Object} callbacks callbacks used by LocusInfo
|
|
251
|
+
* @param {function} callbacks.updateMeeting callback to update the meeting object from an object
|
|
246
252
|
* @param {object} webex
|
|
247
253
|
* @param {string} meetingId
|
|
248
254
|
* @returns {undefined}
|
|
249
255
|
*/
|
|
250
|
-
function LocusInfo(
|
|
256
|
+
function LocusInfo(callbacks, webex, meetingId) {
|
|
251
257
|
var _this;
|
|
252
258
|
(0, _classCallCheck2.default)(this, LocusInfo);
|
|
253
259
|
_this = _callSuper(this, LocusInfo);
|
|
@@ -256,7 +262,6 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
256
262
|
(0, _defineProperty2.default)(_this, "locusParser", void 0);
|
|
257
263
|
(0, _defineProperty2.default)(_this, "meetingId", void 0);
|
|
258
264
|
(0, _defineProperty2.default)(_this, "parsedLocus", void 0);
|
|
259
|
-
(0, _defineProperty2.default)(_this, "updateMeeting", void 0);
|
|
260
265
|
(0, _defineProperty2.default)(_this, "webex", void 0);
|
|
261
266
|
(0, _defineProperty2.default)(_this, "aclUrl", void 0);
|
|
262
267
|
(0, _defineProperty2.default)(_this, "baseSequence", void 0);
|
|
@@ -281,14 +286,16 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
281
286
|
(0, _defineProperty2.default)(_this, "hashTreeObjectId2ParticipantId", void 0);
|
|
282
287
|
// mapping of hash tree object ids to participant ids
|
|
283
288
|
(0, _defineProperty2.default)(_this, "classicVsHashTreeMismatchMetricCounter", 0);
|
|
289
|
+
(0, _defineProperty2.default)(_this, "callbacks", void 0);
|
|
290
|
+
(0, _defineProperty2.default)(_this, "destroyMeetingSuspended", false);
|
|
284
291
|
_this.parsedLocus = {
|
|
285
292
|
states: []
|
|
286
293
|
};
|
|
294
|
+
_this.callbacks = callbacks;
|
|
287
295
|
_this.webex = webex;
|
|
288
296
|
_this.emitChange = false;
|
|
289
297
|
_this.compareAndUpdateFlags = {};
|
|
290
298
|
_this.meetingId = meetingId;
|
|
291
|
-
_this.updateMeeting = updateMeeting;
|
|
292
299
|
_this.locusParser = new _parser.default();
|
|
293
300
|
_this.hashTreeParsers = new _map.default();
|
|
294
301
|
_this.hashTreeObjectId2ParticipantId = new _map.default();
|
|
@@ -296,23 +303,46 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
296
303
|
}
|
|
297
304
|
|
|
298
305
|
/**
|
|
299
|
-
*
|
|
300
|
-
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
306
|
+
* Whether this meeting uses hash tree based Locus (as opposed to a classic, delta based Locus).
|
|
301
307
|
*
|
|
302
|
-
* @
|
|
303
|
-
* @param {boolean} isLocusUrlChanged
|
|
304
|
-
* @param {Locus} locus
|
|
305
|
-
* @returns {undefined}
|
|
308
|
+
* @returns {boolean}
|
|
306
309
|
*/
|
|
307
310
|
(0, _inherits2.default)(LocusInfo, _EventsScope);
|
|
308
311
|
return (0, _createClass2.default)(LocusInfo, [{
|
|
312
|
+
key: "isUsingHashTrees",
|
|
313
|
+
value: function isUsingHashTrees() {
|
|
314
|
+
return this.hashTreeParsers.size > 0;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* 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.
|
|
319
|
+
* WARNING: This function must not be used for hash tree based Locus meetings.
|
|
320
|
+
*
|
|
321
|
+
* @param {Meeting} meeting
|
|
322
|
+
* @param {boolean} isLocusUrlChanged
|
|
323
|
+
* @param {Locus} locus
|
|
324
|
+
* @param {Object} [options]
|
|
325
|
+
* @param {boolean} [options.destroyOnTransientFailure=true] controls what happens on a *transient*
|
|
326
|
+
* sync failure (a terminal failure, e.g. a 403 meaning the meeting has ended, always destroys
|
|
327
|
+
* the meeting regardless of this flag). When true, a transient failure destroys the meeting and
|
|
328
|
+
* the returned promise still resolves. When false, the meeting is preserved and the returned
|
|
329
|
+
* promise rejects so the caller can retry.
|
|
330
|
+
* @returns {Promise} resolves once the fetched DTO has been applied; see destroyOnTransientFailure
|
|
331
|
+
* for the failure behavior
|
|
332
|
+
*/
|
|
333
|
+
}, {
|
|
309
334
|
key: "doLocusSync",
|
|
310
335
|
value: function doLocusSync(meeting, isLocusUrlChanged, locus) {
|
|
311
336
|
var _this$locusParser$wor,
|
|
312
337
|
_this2 = this;
|
|
338
|
+
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
339
|
+
_ref$destroyOnTransie = _ref.destroyOnTransientFailure,
|
|
340
|
+
destroyOnTransientFailure = _ref$destroyOnTransie === void 0 ? true : _ref$destroyOnTransie;
|
|
313
341
|
var url;
|
|
314
342
|
var isDelta = false;
|
|
315
343
|
var meetingDestroyed = false;
|
|
344
|
+
// whether the DTO fetch itself failed (as opposed to applying a successfully fetched DTO)
|
|
345
|
+
var fetchFailed = false;
|
|
316
346
|
if (isLocusUrlChanged) {
|
|
317
347
|
// for the locus url changed case from breakout to main session, we should always do a full sync, in this case, the url from locus is always on main session,
|
|
318
348
|
// so use the main session locus url to get the full locus(full participants list in the response).
|
|
@@ -327,8 +357,28 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
327
357
|
}
|
|
328
358
|
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
|
|
329
359
|
|
|
330
|
-
//
|
|
331
|
-
meeting
|
|
360
|
+
// Called once the DTO fetch (delta plus any full-sync fallback) has failed and we're giving up.
|
|
361
|
+
// The meeting is destroyed when either the delta-processing path asked for it, or the failure is
|
|
362
|
+
// terminal (e.g. a 403 meaning the meeting has ended) - in both cases there's nothing left to
|
|
363
|
+
// sync or retry, so the trailing catch below swallows the rejection whenever meetingDestroyed is
|
|
364
|
+
// set. On the caller-driven reconnection path a non-terminal failure preserves the meeting and
|
|
365
|
+
// lets the rejection propagate so the caller can retry.
|
|
366
|
+
var onFetchFailure = function onFetchFailure(error, logMessage) {
|
|
367
|
+
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
368
|
+
_ref2$terminal = _ref2.terminal,
|
|
369
|
+
terminal = _ref2$terminal === void 0 ? false : _ref2$terminal;
|
|
370
|
+
// terminal failures always destroy the meeting; destroyOnTransientFailure only controls the
|
|
371
|
+
// non-terminal case
|
|
372
|
+
var destroyMeeting = terminal || destroyOnTransientFailure;
|
|
373
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> ".concat(logMessage).concat(destroyMeeting ? ', destroying the meeting' : ''));
|
|
374
|
+
fetchFailed = true;
|
|
375
|
+
if (destroyMeeting) {
|
|
376
|
+
_this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
|
|
377
|
+
meetingDestroyed = true;
|
|
378
|
+
}
|
|
379
|
+
throw error;
|
|
380
|
+
};
|
|
381
|
+
return meeting.meetingRequest.getLocusDTO({
|
|
332
382
|
url: url
|
|
333
383
|
}).catch(function (e) {
|
|
334
384
|
if (isDelta) {
|
|
@@ -348,19 +398,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
348
398
|
return meeting.meetingRequest.getLocusDTO({
|
|
349
399
|
url: meeting.locusUrl
|
|
350
400
|
}).catch(function (err) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
401
|
+
return (
|
|
402
|
+
// A 403 from the fallback full sync is also terminal (meeting has ended), so remove the
|
|
403
|
+
// meeting even on the reconnection path instead of preserving it and rejecting.
|
|
404
|
+
onFetchFailure(err, 'fallback full sync failed', {
|
|
405
|
+
terminal: err.statusCode === 403
|
|
406
|
+
})
|
|
407
|
+
);
|
|
355
408
|
});
|
|
356
409
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
410
|
+
|
|
411
|
+
// A 403 means the meeting has ended - this is terminal, so remove the meeting even on the
|
|
412
|
+
// reconnection path (there's nothing to retry) instead of preserving it and rejecting.
|
|
413
|
+
return onFetchFailure(e, 'got 403 from Locus, skipping fallback to full sync', {
|
|
414
|
+
terminal: true
|
|
415
|
+
});
|
|
360
416
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
417
|
+
return onFetchFailure(e, 'full sync failed', {
|
|
418
|
+
terminal: e.statusCode === 403
|
|
419
|
+
});
|
|
364
420
|
}).then(function (res) {
|
|
365
421
|
if ((0, _lodash.isEmpty)(res.body)) {
|
|
366
422
|
if (isDelta) {
|
|
@@ -380,15 +436,27 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
380
436
|
}
|
|
381
437
|
meeting.locusInfo.onFullLocus('classic Locus sync', res.body);
|
|
382
438
|
}).catch(function (e) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
439
|
+
if (!fetchFailed) {
|
|
440
|
+
// The DTO was fetched successfully but applying it failed. Retrying wouldn't help - it
|
|
441
|
+
// would re-fetch and re-apply the same unprocessable DTO and fail identically - so log and
|
|
442
|
+
// resume (swallow the error) instead of propagating it. Propagating here would make the
|
|
443
|
+
// reconnection flow (which treats a rejection as retryable) retry indefinitely.
|
|
444
|
+
_loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> getLocusDTO succeeded but failed to handle result, locus parser will resume but not all data may be synced (".concat(e.toString(), ")"));
|
|
445
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_SYNC_HANDLING_FAILED, {
|
|
446
|
+
correlationId: meeting.correlationId,
|
|
447
|
+
url: url,
|
|
448
|
+
reason: e.message,
|
|
449
|
+
errorName: e.name,
|
|
450
|
+
stack: e.stack,
|
|
451
|
+
code: e.code
|
|
452
|
+
});
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (!destroyOnTransientFailure && !meetingDestroyed) {
|
|
456
|
+
// caller-driven sync (e.g. reconnection): propagate a transient fetch failure so it can be
|
|
457
|
+
// retried. If the meeting was destroyed (terminal failure), there's nothing to retry.
|
|
458
|
+
throw e;
|
|
459
|
+
}
|
|
392
460
|
}).finally(function () {
|
|
393
461
|
if (!meetingDestroyed) {
|
|
394
462
|
// Notify parser to resume processing delta events.
|
|
@@ -398,6 +466,73 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
398
466
|
});
|
|
399
467
|
}
|
|
400
468
|
|
|
469
|
+
/**
|
|
470
|
+
* Syncs this meeting's Locus state (e.g. after a network reconnection), routing to whichever
|
|
471
|
+
* mechanism the meeting uses (a meeting only ever uses one): hash tree datasets via
|
|
472
|
+
* syncAllHashTreeDatasets() or a standalone Locus DTO fetch for classic meetings.
|
|
473
|
+
* A transient failure preserves the meeting (so the caller can retry); only a terminal failure
|
|
474
|
+
* (e.g. a 403 meaning the meeting has ended) destroys it.
|
|
475
|
+
*
|
|
476
|
+
* The classic path is only needed when Meetings#syncMeetings() can't do its usual
|
|
477
|
+
* getActiveMeetings() fetch (e.g. unverified guests, for whom Locus rejects that call); signed-in
|
|
478
|
+
* users resync classic meetings via getActiveMeetings() and pass canSyncClassicLocus as false.
|
|
479
|
+
*
|
|
480
|
+
* @param {Meeting} meeting
|
|
481
|
+
* @param {Object} options
|
|
482
|
+
* @param {boolean} options.canSyncClassicLocus - whether this sync is allowed to fetch a
|
|
483
|
+
* standalone Locus DTO for classic meetings
|
|
484
|
+
* @param {boolean} options.canSyncHashTree - whether this sync is allowed to sync hash tree
|
|
485
|
+
* datasets for hash tree based meetings
|
|
486
|
+
* @returns {Promise<void>} resolves once the sync (hash tree or classic) completes; for the
|
|
487
|
+
* classic path it rejects only on a transient failure, so the caller can retry (a terminal
|
|
488
|
+
* failure destroys the meeting and resolves)
|
|
489
|
+
*/
|
|
490
|
+
}, {
|
|
491
|
+
key: "sync",
|
|
492
|
+
value: (function () {
|
|
493
|
+
var _sync = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(meeting, _ref3) {
|
|
494
|
+
var canSyncClassicLocus, canSyncHashTree;
|
|
495
|
+
return _regenerator.default.wrap(function (_context) {
|
|
496
|
+
while (1) switch (_context.prev = _context.next) {
|
|
497
|
+
case 0:
|
|
498
|
+
canSyncClassicLocus = _ref3.canSyncClassicLocus, canSyncHashTree = _ref3.canSyncHashTree;
|
|
499
|
+
if (!this.isUsingHashTrees()) {
|
|
500
|
+
_context.next = 2;
|
|
501
|
+
break;
|
|
502
|
+
}
|
|
503
|
+
if (!canSyncHashTree) {
|
|
504
|
+
_context.next = 1;
|
|
505
|
+
break;
|
|
506
|
+
}
|
|
507
|
+
_context.next = 1;
|
|
508
|
+
return this.syncAllHashTreeDatasets();
|
|
509
|
+
case 1:
|
|
510
|
+
return _context.abrupt("return");
|
|
511
|
+
case 2:
|
|
512
|
+
if (!(canSyncClassicLocus && meeting.locusUrl)) {
|
|
513
|
+
_context.next = 3;
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
// Pause the parser so in-flight deltas don't race the DTO fetch; doLocusSync() resumes it.
|
|
517
|
+
this.locusParser.pause();
|
|
518
|
+
// destroyOnTransientFailure: false so a transient failure preserves the meeting and rejects,
|
|
519
|
+
// letting the reconnection flow retry instead of tearing the meeting down. A terminal failure
|
|
520
|
+
// (e.g. a 403 meaning the meeting has ended) still destroys the meeting.
|
|
521
|
+
_context.next = 3;
|
|
522
|
+
return this.doLocusSync(meeting, false, undefined, {
|
|
523
|
+
destroyOnTransientFailure: false
|
|
524
|
+
});
|
|
525
|
+
case 3:
|
|
526
|
+
case "end":
|
|
527
|
+
return _context.stop();
|
|
528
|
+
}
|
|
529
|
+
}, _callee, this);
|
|
530
|
+
}));
|
|
531
|
+
function sync(_x, _x2) {
|
|
532
|
+
return _sync.apply(this, arguments);
|
|
533
|
+
}
|
|
534
|
+
return sync;
|
|
535
|
+
}()
|
|
401
536
|
/**
|
|
402
537
|
* Apply locus delta data to meeting
|
|
403
538
|
* @param {string} action Locus delta action
|
|
@@ -405,6 +540,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
405
540
|
* @param {Meeting} meeting
|
|
406
541
|
* @returns {undefined}
|
|
407
542
|
*/
|
|
543
|
+
)
|
|
408
544
|
}, {
|
|
409
545
|
key: "applyLocusDeltaData",
|
|
410
546
|
value: function applyLocusDeltaData(action, locus, meeting) {
|
|
@@ -490,7 +626,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
490
626
|
this.updateControls(locus.controls, locus.self);
|
|
491
627
|
this.updateLocusUrl(locus.url, _controlsUtils.default.isMainSessionDTO(locus));
|
|
492
628
|
this.updateFullState(locus.fullState);
|
|
493
|
-
this.updateMeetingInfo(locus.info);
|
|
629
|
+
this.updateMeetingInfo(locus.info, locus.self);
|
|
494
630
|
this.updateEmbeddedApps(locus.embeddedApps);
|
|
495
631
|
// self and participants generate sipUrl for 1:1 meeting
|
|
496
632
|
this.updateSelf(locus.self);
|
|
@@ -499,6 +635,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
499
635
|
this.updateLinks(locus.links);
|
|
500
636
|
}
|
|
501
637
|
|
|
638
|
+
/**
|
|
639
|
+
* Whether we expect to receive updates over the LLM connection. This is used by hash tree parsers
|
|
640
|
+
* to decide whether to arm heartbeat watchdog timers for LLM data sets.
|
|
641
|
+
* @returns {boolean}
|
|
642
|
+
*/
|
|
643
|
+
}, {
|
|
644
|
+
key: "isLlmExpected",
|
|
645
|
+
value: function isLlmExpected() {
|
|
646
|
+
var _this$parsedLocus$sel, _this$parsedLocus$sel2;
|
|
647
|
+
return ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : (_this$parsedLocus$sel2 = _this$parsedLocus$sel.joinedWith) === null || _this$parsedLocus$sel2 === void 0 ? void 0 : _this$parsedLocus$sel2.state) === 'JOINED';
|
|
648
|
+
}
|
|
649
|
+
|
|
502
650
|
/**
|
|
503
651
|
* Creates a HashTreeParser instance for a given locusUrl and stores it in the map.
|
|
504
652
|
* @param {Object} params
|
|
@@ -510,19 +658,41 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
510
658
|
*/
|
|
511
659
|
}, {
|
|
512
660
|
key: "createHashTreeParser",
|
|
513
|
-
value: function createHashTreeParser(
|
|
514
|
-
var
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
661
|
+
value: function createHashTreeParser(_ref4) {
|
|
662
|
+
var _this4 = this,
|
|
663
|
+
_locusUrl$split,
|
|
664
|
+
_locusUrl$split$pop,
|
|
665
|
+
_this$webex$config$me;
|
|
666
|
+
var locusUrl = _ref4.locusUrl,
|
|
667
|
+
initialLocus = _ref4.initialLocus,
|
|
668
|
+
metadata = _ref4.metadata,
|
|
669
|
+
replacedAt = _ref4.replacedAt;
|
|
519
670
|
var parser = new _hashTreeParser2.default({
|
|
520
671
|
initialLocus: initialLocus,
|
|
521
672
|
metadata: metadata,
|
|
522
673
|
webexRequest: this.webex.request.bind(this.webex),
|
|
523
|
-
|
|
674
|
+
callbacks: {
|
|
675
|
+
locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
|
|
676
|
+
syncLatencyTracker: this.callbacks.syncLatencyTracker,
|
|
677
|
+
isLlmExpected: function isLlmExpected() {
|
|
678
|
+
return _this4.isLlmExpected();
|
|
679
|
+
},
|
|
680
|
+
// Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
|
|
681
|
+
// webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
|
|
682
|
+
// ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
|
|
683
|
+
// back to a uuid on the rare chance the interceptor hasn't issued any request yet (and so
|
|
684
|
+
// isn't in the map). The value is opaque to the metrics layer and is forced onto the
|
|
685
|
+
// /hashtree and /sync request headers.
|
|
686
|
+
generateTrackingId: function generateTrackingId() {
|
|
687
|
+
var interceptor = (0, _toConsumableArray2.default)(_webexCore.webexTrackingIdSequenceNumbers.keys()).find(function (candidate) {
|
|
688
|
+
return (candidate === null || candidate === void 0 ? void 0 : candidate.webex) === _this4.webex;
|
|
689
|
+
});
|
|
690
|
+
return "".concat(_this4.webex.sessionId, "_").concat(interceptor ? interceptor.sequence : _uuid.default.v4());
|
|
691
|
+
}
|
|
692
|
+
},
|
|
524
693
|
debugId: "HT-".concat((_locusUrl$split = locusUrl.split('/')) === null || _locusUrl$split === void 0 ? void 0 : (_locusUrl$split$pop = _locusUrl$split.pop()) === null || _locusUrl$split$pop === void 0 ? void 0 : _locusUrl$split$pop.substring(0, 4)),
|
|
525
|
-
excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets
|
|
694
|
+
excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets,
|
|
695
|
+
syncLatencyMeetingId: this.meetingId
|
|
526
696
|
});
|
|
527
697
|
|
|
528
698
|
// When a new HashTreeParser is created, previous one should be stopped.
|
|
@@ -558,24 +728,26 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
558
728
|
|
|
559
729
|
/**
|
|
560
730
|
* @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
|
|
731
|
+
* @param {Function} [onLocusSynced] - optional callback that will be called at the end of initial setup, when locus info is fully synced. It will be called with the full locus snapshot as an argument (which may be null if we haven't received any full locus DTOs during the initial setup, for example in case we receive only hash tree messages without full locus DTOs)
|
|
561
732
|
* @returns {undefined}
|
|
562
733
|
* @memberof LocusInfo
|
|
563
734
|
*/
|
|
564
735
|
}, {
|
|
565
736
|
key: "initialSetup",
|
|
566
737
|
value: (function () {
|
|
567
|
-
var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function
|
|
738
|
+
var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(data, onLocusSynced) {
|
|
568
739
|
var _data$locus, _data$locus$links, _data$locus$links$res, _data$locus$links$res2;
|
|
569
|
-
var _data$hashTreeMessage, _metadataObject$data, metadataObject, hashTreeParser, _hashTreeParser, _t;
|
|
570
|
-
return _regenerator.default.wrap(function (
|
|
571
|
-
while (1) switch (
|
|
740
|
+
var initialFullLocus, _data$hashTreeMessage, _metadataObject$data, metadataObject, hashTreeParser, _hashTreeParser, _t;
|
|
741
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
742
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
572
743
|
case 0:
|
|
744
|
+
initialFullLocus = null;
|
|
573
745
|
_t = data.trigger;
|
|
574
|
-
|
|
746
|
+
_context2.next = _t === 'locus-message' ? 1 : _t === 'join-response' ? 6 : _t === 'get-loci-response' ? 7 : 10;
|
|
575
747
|
break;
|
|
576
748
|
case 1:
|
|
577
749
|
if (!data.hashTreeMessage) {
|
|
578
|
-
|
|
750
|
+
_context2.next = 4;
|
|
579
751
|
break;
|
|
580
752
|
}
|
|
581
753
|
// we need the Metadata object to be in the received message, because it contains visibleDataSets
|
|
@@ -584,7 +756,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
584
756
|
return (0, _utils.isMetadata)(el);
|
|
585
757
|
});
|
|
586
758
|
if (metadataObject !== null && metadataObject !== void 0 && (_metadataObject$data = metadataObject.data) !== null && _metadataObject$data !== void 0 && _metadataObject$data.visibleDataSets) {
|
|
587
|
-
|
|
759
|
+
_context2.next = 2;
|
|
588
760
|
break;
|
|
589
761
|
}
|
|
590
762
|
// this is a common case (not an error)
|
|
@@ -607,24 +779,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
607
779
|
visibleDataSets: metadataObject.data.visibleDataSets
|
|
608
780
|
}
|
|
609
781
|
}); // now handle the message - that should populate all the visible datasets
|
|
610
|
-
|
|
782
|
+
_context2.next = 3;
|
|
611
783
|
return hashTreeParser.initializeFromMessage(data.hashTreeMessage);
|
|
612
784
|
case 3:
|
|
613
|
-
|
|
785
|
+
_context2.next = 5;
|
|
614
786
|
break;
|
|
615
787
|
case 4:
|
|
616
788
|
// "classic" Locus case, no hash trees involved
|
|
617
789
|
this.updateLocusCache(data.locus);
|
|
618
790
|
this.onFullLocus('classic locus message', data.locus, undefined);
|
|
619
791
|
case 5:
|
|
620
|
-
return
|
|
792
|
+
return _context2.abrupt("continue", 10);
|
|
621
793
|
case 6:
|
|
622
794
|
this.updateLocusCache(data.locus);
|
|
623
795
|
this.onFullLocus('join response', data.locus, undefined, data.dataSets, data.metadata);
|
|
624
|
-
|
|
796
|
+
initialFullLocus = data.locus;
|
|
797
|
+
return _context2.abrupt("continue", 10);
|
|
625
798
|
case 7:
|
|
626
799
|
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)) {
|
|
627
|
-
|
|
800
|
+
_context2.next = 9;
|
|
628
801
|
break;
|
|
629
802
|
}
|
|
630
803
|
_loggerProxy.default.logger.info('Locus-info:index#initialSetup --> creating HashTreeParser from get-loci-response');
|
|
@@ -637,36 +810,67 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
637
810
|
},
|
|
638
811
|
metadata: null // get-loci-response doesn't contain Metadata object
|
|
639
812
|
}); // now initialize all the data
|
|
640
|
-
|
|
813
|
+
_context2.next = 8;
|
|
641
814
|
return _hashTreeParser.initializeFromGetLociResponse(data.locus);
|
|
642
815
|
case 8:
|
|
643
|
-
|
|
816
|
+
_context2.next = 10;
|
|
644
817
|
break;
|
|
645
818
|
case 9:
|
|
646
819
|
// "classic" Locus case, no hash trees involved
|
|
647
820
|
this.updateLocusCache(data.locus);
|
|
648
821
|
this.onFullLocus('classic get-loci-response', data.locus, undefined);
|
|
822
|
+
initialFullLocus = data.locus || null;
|
|
649
823
|
case 10:
|
|
824
|
+
if (onLocusSynced) {
|
|
825
|
+
try {
|
|
826
|
+
onLocusSynced(initialFullLocus || this.getCurrentLocusSnapshot());
|
|
827
|
+
} catch (error) {
|
|
828
|
+
_loggerProxy.default.logger.warn("Locus-info:index#initialSetup --> onLocusSynced callback failed: ".concat(error));
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
650
832
|
// Change it to true after it receives it first locus object
|
|
651
833
|
this.emitChange = true;
|
|
652
834
|
case 11:
|
|
653
835
|
case "end":
|
|
654
|
-
return
|
|
836
|
+
return _context2.stop();
|
|
655
837
|
}
|
|
656
|
-
},
|
|
838
|
+
}, _callee2, this);
|
|
657
839
|
}));
|
|
658
|
-
function initialSetup(
|
|
840
|
+
function initialSetup(_x3, _x4) {
|
|
659
841
|
return _initialSetup.apply(this, arguments);
|
|
660
842
|
}
|
|
661
843
|
return initialSetup;
|
|
662
844
|
}()
|
|
845
|
+
/**
|
|
846
|
+
* Builds a full locus DTO snapshot from current internal locus state.
|
|
847
|
+
*
|
|
848
|
+
* @returns {LocusDTO}
|
|
849
|
+
*/
|
|
850
|
+
)
|
|
851
|
+
}, {
|
|
852
|
+
key: "getCurrentLocusSnapshot",
|
|
853
|
+
value: function getCurrentLocusSnapshot() {
|
|
854
|
+
var _this5 = this;
|
|
855
|
+
var locus = {};
|
|
856
|
+
LocusDtoTopLevelKeys.forEach(function (key) {
|
|
857
|
+
var value = _this5[key];
|
|
858
|
+
if (value !== undefined && value !== null) {
|
|
859
|
+
locus[key] = (0, _lodash.cloneDeep)(value);
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
if (!(0, _isArray.default)(locus.participants)) {
|
|
863
|
+
locus.participants = [];
|
|
864
|
+
}
|
|
865
|
+
return locus;
|
|
866
|
+
}
|
|
867
|
+
|
|
663
868
|
/**
|
|
664
869
|
* Handles HTTP response from Locus API call.
|
|
665
870
|
* @param {Meeting} meeting meeting object
|
|
666
871
|
* @param {LocusApiResponseBody} responseBody body of the http response from Locus API call
|
|
667
872
|
* @returns {void}
|
|
668
873
|
*/
|
|
669
|
-
)
|
|
670
874
|
}, {
|
|
671
875
|
key: "handleLocusAPIResponse",
|
|
672
876
|
value: function handleLocusAPIResponse(meeting, responseBody) {
|
|
@@ -674,29 +878,38 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
674
878
|
var isWrapped = 'locus' in responseBody;
|
|
675
879
|
var locusUrl = isWrapped ? (_responseBody$locus = responseBody.locus) === null || _responseBody$locus === void 0 ? void 0 : _responseBody$locus.url : responseBody.url;
|
|
676
880
|
var hashTreeParserEntry = locusUrl && this.hashTreeParsers.get(locusUrl);
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
881
|
+
var locus = isWrapped ? responseBody.locus : responseBody;
|
|
882
|
+
if (this.isUsingHashTrees()) {
|
|
883
|
+
// We are in hash tree mode. Check if we need to create/reactivate a parser for this locusUrl.
|
|
884
|
+
if (!hashTreeParserEntry || hashTreeParserEntry.parser.state === 'stopped') {
|
|
885
|
+
if (!locusUrl) {
|
|
886
|
+
_loggerProxy.default.logger.warn('Locus-info:index#handleLocusAPIResponse --> API response has no locusUrl, cannot handle hash tree parser switch');
|
|
887
|
+
return;
|
|
682
888
|
}
|
|
683
|
-
|
|
889
|
+
this.handleHashTreeParserSwitchForAPIResponse(locusUrl, locus);
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// Active parser found - pass the API response to it
|
|
894
|
+
if (isWrapped) {
|
|
684
895
|
// update the data in our hash trees
|
|
685
896
|
hashTreeParserEntry.parser.handleLocusUpdate(responseBody);
|
|
686
897
|
} else {
|
|
687
|
-
// LocusDTO without wrapper - pass it through as if it had no dataSets
|
|
898
|
+
// LocusDTO without wrapper - pass it through as if it had no dataSets nor metadata
|
|
688
899
|
hashTreeParserEntry.parser.handleLocusUpdate({
|
|
689
900
|
locus: responseBody
|
|
690
901
|
});
|
|
691
902
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
this.handleLocusDelta(locus, meeting);
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// No hash tree parsers - classic Locus mode
|
|
907
|
+
if (isWrapped && responseBody.dataSets) {
|
|
908
|
+
this.sendClassicVsHashTreeMismatchMetric(meeting, "unexpected hash tree dataSets in API response");
|
|
699
909
|
}
|
|
910
|
+
|
|
911
|
+
// classic Locus delta
|
|
912
|
+
this.handleLocusDelta(locus, meeting);
|
|
700
913
|
}
|
|
701
914
|
|
|
702
915
|
/**
|
|
@@ -707,7 +920,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
707
920
|
}, {
|
|
708
921
|
key: "updateLocusFromHashTreeObject",
|
|
709
922
|
value: function updateLocusFromHashTreeObject(object, locus) {
|
|
710
|
-
var
|
|
923
|
+
var _this6 = this,
|
|
711
924
|
_locus$self;
|
|
712
925
|
var type = object.htMeta.elementId.type.toLowerCase();
|
|
713
926
|
var addParticipantObject = function addParticipantObject(obj) {
|
|
@@ -715,7 +928,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
715
928
|
locus.participants = [];
|
|
716
929
|
}
|
|
717
930
|
locus.participants.push(obj.data);
|
|
718
|
-
|
|
931
|
+
_this6.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
|
|
719
932
|
};
|
|
720
933
|
switch (type) {
|
|
721
934
|
case _types.ObjectType.locus:
|
|
@@ -826,10 +1039,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
826
1039
|
if (!object.data) {
|
|
827
1040
|
// self without data is handled inside HashTreeParser and results in LocusInfoUpdateType.MEETING_ENDED, so we should never get here
|
|
828
1041
|
// all other types info, fullstate, etc - Locus should never send them without data
|
|
829
|
-
|
|
1042
|
+
// but we end up with this method being called without the data for them when the main dataset is removed from visible datasets list
|
|
1043
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> received ".concat(type, " object without data, version=").concat(object.htMeta.elementId.version));
|
|
830
1044
|
} else {
|
|
831
1045
|
var _locus$info, _object$data$controls, _object$data$controls2, _object$data$controls3;
|
|
832
1046
|
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> ".concat(type, " object updated to version ").concat(object.htMeta.elementId.version));
|
|
1047
|
+
if (type === _types.ObjectType.self) {
|
|
1048
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> self data: removed=".concat(object.data.removed, " state=").concat(object.data.state, " reason=").concat(object.data.reason));
|
|
1049
|
+
}
|
|
833
1050
|
var locusDtoKey = _types.ObjectTypeToLocusKeyMap[type];
|
|
834
1051
|
locus[locusDtoKey] = object.data;
|
|
835
1052
|
|
|
@@ -879,6 +1096,81 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
879
1096
|
}
|
|
880
1097
|
}
|
|
881
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
* Helper that handles the common logic for reactivating a stopped HashTreeParser when
|
|
1101
|
+
* a newer "replaces" is detected. Used by both the message and API response parser switch methods.
|
|
1102
|
+
*
|
|
1103
|
+
* @param {string} callerName - name of the calling method, used in log messages
|
|
1104
|
+
* @param {string} locusUrl - the locus URL of the stopped parser
|
|
1105
|
+
* @param {HashTreeParserEntry} stoppedEntry - the stopped parser entry
|
|
1106
|
+
* @param {ReplacesInfo} replaces - replacement info extracted from self
|
|
1107
|
+
* @param {Function} resumeCallback - callback to invoke after reactivation to resume the parser
|
|
1108
|
+
* @returns {void}
|
|
1109
|
+
*/
|
|
1110
|
+
}, {
|
|
1111
|
+
key: "resumeStoppedParser",
|
|
1112
|
+
value: function resumeStoppedParser(callerName, locusUrl, stoppedEntry, replaces, resumeCallback) {
|
|
1113
|
+
// this check is just for typescript, it should never happen, replaces should always be defined
|
|
1114
|
+
if (!replaces) {
|
|
1115
|
+
_loggerProxy.default.logger.info("Locus-info:index#".concat(callerName, " --> received data for stopped HashTreeParser with locusUrl ").concat(locusUrl, ", but no replaces info provided, so not re-activating the parser"));
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
if (replaces.replacedAt <= (stoppedEntry.replacedAt || '')) {
|
|
1119
|
+
_loggerProxy.default.logger.info("Locus-info:index#".concat(callerName, " --> received data for stopped HashTreeParser with locusUrl ").concat(locusUrl, ", but replaces info provided is not newer, so not re-activating the parser"));
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
_loggerProxy.default.logger.info("Locus-info:index#".concat(callerName, " --> reactivating HashTreeParser for locusUrl=").concat(locusUrl, ", which replaces ").concat(replaces.locusUrl));
|
|
1123
|
+
var replacedEntry = this.hashTreeParsers.get(replaces.locusUrl);
|
|
1124
|
+
if (replacedEntry) {
|
|
1125
|
+
replacedEntry.replacedAt = replaces.replacedAt;
|
|
1126
|
+
replacedEntry.parser.stop();
|
|
1127
|
+
} else {
|
|
1128
|
+
_loggerProxy.default.logger.warn("Locus-info:index#".concat(callerName, " --> the parser that is supposed to be replaced with the currently reactivated parser is not found, locusUrl=").concat(replaces.locusUrl));
|
|
1129
|
+
}
|
|
1130
|
+
stoppedEntry.initializedFromHashTree = false;
|
|
1131
|
+
this.hashTreeObjectId2ParticipantId.clear();
|
|
1132
|
+
resumeCallback();
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* Handles an API response whose locusUrl doesn't match any active HashTreeParser
|
|
1137
|
+
* (either no entry exists, or the existing entry is stopped).
|
|
1138
|
+
* Creates a new parser or reactivates a stopped one using initializeFromGetLociResponse.
|
|
1139
|
+
*
|
|
1140
|
+
* @param {string} locusUrl - the locus URL from the API response
|
|
1141
|
+
* @param {LocusDTO} locus - the locus DTO from the API response
|
|
1142
|
+
* @returns {void}
|
|
1143
|
+
*/
|
|
1144
|
+
}, {
|
|
1145
|
+
key: "handleHashTreeParserSwitchForAPIResponse",
|
|
1146
|
+
value: function handleHashTreeParserSwitchForAPIResponse(locusUrl, locus) {
|
|
1147
|
+
var entry = this.hashTreeParsers.get(locusUrl);
|
|
1148
|
+
var replaces = getReplaceInfoFromSelf(locus.self,
|
|
1149
|
+
// @ts-ignore
|
|
1150
|
+
this.webex.internal.device.url);
|
|
1151
|
+
if (!entry) {
|
|
1152
|
+
_loggerProxy.default.logger.info("Locus-info:index#handleHashTreeParserSwitchForAPIResponse --> no parser for locusUrl ".concat(locusUrl, ", creating a new one"));
|
|
1153
|
+
var parser = this.createHashTreeParser({
|
|
1154
|
+
locusUrl: locusUrl,
|
|
1155
|
+
initialLocus: {
|
|
1156
|
+
locus: null,
|
|
1157
|
+
dataSets: []
|
|
1158
|
+
},
|
|
1159
|
+
metadata: null,
|
|
1160
|
+
replacedAt: replaces === null || replaces === void 0 ? void 0 : replaces.replacedAt
|
|
1161
|
+
});
|
|
1162
|
+
parser.initializeFromGetLociResponse(locus);
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
if (entry.parser.state !== 'stopped') {
|
|
1166
|
+
_loggerProxy.default.logger.warn("Locus-info:index#handleHashTreeParserSwitchForAPIResponse --> unexpected parser state \"".concat(entry.parser.state, "\" for locusUrl ").concat(locusUrl));
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
this.resumeStoppedParser('handleHashTreeParserSwitchForAPIResponse', locusUrl, entry, replaces, function () {
|
|
1170
|
+
return entry.parser.resumeFromApiResponse(locus);
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
|
|
882
1174
|
/**
|
|
883
1175
|
* Checks if the hash tree message should trigger a switch to a different HashTreeParser
|
|
884
1176
|
*
|
|
@@ -926,25 +1218,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
926
1218
|
if (entry.parser.state === 'stopped') {
|
|
927
1219
|
// the message matches a stopped parser, we need to check if maybe this is a new "replacement" and we need to re-activate the parser
|
|
928
1220
|
// this happens when you move from breakout A -> breakout B -> back to breakout A
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
var replacedEntry = this.hashTreeParsers.get(replaces.locusUrl);
|
|
933
|
-
if (replacedEntry) {
|
|
934
|
-
replacedEntry.replacedAt = replaces.replacedAt;
|
|
935
|
-
entry.initializedFromHashTree = false;
|
|
936
|
-
this.hashTreeObjectId2ParticipantId.clear();
|
|
937
|
-
replacedEntry.parser.stop();
|
|
938
|
-
entry.parser.resume(message);
|
|
939
|
-
} else {
|
|
940
|
-
_loggerProxy.default.logger.warn("Locus-info:index#handleHashTreeParserSwitch --> the parser that is supposed to be replaced with the currently resumed parser is not found, locusUrl=".concat(replaces.locusUrl));
|
|
941
|
-
}
|
|
942
|
-
} else {
|
|
943
|
-
_loggerProxy.default.logger.info("Locus-info:index#handleHashTreeParserSwitch --> received message for stopped HashTreeParser with locusUrl ".concat(message.locusUrl, ", but replaces info provided is not newer, so not re-activating the parser"));
|
|
944
|
-
}
|
|
945
|
-
return true;
|
|
946
|
-
}
|
|
947
|
-
_loggerProxy.default.logger.info("Locus-info:index#handleHashTreeParserSwitch --> received message for stopped HashTreeParser with locusUrl ".concat(message.locusUrl, ", but no replaces info provided, so not re-activating the parser"));
|
|
1221
|
+
this.resumeStoppedParser('handleHashTreeParserSwitch', message.locusUrl, entry, replaces, function () {
|
|
1222
|
+
return entry.parser.resumeFromMessage(message);
|
|
1223
|
+
});
|
|
948
1224
|
return true;
|
|
949
1225
|
}
|
|
950
1226
|
return false;
|
|
@@ -977,6 +1253,69 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
977
1253
|
}
|
|
978
1254
|
}
|
|
979
1255
|
|
|
1256
|
+
/**
|
|
1257
|
+
* Triggers a sync of all hash tree datasets for all hash tree parsers associated with this meeting.
|
|
1258
|
+
* The syncs are executed sequentially within each parser.
|
|
1259
|
+
*
|
|
1260
|
+
* @param {Object} [options={}] - Options for syncing
|
|
1261
|
+
* @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
|
|
1262
|
+
* @returns {Promise<void>}
|
|
1263
|
+
*/
|
|
1264
|
+
}, {
|
|
1265
|
+
key: "syncAllHashTreeDatasets",
|
|
1266
|
+
value: (function () {
|
|
1267
|
+
var _syncAllHashTreeDatasets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
1268
|
+
var options,
|
|
1269
|
+
_iterator3,
|
|
1270
|
+
_step3,
|
|
1271
|
+
_step3$value,
|
|
1272
|
+
entry,
|
|
1273
|
+
_args3 = arguments,
|
|
1274
|
+
_t2;
|
|
1275
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
1276
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1277
|
+
case 0:
|
|
1278
|
+
options = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
|
1279
|
+
_iterator3 = _createForOfIteratorHelper(this.hashTreeParsers);
|
|
1280
|
+
_context3.prev = 1;
|
|
1281
|
+
_iterator3.s();
|
|
1282
|
+
case 2:
|
|
1283
|
+
if ((_step3 = _iterator3.n()).done) {
|
|
1284
|
+
_context3.next = 4;
|
|
1285
|
+
break;
|
|
1286
|
+
}
|
|
1287
|
+
_step3$value = (0, _slicedToArray2.default)(_step3.value, 2), entry = _step3$value[1];
|
|
1288
|
+
if (!entry.parser) {
|
|
1289
|
+
_context3.next = 3;
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
_context3.next = 3;
|
|
1293
|
+
return entry.parser.syncAllDatasets(options);
|
|
1294
|
+
case 3:
|
|
1295
|
+
_context3.next = 2;
|
|
1296
|
+
break;
|
|
1297
|
+
case 4:
|
|
1298
|
+
_context3.next = 6;
|
|
1299
|
+
break;
|
|
1300
|
+
case 5:
|
|
1301
|
+
_context3.prev = 5;
|
|
1302
|
+
_t2 = _context3["catch"](1);
|
|
1303
|
+
_iterator3.e(_t2);
|
|
1304
|
+
case 6:
|
|
1305
|
+
_context3.prev = 6;
|
|
1306
|
+
_iterator3.f();
|
|
1307
|
+
return _context3.finish(6);
|
|
1308
|
+
case 7:
|
|
1309
|
+
case "end":
|
|
1310
|
+
return _context3.stop();
|
|
1311
|
+
}
|
|
1312
|
+
}, _callee3, this, [[1, 5, 6, 7]]);
|
|
1313
|
+
}));
|
|
1314
|
+
function syncAllHashTreeDatasets() {
|
|
1315
|
+
return _syncAllHashTreeDatasets.apply(this, arguments);
|
|
1316
|
+
}
|
|
1317
|
+
return syncAllHashTreeDatasets;
|
|
1318
|
+
}()
|
|
980
1319
|
/**
|
|
981
1320
|
* Callback registered with HashTreeParser to receive locus info updates.
|
|
982
1321
|
* Updates our locus info based on the data parsed by the hash tree parser.
|
|
@@ -985,10 +1324,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
985
1324
|
* @param {LocusInfoUpdate} update - Details about the update.
|
|
986
1325
|
* @returns {void}
|
|
987
1326
|
*/
|
|
1327
|
+
)
|
|
988
1328
|
}, {
|
|
989
1329
|
key: "updateFromHashTree",
|
|
990
1330
|
value: function updateFromHashTree(locusUrl, update) {
|
|
991
|
-
var
|
|
1331
|
+
var _this7 = this;
|
|
992
1332
|
switch (update.updateType) {
|
|
993
1333
|
case _hashTreeParser2.LocusInfoUpdateType.OBJECTS_UPDATED:
|
|
994
1334
|
{
|
|
@@ -1012,7 +1352,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1012
1352
|
// but these should never happen
|
|
1013
1353
|
_loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
|
|
1014
1354
|
_metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_HASH_TREE_UNSUPPORTED_OPERATION, {
|
|
1015
|
-
locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) ||
|
|
1355
|
+
locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this7.url,
|
|
1016
1356
|
message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
|
|
1017
1357
|
});
|
|
1018
1358
|
}
|
|
@@ -1046,7 +1386,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1046
1386
|
// copy over all of existing locus except participants
|
|
1047
1387
|
LocusDtoTopLevelKeys.forEach(function (key) {
|
|
1048
1388
|
if (key !== 'participants') {
|
|
1049
|
-
locus[key] = (0, _lodash.cloneDeep)(
|
|
1389
|
+
locus[key] = (0, _lodash.cloneDeep)(_this7[key]);
|
|
1050
1390
|
}
|
|
1051
1391
|
});
|
|
1052
1392
|
} else {
|
|
@@ -1054,7 +1394,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1054
1394
|
// (except participants, which need to stay empty - that means "no participant changes")
|
|
1055
1395
|
(0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
|
|
1056
1396
|
if (locusDtoKey !== 'participants') {
|
|
1057
|
-
locus[locusDtoKey] = (0, _lodash.cloneDeep)(
|
|
1397
|
+
locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this7[locusDtoKey]);
|
|
1058
1398
|
}
|
|
1059
1399
|
});
|
|
1060
1400
|
}
|
|
@@ -1067,7 +1407,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1067
1407
|
}))));
|
|
1068
1408
|
// now apply all the updates from the hash tree onto the locus
|
|
1069
1409
|
update.updatedObjects.forEach(function (object) {
|
|
1070
|
-
locus =
|
|
1410
|
+
locus = _this7.updateLocusFromHashTreeObject(object, locus);
|
|
1071
1411
|
});
|
|
1072
1412
|
|
|
1073
1413
|
// update our locus info with the new locus
|
|
@@ -1081,6 +1421,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1081
1421
|
_loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received signal that meeting ended, destroying meeting ".concat(this.meetingId));
|
|
1082
1422
|
this.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.SELF_REMOVED);
|
|
1083
1423
|
}
|
|
1424
|
+
break;
|
|
1425
|
+
}
|
|
1426
|
+
case _hashTreeParser2.LocusInfoUpdateType.LOCUS_NOT_FOUND:
|
|
1427
|
+
{
|
|
1428
|
+
_loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received LOCUS_NOT_FOUND for ".concat(locusUrl, ", triggering syncMeetings"));
|
|
1429
|
+
this.webex.meetings.syncMeetings({
|
|
1430
|
+
keepOnlyLocusMeetings: false,
|
|
1431
|
+
skipHashTreeSync: true
|
|
1432
|
+
}).catch(function (syncError) {
|
|
1433
|
+
_loggerProxy.default.logger.error("Locus-info:index#updateFromHashTree --> syncMeetings failed after LOCUS_NOT_FOUND: ".concat(syncError));
|
|
1434
|
+
});
|
|
1435
|
+
break;
|
|
1084
1436
|
}
|
|
1085
1437
|
}
|
|
1086
1438
|
}
|
|
@@ -1094,8 +1446,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1094
1446
|
}, {
|
|
1095
1447
|
key: "parse",
|
|
1096
1448
|
value: function parse(meeting, data) {
|
|
1097
|
-
if (this.
|
|
1098
|
-
|
|
1449
|
+
if (this.isUsingHashTrees()) {
|
|
1450
|
+
if (data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS) {
|
|
1451
|
+
// sync meetings response follows the format of "not wrapped" locus API responses,
|
|
1452
|
+
// so has no dataSets nor Metadata
|
|
1453
|
+
this.handleLocusAPIResponse(meeting, _objectSpread({}, data.locus));
|
|
1454
|
+
} else {
|
|
1455
|
+
this.handleHashTreeMessage(meeting, data.eventType, data.stateElementsMessage);
|
|
1456
|
+
}
|
|
1099
1457
|
} else {
|
|
1100
1458
|
var eventType = data.eventType;
|
|
1101
1459
|
if (eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
|
|
@@ -1246,7 +1604,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1246
1604
|
key: "onFullLocusCommon",
|
|
1247
1605
|
value: function onFullLocusCommon(locus, eventType) {
|
|
1248
1606
|
var _this$participants,
|
|
1249
|
-
|
|
1607
|
+
_this8 = this,
|
|
1250
1608
|
_locus$jsSdkMeta;
|
|
1251
1609
|
this.scheduledMeeting = locus.meeting || null;
|
|
1252
1610
|
this.participants = locus.participants;
|
|
@@ -1254,7 +1612,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1254
1612
|
var _participant$htMeta;
|
|
1255
1613
|
// participant.htMeta is set only for hash tree based locus
|
|
1256
1614
|
if (typeof ((_participant$htMeta = participant.htMeta) === null || _participant$htMeta === void 0 ? void 0 : _participant$htMeta.elementId.id) === 'number') {
|
|
1257
|
-
|
|
1615
|
+
_this8.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
|
|
1258
1616
|
}
|
|
1259
1617
|
});
|
|
1260
1618
|
var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
|
|
@@ -1362,8 +1720,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1362
1720
|
}, {
|
|
1363
1721
|
key: "updateLocusInfo",
|
|
1364
1722
|
value: function updateLocusInfo(locus) {
|
|
1365
|
-
|
|
1366
|
-
if (((_locus$self2 = locus.self) === null || _locus$self2 === void 0 ? void 0 : _locus$self2.reason) === 'MOVED' && ((_locus$self3 = locus.self) === null || _locus$self3 === void 0 ? void 0 : _locus$self3.state) === 'LEFT') {
|
|
1723
|
+
if (_util.default.isSelfMovedOrBreakoutEnded(locus)) {
|
|
1367
1724
|
// When moved to a breakout session locus sends a message for the previous locus
|
|
1368
1725
|
// indicating that we have been moved. It isn't helpful to continue parsing this
|
|
1369
1726
|
// as it gets interpreted as if we have left the call
|
|
@@ -1421,7 +1778,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1421
1778
|
if (((_this$parsedLocus$ful3 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful3 === void 0 ? void 0 : _this$parsedLocus$ful3.type) === _constants._CALL_ || ((_this$parsedLocus$ful4 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful4 === void 0 ? void 0 : _this$parsedLocus$ful4.type) === _constants._SIP_BRIDGE_ || ((_this$parsedLocus$ful5 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful5 === void 0 ? void 0 : _this$parsedLocus$ful5.type) === _constants._SPACE_SHARE_) {
|
|
1422
1779
|
// @ts-ignore
|
|
1423
1780
|
var partner = this.getLocusPartner(this.participants, this.self);
|
|
1424
|
-
this.updateMeeting({
|
|
1781
|
+
this.callbacks.updateMeeting({
|
|
1425
1782
|
partner: partner
|
|
1426
1783
|
});
|
|
1427
1784
|
|
|
@@ -1441,8 +1798,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1441
1798
|
name: 'client.call.remote-ended',
|
|
1442
1799
|
options: {
|
|
1443
1800
|
meetingId: this.meetingId
|
|
1801
|
+
},
|
|
1802
|
+
payload: {
|
|
1803
|
+
eventData: {
|
|
1804
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1805
|
+
}
|
|
1444
1806
|
}
|
|
1445
1807
|
});
|
|
1808
|
+
if (this.destroyMeetingSuspended) {
|
|
1809
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1810
|
+
meetingId: this.meetingId,
|
|
1811
|
+
reason: 'CALL_INACTIVE'
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1446
1814
|
this.emitScoped({
|
|
1447
1815
|
file: 'locus-info',
|
|
1448
1816
|
function: 'isMeetingActive'
|
|
@@ -1456,8 +1824,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1456
1824
|
name: 'client.call.remote-ended',
|
|
1457
1825
|
options: {
|
|
1458
1826
|
meetingId: this.meetingId
|
|
1827
|
+
},
|
|
1828
|
+
payload: {
|
|
1829
|
+
eventData: {
|
|
1830
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1831
|
+
}
|
|
1459
1832
|
}
|
|
1460
1833
|
});
|
|
1834
|
+
if (this.destroyMeetingSuspended) {
|
|
1835
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1836
|
+
meetingId: this.meetingId,
|
|
1837
|
+
reason: 'PARTNER_LEFT'
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1461
1840
|
this.emitScoped({
|
|
1462
1841
|
file: 'locus-info',
|
|
1463
1842
|
function: 'isMeetingActive'
|
|
@@ -1472,8 +1851,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1472
1851
|
name: 'client.call.remote-ended',
|
|
1473
1852
|
options: {
|
|
1474
1853
|
meetingId: this.meetingId
|
|
1854
|
+
},
|
|
1855
|
+
payload: {
|
|
1856
|
+
eventData: {
|
|
1857
|
+
joinInProgress: this.destroyMeetingSuspended
|
|
1858
|
+
}
|
|
1475
1859
|
}
|
|
1476
1860
|
});
|
|
1861
|
+
if (this.destroyMeetingSuspended) {
|
|
1862
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1863
|
+
meetingId: this.meetingId,
|
|
1864
|
+
reason: 'SELF_LEFT'
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1477
1867
|
this.emitScoped({
|
|
1478
1868
|
file: 'locus-info',
|
|
1479
1869
|
function: 'isMeetingActive'
|
|
@@ -1483,43 +1873,69 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1483
1873
|
});
|
|
1484
1874
|
}
|
|
1485
1875
|
} else if (((_this$parsedLocus$ful6 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful6 === void 0 ? void 0 : _this$parsedLocus$ful6.type) === _constants._MEETING_) {
|
|
1486
|
-
if (this.fullState && (this.fullState
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1876
|
+
if (this.fullState && _util.default.isWholeMeetingEnded(this.fullState)) {
|
|
1877
|
+
if (this.destroyMeetingSuspended) {
|
|
1878
|
+
_loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (MEETING_INACTIVE_TERMINATING) because destroyMeeting is suspended');
|
|
1879
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1880
|
+
meetingId: this.meetingId,
|
|
1881
|
+
reason: 'MEETING_INACTIVE_TERMINATING'
|
|
1882
|
+
});
|
|
1883
|
+
} else {
|
|
1884
|
+
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive');
|
|
1490
1885
|
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1886
|
+
// @ts-ignore
|
|
1887
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
1888
|
+
name: 'client.call.remote-ended',
|
|
1889
|
+
options: {
|
|
1890
|
+
meetingId: this.meetingId
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
this.emitScoped({
|
|
1894
|
+
file: 'locus-info',
|
|
1895
|
+
function: 'isMeetingActive'
|
|
1896
|
+
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
1897
|
+
reason: _constants.MEETING_REMOVED_REASON.MEETING_INACTIVE_TERMINATING,
|
|
1898
|
+
shouldLeave: false
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1505
1901
|
}
|
|
1506
1902
|
// If you are guest and you are removed from the meeting
|
|
1507
1903
|
// You wont get any further events
|
|
1508
1904
|
else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1905
|
+
if (this.destroyMeetingSuspended) {
|
|
1906
|
+
_loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (SELF_REMOVED) because destroyMeeting is suspended');
|
|
1907
|
+
_metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
|
|
1908
|
+
meetingId: this.meetingId,
|
|
1909
|
+
reason: 'SELF_REMOVED'
|
|
1910
|
+
});
|
|
1911
|
+
} else {
|
|
1912
|
+
this.emitScoped({
|
|
1913
|
+
file: 'locus-info',
|
|
1914
|
+
function: 'isMeetingActive'
|
|
1915
|
+
}, _constants.EVENTS.DESTROY_MEETING, {
|
|
1916
|
+
reason: _constants.MEETING_REMOVED_REASON.SELF_REMOVED,
|
|
1917
|
+
shouldLeave: false
|
|
1918
|
+
});
|
|
1919
|
+
}
|
|
1517
1920
|
}
|
|
1518
1921
|
} else {
|
|
1519
1922
|
_loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
|
|
1520
1923
|
}
|
|
1521
1924
|
}
|
|
1522
1925
|
|
|
1926
|
+
/**
|
|
1927
|
+
* Suspends or resumes the emission of DESTROY_MEETING events in certain situations.
|
|
1928
|
+
* Used by joinWithMedia to prevent meeting destruction during retry flows.
|
|
1929
|
+
* @param {boolean} suspend - true to suppress, false to resume
|
|
1930
|
+
* @returns {undefined}
|
|
1931
|
+
* @memberof LocusInfo
|
|
1932
|
+
*/
|
|
1933
|
+
}, {
|
|
1934
|
+
key: "suspendDestroyMeeting",
|
|
1935
|
+
value: function suspendDestroyMeeting(suspend) {
|
|
1936
|
+
this.destroyMeetingSuspended = suspend;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1523
1939
|
/**
|
|
1524
1940
|
* checks if the host permissions have changed while in the meeting
|
|
1525
1941
|
* This would be the case if your role as host or moderator has been updated
|
|
@@ -1588,11 +2004,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1588
2004
|
isReplace: isReplace
|
|
1589
2005
|
});
|
|
1590
2006
|
if (participants && (0, _isArray.default)(participants) && participants.length > 0) {
|
|
1591
|
-
var
|
|
1592
|
-
|
|
2007
|
+
var _iterator4 = _createForOfIteratorHelper(participants),
|
|
2008
|
+
_step4;
|
|
1593
2009
|
try {
|
|
1594
|
-
for (
|
|
1595
|
-
var participant =
|
|
2010
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
2011
|
+
var participant = _step4.value;
|
|
1596
2012
|
if (participant && (participant === null || participant === void 0 ? void 0 : participant.reason) === 'FAILURE') {
|
|
1597
2013
|
var _participant$person;
|
|
1598
2014
|
this.emitScoped({
|
|
@@ -1604,9 +2020,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1604
2020
|
}
|
|
1605
2021
|
}
|
|
1606
2022
|
} catch (err) {
|
|
1607
|
-
|
|
2023
|
+
_iterator4.e(err);
|
|
1608
2024
|
} finally {
|
|
1609
|
-
|
|
2025
|
+
_iterator4.f();
|
|
1610
2026
|
}
|
|
1611
2027
|
}
|
|
1612
2028
|
}
|
|
@@ -1727,7 +2143,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1727
2143
|
}, _constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, {
|
|
1728
2144
|
state: state,
|
|
1729
2145
|
modifiedBy: current.record.modifiedBy,
|
|
1730
|
-
lastModified: current.record.lastModified
|
|
2146
|
+
lastModified: current.record.lastModified,
|
|
2147
|
+
modifiedByServiceAppName: current.record.modifiedByServiceAppName,
|
|
2148
|
+
modifiedByServiceAppId: current.record.modifiedByServiceAppId
|
|
1731
2149
|
});
|
|
1732
2150
|
}
|
|
1733
2151
|
if (hasMeetingContainerChanged) {
|
|
@@ -1807,7 +2225,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1807
2225
|
}
|
|
1808
2226
|
if (hasEntryExitToneChanged) {
|
|
1809
2227
|
var entryExitTone = current.entryExitTone;
|
|
1810
|
-
this.updateMeeting({
|
|
2228
|
+
this.callbacks.updateMeeting({
|
|
1811
2229
|
entryExitTone: entryExitTone
|
|
1812
2230
|
});
|
|
1813
2231
|
this.emitScoped({
|
|
@@ -1822,7 +2240,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1822
2240
|
// to fit with audio mute status logic
|
|
1823
2241
|
if (hasVideoEnabledChanged) {
|
|
1824
2242
|
var videoEnabled = current.videoEnabled;
|
|
1825
|
-
this.updateMeeting({
|
|
2243
|
+
this.callbacks.updateMeeting({
|
|
1826
2244
|
unmuteVideoAllowed: videoEnabled
|
|
1827
2245
|
});
|
|
1828
2246
|
this.emitScoped({
|
|
@@ -1912,12 +2330,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1912
2330
|
value: function updateConversationUrl(conversationUrl, info) {
|
|
1913
2331
|
if (conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, conversationUrl)) {
|
|
1914
2332
|
this.conversationUrl = conversationUrl;
|
|
1915
|
-
this.updateMeeting({
|
|
2333
|
+
this.callbacks.updateMeeting({
|
|
1916
2334
|
conversationUrl: conversationUrl
|
|
1917
2335
|
});
|
|
1918
2336
|
} else if (info && info.conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, info.conversationUrl)) {
|
|
1919
2337
|
this.conversationUrl = info.conversationUrl;
|
|
1920
|
-
this.updateMeeting({
|
|
2338
|
+
this.callbacks.updateMeeting({
|
|
1921
2339
|
conversationUrl: info.conversationUrl
|
|
1922
2340
|
});
|
|
1923
2341
|
}
|
|
@@ -1946,9 +2364,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1946
2364
|
key: "updateLinks",
|
|
1947
2365
|
value: function updateLinks(links) {
|
|
1948
2366
|
var _this$links, _this$links2;
|
|
1949
|
-
var
|
|
1950
|
-
services =
|
|
1951
|
-
resources =
|
|
2367
|
+
var _ref5 = links || {},
|
|
2368
|
+
services = _ref5.services,
|
|
2369
|
+
resources = _ref5.resources;
|
|
1952
2370
|
if (services && !(0, _lodash.isEqual)((_this$links = this.links) === null || _this$links === void 0 ? void 0 : _this$links.services, services)) {
|
|
1953
2371
|
this.emitScoped({
|
|
1954
2372
|
file: 'locus-info',
|
|
@@ -1978,7 +2396,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1978
2396
|
value: function updateFullState(fullState) {
|
|
1979
2397
|
if (fullState && !(0, _lodash.isEqual)(this.fullState, fullState)) {
|
|
1980
2398
|
var result = _fullState.default.getFullState(this.fullState, fullState);
|
|
1981
|
-
this.updateMeeting(result.current);
|
|
2399
|
+
this.callbacks.updateMeeting(result.current);
|
|
1982
2400
|
if (result.updates.meetingStateChangedTo) {
|
|
1983
2401
|
this.emitScoped({
|
|
1984
2402
|
file: 'locus-info',
|
|
@@ -2013,7 +2431,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2013
2431
|
value: function updateHostInfo(host) {
|
|
2014
2432
|
if (host && !(0, _lodash.isEqual)(this.host, host)) {
|
|
2015
2433
|
var parsedHosts = _hostUtils.default.getHosts(this.host, host);
|
|
2016
|
-
this.updateMeeting(parsedHosts.current);
|
|
2434
|
+
this.callbacks.updateMeeting(parsedHosts.current);
|
|
2017
2435
|
this.parsedLocus.host = parsedHosts.current;
|
|
2018
2436
|
if (parsedHosts.updates.isNewHost) {
|
|
2019
2437
|
this.compareAndUpdateFlags.compareSelfAndHost = true;
|
|
@@ -2040,11 +2458,20 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2040
2458
|
}, {
|
|
2041
2459
|
key: "updateMeetingInfo",
|
|
2042
2460
|
value: function updateMeetingInfo(info, self) {
|
|
2043
|
-
var _this$parsedLocus$
|
|
2044
|
-
var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2461
|
+
var _this$parsedLocus$sel3;
|
|
2462
|
+
var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel3 = this.parsedLocus.self) === null || _this$parsedLocus$sel3 === void 0 ? void 0 : _this$parsedLocus$sel3.roles) || [];
|
|
2463
|
+
var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
|
|
2464
|
+
|
|
2465
|
+
// The parsed userDisplayHints depend on info, roles and isJoined, so we must recompute
|
|
2466
|
+
// whenever any of them changes. A common case is self transitioning to JOINED via a delta
|
|
2467
|
+
// that doesn't carry an info section - in that case we fall back to the previously stored
|
|
2468
|
+
// info so the hints get reparsed with the new joined state (e.g. VIEW_THE_PARTICIPANT_LIST).
|
|
2469
|
+
var infoToParse = info || this.info;
|
|
2470
|
+
var infoChanged = info && !(0, _lodash.isEqual)(this.info, info);
|
|
2471
|
+
var rolesChanged = !(0, _lodash.isEqual)(this.roles, roles);
|
|
2472
|
+
var isJoinedChanged = _selfUtils.default.isJoined(this.parsedLocus.self) !== isJoined;
|
|
2473
|
+
if (infoToParse && (infoChanged || rolesChanged || isJoinedChanged)) {
|
|
2474
|
+
var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, infoToParse, roles, isJoined);
|
|
2048
2475
|
if (parsedInfo.updates.isLocked) {
|
|
2049
2476
|
this.emitScoped({
|
|
2050
2477
|
file: 'locus-info',
|
|
@@ -2057,10 +2484,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2057
2484
|
function: 'updateMeetingInfo'
|
|
2058
2485
|
}, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
|
|
2059
2486
|
}
|
|
2060
|
-
this.info =
|
|
2487
|
+
this.info = infoToParse;
|
|
2061
2488
|
this.parsedLocus.info = parsedInfo.current;
|
|
2062
2489
|
// Parses the info and adds necessary values
|
|
2063
|
-
this.updateMeeting(parsedInfo.current);
|
|
2490
|
+
this.callbacks.updateMeeting(parsedInfo.current);
|
|
2064
2491
|
this.emitScoped({
|
|
2065
2492
|
file: 'locus-info',
|
|
2066
2493
|
function: 'updateMeetingInfo'
|
|
@@ -2084,7 +2511,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2084
2511
|
return;
|
|
2085
2512
|
}
|
|
2086
2513
|
var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
|
|
2087
|
-
this.updateMeeting({
|
|
2514
|
+
this.callbacks.updateMeeting({
|
|
2088
2515
|
embeddedApps: parsedEmbeddedApps
|
|
2089
2516
|
});
|
|
2090
2517
|
this.emitScoped({
|
|
@@ -2108,7 +2535,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2108
2535
|
var forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2109
2536
|
if (mediaShares && (!(0, _lodash.isEqual)(this.mediaShares, mediaShares) || forceUpdate)) {
|
|
2110
2537
|
var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
|
|
2111
|
-
this.updateMeeting(parsedMediaShares.current);
|
|
2538
|
+
this.callbacks.updateMeeting(parsedMediaShares.current);
|
|
2112
2539
|
this.parsedLocus.mediaShares = parsedMediaShares.current;
|
|
2113
2540
|
this.mediaShares = mediaShares;
|
|
2114
2541
|
this.emitScoped({
|
|
@@ -2147,10 +2574,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2147
2574
|
value: function updateSelf(self) {
|
|
2148
2575
|
if (self) {
|
|
2149
2576
|
var _this$parsedLocus$ful7, _this$parsedLocus$inf;
|
|
2577
|
+
var wasLlmExpected = this.isLlmExpected();
|
|
2150
2578
|
// @ts-ignore
|
|
2151
2579
|
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
|
|
2152
2580
|
);
|
|
2153
|
-
this.updateMeeting(parsedSelves.current);
|
|
2581
|
+
this.callbacks.updateMeeting(parsedSelves.current);
|
|
2154
2582
|
this.parsedLocus.self = parsedSelves.current;
|
|
2155
2583
|
var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
|
|
2156
2584
|
if (element !== parsedSelves.current.state) {
|
|
@@ -2161,7 +2589,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2161
2589
|
// this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState?.type, this.parsedLocus.info?.sipUri));
|
|
2162
2590
|
var result = _selfUtils.default.getSipUrl(this.getLocusPartner(this.participants, self), (_this$parsedLocus$ful7 = this.parsedLocus.fullState) === null || _this$parsedLocus$ful7 === void 0 ? void 0 : _this$parsedLocus$ful7.type, (_this$parsedLocus$inf = this.parsedLocus.info) === null || _this$parsedLocus$inf === void 0 ? void 0 : _this$parsedLocus$inf.sipUri);
|
|
2163
2591
|
if (result !== null && result !== void 0 && result.sipUri) {
|
|
2164
|
-
this.updateMeeting(result);
|
|
2592
|
+
this.callbacks.updateMeeting(result);
|
|
2165
2593
|
}
|
|
2166
2594
|
if (parsedSelves.updates.moderatorChanged) {
|
|
2167
2595
|
this.compareAndUpdateFlags.compareHostAndSelf = true;
|
|
@@ -2243,23 +2671,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2243
2671
|
});
|
|
2244
2672
|
}
|
|
2245
2673
|
if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
|
|
2674
|
+
var _parsedSelves$current2;
|
|
2246
2675
|
this.emitScoped({
|
|
2247
2676
|
file: 'locus-info',
|
|
2248
2677
|
function: 'updateSelf'
|
|
2249
2678
|
}, _constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, {
|
|
2250
2679
|
muted: parsedSelves.current.remoteMuted,
|
|
2251
|
-
unmuteAllowed: parsedSelves.current.unmuteAllowed
|
|
2680
|
+
unmuteAllowed: parsedSelves.current.unmuteAllowed,
|
|
2681
|
+
modifiedBy: (_parsedSelves$current2 = parsedSelves.current.modifiedBy) !== null && _parsedSelves$current2 !== void 0 ? _parsedSelves$current2 : null
|
|
2252
2682
|
});
|
|
2253
2683
|
}
|
|
2254
2684
|
if (parsedSelves.updates.isMutedByOthersChanged) {
|
|
2255
|
-
var _parsedSelves$
|
|
2685
|
+
var _parsedSelves$current3;
|
|
2256
2686
|
this.emitScoped({
|
|
2257
2687
|
file: 'locus-info',
|
|
2258
2688
|
function: 'updateSelf'
|
|
2259
2689
|
}, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, {
|
|
2260
2690
|
muted: parsedSelves.current.remoteMuted,
|
|
2261
2691
|
unmuteAllowed: parsedSelves.current.unmuteAllowed,
|
|
2262
|
-
modifiedBy: (_parsedSelves$
|
|
2692
|
+
modifiedBy: (_parsedSelves$current3 = parsedSelves.current.modifiedBy) !== null && _parsedSelves$current3 !== void 0 ? _parsedSelves$current3 : null
|
|
2263
2693
|
});
|
|
2264
2694
|
}
|
|
2265
2695
|
if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
|
|
@@ -2289,14 +2719,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2289
2719
|
_constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
|
|
2290
2720
|
}
|
|
2291
2721
|
if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
|
|
2292
|
-
var _parsedSelves$
|
|
2722
|
+
var _parsedSelves$current4, _parsedSelves$current5, _parsedSelves$current6;
|
|
2293
2723
|
this.emitScoped({
|
|
2294
2724
|
file: 'locus-info',
|
|
2295
2725
|
function: 'updateSelf'
|
|
2296
2726
|
}, _constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, {
|
|
2297
|
-
audioStatus: (_parsedSelves$
|
|
2298
|
-
videoStatus: (_parsedSelves$
|
|
2299
|
-
shareStatus: (_parsedSelves$
|
|
2727
|
+
audioStatus: (_parsedSelves$current4 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current4 === void 0 ? void 0 : _parsedSelves$current4.audio,
|
|
2728
|
+
videoStatus: (_parsedSelves$current5 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current5 === void 0 ? void 0 : _parsedSelves$current5.video,
|
|
2729
|
+
shareStatus: (_parsedSelves$current6 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current6 === void 0 ? void 0 : _parsedSelves$current6.share
|
|
2300
2730
|
});
|
|
2301
2731
|
}
|
|
2302
2732
|
if (parsedSelves.updates.isUserObserving) {
|
|
@@ -2331,6 +2761,15 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2331
2761
|
this.parsedLocus.self = parsedSelves.current;
|
|
2332
2762
|
// @ts-ignore
|
|
2333
2763
|
this.self = self;
|
|
2764
|
+
|
|
2765
|
+
// If LLM just became expected (self reported JOINED), some hash tree parsers may have skipped
|
|
2766
|
+
// arming heartbeat watchdog timers for LLM data sets whose messages arrived before this
|
|
2767
|
+
// update. Re-evaluate them now so those watchdogs get armed.
|
|
2768
|
+
if (!wasLlmExpected && this.isLlmExpected()) {
|
|
2769
|
+
this.hashTreeParsers.forEach(function (entry) {
|
|
2770
|
+
entry.parser.reevaluateLlmWatchdogs();
|
|
2771
|
+
});
|
|
2772
|
+
}
|
|
2334
2773
|
} else {
|
|
2335
2774
|
this.compareAndUpdateFlags.compareHostAndSelf = false;
|
|
2336
2775
|
}
|
|
@@ -2349,7 +2788,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2349
2788
|
var isMainLocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2350
2789
|
if (url && this.url !== url) {
|
|
2351
2790
|
this.url = url;
|
|
2352
|
-
this.updateMeeting({
|
|
2791
|
+
this.callbacks.updateMeeting({
|
|
2353
2792
|
locusUrl: url
|
|
2354
2793
|
});
|
|
2355
2794
|
this.emitScoped({
|
|
@@ -2478,7 +2917,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2478
2917
|
}, {
|
|
2479
2918
|
key: "updateMainSessionLocusCache",
|
|
2480
2919
|
value: function updateMainSessionLocusCache(mainLocus) {
|
|
2481
|
-
var
|
|
2920
|
+
var _this9 = this;
|
|
2482
2921
|
if (!mainLocus) {
|
|
2483
2922
|
return;
|
|
2484
2923
|
}
|
|
@@ -2487,7 +2926,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
2487
2926
|
// shallow merge and do special merge for participants
|
|
2488
2927
|
(0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
|
|
2489
2928
|
if (key === 'participants') {
|
|
2490
|
-
return
|
|
2929
|
+
return _this9.mergeParticipants(objValue, srcValue);
|
|
2491
2930
|
}
|
|
2492
2931
|
return srcValue || objValue;
|
|
2493
2932
|
});
|