@webex/plugin-meetings 3.12.0-next.12 → 3.12.0-next.121

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.
Files changed (227) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/breakouts/breakout.js +8 -3
  5. package/dist/breakouts/breakout.js.map +1 -1
  6. package/dist/breakouts/events.js +29 -14
  7. package/dist/breakouts/events.js.map +1 -1
  8. package/dist/breakouts/index.js +90 -3
  9. package/dist/breakouts/index.js.map +1 -1
  10. package/dist/common/errors/webex-errors.js +49 -5
  11. package/dist/common/errors/webex-errors.js.map +1 -1
  12. package/dist/config.js +2 -2
  13. package/dist/config.js.map +1 -1
  14. package/dist/constants.js +37 -10
  15. package/dist/constants.js.map +1 -1
  16. package/dist/controls-options-manager/index.js +46 -10
  17. package/dist/controls-options-manager/index.js.map +1 -1
  18. package/dist/hashTree/constants.js +4 -1
  19. package/dist/hashTree/constants.js.map +1 -1
  20. package/dist/hashTree/hashTreeParser.js +1045 -393
  21. package/dist/hashTree/hashTreeParser.js.map +1 -1
  22. package/dist/hashTree/utils.js +20 -0
  23. package/dist/hashTree/utils.js.map +1 -1
  24. package/dist/index.js +7 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  27. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  28. package/dist/interceptors/locusRetry.js +23 -8
  29. package/dist/interceptors/locusRetry.js.map +1 -1
  30. package/dist/interpretation/index.js +10 -1
  31. package/dist/interpretation/index.js.map +1 -1
  32. package/dist/interpretation/interpretation.types.js +7 -0
  33. package/dist/interpretation/interpretation.types.js.map +1 -0
  34. package/dist/interpretation/siLanguage.js +1 -1
  35. package/dist/locus-info/controlsUtils.js +4 -1
  36. package/dist/locus-info/controlsUtils.js.map +1 -1
  37. package/dist/locus-info/index.js +406 -121
  38. package/dist/locus-info/index.js.map +1 -1
  39. package/dist/locus-info/infoUtils.js +36 -5
  40. package/dist/locus-info/infoUtils.js.map +1 -1
  41. package/dist/locus-info/types.js +19 -0
  42. package/dist/locus-info/types.js.map +1 -1
  43. package/dist/media/MediaConnectionAwaiter.js +15 -2
  44. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  45. package/dist/media/index.js +8 -2
  46. package/dist/media/index.js.map +1 -1
  47. package/dist/media/properties.js +4 -5
  48. package/dist/media/properties.js.map +1 -1
  49. package/dist/meeting/in-meeting-actions.js +5 -1
  50. package/dist/meeting/in-meeting-actions.js.map +1 -1
  51. package/dist/meeting/index.js +1667 -834
  52. package/dist/meeting/index.js.map +1 -1
  53. package/dist/meeting/locusMediaRequest.js +229 -82
  54. package/dist/meeting/locusMediaRequest.js.map +1 -1
  55. package/dist/meeting/muteState.js +10 -1
  56. package/dist/meeting/muteState.js.map +1 -1
  57. package/dist/meeting/request.js +5 -2
  58. package/dist/meeting/request.js.map +1 -1
  59. package/dist/meeting/util.js +34 -2
  60. package/dist/meeting/util.js.map +1 -1
  61. package/dist/meeting-info/meeting-info-v2.js +2 -2
  62. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  63. package/dist/meetings/index.js +256 -118
  64. package/dist/meetings/index.js.map +1 -1
  65. package/dist/meetings/meetings.types.js +6 -1
  66. package/dist/meetings/meetings.types.js.map +1 -1
  67. package/dist/meetings/request.js +39 -0
  68. package/dist/meetings/request.js.map +1 -1
  69. package/dist/meetings/util.js +116 -18
  70. package/dist/meetings/util.js.map +1 -1
  71. package/dist/member/index.js +10 -0
  72. package/dist/member/index.js.map +1 -1
  73. package/dist/member/types.js.map +1 -1
  74. package/dist/member/util.js +30 -0
  75. package/dist/member/util.js.map +1 -1
  76. package/dist/members/index.js +101 -43
  77. package/dist/members/index.js.map +1 -1
  78. package/dist/members/util.js +8 -1
  79. package/dist/members/util.js.map +1 -1
  80. package/dist/metrics/constants.js +7 -1
  81. package/dist/metrics/constants.js.map +1 -1
  82. package/dist/multistream/codec/constants.js +63 -0
  83. package/dist/multistream/codec/constants.js.map +1 -0
  84. package/dist/multistream/mediaRequestManager.js +62 -15
  85. package/dist/multistream/mediaRequestManager.js.map +1 -1
  86. package/dist/multistream/receiveSlot.js +9 -0
  87. package/dist/multistream/receiveSlot.js.map +1 -1
  88. package/dist/reachability/clusterReachability.js.map +1 -1
  89. package/dist/reachability/index.js +121 -83
  90. package/dist/reachability/index.js.map +1 -1
  91. package/dist/reachability/reachability.types.js +2 -0
  92. package/dist/reachability/reachability.types.js.map +1 -1
  93. package/dist/reachability/util.js +45 -0
  94. package/dist/reachability/util.js.map +1 -1
  95. package/dist/reactions/reactions.type.js.map +1 -1
  96. package/dist/recording-controller/index.js +1 -3
  97. package/dist/recording-controller/index.js.map +1 -1
  98. package/dist/roap/turnDiscovery.js +8 -1
  99. package/dist/roap/turnDiscovery.js.map +1 -1
  100. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  101. package/dist/types/config.d.ts +2 -2
  102. package/dist/types/constants.d.ts +13 -1
  103. package/dist/types/controls-options-manager/index.d.ts +16 -0
  104. package/dist/types/hashTree/constants.d.ts +1 -0
  105. package/dist/types/hashTree/hashTreeParser.d.ts +189 -22
  106. package/dist/types/hashTree/utils.d.ts +7 -0
  107. package/dist/types/index.d.ts +3 -0
  108. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  109. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  110. package/dist/types/locus-info/index.d.ts +61 -7
  111. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  112. package/dist/types/locus-info/types.d.ts +21 -1
  113. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  114. package/dist/types/media/properties.d.ts +6 -2
  115. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  116. package/dist/types/meeting/index.d.ts +175 -11
  117. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  118. package/dist/types/meeting/request.d.ts +1 -0
  119. package/dist/types/meeting/util.d.ts +9 -0
  120. package/dist/types/meetings/index.d.ts +38 -18
  121. package/dist/types/meetings/meetings.types.d.ts +15 -0
  122. package/dist/types/meetings/request.d.ts +14 -0
  123. package/dist/types/member/index.d.ts +1 -0
  124. package/dist/types/member/types.d.ts +1 -0
  125. package/dist/types/member/util.d.ts +9 -0
  126. package/dist/types/members/index.d.ts +15 -2
  127. package/dist/types/members/util.d.ts +1 -5
  128. package/dist/types/metrics/constants.d.ts +6 -0
  129. package/dist/types/multistream/codec/constants.d.ts +7 -0
  130. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  131. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  132. package/dist/types/reachability/index.d.ts +10 -3
  133. package/dist/types/reachability/reachability.types.d.ts +7 -0
  134. package/dist/types/reachability/util.d.ts +17 -0
  135. package/dist/types/reactions/reactions.type.d.ts +3 -0
  136. package/dist/webinar/index.js +307 -161
  137. package/dist/webinar/index.js.map +1 -1
  138. package/package.json +23 -23
  139. package/src/aiEnableRequest/index.ts +16 -0
  140. package/src/breakouts/breakout.ts +3 -1
  141. package/src/breakouts/events.ts +33 -11
  142. package/src/breakouts/index.ts +110 -1
  143. package/src/common/errors/webex-errors.ts +50 -3
  144. package/src/config.ts +2 -2
  145. package/src/constants.ts +21 -3
  146. package/src/controls-options-manager/index.ts +62 -10
  147. package/src/hashTree/constants.ts +7 -0
  148. package/src/hashTree/hashTreeParser.ts +796 -192
  149. package/src/hashTree/utils.ts +19 -0
  150. package/src/index.ts +6 -0
  151. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  152. package/src/interceptors/locusRetry.ts +25 -4
  153. package/src/interpretation/index.ts +27 -9
  154. package/src/interpretation/interpretation.types.ts +11 -0
  155. package/src/locus-info/controlsUtils.ts +3 -1
  156. package/src/locus-info/index.ts +412 -130
  157. package/src/locus-info/infoUtils.ts +41 -6
  158. package/src/locus-info/types.ts +25 -1
  159. package/src/media/MediaConnectionAwaiter.ts +21 -4
  160. package/src/media/index.ts +10 -1
  161. package/src/media/properties.ts +8 -3
  162. package/src/meeting/in-meeting-actions.ts +8 -0
  163. package/src/meeting/index.ts +922 -116
  164. package/src/meeting/locusMediaRequest.ts +106 -6
  165. package/src/meeting/muteState.ts +10 -1
  166. package/src/meeting/request.ts +11 -0
  167. package/src/meeting/util.ts +46 -5
  168. package/src/meeting-info/meeting-info-v2.ts +4 -2
  169. package/src/meetings/index.ts +168 -79
  170. package/src/meetings/meetings.types.ts +19 -0
  171. package/src/meetings/request.ts +43 -0
  172. package/src/meetings/util.ts +117 -4
  173. package/src/member/index.ts +10 -0
  174. package/src/member/types.ts +1 -0
  175. package/src/member/util.ts +29 -0
  176. package/src/members/index.ts +70 -7
  177. package/src/members/util.ts +12 -4
  178. package/src/metrics/constants.ts +6 -0
  179. package/src/multistream/codec/constants.ts +58 -0
  180. package/src/multistream/mediaRequestManager.ts +119 -28
  181. package/src/multistream/receiveSlot.ts +18 -0
  182. package/src/reachability/clusterReachability.ts +3 -2
  183. package/src/reachability/index.ts +47 -16
  184. package/src/reachability/reachability.types.ts +11 -0
  185. package/src/reachability/util.ts +36 -0
  186. package/src/reactions/reactions.type.ts +3 -0
  187. package/src/recording-controller/index.ts +1 -2
  188. package/src/roap/turnDiscovery.ts +9 -1
  189. package/src/webinar/index.ts +216 -38
  190. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  191. package/test/unit/spec/breakouts/breakout.ts +9 -3
  192. package/test/unit/spec/breakouts/events.ts +120 -2
  193. package/test/unit/spec/breakouts/index.ts +191 -2
  194. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  195. package/test/unit/spec/controls-options-manager/index.js +139 -32
  196. package/test/unit/spec/hashTree/hashTreeParser.ts +2299 -243
  197. package/test/unit/spec/hashTree/utils.ts +37 -0
  198. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  199. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  200. package/test/unit/spec/interpretation/index.ts +26 -4
  201. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  202. package/test/unit/spec/locus-info/index.js +643 -63
  203. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  204. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  205. package/test/unit/spec/media/index.ts +92 -0
  206. package/test/unit/spec/media/properties.ts +23 -23
  207. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  208. package/test/unit/spec/meeting/index.js +2704 -135
  209. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  210. package/test/unit/spec/meeting/muteState.js +81 -0
  211. package/test/unit/spec/meeting/request.js +12 -0
  212. package/test/unit/spec/meeting/utils.js +153 -1
  213. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  214. package/test/unit/spec/meetings/index.js +479 -48
  215. package/test/unit/spec/meetings/request.js +141 -0
  216. package/test/unit/spec/meetings/utils.js +402 -51
  217. package/test/unit/spec/member/index.js +7 -0
  218. package/test/unit/spec/member/util.js +89 -0
  219. package/test/unit/spec/members/index.js +216 -0
  220. package/test/unit/spec/members/request.js +37 -1
  221. package/test/unit/spec/members/utils.js +63 -0
  222. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  223. package/test/unit/spec/reachability/index.ts +128 -46
  224. package/test/unit/spec/reachability/util.ts +31 -0
  225. package/test/unit/spec/recording-controller/index.js +9 -8
  226. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  227. package/test/unit/spec/webinar/index.ts +332 -31
