@webex/plugin-meetings 3.12.0-next.11 → 3.12.0-next.111

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 (235) 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/constants.js +11 -1
  17. package/dist/controls-options-manager/constants.js.map +1 -1
  18. package/dist/controls-options-manager/index.js +67 -29
  19. package/dist/controls-options-manager/index.js.map +1 -1
  20. package/dist/controls-options-manager/util.js +91 -0
  21. package/dist/controls-options-manager/util.js.map +1 -1
  22. package/dist/hashTree/constants.js +4 -1
  23. package/dist/hashTree/constants.js.map +1 -1
  24. package/dist/hashTree/hashTreeParser.js +1003 -393
  25. package/dist/hashTree/hashTreeParser.js.map +1 -1
  26. package/dist/hashTree/utils.js +20 -0
  27. package/dist/hashTree/utils.js.map +1 -1
  28. package/dist/index.js +7 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  31. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  32. package/dist/interceptors/locusRetry.js +23 -8
  33. package/dist/interceptors/locusRetry.js.map +1 -1
  34. package/dist/interpretation/index.js +10 -1
  35. package/dist/interpretation/index.js.map +1 -1
  36. package/dist/interpretation/interpretation.types.js +7 -0
  37. package/dist/interpretation/interpretation.types.js.map +1 -0
  38. package/dist/interpretation/siLanguage.js +1 -1
  39. package/dist/locus-info/controlsUtils.js +4 -1
  40. package/dist/locus-info/controlsUtils.js.map +1 -1
  41. package/dist/locus-info/index.js +406 -121
  42. package/dist/locus-info/index.js.map +1 -1
  43. package/dist/locus-info/infoUtils.js +36 -5
  44. package/dist/locus-info/infoUtils.js.map +1 -1
  45. package/dist/locus-info/types.js +19 -0
  46. package/dist/locus-info/types.js.map +1 -1
  47. package/dist/media/MediaConnectionAwaiter.js +15 -2
  48. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  49. package/dist/media/index.js +8 -2
  50. package/dist/media/index.js.map +1 -1
  51. package/dist/media/properties.js +4 -5
  52. package/dist/media/properties.js.map +1 -1
  53. package/dist/meeting/in-meeting-actions.js +5 -1
  54. package/dist/meeting/in-meeting-actions.js.map +1 -1
  55. package/dist/meeting/index.js +1662 -829
  56. package/dist/meeting/index.js.map +1 -1
  57. package/dist/meeting/locusMediaRequest.js +229 -82
  58. package/dist/meeting/locusMediaRequest.js.map +1 -1
  59. package/dist/meeting/muteState.js +10 -1
  60. package/dist/meeting/muteState.js.map +1 -1
  61. package/dist/meeting/request.js +5 -2
  62. package/dist/meeting/request.js.map +1 -1
  63. package/dist/meeting/util.js +34 -2
  64. package/dist/meeting/util.js.map +1 -1
  65. package/dist/meeting-info/meeting-info-v2.js +2 -2
  66. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  67. package/dist/meetings/index.js +256 -118
  68. package/dist/meetings/index.js.map +1 -1
  69. package/dist/meetings/meetings.types.js +6 -1
  70. package/dist/meetings/meetings.types.js.map +1 -1
  71. package/dist/meetings/request.js +39 -0
  72. package/dist/meetings/request.js.map +1 -1
  73. package/dist/meetings/util.js +116 -18
  74. package/dist/meetings/util.js.map +1 -1
  75. package/dist/member/index.js +10 -0
  76. package/dist/member/index.js.map +1 -1
  77. package/dist/member/types.js.map +1 -1
  78. package/dist/member/util.js +30 -0
  79. package/dist/member/util.js.map +1 -1
  80. package/dist/members/index.js +101 -43
  81. package/dist/members/index.js.map +1 -1
  82. package/dist/members/util.js +8 -1
  83. package/dist/members/util.js.map +1 -1
  84. package/dist/metrics/constants.js +7 -1
  85. package/dist/metrics/constants.js.map +1 -1
  86. package/dist/multistream/codec/constants.js +63 -0
  87. package/dist/multistream/codec/constants.js.map +1 -0
  88. package/dist/multistream/mediaRequestManager.js +62 -15
  89. package/dist/multistream/mediaRequestManager.js.map +1 -1
  90. package/dist/multistream/receiveSlot.js +9 -0
  91. package/dist/multistream/receiveSlot.js.map +1 -1
  92. package/dist/reachability/clusterReachability.js.map +1 -1
  93. package/dist/reachability/index.js +121 -83
  94. package/dist/reachability/index.js.map +1 -1
  95. package/dist/reachability/reachability.types.js +2 -0
  96. package/dist/reachability/reachability.types.js.map +1 -1
  97. package/dist/reachability/util.js +45 -0
  98. package/dist/reachability/util.js.map +1 -1
  99. package/dist/reactions/reactions.type.js.map +1 -1
  100. package/dist/recording-controller/index.js +1 -3
  101. package/dist/recording-controller/index.js.map +1 -1
  102. package/dist/roap/turnDiscovery.js +8 -1
  103. package/dist/roap/turnDiscovery.js.map +1 -1
  104. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/constants.d.ts +13 -1
  107. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  108. package/dist/types/controls-options-manager/index.d.ts +16 -0
  109. package/dist/types/hashTree/constants.d.ts +1 -0
  110. package/dist/types/hashTree/hashTreeParser.d.ts +178 -22
  111. package/dist/types/hashTree/utils.d.ts +7 -0
  112. package/dist/types/index.d.ts +3 -0
  113. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  114. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  115. package/dist/types/locus-info/index.d.ts +61 -7
  116. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  117. package/dist/types/locus-info/types.d.ts +21 -1
  118. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  119. package/dist/types/media/properties.d.ts +6 -2
  120. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  121. package/dist/types/meeting/index.d.ts +175 -11
  122. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  123. package/dist/types/meeting/request.d.ts +1 -0
  124. package/dist/types/meeting/util.d.ts +9 -0
  125. package/dist/types/meetings/index.d.ts +38 -18
  126. package/dist/types/meetings/meetings.types.d.ts +15 -0
  127. package/dist/types/meetings/request.d.ts +14 -0
  128. package/dist/types/member/index.d.ts +1 -0
  129. package/dist/types/member/types.d.ts +1 -0
  130. package/dist/types/member/util.d.ts +9 -0
  131. package/dist/types/members/index.d.ts +15 -2
  132. package/dist/types/members/util.d.ts +1 -5
  133. package/dist/types/metrics/constants.d.ts +6 -0
  134. package/dist/types/multistream/codec/constants.d.ts +7 -0
  135. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  136. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  137. package/dist/types/reachability/index.d.ts +10 -3
  138. package/dist/types/reachability/reachability.types.d.ts +7 -0
  139. package/dist/types/reachability/util.d.ts +17 -0
  140. package/dist/types/reactions/reactions.type.d.ts +3 -0
  141. package/dist/webinar/index.js +307 -161
  142. package/dist/webinar/index.js.map +1 -1
  143. package/package.json +23 -23
  144. package/src/aiEnableRequest/index.ts +16 -0
  145. package/src/breakouts/breakout.ts +3 -1
  146. package/src/breakouts/events.ts +33 -11
  147. package/src/breakouts/index.ts +110 -1
  148. package/src/common/errors/webex-errors.ts +50 -3
  149. package/src/config.ts +2 -2
  150. package/src/constants.ts +21 -3
  151. package/src/controls-options-manager/constants.ts +14 -1
  152. package/src/controls-options-manager/index.ts +87 -28
  153. package/src/controls-options-manager/util.ts +81 -1
  154. package/src/hashTree/constants.ts +7 -0
  155. package/src/hashTree/hashTreeParser.ts +752 -192
  156. package/src/hashTree/utils.ts +19 -0
  157. package/src/index.ts +6 -0
  158. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  159. package/src/interceptors/locusRetry.ts +25 -4
  160. package/src/interpretation/index.ts +27 -9
  161. package/src/interpretation/interpretation.types.ts +11 -0
  162. package/src/locus-info/controlsUtils.ts +3 -1
  163. package/src/locus-info/index.ts +412 -130
  164. package/src/locus-info/infoUtils.ts +41 -6
  165. package/src/locus-info/types.ts +25 -1
  166. package/src/media/MediaConnectionAwaiter.ts +21 -4
  167. package/src/media/index.ts +10 -1
  168. package/src/media/properties.ts +8 -3
  169. package/src/meeting/in-meeting-actions.ts +8 -0
  170. package/src/meeting/index.ts +913 -111
  171. package/src/meeting/locusMediaRequest.ts +106 -6
  172. package/src/meeting/muteState.ts +10 -1
  173. package/src/meeting/request.ts +11 -0
  174. package/src/meeting/util.ts +46 -5
  175. package/src/meeting-info/meeting-info-v2.ts +4 -2
  176. package/src/meetings/index.ts +168 -79
  177. package/src/meetings/meetings.types.ts +19 -0
  178. package/src/meetings/request.ts +43 -0
  179. package/src/meetings/util.ts +117 -4
  180. package/src/member/index.ts +10 -0
  181. package/src/member/types.ts +1 -0
  182. package/src/member/util.ts +29 -0
  183. package/src/members/index.ts +70 -7
  184. package/src/members/util.ts +12 -4
  185. package/src/metrics/constants.ts +6 -0
  186. package/src/multistream/codec/constants.ts +58 -0
  187. package/src/multistream/mediaRequestManager.ts +119 -28
  188. package/src/multistream/receiveSlot.ts +18 -0
  189. package/src/reachability/clusterReachability.ts +3 -2
  190. package/src/reachability/index.ts +47 -16
  191. package/src/reachability/reachability.types.ts +11 -0
  192. package/src/reachability/util.ts +36 -0
  193. package/src/reactions/reactions.type.ts +3 -0
  194. package/src/recording-controller/index.ts +1 -2
  195. package/src/roap/turnDiscovery.ts +9 -1
  196. package/src/webinar/index.ts +216 -38
  197. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  198. package/test/unit/spec/breakouts/breakout.ts +9 -3
  199. package/test/unit/spec/breakouts/events.ts +120 -2
  200. package/test/unit/spec/breakouts/index.ts +191 -2
  201. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  202. package/test/unit/spec/controls-options-manager/index.js +244 -29
  203. package/test/unit/spec/controls-options-manager/util.js +165 -0
  204. package/test/unit/spec/hashTree/hashTreeParser.ts +2110 -170
  205. package/test/unit/spec/hashTree/utils.ts +37 -0
  206. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  207. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  208. package/test/unit/spec/interpretation/index.ts +26 -4
  209. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  210. package/test/unit/spec/locus-info/index.js +643 -63
  211. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  212. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  213. package/test/unit/spec/media/index.ts +92 -0
  214. package/test/unit/spec/media/properties.ts +23 -23
  215. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  216. package/test/unit/spec/meeting/index.js +2711 -183
  217. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  218. package/test/unit/spec/meeting/muteState.js +81 -0
  219. package/test/unit/spec/meeting/request.js +12 -0
  220. package/test/unit/spec/meeting/utils.js +153 -1
  221. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  222. package/test/unit/spec/meetings/index.js +467 -36
  223. package/test/unit/spec/meetings/request.js +141 -0
  224. package/test/unit/spec/meetings/utils.js +402 -51
  225. package/test/unit/spec/member/index.js +7 -0
  226. package/test/unit/spec/member/util.js +89 -0
  227. package/test/unit/spec/members/index.js +216 -0
  228. package/test/unit/spec/members/request.js +37 -1
  229. package/test/unit/spec/members/utils.js +63 -0
  230. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  231. package/test/unit/spec/reachability/index.ts +128 -46
  232. package/test/unit/spec/reachability/util.ts +31 -0
  233. package/test/unit/spec/recording-controller/index.js +9 -8
  234. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  235. package/test/unit/spec/webinar/index.ts +332 -31