@@ -23,6 +23,7 @@ exports.findMeetingForHashTreeMessage = findMeetingForHashTreeMessage;
23
23
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
24
24
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
25
25
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
26
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
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 _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
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 user's device
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, deviceUrl) {
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 {function} updateMeeting callback to update the meeting object from an object
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(updateMeeting, webex, meetingId) {
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();
@@ -490,7 +497,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
490
497
  this.updateControls(locus.controls, locus.self);
491
498
  this.updateLocusUrl(locus.url, _controlsUtils.default.isMainSessionDTO(locus));
492
499
  this.updateFullState(locus.fullState);
493
- this.updateMeetingInfo(locus.info);
500
+ this.updateMeetingInfo(locus.info, locus.self);
494
501
  this.updateEmbeddedApps(locus.embeddedApps);
495
502
  // self and participants generate sipUrl for 1:1 meeting
496
503
  this.updateSelf(locus.self);
@@ -511,7 +518,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
511
518
  }, {
512
519
  key: "createHashTreeParser",
513
520
  value: function createHashTreeParser(_ref) {
514
- var _locusUrl$split, _locusUrl$split$pop, _this$webex$config$me;
521
+ var _this4 = this,
522
+ _locusUrl$split,
523
+ _locusUrl$split$pop,
524
+ _this$webex$config$me;
515
525
  var locusUrl = _ref.locusUrl,
516
526
  initialLocus = _ref.initialLocus,
517
527
  metadata = _ref.metadata,
@@ -520,9 +530,25 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
520
530
  initialLocus: initialLocus,
521
531
  metadata: metadata,
522
532
  webexRequest: this.webex.request.bind(this.webex),
523
- locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
533
+ callbacks: {
534
+ locusInfoUpdateCallback: this.updateFromHashTree.bind(this, locusUrl),
535
+ syncLatencyTracker: this.callbacks.syncLatencyTracker,
536
+ // Reuse webex-core's tracking-id interceptor sequence (exposed publicly via
537
+ // webexTrackingIdSequenceNumbers) so Locus requests share the client's unified
538
+ // ${sessionId}_${sequence} tracking id space instead of minting an unrelated id. Fall
539
+ // back to a uuid on the rare chance the interceptor hasn't issued any request yet (and so
540
+ // isn't in the map). The value is opaque to the metrics layer and is forced onto the
541
+ // /hashtree and /sync request headers.
542
+ generateTrackingId: function generateTrackingId() {
543
+ var interceptor = (0, _toConsumableArray2.default)(_webexCore.webexTrackingIdSequenceNumbers.keys()).find(function (candidate) {
544
+ return (candidate === null || candidate === void 0 ? void 0 : candidate.webex) === _this4.webex;
545
+ });
546
+ return "".concat(_this4.webex.sessionId, "_").concat(interceptor ? interceptor.sequence : _uuid.default.v4());
547
+ }
548
+ },
524
549
  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
550
+ excludedDataSets: (_this$webex$config$me = this.webex.config.meetings.locus) === null || _this$webex$config$me === void 0 ? void 0 : _this$webex$config$me.excludedDataSets,
551
+ syncLatencyMeetingId: this.meetingId
526
552
  });
527
553
 
528
554
  // When a new HashTreeParser is created, previous one should be stopped.
@@ -558,18 +584,20 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
558
584
 
559
585
  /**
560
586
  * @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
587
+ * @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
588
  * @returns {undefined}
562
589
  * @memberof LocusInfo
563
590
  */
564
591
  }, {
565
592
  key: "initialSetup",
566
593
  value: (function () {
567
- var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(data) {
594
+ var _initialSetup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(data, onLocusSynced) {
568
595
  var _data$locus, _data$locus$links, _data$locus$links$res, _data$locus$links$res2;
569
- var _data$hashTreeMessage, _metadataObject$data, metadataObject, hashTreeParser, _hashTreeParser, _t;
596
+ var initialFullLocus, _data$hashTreeMessage, _metadataObject$data, metadataObject, hashTreeParser, _hashTreeParser, _t;
570
597
  return _regenerator.default.wrap(function (_context) {
571
598
  while (1) switch (_context.prev = _context.next) {
572
599
  case 0:
600
+ initialFullLocus = null;
573
601
  _t = data.trigger;
574
602
  _context.next = _t === 'locus-message' ? 1 : _t === 'join-response' ? 6 : _t === 'get-loci-response' ? 7 : 10;
575
603
  break;
@@ -621,6 +649,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
621
649
  case 6:
622
650
  this.updateLocusCache(data.locus);
623
651
  this.onFullLocus('join response', data.locus, undefined, data.dataSets, data.metadata);
652
+ initialFullLocus = data.locus;
624
653
  return _context.abrupt("continue", 10);
625
654
  case 7:
626
655
  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)) {
@@ -646,7 +675,16 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
646
675
  // "classic" Locus case, no hash trees involved
647
676
  this.updateLocusCache(data.locus);
648
677
  this.onFullLocus('classic get-loci-response', data.locus, undefined);
678
+ initialFullLocus = data.locus || null;
649
679
  case 10:
680
+ if (onLocusSynced) {
681
+ try {
682
+ onLocusSynced(initialFullLocus || this.getCurrentLocusSnapshot());
683
+ } catch (error) {
684
+ _loggerProxy.default.logger.warn("Locus-info:index#initialSetup --> onLocusSynced callback failed: ".concat(error));
685
+ }
686
+ }
687
+
650
688
  // Change it to true after it receives it first locus object
651
689
  this.emitChange = true;
652
690
  case 11:
@@ -655,18 +693,40 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
655
693
  }
656
694
  }, _callee, this);
657
695
  }));
658
- function initialSetup(_x) {
696
+ function initialSetup(_x, _x2) {
659
697
  return _initialSetup.apply(this, arguments);
660
698
  }
661
699
  return initialSetup;
662
700
  }()
701
+ /**
702
+ * Builds a full locus DTO snapshot from current internal locus state.
703
+ *
704
+ * @returns {LocusDTO}
705
+ */
706
+ )
707
+ }, {
708
+ key: "getCurrentLocusSnapshot",
709
+ value: function getCurrentLocusSnapshot() {
710
+ var _this5 = this;
711
+ var locus = {};
712
+ LocusDtoTopLevelKeys.forEach(function (key) {
713
+ var value = _this5[key];
714
+ if (value !== undefined && value !== null) {
715
+ locus[key] = (0, _lodash.cloneDeep)(value);
716
+ }
717
+ });
718
+ if (!(0, _isArray.default)(locus.participants)) {
719
+ locus.participants = [];
720
+ }
721
+ return locus;
722
+ }
723
+
663
724
  /**
664
725
  * Handles HTTP response from Locus API call.
665
726
  * @param {Meeting} meeting meeting object
666
727
  * @param {LocusApiResponseBody} responseBody body of the http response from Locus API call
667
728
  * @returns {void}
668
729
  */
669
- )
670
730
  }, {
671
731
  key: "handleLocusAPIResponse",
672
732
  value: function handleLocusAPIResponse(meeting, responseBody) {
@@ -674,29 +734,38 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
674
734
  var isWrapped = 'locus' in responseBody;
675
735
  var locusUrl = isWrapped ? (_responseBody$locus = responseBody.locus) === null || _responseBody$locus === void 0 ? void 0 : _responseBody$locus.url : responseBody.url;
676
736
  var hashTreeParserEntry = locusUrl && this.hashTreeParsers.get(locusUrl);
677
- if (hashTreeParserEntry) {
678
- if (isWrapped) {
679
- if (!responseBody.dataSets) {
680
- this.sendClassicVsHashTreeMismatchMetric(meeting, "expected hash tree dataSets in API response but they are missing");
681
- // continuing as we can still manage without responseBody.dataSets, but this is very suspicious
737
+ var locus = isWrapped ? responseBody.locus : responseBody;
738
+ if (this.hashTreeParsers.size > 0) {
739
+ // We are in hash tree mode. Check if we need to create/reactivate a parser for this locusUrl.
740
+ if (!hashTreeParserEntry || hashTreeParserEntry.parser.state === 'stopped') {
741
+ if (!locusUrl) {
742
+ _loggerProxy.default.logger.warn('Locus-info:index#handleLocusAPIResponse --> API response has no locusUrl, cannot handle hash tree parser switch');
743
+ return;
682
744
  }
683
- _loggerProxy.default.logger.info('Locus-info:index#handleLocusAPIResponse --> passing Locus API response to HashTreeParser: ', responseBody);
745
+ this.handleHashTreeParserSwitchForAPIResponse(locusUrl, locus);
746
+ return;
747
+ }
748
+
749
+ // Active parser found - pass the API response to it
750
+ if (isWrapped) {
684
751
  // update the data in our hash trees
685
752
  hashTreeParserEntry.parser.handleLocusUpdate(responseBody);
686
753
  } else {
687
- // LocusDTO without wrapper - pass it through as if it had no dataSets
754
+ // LocusDTO without wrapper - pass it through as if it had no dataSets nor metadata
688
755
  hashTreeParserEntry.parser.handleLocusUpdate({
689
756
  locus: responseBody
690
757
  });
691
758
  }
692
- } else {
693
- if (isWrapped && responseBody.dataSets) {
694
- this.sendClassicVsHashTreeMismatchMetric(meeting, "unexpected hash tree dataSets in API response");
695
- }
696
- // classic Locus delta
697
- var locus = isWrapped ? responseBody.locus : responseBody;
698
- this.handleLocusDelta(locus, meeting);
759
+ return;
760
+ }
761
+
762
+ // No hash tree parsers - classic Locus mode
763
+ if (isWrapped && responseBody.dataSets) {
764
+ this.sendClassicVsHashTreeMismatchMetric(meeting, "unexpected hash tree dataSets in API response");
699
765
  }
766
+
767
+ // classic Locus delta
768
+ this.handleLocusDelta(locus, meeting);
700
769
  }
701
770
 
702
771
  /**
@@ -707,7 +776,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
707
776
  }, {
708
777
  key: "updateLocusFromHashTreeObject",
709
778
  value: function updateLocusFromHashTreeObject(object, locus) {
710
- var _this4 = this,
779
+ var _this6 = this,
711
780
  _locus$self;
712
781
  var type = object.htMeta.elementId.type.toLowerCase();
713
782
  var addParticipantObject = function addParticipantObject(obj) {
@@ -715,7 +784,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
715
784
  locus.participants = [];
716
785
  }
717
786
  locus.participants.push(obj.data);
718
- _this4.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
787
+ _this6.hashTreeObjectId2ParticipantId.set(obj.htMeta.elementId.id, obj.data.id);
719
788
  };
720
789
  switch (type) {
721
790
  case _types.ObjectType.locus:
@@ -826,10 +895,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
826
895
  if (!object.data) {
827
896
  // self without data is handled inside HashTreeParser and results in LocusInfoUpdateType.MEETING_ENDED, so we should never get here
828
897
  // all other types info, fullstate, etc - Locus should never send them without data
829
- _loggerProxy.default.logger.warn("Locus-info:index#updateLocusFromHashTreeObject --> received ".concat(type, " object without data, this is not expected! version=").concat(object.htMeta.elementId.version));
898
+ // but we end up with this method being called without the data for them when the main dataset is removed from visible datasets list
899
+ _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> received ".concat(type, " object without data, version=").concat(object.htMeta.elementId.version));
830
900
  } else {
831
901
  var _locus$info, _object$data$controls, _object$data$controls2, _object$data$controls3;
832
902
  _loggerProxy.default.logger.info("Locus-info:index#updateLocusFromHashTreeObject --> ".concat(type, " object updated to version ").concat(object.htMeta.elementId.version));
903
+ if (type === _types.ObjectType.self) {
904
+ _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));
905
+ }
833
906
  var locusDtoKey = _types.ObjectTypeToLocusKeyMap[type];
834
907
  locus[locusDtoKey] = object.data;
835
908
 
@@ -879,6 +952,81 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
879
952
  }
880
953
  }
881
954
 
955
+ /**
956
+ * Helper that handles the common logic for reactivating a stopped HashTreeParser when
957
+ * a newer "replaces" is detected. Used by both the message and API response parser switch methods.
958
+ *
959
+ * @param {string} callerName - name of the calling method, used in log messages
960
+ * @param {string} locusUrl - the locus URL of the stopped parser
961
+ * @param {HashTreeParserEntry} stoppedEntry - the stopped parser entry
962
+ * @param {ReplacesInfo} replaces - replacement info extracted from self
963
+ * @param {Function} resumeCallback - callback to invoke after reactivation to resume the parser
964
+ * @returns {void}
965
+ */
966
+ }, {
967
+ key: "resumeStoppedParser",
968
+ value: function resumeStoppedParser(callerName, locusUrl, stoppedEntry, replaces, resumeCallback) {
969
+ // this check is just for typescript, it should never happen, replaces should always be defined
970
+ if (!replaces) {
971
+ _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"));
972
+ return;
973
+ }
974
+ if (replaces.replacedAt <= (stoppedEntry.replacedAt || '')) {
975
+ _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"));
976
+ return;
977
+ }
978
+ _loggerProxy.default.logger.info("Locus-info:index#".concat(callerName, " --> reactivating HashTreeParser for locusUrl=").concat(locusUrl, ", which replaces ").concat(replaces.locusUrl));
979
+ var replacedEntry = this.hashTreeParsers.get(replaces.locusUrl);
980
+ if (replacedEntry) {
981
+ replacedEntry.replacedAt = replaces.replacedAt;
982
+ replacedEntry.parser.stop();
983
+ } else {
984
+ _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));
985
+ }
986
+ stoppedEntry.initializedFromHashTree = false;
987
+ this.hashTreeObjectId2ParticipantId.clear();
988
+ resumeCallback();
989
+ }
990
+
991
+ /**
992
+ * Handles an API response whose locusUrl doesn't match any active HashTreeParser
993
+ * (either no entry exists, or the existing entry is stopped).
994
+ * Creates a new parser or reactivates a stopped one using initializeFromGetLociResponse.
995
+ *
996
+ * @param {string} locusUrl - the locus URL from the API response
997
+ * @param {LocusDTO} locus - the locus DTO from the API response
998
+ * @returns {void}
999
+ */
1000
+ }, {
1001
+ key: "handleHashTreeParserSwitchForAPIResponse",
1002
+ value: function handleHashTreeParserSwitchForAPIResponse(locusUrl, locus) {
1003
+ var entry = this.hashTreeParsers.get(locusUrl);
1004
+ var replaces = getReplaceInfoFromSelf(locus.self,
1005
+ // @ts-ignore
1006
+ this.webex.internal.device.url);
1007
+ if (!entry) {
1008
+ _loggerProxy.default.logger.info("Locus-info:index#handleHashTreeParserSwitchForAPIResponse --> no parser for locusUrl ".concat(locusUrl, ", creating a new one"));
1009
+ var parser = this.createHashTreeParser({
1010
+ locusUrl: locusUrl,
1011
+ initialLocus: {
1012
+ locus: null,
1013
+ dataSets: []
1014
+ },
1015
+ metadata: null,
1016
+ replacedAt: replaces === null || replaces === void 0 ? void 0 : replaces.replacedAt
1017
+ });
1018
+ parser.initializeFromGetLociResponse(locus);
1019
+ return;
1020
+ }
1021
+ if (entry.parser.state !== 'stopped') {
1022
+ _loggerProxy.default.logger.warn("Locus-info:index#handleHashTreeParserSwitchForAPIResponse --> unexpected parser state \"".concat(entry.parser.state, "\" for locusUrl ").concat(locusUrl));
1023
+ return;
1024
+ }
1025
+ this.resumeStoppedParser('handleHashTreeParserSwitchForAPIResponse', locusUrl, entry, replaces, function () {
1026
+ return entry.parser.resumeFromApiResponse(locus);
1027
+ });
1028
+ }
1029
+
882
1030
  /**
883
1031
  * Checks if the hash tree message should trigger a switch to a different HashTreeParser
884
1032
  *
@@ -926,25 +1074,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
926
1074
  if (entry.parser.state === 'stopped') {
927
1075
  // 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
1076
  // this happens when you move from breakout A -> breakout B -> back to breakout A
929
- if (replaces) {
930
- if (replaces.replacedAt > (entry.replacedAt || '')) {
931
- _loggerProxy.default.logger.info("Locus-info:index#handleHashTreeParserSwitch --> resuming a HashTreeParser for locusUrl=".concat(message.locusUrl, ", which replaces ").concat(replaces.locusUrl));
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"));
1077
+ this.resumeStoppedParser('handleHashTreeParserSwitch', message.locusUrl, entry, replaces, function () {
1078
+ return entry.parser.resumeFromMessage(message);
1079
+ });
948
1080
  return true;
949
1081
  }
950
1082
  return false;
@@ -977,6 +1109,69 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
977
1109
  }
978
1110
  }
979
1111
 
1112
+ /**
1113
+ * Triggers a sync of all hash tree datasets for all hash tree parsers associated with this meeting.
1114
+ * The syncs are executed sequentially within each parser.
1115
+ *
1116
+ * @param {Object} [options={}] - Options for syncing
1117
+ * @param {boolean} [options.onlyLLM=false] - Whether to sync only LLM based data sets
1118
+ * @returns {Promise<void>}
1119
+ */
1120
+ }, {
1121
+ key: "syncAllHashTreeDatasets",
1122
+ value: (function () {
1123
+ var _syncAllHashTreeDatasets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() {
1124
+ var options,
1125
+ _iterator3,
1126
+ _step3,
1127
+ _step3$value,
1128
+ entry,
1129
+ _args2 = arguments,
1130
+ _t2;
1131
+ return _regenerator.default.wrap(function (_context2) {
1132
+ while (1) switch (_context2.prev = _context2.next) {
1133
+ case 0:
1134
+ options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
1135
+ _iterator3 = _createForOfIteratorHelper(this.hashTreeParsers);
1136
+ _context2.prev = 1;
1137
+ _iterator3.s();
1138
+ case 2:
1139
+ if ((_step3 = _iterator3.n()).done) {
1140
+ _context2.next = 4;
1141
+ break;
1142
+ }
1143
+ _step3$value = (0, _slicedToArray2.default)(_step3.value, 2), entry = _step3$value[1];
1144
+ if (!entry.parser) {
1145
+ _context2.next = 3;
1146
+ break;
1147
+ }
1148
+ _context2.next = 3;
1149
+ return entry.parser.syncAllDatasets(options);
1150
+ case 3:
1151
+ _context2.next = 2;
1152
+ break;
1153
+ case 4:
1154
+ _context2.next = 6;
1155
+ break;
1156
+ case 5:
1157
+ _context2.prev = 5;
1158
+ _t2 = _context2["catch"](1);
1159
+ _iterator3.e(_t2);
1160
+ case 6:
1161
+ _context2.prev = 6;
1162
+ _iterator3.f();
1163
+ return _context2.finish(6);
1164
+ case 7:
1165
+ case "end":
1166
+ return _context2.stop();
1167
+ }
1168
+ }, _callee2, this, [[1, 5, 6, 7]]);
1169
+ }));
1170
+ function syncAllHashTreeDatasets() {
1171
+ return _syncAllHashTreeDatasets.apply(this, arguments);
1172
+ }
1173
+ return syncAllHashTreeDatasets;
1174
+ }()
980
1175
  /**
981
1176
  * Callback registered with HashTreeParser to receive locus info updates.
982
1177
  * Updates our locus info based on the data parsed by the hash tree parser.
@@ -985,10 +1180,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
985
1180
  * @param {LocusInfoUpdate} update - Details about the update.
986
1181
  * @returns {void}
987
1182
  */
1183
+ )
988
1184
  }, {
989
1185
  key: "updateFromHashTree",
990
1186
  value: function updateFromHashTree(locusUrl, update) {
991
- var _this5 = this;
1187
+ var _this7 = this;
992
1188
  switch (update.updateType) {
993
1189
  case _hashTreeParser2.LocusInfoUpdateType.OBJECTS_UPDATED:
994
1190
  {
@@ -1012,7 +1208,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1012
1208
  // but these should never happen
1013
1209
  _loggerProxy.default.logger.warn("Locus-info:index#updateFromHashTree --> received multiple LOCUS objects in one update, this is unexpected!");
1014
1210
  _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) || _this5.url,
1211
+ locusUrl: ((_object$data = object.data) === null || _object$data === void 0 ? void 0 : _object$data.url) || _this7.url,
1016
1212
  message: object.data ? 'multiple LOCUS object updates' : 'LOCUS object update followed by removal'
1017
1213
  });
1018
1214
  }
@@ -1046,7 +1242,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1046
1242
  // copy over all of existing locus except participants
1047
1243
  LocusDtoTopLevelKeys.forEach(function (key) {
1048
1244
  if (key !== 'participants') {
1049
- locus[key] = (0, _lodash.cloneDeep)(_this5[key]);
1245
+ locus[key] = (0, _lodash.cloneDeep)(_this7[key]);
1050
1246
  }
1051
1247
  });
1052
1248
  } else {
@@ -1054,7 +1250,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1054
1250
  // (except participants, which need to stay empty - that means "no participant changes")
1055
1251
  (0, _values.default)(_types.ObjectTypeToLocusKeyMap).forEach(function (locusDtoKey) {
1056
1252
  if (locusDtoKey !== 'participants') {
1057
- locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this5[locusDtoKey]);
1253
+ locus[locusDtoKey] = (0, _lodash.cloneDeep)(_this7[locusDtoKey]);
1058
1254
  }
1059
1255
  });
1060
1256
  }
@@ -1067,7 +1263,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1067
1263
  }))));
1068
1264
  // now apply all the updates from the hash tree onto the locus
1069
1265
  update.updatedObjects.forEach(function (object) {
1070
- locus = _this5.updateLocusFromHashTreeObject(object, locus);
1266
+ locus = _this7.updateLocusFromHashTreeObject(object, locus);
1071
1267
  });