@@ -29,6 +29,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
29
29
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
30
30
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
31
31
  var _lodash = require("lodash");
32
+ var _webCapabilities = require("@webex/web-capabilities");
32
33
  require("@webex/internal-plugin-mercury");
33
34
  require("@webex/internal-plugin-conversation");
34
35
  require("@webex/internal-plugin-metrics");
@@ -64,7 +65,7 @@ var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting
64
65
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
65
66
  var _utils = require("../hashTree/utils");
66
67
  var _locusInfo = require("../locus-info");
67
- function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _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); }
68
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
68
69
  function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
69
70
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
70
71
  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)); }
@@ -204,6 +205,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
204
205
  (0, _defineProperty2.default)(_this, "breakoutLocusForHandleLater", void 0);
205
206
  (0, _defineProperty2.default)(_this, "namespace", _constants.MEETINGS);
206
207
  (0, _defineProperty2.default)(_this, "registrationStatus", void 0);
208
+ /**
209
+ * Emits a metric describing how well this browser runs WebAssembly, used to spot browsers
210
+ * where real-time WASM effects (e.g. background noise removal) run poorly.
211
+ *
212
+ * @param {string} correlationId - correlation id to report the result against
213
+ * @returns {void}
214
+ */
215
+ (0, _defineProperty2.default)(_this, "emitWasmRuntimePerformance", (0, _lodash.once)(function (correlationId) {
216
+ // This check is designed to swallow any probe/metrics failure so it can never break meeting
217
+ // creation, while still reporting the status so we can track browsers with WASM issues.
218
+ _webCapabilities.WasmRuntimeProbe.check().then(function (result) {
219
+ _loggerProxy.default.logger.log("Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ".concat(result.status, ", ratio: ").concat(result.ratio, ", wasmMs: ").concat(result.wasmMs, ", jsMs: ").concat(result.jsMs));
220
+ return _metrics.default.sendBehavioralMetric(_constants2.default.WASM_RUNTIME_PERFORMANCE, {
221
+ status: result.status,
222
+ ratio: result.ratio,
223
+ wasmMs: result.wasmMs,
224
+ jsMs: result.jsMs,
225
+ correlation_id: correlationId
226
+ });
227
+ }).catch(function (error) {
228
+ _loggerProxy.default.logger.error("Meetings:index#emitWasmRuntimePerformance --> ERROR, failed to probe or report WASM runtime performance: ".concat(error.message));
229
+ });
230
+ }));
207
231
  /**
208
232
  * Creates a noise reduction effect
209
233
  *
@@ -354,11 +378,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
354
378
  return (0, _createClass2.default)(Meetings, [{
355
379
  key: "isNeedHandleMainLocus",
356
380
  value: function isNeedHandleMainLocus(meeting, newLocus) {
357
- var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _newLocus$self2, _newLocus$self3, _breakoutLocus$joined, _newLocus$self4;
381
+ var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _breakoutLocus$joined, _newLocus$self2;
358
382
  var breakoutUrl = (_newLocus$controls = newLocus.controls) === null || _newLocus$controls === void 0 ? void 0 : (_newLocus$controls$br = _newLocus$controls.breakout) === null || _newLocus$controls$br === void 0 ? void 0 : _newLocus$controls$br.url;
359
383
  var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
360
384
  var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) === _constants._JOINED_;
361
- var isSelfMoved = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self2 = newLocus.self) === null || _newLocus$self2 === void 0 ? void 0 : _newLocus$self2.state) === _constants._LEFT_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : _newLocus$self3.reason) === _constants._MOVED_;
385
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
362
386
  // @ts-ignore
363
387
  var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
364
388
  var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants._MOVED_;
@@ -383,7 +407,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
383
407
  _loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> there is active breakout session and joined on this device, and don't need to handle main session: ".concat(breakoutUrl));
384
408
  return false;
385
409
  }
386
- if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self4 = newLocus.self) !== null && _newLocus$self4 !== void 0 && _newLocus$self4.removed || isResourceMovedOnThisDevice)) {
410
+ if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self2 = newLocus.self) !== null && _newLocus$self2 !== void 0 && _newLocus$self2.removed || isResourceMovedOnThisDevice)) {
387
411
  _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status or with device resource moved, not need to handle');
388
412
  return false;
389
413
  }
@@ -407,15 +431,15 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
407
431
  key: "isNeedHandleLocusDTO",
408
432
  value: function isNeedHandleLocusDTO(meeting, newLocus) {
409
433
  if (newLocus) {
410
- var _newLocus$self5, _newLocus$self6, _newLocus$self7, _newLocus$self7$devic, _newLocus$self7$devic2, _newLocus$self8, _newLocus$self8$devic, _newLocus$self8$devic2;
434
+ var _newLocus$self3, _newLocus$self3$devic, _newLocus$self3$devic2, _newLocus$self4, _newLocus$self4$devic, _newLocus$self4$devic2;
411
435
  var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
412
- var isSelfMoved = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._LEFT_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self6 = newLocus.self) === null || _newLocus$self6 === void 0 ? void 0 : _newLocus$self6.reason) === _constants._MOVED_;
413
- var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self7 = newLocus.self) === null || _newLocus$self7 === void 0 ? void 0 : (_newLocus$self7$devic = _newLocus$self7.devices[0]) === null || _newLocus$self7$devic === void 0 ? void 0 : (_newLocus$self7$devic2 = _newLocus$self7$devic.intent) === null || _newLocus$self7$devic2 === void 0 ? void 0 : _newLocus$self7$devic2.reason) === _constants._ON_HOLD_LOBBY_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self8 = newLocus.self) === null || _newLocus$self8 === void 0 ? void 0 : (_newLocus$self8$devic = _newLocus$self8.devices[0]) === null || _newLocus$self8$devic === void 0 ? void 0 : (_newLocus$self8$devic2 = _newLocus$self8$devic.intent) === null || _newLocus$self8$devic2 === void 0 ? void 0 : _newLocus$self8$devic2.type) === _constants._WAIT_;
436
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
437
+ var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : (_newLocus$self3$devic = _newLocus$self3.devices[0]) === null || _newLocus$self3$devic === void 0 ? void 0 : (_newLocus$self3$devic2 = _newLocus$self3$devic.intent) === null || _newLocus$self3$devic2 === void 0 ? void 0 : _newLocus$self3$devic2.reason) === _constants._ON_HOLD_LOBBY_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self4 = newLocus.self) === null || _newLocus$self4 === void 0 ? void 0 : (_newLocus$self4$devic = _newLocus$self4.devices[0]) === null || _newLocus$self4$devic === void 0 ? void 0 : (_newLocus$self4$devic2 = _newLocus$self4$devic.intent) === null || _newLocus$self4$devic2 === void 0 ? void 0 : _newLocus$self4$devic2.type) === _constants._WAIT_;
414
438
  if (!meeting) {
415
439
  if (isNewLocusAsBreakout) {
416
- var _newLocus$fullState, _newLocus$self9;
440
+ var _newLocus$fullState, _newLocus$self5;
417
441
  _loggerProxy.default.logger.log("Meetings:index#isNeedHandleLocusDTO --> the first breakout session locusDTO active status: ".concat((_newLocus$fullState = newLocus.fullState) === null || _newLocus$fullState === void 0 ? void 0 : _newLocus$fullState.active));
418
- return ((_newLocus$self9 = newLocus.self) === null || _newLocus$self9 === void 0 ? void 0 : _newLocus$self9.state) === _constants._JOINED_;
442
+ return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._JOINED_;
419
443
  }
420
444
  return this.isNeedHandleMainLocus(meeting, newLocus);
421
445
  }
@@ -451,9 +475,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
451
475
  }
452
476
  if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
453
477
  // need to check if maybe this event indicates a move to/from breakout
454
- var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data.stateElementsMessage, this.meetingCollection,
455
- // @ts-ignore
456
- this.webex.internal.device.url);
478
+ var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data === null || data === void 0 ? void 0 : data.stateElementsMessage, this.meetingCollection);
457
479
  if (meetingForHashTreeMessage) {
458
480
  return meetingForHashTreeMessage;
459
481
  }
@@ -493,7 +515,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
493
515
  var _this2 = this;
494
516
  var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
495
517
  var meeting = this.getCorrespondingMeetingByLocus(data);
496
-
497
518
  // @ts-ignore
498
519
  if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
499
520
  (0, _meeting.storeEventForDebugging)('mercury', data);
@@ -573,6 +594,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
573
594
  trigger: data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS ? 'get-loci-response' : 'locus-message',
574
595
  locus: data.locus,
575
596
  hashTreeMessage: data.stateElementsMessage
597
+ }, function (locus) {
598
+ meeting.finalizeMeetingAfterInitialLocusSetup(locus);
576
599
  });
577
600
  case 2:
578
601
  _context3.next = 4;
@@ -825,46 +848,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
825
848
  }
826
849
  }
827
850
 
828
- /**
829
- * API to toggle TCP reachability, needs to be called before webex.meetings.register()
830
- * @param {Boolean} newValue
831
- * @private
832
- * @memberof Meetings
833
- * @returns {undefined}
834
- */
835
- }, {
836
- key: "_toggleTcpReachability",
837
- value: function _toggleTcpReachability(newValue) {
838
- if (typeof newValue !== 'boolean') {
839
- return;
840
- }
841
- // @ts-ignore
842
- if (this.config.experimental.enableTcpReachability !== newValue) {
843
- // @ts-ignore
844
- this.config.experimental.enableTcpReachability = newValue;
845
- }
846
- }
847
-
848
- /**
849
- * API to toggle TLS reachability, needs to be called before webex.meetings.register()
850
- * @param {Boolean} newValue
851
- * @private
852
- * @memberof Meetings
853
- * @returns {undefined}
854
- */
855
- }, {
856
- key: "_toggleTlsReachability",
857
- value: function _toggleTlsReachability(newValue) {
858
- if (typeof newValue !== 'boolean') {
859
- return;
860
- }
861
- // @ts-ignore
862
- if (this.config.experimental.enableTlsReachability !== newValue) {
863
- // @ts-ignore
864
- this.config.experimental.enableTlsReachability = newValue;
865
- }
866
- }
867
-
868
851
  /**
869
852
  * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
870
853
  *
@@ -930,6 +913,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
930
913
  }
931
914
  }
932
915
 
916
+ /**
917
+ * API to toggle AV1 codec support for video slides in multistream,
918
+ * needs to be called before webex.meetings.joinWithMedia()
919
+ *
920
+ * @param {Boolean} newValue
921
+ * @private
922
+ * @memberof Meetings
923
+ * @returns {undefined}
924
+ */
925
+ }, {
926
+ key: "_toggleEnableAv1SlidesSupport",
927
+ value: function _toggleEnableAv1SlidesSupport(newValue) {
928
+ if (typeof newValue !== 'boolean') {
929
+ return;
930
+ }
931
+
932
+ // @ts-ignore
933
+ if (this.config.enableAv1SlidesSupport !== newValue) {
934
+ // @ts-ignore
935
+ this.config.enableAv1SlidesSupport = newValue;
936
+ }
937
+ }
938
+
933
939
  /**
934
940
  * API to toggle stopping ICE Candidates Gathering after first relay candidate,
935
941
  * needs to be called before webex.meetings.joinWithMedia()
@@ -1275,6 +1281,31 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1275
1281
  return this.personalMeetingRoom;
1276
1282
  }
1277
1283
 
1284
+ /**
1285
+ * Fetches site preferences for the provided Webex site, or the preferred Webex site.
1286
+ * This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
1287
+ *
1288
+ * @param {object} [options]
1289
+ * @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
1290
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
1291
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
1292
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
1293
+ * @throws {ParameterError}
1294
+ * @public
1295
+ * @memberof Meetings
1296
+ * @example
1297
+ * const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
1298
+ * const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
1299
+ */
1300
+ }, {
1301
+ key: "fetchSitePreferencesMeViaSite",
1302
+ value: function fetchSitePreferencesMeViaSite() {
1303
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1304
+ return this.request.fetchSitePreferencesMeViaSite(_objectSpread(_objectSpread({}, options), {}, {
1305
+ siteUrl: options.siteUrl || this.preferredWebexSite
1306
+ }));
1307
+ }
1308
+
1278
1309
  /**
1279
1310
  * Returns basic information about a meeting that exists or
1280
1311
  * used to exist in the MeetingCollection
@@ -1470,6 +1501,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1470
1501
  });
1471
1502
  }
1472
1503
  });
1504
+ _this1.emitWasmRuntimePerformance(createdMeeting.correlationId);
1473
1505
  } else {
1474
1506
  _loggerProxy.default.logger.error("Meetings:index#create --> ERROR, meeting does not have on method, will not be destroyed, meeting cleanup impossible for meeting: ".concat(meeting));
1475
1507
  }
@@ -1567,6 +1599,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1567
1599
  isMeetingActive,
1568
1600
  enableUnifiedMeetings,
1569
1601
  meetingInfoOptions,
1602
+ shouldDeferMeetingInfoFetch,
1603
+ isOneOnOneCallLocus,
1570
1604
  meetingAddedType,
1571
1605
  _args4 = arguments,
1572
1606
  _t2;
@@ -1621,16 +1655,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1621
1655
  extraParams: infoExtraParams,
1622
1656
  sendCAevents: !!(callStateForMetrics !== null && callStateForMetrics !== void 0 && callStateForMetrics.correlationId) // if client sends correlation id as argument of public create(), then it means that this meeting creation is part of a pre-join intent from user
1623
1657
  };
1658
+ shouldDeferMeetingInfoFetch = type === _constants.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
1659
+ isOneOnOneCallLocus = type === _constants.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
1624
1660
  if (!meetingInfo) {
1625
1661
  _context4.next = 2;
1626
1662
  break;
1627
1663
  }
1628
1664
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1629
- _context4.next = 4;
1665
+ _context4.next = 6;
1630
1666
  break;
1631
1667
  case 2:
1632
- if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
1633
- _context4.next = 4;
1668
+ if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
1669
+ _context4.next = 6;
1634
1670
  break;
1635
1671
  }
1636
1672
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
@@ -1641,41 +1677,54 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1641
1677
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1642
1678
  }, waitingTime);
1643
1679
  meeting.parseMeetingInfo(undefined, destination);
1644
- _context4.next = 4;
1680
+ _context4.next = 6;
1645
1681
  break;
1646
1682
  case 3:
1683
+ if (shouldDeferMeetingInfoFetch) {
1684
+ _context4.next = 5;
1685
+ break;
1686
+ }
1647
1687
  _context4.next = 4;
1648
1688
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1649
1689
  case 4:
1650
- _context4.next = 8;
1690
+ _context4.next = 6;
1651
1691
  break;
1652
1692
  case 5:
1653
- _context4.prev = 5;
1693
+ _loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
1694
+ case 6:
1695
+ _context4.next = 10;
1696
+ break;
1697
+ case 7:
1698
+ _context4.prev = 7;
1654
1699
  _t2 = _context4["catch"](1);
1655
1700
  if (!(!(_t2 instanceof _captchaError.default) && !(_t2 instanceof _passwordError.default) && !(_t2 instanceof _permission.default) && !(_t2 instanceof _joinWebinarError.default) && !(_t2 instanceof _joinForbiddenError.default))) {
1656
- _context4.next = 7;
1701
+ _context4.next = 9;
1657
1702
  break;
1658
1703
  }
1659
1704
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1660
1705
  if (!failOnMissingMeetingInfo) {
1661
- _context4.next = 6;
1706
+ _context4.next = 8;
1662
1707
  break;
1663
1708
  }
1664
1709
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1665
1710
  // @ts-ignore
1666
1711
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1667
1712
  throw new _noMeetingInfo.default();
1668
- case 6:
1713
+ case 8:
1669
1714
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1670
1715
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1671
- case 7:
1716
+ case 9:
1672
1717
  _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
1673
- case 8:
1674
- _context4.prev = 8;
1718
+ case 10:
1719
+ _context4.prev = 10;
1675
1720
  // For type LOCUS_ID we need to parse the locus object to get the information
1676
1721
  // about the caller and callee
1677
1722
  // Meeting Added event will be created in `handleLocusEvent`
1678
- if (type !== _constants.DESTINATION_TYPE.LOCUS_ID) {
1723
+ // Only emit MEETING_ADDED if the meeting still exists in the collection.
1724
+ // If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
1725
+ // skip emitting to prevent orphaned meeting references on the consumer side.
1726
+ // @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
1727
+ if (type !== _constants.DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_constants._ID_, meeting.id)) {
1679
1728
  if (!meeting.sipUri) {
1680
1729
  meeting.setSipUri(destination);
1681
1730
  }
@@ -1691,14 +1740,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1691
1740
  type: meetingAddedType
1692
1741
  });
1693
1742
  }
1694
- return _context4.finish(8);
1695
- case 9:
1743
+ return _context4.finish(10);
1744
+ case 11:
1696
1745
  return _context4.abrupt("return", meeting);
1697
- case 10:
1746
+ case 12:
1698
1747
  case "end":
1699
1748
  return _context4.stop();
1700
1749
  }
1701
- }, _callee4, this, [[1, 5, 8, 9]]);
1750
+ }, _callee4, this, [[1, 7, 10, 11]]);
1702
1751
  }));
1703
1752
  function createMeeting(_x4) {
1704
1753
  return _createMeeting.apply(this, arguments);
@@ -1741,51 +1790,141 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1741
1790
  */
1742
1791
  }, {
1743
1792
  key: "syncMeetings",
1744
- value: function syncMeetings() {
1745
- var _this11 = this;
1746
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1747
- _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings,
1748
- keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe;
1749
- // @ts-ignore
1750
- if (this.webex.credentials.isUnverifiedGuest) {
1751
- _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> skipping meeting sync as unverified guest');
1752
- return _promise.default.resolve();
1753
- }
1754
- return this.request.getActiveMeetings().then(function (locusArray) {
1755
- var activeLocusUrl = [];
1756
- if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1757
- var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
1758
- lociToUpdate.forEach(function (locus) {
1759
- activeLocusUrl.push(locus.url);
1760
- _this11.handleLocusEvent({
1761
- eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1762
- locus: locus,
1763
- locusUrl: locus.url
1764
- });
1765
- });
1766
- }
1767
- var meetingsCollection = _this11.meetingCollection.getAll();
1768
- if ((0, _keys.default)(meetingsCollection).length > 0) {
1769
- // Sometimes the mercury events are lost after mercury reconnect
1770
- // Remove any Locus meetings that are not returned by Locus
1771
- // (they had a locusUrl previously but are no longer active) in the sync
1772
- for (var _i = 0, _Object$values = (0, _values.default)(meetingsCollection); _i < _Object$values.length; _i++) {
1773
- var meeting = _Object$values[_i];
1774
- // @ts-ignore
1775
- var locusUrl = meeting.locusUrl;
1776
- if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1777
- // destroy function also uploads logs
1778
- // @ts-ignore
1779
- _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1780
- }
1793
+ value: (function () {
1794
+ var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1795
+ var _this11 = this;
1796
+ var _ref4,
1797
+ _ref4$keepOnlyLocusMe,
1798
+ keepOnlyLocusMeetings,
1799
+ _ref4$skipHashTreeSyn,
1800
+ skipHashTreeSync,
1801
+ locusArray,
1802
+ activeLocusUrl,
1803
+ lociToUpdate,
1804
+ meetingsCollection,
1805
+ _loop,
1806
+ _i,
1807
+ _Object$values,
1808
+ remainingMeetings,
1809
+ syncPromises,
1810
+ _i2,
1811
+ _arr,
1812
+ meeting,
1813
+ _args6 = arguments,
1814
+ _t3;
1815
+ return _regenerator.default.wrap(function (_context6) {
1816
+ while (1) switch (_context6.prev = _context6.next) {
1817
+ case 0:
1818
+ _ref4 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe, _ref4$skipHashTreeSyn = _ref4.skipHashTreeSync, skipHashTreeSync = _ref4$skipHashTreeSyn === void 0 ? false : _ref4$skipHashTreeSyn;
1819
+ if (!this.webex.credentials.isUnverifiedGuest) {
1820
+ _context6.next = 1;
1821
+ break;
1822
+ }
1823
+ _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
1824
+ _context6.next = 7;
1825
+ break;
1826
+ case 1:
1827
+ _context6.prev = 1;
1828
+ _context6.next = 2;
1829
+ return this.request.getActiveMeetings();
1830
+ case 2:
1831
+ locusArray = _context6.sent;
1832
+ activeLocusUrl = [];
1833
+ if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1834
+ lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
1835
+ lociToUpdate.forEach(function (locus) {
1836
+ activeLocusUrl.push(locus.url);
1837
+ _this11.handleLocusEvent({
1838
+ eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1839
+ locus: locus,
1840
+ locusUrl: locus.url
1841
+ });
1842
+ });
1843
+ }
1844
+ meetingsCollection = this.meetingCollection.getAll();
1845
+ if (!((0, _keys.default)(meetingsCollection).length > 0)) {
1846
+ _context6.next = 5;
1847
+ break;
1848
+ }
1849
+ _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
1850
+ var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
1851
+ return _regenerator.default.wrap(function (_context5) {
1852
+ while (1) switch (_context5.prev = _context5.next) {
1853
+ case 0:
1854
+ meeting = _Object$values[_i];
1855
+ // @ts-ignore
1856
+ locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
1857
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1858
+ globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
1859
+ if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
1860
+ var _locus$info;
1861
+ return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
1862
+ })) {
1863
+ // don't destroy the meeting as Locus API still returned some Locus that shares
1864
+ // the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
1865
+ // is in a breakout and gets moved to a different breakout while we were offline
1866
+ } else {
1867
+ // destroy function also uploads logs
1868
+ // @ts-ignore
1869
+ _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1870
+ }
1871
+ }
1872
+ case 1:
1873
+ case "end":
1874
+ return _context5.stop();
1875
+ }
1876
+ }, _loop);
1877
+ });
1878
+ _i = 0, _Object$values = (0, _values.default)(meetingsCollection);
1879
+ case 3:
1880
+ if (!(_i < _Object$values.length)) {
1881
+ _context6.next = 5;
1882
+ break;
1883
+ }
1884
+ return _context6.delegateYield(_loop(), "t0", 4);
1885
+ case 4:
1886
+ _i++;
1887
+ _context6.next = 3;
1888
+ break;
1889
+ case 5:
1890
+ _context6.next = 7;
1891
+ break;
1892
+ case 6:
1893
+ _context6.prev = 6;
1894
+ _t3 = _context6["catch"](1);
1895
+ _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
1896
+ throw _t3;
1897
+ case 7:
1898
+ if (skipHashTreeSync) {
1899
+ _context6.next = 8;
1900
+ break;
1901
+ }
1902
+ // Trigger hash tree syncs for all remaining meetings
1903
+ remainingMeetings = this.meetingCollection.getAll();
1904
+ syncPromises = [];
1905
+ for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
1906
+ meeting = _arr[_i2];
1907
+ if (meeting.locusInfo) {
1908
+ syncPromises.push(meeting.locusInfo.syncAllHashTreeDatasets());
1909
+ }
1910
+ }
1911
+ if (!(syncPromises.length > 0)) {
1912
+ _context6.next = 8;
1913
+ break;
1914
+ }
1915
+ _context6.next = 8;
1916
+ return _promise.default.all(syncPromises);
1917
+ case 8:
1918
+ case "end":
1919
+ return _context6.stop();
1781
1920
  }