1072
1268
 
1073
1269
  // update our locus info with the new locus
@@ -1081,6 +1277,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1081
1277
  _loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received signal that meeting ended, destroying meeting ".concat(this.meetingId));
1082
1278
  this.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.SELF_REMOVED);
1083
1279
  }
1280
+ break;
1281
+ }
1282
+ case _hashTreeParser2.LocusInfoUpdateType.LOCUS_NOT_FOUND:
1283
+ {
1284
+ _loggerProxy.default.logger.info("Locus-info:index#updateFromHashTree --> received LOCUS_NOT_FOUND for ".concat(locusUrl, ", triggering syncMeetings"));
1285
+ this.webex.meetings.syncMeetings({
1286
+ keepOnlyLocusMeetings: false,
1287
+ skipHashTreeSync: true
1288
+ }).catch(function (syncError) {
1289
+ _loggerProxy.default.logger.error("Locus-info:index#updateFromHashTree --> syncMeetings failed after LOCUS_NOT_FOUND: ".concat(syncError));
1290
+ });
1291
+ break;
1084
1292
  }
1085
1293
  }
1086
1294
  }
@@ -1095,7 +1303,13 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1095
1303
  key: "parse",
1096
1304
  value: function parse(meeting, data) {
1097
1305
  if (this.hashTreeParsers.size > 0) {
1098
- this.handleHashTreeMessage(meeting, data.eventType, data.stateElementsMessage);
1306
+ if (data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS) {
1307
+ // sync meetings response follows the format of "not wrapped" locus API responses,
1308
+ // so has no dataSets nor Metadata
1309
+ this.handleLocusAPIResponse(meeting, _objectSpread({}, data.locus));
1310
+ } else {
1311
+ this.handleHashTreeMessage(meeting, data.eventType, data.stateElementsMessage);
1312
+ }
1099
1313
  } else {
1100
1314
  var eventType = data.eventType;
1101
1315
  if (eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
@@ -1246,7 +1460,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1246
1460
  key: "onFullLocusCommon",
1247
1461
  value: function onFullLocusCommon(locus, eventType) {
1248
1462
  var _this$participants,
1249
- _this6 = this,
1463
+ _this8 = this,
1250
1464
  _locus$jsSdkMeta;
1251
1465
  this.scheduledMeeting = locus.meeting || null;
1252
1466
  this.participants = locus.participants;
@@ -1254,7 +1468,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1254
1468
  var _participant$htMeta;
1255
1469
  // participant.htMeta is set only for hash tree based locus
1256
1470
  if (typeof ((_participant$htMeta = participant.htMeta) === null || _participant$htMeta === void 0 ? void 0 : _participant$htMeta.elementId.id) === 'number') {
1257
- _this6.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
1471
+ _this8.hashTreeObjectId2ParticipantId.set(participant.htMeta.elementId.id, participant.id);
1258
1472
  }
1259
1473
  });
1260
1474
  var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
@@ -1362,8 +1576,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1362
1576
  }, {
1363
1577
  key: "updateLocusInfo",
1364
1578
  value: function updateLocusInfo(locus) {
1365
- var _locus$self2, _locus$self3;
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') {
1579
+ if (_util.default.isSelfMovedOrBreakoutEnded(locus)) {
1367
1580
  // When moved to a breakout session locus sends a message for the previous locus
1368
1581
  // indicating that we have been moved. It isn't helpful to continue parsing this
1369
1582
  // as it gets interpreted as if we have left the call
@@ -1421,7 +1634,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1421
1634
  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
1635
  // @ts-ignore
1423
1636
  var partner = this.getLocusPartner(this.participants, this.self);
1424
- this.updateMeeting({
1637
+ this.callbacks.updateMeeting({
1425
1638
  partner: partner
1426
1639
  });
1427
1640
 
@@ -1441,8 +1654,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1441
1654
  name: 'client.call.remote-ended',
1442
1655
  options: {
1443
1656
  meetingId: this.meetingId
1657
+ },
1658
+ payload: {
1659
+ eventData: {
1660
+ joinInProgress: this.destroyMeetingSuspended
1661
+ }
1444
1662
  }
1445
1663
  });
1664
+ if (this.destroyMeetingSuspended) {
1665
+ _metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
1666
+ meetingId: this.meetingId,
1667
+ reason: 'CALL_INACTIVE'
1668
+ });
1669
+ }
1446
1670
  this.emitScoped({
1447
1671
  file: 'locus-info',
1448
1672
  function: 'isMeetingActive'
@@ -1456,8 +1680,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1456
1680
  name: 'client.call.remote-ended',
1457
1681
  options: {
1458
1682
  meetingId: this.meetingId
1683
+ },
1684
+ payload: {
1685
+ eventData: {
1686
+ joinInProgress: this.destroyMeetingSuspended
1687
+ }
1459
1688
  }
1460
1689
  });
1690
+ if (this.destroyMeetingSuspended) {
1691
+ _metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
1692
+ meetingId: this.meetingId,
1693
+ reason: 'PARTNER_LEFT'
1694
+ });
1695
+ }
1461
1696
  this.emitScoped({
1462
1697
  file: 'locus-info',
1463
1698
  function: 'isMeetingActive'
@@ -1472,8 +1707,19 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1472
1707
  name: 'client.call.remote-ended',
1473
1708
  options: {
1474
1709
  meetingId: this.meetingId
1710
+ },
1711
+ payload: {
1712
+ eventData: {
1713
+ joinInProgress: this.destroyMeetingSuspended
1714
+ }
1475
1715
  }
1476
1716
  });
1717
+ if (this.destroyMeetingSuspended) {
1718
+ _metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
1719
+ meetingId: this.meetingId,
1720
+ reason: 'SELF_LEFT'
1721
+ });
1722
+ }
1477
1723
  this.emitScoped({
1478
1724
  file: 'locus-info',
1479
1725
  function: 'isMeetingActive'
@@ -1483,43 +1729,69 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1483
1729
  });
1484
1730
  }
1485
1731
  } 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.state === _constants.LOCUS.STATE.INACTIVE ||
1487
- // @ts-ignore
1488
- this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
1489
- _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
1732
+ if (this.fullState && _util.default.isWholeMeetingEnded(this.fullState)) {
1733
+ if (this.destroyMeetingSuspended) {
1734
+ _loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (MEETING_INACTIVE_TERMINATING) because destroyMeeting is suspended');
1735
+ _metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
1736
+ meetingId: this.meetingId,
1737
+ reason: 'MEETING_INACTIVE_TERMINATING'
1738
+ });
1739
+ } else {
1740
+ _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive');
1490
1741
 
1491
- // @ts-ignore
1492
- this.webex.internal.newMetrics.submitClientEvent({
1493
- name: 'client.call.remote-ended',
1494
- options: {
1495
- meetingId: this.meetingId
1496
- }
1497
- });
1498
- this.emitScoped({
1499
- file: 'locus-info',
1500
- function: 'isMeetingActive'
1501
- }, _constants.EVENTS.DESTROY_MEETING, {
1502
- reason: _constants.MEETING_REMOVED_REASON.MEETING_INACTIVE_TERMINATING,
1503
- shouldLeave: false
1504
- });
1742
+ // @ts-ignore
1743
+ this.webex.internal.newMetrics.submitClientEvent({
1744
+ name: 'client.call.remote-ended',
1745
+ options: {
1746
+ meetingId: this.meetingId
1747
+ }
1748
+ });
1749
+ this.emitScoped({
1750
+ file: 'locus-info',
1751
+ function: 'isMeetingActive'
1752
+ }, _constants.EVENTS.DESTROY_MEETING, {
1753
+ reason: _constants.MEETING_REMOVED_REASON.MEETING_INACTIVE_TERMINATING,
1754
+ shouldLeave: false
1755
+ });
1756
+ }
1505
1757
  }