1782
- }
1783
- }).catch(function (error) {
1784
- _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
1785
- throw new Error(error);
1786
- });
1787
- }
1788
-
1921
+ }, _callee5, this, [[1, 6]]);
1922
+ }));
1923
+ function syncMeetings() {
1924
+ return _syncMeetings.apply(this, arguments);
1925
+ }
1926
+ return syncMeetings;
1927
+ }()
1789
1928
  /**
1790
1929
  * sort out locus array for initial creating
1791
1930
  * @param {Array} loci original locus array
@@ -1793,6 +1932,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1793
1932
  * @public
1794
1933
  * @memberof Meetings
1795
1934
  */
1935
+ )
1796
1936
  }, {
1797
1937
  key: "sortLocusArrayToUpdate",
1798
1938
  value: function sortLocusArrayToUpdate(loci) {
@@ -1807,8 +1947,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1807
1947
  var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1808
1948
  breakoutLoci.forEach(function (breakoutLocus) {
1809
1949
  var associateMainLocus = mainLoci.find(function (mainLocus) {
1810
- var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1811
- return ((_mainLocus$controls = mainLocus.controls) === null || _mainLocus$controls === void 0 ? void 0 : (_mainLocus$controls$b = _mainLocus$controls.breakout) === null || _mainLocus$controls$b === void 0 ? void 0 : _mainLocus$controls$b.url) === ((_breakoutLocus$contro = breakoutLocus.controls) === null || _breakoutLocus$contro === void 0 ? void 0 : (_breakoutLocus$contro2 = _breakoutLocus$contro.breakout) === null || _breakoutLocus$contro2 === void 0 ? void 0 : _breakoutLocus$contro2.url);
1950
+ return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
1812
1951
  });
1813
1952
  var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1814
1953
  eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
@@ -1844,8 +1983,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1844
1983
  return;
1845
1984
  }
1846
1985
  var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
1847
- var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
1848
- return ((_breakoutLocus$contro3 = breakoutLocus.controls) === null || _breakoutLocus$contro3 === void 0 ? void 0 : (_breakoutLocus$contro4 = _breakoutLocus$contro3.breakout) === null || _breakoutLocus$contro4 === void 0 ? void 0 : _breakoutLocus$contro4.url) === ((_newCreatedLocus$cont = newCreatedLocus.controls) === null || _newCreatedLocus$cont === void 0 ? void 0 : (_newCreatedLocus$cont2 = _newCreatedLocus$cont.breakout) === null || _newCreatedLocus$cont2 === void 0 ? void 0 : _newCreatedLocus$cont2.url);
1986
+ return _util2.default.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus);
1849
1987
  });
1850
1988
  if (existIndex < 0) {
1851
1989
  return;