1506
1758
  // If you are guest and you are removed from the meeting
1507
1759
  // You wont get any further events
1508
1760
  else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
1509
- // Check if we need to send an event
1510
- this.emitScoped({
1511
- file: 'locus-info',
1512
- function: 'isMeetingActive'
1513
- }, _constants.EVENTS.DESTROY_MEETING, {
1514
- reason: _constants.MEETING_REMOVED_REASON.SELF_REMOVED,
1515
- shouldLeave: false
1516
- });
1761
+ if (this.destroyMeetingSuspended) {
1762
+ _loggerProxy.default.logger.info('Locus-info:index#isMeetingActive --> suppressing DESTROY_MEETING (SELF_REMOVED) because destroyMeeting is suspended');
1763
+ _metrics.default.sendBehavioralMetric(_constants2.default.DESTROY_MEETING_WHILE_SUSPENDED, {
1764
+ meetingId: this.meetingId,
1765
+ reason: 'SELF_REMOVED'
1766
+ });
1767
+ } else {
1768
+ this.emitScoped({
1769
+ file: 'locus-info',
1770
+ function: 'isMeetingActive'
1771
+ }, _constants.EVENTS.DESTROY_MEETING, {
1772
+ reason: _constants.MEETING_REMOVED_REASON.SELF_REMOVED,
1773
+ shouldLeave: false
1774
+ });
1775
+ }
1517
1776
  }
1518
1777
  } else {
1519
1778
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
1520
1779
  }
1521
1780
  }
1522
1781
 
1782
+ /**
1783
+ * Suspends or resumes the emission of DESTROY_MEETING events in certain situations.
1784
+ * Used by joinWithMedia to prevent meeting destruction during retry flows.
1785
+ * @param {boolean} suspend - true to suppress, false to resume
1786
+ * @returns {undefined}
1787
+ * @memberof LocusInfo
1788
+ */
1789
+ }, {
1790
+ key: "suspendDestroyMeeting",
1791
+ value: function suspendDestroyMeeting(suspend) {
1792
+ this.destroyMeetingSuspended = suspend;
1793
+ }
1794
+
1523
1795
  /**
1524
1796
  * checks if the host permissions have changed while in the meeting
1525
1797
  * This would be the case if your role as host or moderator has been updated
@@ -1588,11 +1860,11 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1588
1860
  isReplace: isReplace
1589
1861
  });
1590
1862
  if (participants && (0, _isArray.default)(participants) && participants.length > 0) {
1591
- var _iterator3 = _createForOfIteratorHelper(participants),
1592
- _step3;
1863
+ var _iterator4 = _createForOfIteratorHelper(participants),
1864
+ _step4;
1593
1865
  try {
1594
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1595
- var participant = _step3.value;
1866
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
1867
+ var participant = _step4.value;
1596
1868
  if (participant && (participant === null || participant === void 0 ? void 0 : participant.reason) === 'FAILURE') {
1597
1869
  var _participant$person;
1598
1870
  this.emitScoped({
@@ -1604,9 +1876,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1604
1876
  }
1605
1877
  }
1606
1878
  } catch (err) {
1607
- _iterator3.e(err);
1879
+ _iterator4.e(err);
1608
1880
  } finally {
1609
- _iterator3.f();
1881
+ _iterator4.f();
1610
1882
  }
1611
1883
  }
1612
1884
  }
@@ -1727,7 +1999,9 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1727
1999
  }, _constants.LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED, {
1728
2000
  state: state,
1729
2001
  modifiedBy: current.record.modifiedBy,
1730
- lastModified: current.record.lastModified
2002
+ lastModified: current.record.lastModified,
2003
+ modifiedByServiceAppName: current.record.modifiedByServiceAppName,
2004
+ modifiedByServiceAppId: current.record.modifiedByServiceAppId
1731
2005
  });
1732
2006
  }
1733
2007
  if (hasMeetingContainerChanged) {
@@ -1807,7 +2081,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1807
2081
  }
1808
2082
  if (hasEntryExitToneChanged) {
1809
2083
  var entryExitTone = current.entryExitTone;
1810
- this.updateMeeting({
2084
+ this.callbacks.updateMeeting({
1811
2085
  entryExitTone: entryExitTone
1812
2086
  });
1813
2087
  this.emitScoped({
@@ -1822,7 +2096,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1822
2096
  // to fit with audio mute status logic
1823
2097
  if (hasVideoEnabledChanged) {
1824
2098
  var videoEnabled = current.videoEnabled;
1825
- this.updateMeeting({
2099
+ this.callbacks.updateMeeting({
1826
2100
  unmuteVideoAllowed: videoEnabled
1827
2101
  });
1828
2102
  this.emitScoped({
@@ -1912,12 +2186,12 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1912
2186
  value: function updateConversationUrl(conversationUrl, info) {
1913
2187
  if (conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, conversationUrl)) {
1914
2188
  this.conversationUrl = conversationUrl;
1915
- this.updateMeeting({
2189
+ this.callbacks.updateMeeting({
1916
2190
  conversationUrl: conversationUrl
1917
2191
  });
1918
2192
  } else if (info && info.conversationUrl && !(0, _lodash.isEqual)(this.conversationUrl, info.conversationUrl)) {
1919
2193
  this.conversationUrl = info.conversationUrl;
1920
- this.updateMeeting({
2194
+ this.callbacks.updateMeeting({
1921
2195
  conversationUrl: info.conversationUrl
1922
2196
  });
1923
2197
  }
@@ -1978,7 +2252,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
1978
2252
  value: function updateFullState(fullState) {
1979
2253
  if (fullState && !(0, _lodash.isEqual)(this.fullState, fullState)) {
1980
2254
  var result = _fullState.default.getFullState(this.fullState, fullState);
1981
- this.updateMeeting(result.current);
2255
+ this.callbacks.updateMeeting(result.current);
1982
2256
  if (result.updates.meetingStateChangedTo) {
1983
2257
  this.emitScoped({
1984
2258
  file: 'locus-info',
@@ -2013,7 +2287,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2013
2287
  value: function updateHostInfo(host) {
2014
2288
  if (host && !(0, _lodash.isEqual)(this.host, host)) {
2015
2289
  var parsedHosts = _hostUtils.default.getHosts(this.host, host);
2016
- this.updateMeeting(parsedHosts.current);
2290
+ this.callbacks.updateMeeting(parsedHosts.current);
2017
2291
  this.parsedLocus.host = parsedHosts.current;
2018
2292
  if (parsedHosts.updates.isNewHost) {
2019
2293
  this.compareAndUpdateFlags.compareSelfAndHost = true;
@@ -2042,9 +2316,18 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2042
2316
  value: function updateMeetingInfo(info, self) {
2043
2317
  var _this$parsedLocus$sel;
2044
2318
  var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
2045
- if (info && !(0, _lodash.isEqual)(this.info, info) || !(0, _lodash.isEqual)(this.roles, roles) && info) {
2046
- var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
2047
- var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
2319
+ var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
2320
+
2321
+ // The parsed userDisplayHints depend on info, roles and isJoined, so we must recompute
2322
+ // whenever any of them changes. A common case is self transitioning to JOINED via a delta
2323
+ // that doesn't carry an info section - in that case we fall back to the previously stored
2324
+ // info so the hints get reparsed with the new joined state (e.g. VIEW_THE_PARTICIPANT_LIST).
2325
+ var infoToParse = info || this.info;
2326
+ var infoChanged = info && !(0, _lodash.isEqual)(this.info, info);
2327
+ var rolesChanged = !(0, _lodash.isEqual)(this.roles, roles);
2328
+ var isJoinedChanged = _selfUtils.default.isJoined(this.parsedLocus.self) !== isJoined;
2329
+ if (infoToParse && (infoChanged || rolesChanged || isJoinedChanged)) {
2330
+ var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, infoToParse, roles, isJoined);
2048
2331
  if (parsedInfo.updates.isLocked) {
2049
2332
  this.emitScoped({
2050
2333
  file: 'locus-info',
@@ -2057,10 +2340,10 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2057
2340
  function: 'updateMeetingInfo'
2058
2341
  }, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
2059
2342
  }
2060
- this.info = info;
2343
+ this.info = infoToParse;
2061
2344
  this.parsedLocus.info = parsedInfo.current;
2062
2345
  // Parses the info and adds necessary values
2063
- this.updateMeeting(parsedInfo.current);
2346
+ this.callbacks.updateMeeting(parsedInfo.current);
2064
2347
  this.emitScoped({
2065
2348
  file: 'locus-info',
2066
2349
  function: 'updateMeetingInfo'
@@ -2084,7 +2367,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2084
2367
  return;
2085
2368
  }
2086
2369
  var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
2087
- this.updateMeeting({
2370
+ this.callbacks.updateMeeting({
2088
2371
  embeddedApps: parsedEmbeddedApps
2089
2372
  });
2090
2373
  this.emitScoped({
@@ -2108,7 +2391,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2108
2391
  var forceUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
2109
2392
  if (mediaShares && (!(0, _lodash.isEqual)(this.mediaShares, mediaShares) || forceUpdate)) {
2110
2393
  var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
2111
- this.updateMeeting(parsedMediaShares.current);
2394
+ this.callbacks.updateMeeting(parsedMediaShares.current);
2112
2395
  this.parsedLocus.mediaShares = parsedMediaShares.current;
2113
2396
  this.mediaShares = mediaShares;
2114
2397
  this.emitScoped({
@@ -2150,7 +2433,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2150
2433
  // @ts-ignore
2151
2434
  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
2435
  );
2153
- this.updateMeeting(parsedSelves.current);
2436
+ this.callbacks.updateMeeting(parsedSelves.current);
2154
2437
  this.parsedLocus.self = parsedSelves.current;
2155
2438
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
2156
2439
  if (element !== parsedSelves.current.state) {
@@ -2161,7 +2444,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2161
2444
  // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState?.type, this.parsedLocus.info?.sipUri));
2162
2445
  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
2446
  if (result !== null && result !== void 0 && result.sipUri) {
2164
- this.updateMeeting(result);
2447
+ this.callbacks.updateMeeting(result);
2165
2448
  }
2166
2449
  if (parsedSelves.updates.moderatorChanged) {
2167
2450
  this.compareAndUpdateFlags.compareHostAndSelf = true;
@@ -2252,12 +2535,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2252
2535
  });
2253
2536
  }
2254
2537
  if (parsedSelves.updates.isMutedByOthersChanged) {
2538
+ var _parsedSelves$current2;
2255
2539
  this.emitScoped({
2256
2540
  file: 'locus-info',
2257
2541
  function: 'updateSelf'
2258
2542
  }, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_MUTE_STATUS_UPDATED, {
2259
2543
  muted: parsedSelves.current.remoteMuted,
2260
- unmuteAllowed: parsedSelves.current.unmuteAllowed
2544
+ unmuteAllowed: parsedSelves.current.unmuteAllowed,
2545
+ modifiedBy: (_parsedSelves$current2 = parsedSelves.current.modifiedBy) !== null && _parsedSelves$current2 !== void 0 ? _parsedSelves$current2 : null
2261
2546
  });
2262
2547
  }
2263
2548
  if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
@@ -2287,14 +2572,14 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2287
2572
  _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
2288
2573
  }
2289
2574
  if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
2290
- var _parsedSelves$current2, _parsedSelves$current3, _parsedSelves$current4;
2575
+ var _parsedSelves$current3, _parsedSelves$current4, _parsedSelves$current5;
2291
2576
  this.emitScoped({
2292
2577
  file: 'locus-info',
2293
2578
  function: 'updateSelf'
2294
2579
  }, _constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, {
2295
- audioStatus: (_parsedSelves$current2 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current2 === void 0 ? void 0 : _parsedSelves$current2.audio,
2296
- videoStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.video,
2297
- shareStatus: (_parsedSelves$current4 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current4 === void 0 ? void 0 : _parsedSelves$current4.share
2580
+ audioStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.audio,
2581
+ videoStatus: (_parsedSelves$current4 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current4 === void 0 ? void 0 : _parsedSelves$current4.video,
2582
+ shareStatus: (_parsedSelves$current5 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current5 === void 0 ? void 0 : _parsedSelves$current5.share
2298
2583
  });
2299
2584
  }
2300
2585
  if (parsedSelves.updates.isUserObserving) {
@@ -2347,7 +2632,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2347
2632
  var isMainLocus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2348
2633
  if (url && this.url !== url) {
2349
2634
  this.url = url;
2350
- this.updateMeeting({
2635
+ this.callbacks.updateMeeting({
2351
2636
  locusUrl: url
2352
2637
  });
2353
2638
  this.emitScoped({
@@ -2476,7 +2761,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2476
2761
  }, {
2477
2762
  key: "updateMainSessionLocusCache",
2478
2763
  value: function updateMainSessionLocusCache(mainLocus) {
2479
- var _this7 = this;
2764
+ var _this9 = this;
2480
2765
  if (!mainLocus) {
2481
2766
  return;
2482
2767
  }
@@ -2485,7 +2770,7 @@ var LocusInfo = exports.default = /*#__PURE__*/function (_EventsScope) {
2485
2770
  // shallow merge and do special merge for participants
2486
2771
  (0, _lodash.assignWith)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
2487
2772
  if (key === 'participants') {
2488
- return _this7.mergeParticipants(objValue, srcValue);
2773
+ return _this9.mergeParticipants(objValue, srcValue);
2489
2774
  }
2490
2775
  return srcValue || objValue;
2491
2776
  });