@webex/plugin-meetings 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.1

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 (302) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +197 -0
  3. package/dist/aiEnableRequest/index.js.map +1 -0
  4. package/dist/aiEnableRequest/utils.js +36 -0
  5. package/dist/aiEnableRequest/utils.js.map +1 -0
  6. package/dist/annotation/index.js +14 -5
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +8 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/index.js +26 -2
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +9 -3
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +59 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/constants.js +11 -1
  19. package/dist/controls-options-manager/constants.js.map +1 -1
  20. package/dist/controls-options-manager/index.js +67 -29
  21. package/dist/controls-options-manager/index.js.map +1 -1
  22. package/dist/controls-options-manager/util.js +91 -0
  23. package/dist/controls-options-manager/util.js.map +1 -1
  24. package/dist/hashTree/constants.js +34 -0
  25. package/dist/hashTree/constants.js.map +1 -0
  26. package/dist/hashTree/hashTree.js +533 -0
  27. package/dist/hashTree/hashTree.js.map +1 -0
  28. package/dist/hashTree/hashTreeParser.js +2068 -36
  29. package/dist/hashTree/hashTreeParser.js.map +1 -1
  30. package/dist/hashTree/types.js +13 -3
  31. package/dist/hashTree/types.js.map +1 -1
  32. package/dist/hashTree/utils.js +111 -0
  33. package/dist/hashTree/utils.js.map +1 -0
  34. package/dist/index.js +18 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/interceptors/constant.js +12 -0
  37. package/dist/interceptors/constant.js.map +1 -0
  38. package/dist/interceptors/dataChannelAuthToken.js +350 -0
  39. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  40. package/dist/interceptors/index.js +7 -0
  41. package/dist/interceptors/index.js.map +1 -1
  42. package/dist/interceptors/locusRetry.js +23 -8
  43. package/dist/interceptors/locusRetry.js.map +1 -1
  44. package/dist/interceptors/locusRouteToken.js +27 -5
  45. package/dist/interceptors/locusRouteToken.js.map +1 -1
  46. package/dist/interceptors/utils.js +27 -0
  47. package/dist/interceptors/utils.js.map +1 -0
  48. package/dist/interpretation/index.js +11 -2
  49. package/dist/interpretation/index.js.map +1 -1
  50. package/dist/interpretation/interpretation.types.js +7 -0
  51. package/dist/interpretation/interpretation.types.js.map +1 -0
  52. package/dist/interpretation/siLanguage.js +1 -1
  53. package/dist/locus-info/controlsUtils.js +11 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +896 -277
  56. package/dist/locus-info/index.js.map +1 -1
  57. package/dist/locus-info/infoUtils.js +36 -5
  58. package/dist/locus-info/infoUtils.js.map +1 -1
  59. package/dist/locus-info/selfUtils.js +1 -0
  60. package/dist/locus-info/selfUtils.js.map +1 -1
  61. package/dist/locus-info/types.js +19 -0
  62. package/dist/locus-info/types.js.map +1 -1
  63. package/dist/media/MediaConnectionAwaiter.js +72 -3
  64. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  65. package/dist/media/index.js +8 -2
  66. package/dist/media/index.js.map +1 -1
  67. package/dist/media/properties.js +5 -2
  68. package/dist/media/properties.js.map +1 -1
  69. package/dist/meeting/in-meeting-actions.js +11 -1
  70. package/dist/meeting/in-meeting-actions.js.map +1 -1
  71. package/dist/meeting/index.js +2075 -1096
  72. package/dist/meeting/index.js.map +1 -1
  73. package/dist/meeting/locusMediaRequest.js +229 -82
  74. package/dist/meeting/locusMediaRequest.js.map +1 -1
  75. package/dist/meeting/muteState.js +10 -1
  76. package/dist/meeting/muteState.js.map +1 -1
  77. package/dist/meeting/request.js +55 -2
  78. package/dist/meeting/request.js.map +1 -1
  79. package/dist/meeting/request.type.js.map +1 -1
  80. package/dist/meeting/util.js +168 -5
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/meeting-info-v2.js +2 -2
  83. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  84. package/dist/meetings/index.js +369 -173
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +6 -1
  87. package/dist/meetings/meetings.types.js.map +1 -1
  88. package/dist/meetings/request.js +39 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +127 -25
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +20 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js.map +1 -1
  95. package/dist/member/util.js +40 -0
  96. package/dist/member/util.js.map +1 -1
  97. package/dist/members/index.js +101 -43
  98. package/dist/members/index.js.map +1 -1
  99. package/dist/members/util.js +8 -1
  100. package/dist/members/util.js.map +1 -1
  101. package/dist/metrics/constants.js +11 -1
  102. package/dist/metrics/constants.js.map +1 -1
  103. package/dist/multistream/codec/constants.js +63 -0
  104. package/dist/multistream/codec/constants.js.map +1 -0
  105. package/dist/multistream/mediaRequestManager.js +64 -68
  106. package/dist/multistream/mediaRequestManager.js.map +1 -1
  107. package/dist/multistream/receiveSlot.js +9 -0
  108. package/dist/multistream/receiveSlot.js.map +1 -1
  109. package/dist/multistream/remoteMediaManager.js +11 -0
  110. package/dist/multistream/remoteMediaManager.js.map +1 -1
  111. package/dist/multistream/sendSlotManager.js +116 -2
  112. package/dist/multistream/sendSlotManager.js.map +1 -1
  113. package/dist/reachability/clusterReachability.js +171 -18
  114. package/dist/reachability/clusterReachability.js.map +1 -1
  115. package/dist/reachability/index.js +142 -94
  116. package/dist/reachability/index.js.map +1 -1
  117. package/dist/reachability/reachability.types.js +2 -0
  118. package/dist/reachability/reachability.types.js.map +1 -1
  119. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  120. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  121. package/dist/reachability/util.js +45 -0
  122. package/dist/reachability/util.js.map +1 -1
  123. package/dist/reactions/reactions.type.js.map +1 -1
  124. package/dist/reconnection-manager/index.js +0 -1
  125. package/dist/reconnection-manager/index.js.map +1 -1
  126. package/dist/recording-controller/index.js +1 -3
  127. package/dist/recording-controller/index.js.map +1 -1
  128. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  129. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  130. package/dist/types/common/browser-detection.d.ts +1 -0
  131. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  132. package/dist/types/common/events/events-scope.d.ts +1 -0
  133. package/dist/types/common/events/events.d.ts +1 -0
  134. package/dist/types/config.d.ts +7 -2
  135. package/dist/types/constants.d.ts +35 -1
  136. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  137. package/dist/types/controls-options-manager/index.d.ts +16 -0
  138. package/dist/types/hashTree/constants.d.ts +11 -0
  139. package/dist/types/hashTree/hashTree.d.ts +136 -0
  140. package/dist/types/hashTree/hashTreeParser.d.ts +392 -14
  141. package/dist/types/hashTree/types.d.ts +20 -0
  142. package/dist/types/hashTree/utils.d.ts +40 -0
  143. package/dist/types/index.d.ts +4 -0
  144. package/dist/types/interceptors/constant.d.ts +5 -0
  145. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  146. package/dist/types/interceptors/index.d.ts +2 -1
  147. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  148. package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
  149. package/dist/types/interceptors/utils.d.ts +1 -0
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +116 -51
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +48 -12
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  155. package/dist/types/media/properties.d.ts +3 -1
  156. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  157. package/dist/types/meeting/index.d.ts +196 -15
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +17 -1
  160. package/dist/types/meeting/request.type.d.ts +5 -0
  161. package/dist/types/meeting/util.d.ts +40 -0
  162. package/dist/types/meeting-info/util.d.ts +1 -0
  163. package/dist/types/meeting-info/utilv2.d.ts +1 -0
  164. package/dist/types/meetings/index.d.ts +34 -20
  165. package/dist/types/meetings/meetings.types.d.ts +15 -0
  166. package/dist/types/meetings/request.d.ts +14 -0
  167. package/dist/types/member/index.d.ts +2 -0
  168. package/dist/types/member/types.d.ts +5 -4
  169. package/dist/types/member/util.d.ts +14 -0
  170. package/dist/types/members/index.d.ts +15 -2
  171. package/dist/types/members/util.d.ts +1 -5
  172. package/dist/types/metrics/constants.d.ts +10 -0
  173. package/dist/types/multistream/codec/constants.d.ts +7 -0
  174. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  175. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  176. package/dist/types/reachability/clusterReachability.d.ts +33 -6
  177. package/dist/types/reachability/index.d.ts +10 -3
  178. package/dist/types/reachability/reachability.types.d.ts +7 -0
  179. package/dist/types/reachability/util.d.ts +17 -0
  180. package/dist/types/reactions/reactions.type.d.ts +4 -0
  181. package/dist/types/recording-controller/util.d.ts +5 -5
  182. package/dist/types/roap/index.d.ts +1 -1
  183. package/dist/types/webinar/utils.d.ts +6 -0
  184. package/dist/webinar/index.js +585 -164
  185. package/dist/webinar/index.js.map +1 -1
  186. package/dist/webinar/utils.js +25 -0
  187. package/dist/webinar/utils.js.map +1 -0
  188. package/package.json +26 -24
  189. package/src/aiEnableRequest/README.md +84 -0
  190. package/src/aiEnableRequest/index.ts +186 -0
  191. package/src/aiEnableRequest/utils.ts +25 -0
  192. package/src/annotation/index.ts +27 -7
  193. package/src/breakouts/breakout.ts +3 -1
  194. package/src/breakouts/index.ts +31 -0
  195. package/src/common/errors/webex-errors.ts +50 -3
  196. package/src/config.ts +7 -2
  197. package/src/constants.ts +49 -3
  198. package/src/controls-options-manager/constants.ts +14 -1
  199. package/src/controls-options-manager/index.ts +87 -28
  200. package/src/controls-options-manager/util.ts +81 -1
  201. package/src/hashTree/constants.ts +26 -0
  202. package/src/hashTree/hashTree.ts +480 -0
  203. package/src/hashTree/hashTreeParser.ts +1911 -29
  204. package/src/hashTree/types.ts +24 -1
  205. package/src/hashTree/utils.ts +98 -0
  206. package/src/index.ts +14 -1
  207. package/src/interceptors/constant.ts +6 -0
  208. package/src/interceptors/dataChannelAuthToken.ts +246 -0
  209. package/src/interceptors/index.ts +2 -1
  210. package/src/interceptors/locusRetry.ts +25 -4
  211. package/src/interceptors/locusRouteToken.ts +22 -5
  212. package/src/interceptors/utils.ts +16 -0
  213. package/src/interpretation/index.ts +29 -11
  214. package/src/interpretation/interpretation.types.ts +11 -0
  215. package/src/locus-info/controlsUtils.ts +20 -1
  216. package/src/locus-info/index.ts +958 -250
  217. package/src/locus-info/infoUtils.ts +41 -6
  218. package/src/locus-info/selfUtils.ts +1 -0
  219. package/src/locus-info/types.ts +51 -12
  220. package/src/media/MediaConnectionAwaiter.ts +62 -5
  221. package/src/media/index.ts +10 -1
  222. package/src/media/properties.ts +4 -1
  223. package/src/meeting/in-meeting-actions.ts +20 -0
  224. package/src/meeting/index.ts +1025 -146
  225. package/src/meeting/locusMediaRequest.ts +106 -6
  226. package/src/meeting/muteState.ts +10 -1
  227. package/src/meeting/request.ts +53 -0
  228. package/src/meeting/request.type.ts +6 -0
  229. package/src/meeting/util.ts +207 -7
  230. package/src/meeting-info/meeting-info-v2.ts +4 -2
  231. package/src/meetings/index.ts +307 -132
  232. package/src/meetings/meetings.types.ts +19 -0
  233. package/src/meetings/request.ts +43 -0
  234. package/src/meetings/util.ts +127 -13
  235. package/src/member/index.ts +20 -0
  236. package/src/member/types.ts +1 -0
  237. package/src/member/util.ts +41 -0
  238. package/src/members/index.ts +70 -7
  239. package/src/members/util.ts +12 -4
  240. package/src/metrics/constants.ts +11 -0
  241. package/src/multistream/codec/constants.ts +58 -0
  242. package/src/multistream/mediaRequestManager.ts +117 -76
  243. package/src/multistream/receiveSlot.ts +18 -0
  244. package/src/multistream/remoteMediaManager.ts +13 -0
  245. package/src/multistream/sendSlotManager.ts +97 -3
  246. package/src/reachability/clusterReachability.ts +156 -29
  247. package/src/reachability/index.ts +62 -17
  248. package/src/reachability/reachability.types.ts +11 -0
  249. package/src/reachability/reachabilityPeerConnection.ts +3 -1
  250. package/src/reachability/util.ts +36 -0
  251. package/src/reactions/reactions.type.ts +4 -0
  252. package/src/reconnection-manager/index.ts +0 -1
  253. package/src/recording-controller/index.ts +1 -2
  254. package/src/webinar/index.ts +448 -11
  255. package/src/webinar/utils.ts +16 -0
  256. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  257. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  258. package/test/unit/spec/annotation/index.ts +69 -7
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/index.ts +49 -0
  261. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  262. package/test/unit/spec/controls-options-manager/index.js +244 -29
  263. package/test/unit/spec/controls-options-manager/util.js +165 -0
  264. package/test/unit/spec/hashTree/hashTree.ts +721 -0
  265. package/test/unit/spec/hashTree/hashTreeParser.ts +5328 -0
  266. package/test/unit/spec/hashTree/utils.ts +264 -0
  267. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +406 -0
  268. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  269. package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
  270. package/test/unit/spec/interceptors/utils.ts +75 -0
  271. package/test/unit/spec/interpretation/index.ts +26 -4
  272. package/test/unit/spec/locus-info/controlsUtils.js +222 -52
  273. package/test/unit/spec/locus-info/index.js +2000 -171
  274. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  275. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  276. package/test/unit/spec/media/index.ts +92 -0
  277. package/test/unit/spec/media/properties.ts +12 -3
  278. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  279. package/test/unit/spec/meeting/index.js +2925 -209
  280. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  281. package/test/unit/spec/meeting/muteState.js +81 -0
  282. package/test/unit/spec/meeting/request.js +82 -0
  283. package/test/unit/spec/meeting/utils.js +595 -27
  284. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  285. package/test/unit/spec/meetings/index.js +1214 -75
  286. package/test/unit/spec/meetings/request.js +141 -0
  287. package/test/unit/spec/meetings/utils.js +453 -52
  288. package/test/unit/spec/member/index.js +35 -4
  289. package/test/unit/spec/member/util.js +154 -27
  290. package/test/unit/spec/members/index.js +216 -0
  291. package/test/unit/spec/members/request.js +37 -1
  292. package/test/unit/spec/members/utils.js +63 -0
  293. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  294. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  295. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  296. package/test/unit/spec/reachability/clusterReachability.ts +125 -1
  297. package/test/unit/spec/reachability/index.ts +154 -49
  298. package/test/unit/spec/reachability/util.ts +31 -0
  299. package/test/unit/spec/reconnection-manager/index.js +4 -8
  300. package/test/unit/spec/recording-controller/index.js +9 -8
  301. package/test/unit/spec/webinar/index.ts +837 -39
  302. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -48,7 +48,7 @@ var _constants = require("../constants");
48
48
  var _constants2 = _interopRequireDefault(require("../metrics/constants"));
49
49
  var _meetingInfo = _interopRequireDefault(require("../meeting-info"));
50
50
  var _meetingInfoV = _interopRequireDefault(require("../meeting-info/meeting-info-v2"));
51
- var _meeting = _interopRequireDefault(require("../meeting"));
51
+ var _meeting = _interopRequireWildcard(require("../meeting"));
52
52
  var _personalMeetingRoom = _interopRequireDefault(require("../personal-meeting-room"));
53
53
  var _reachability = _interopRequireDefault(require("../reachability"));
54
54
  var _request2 = _interopRequireDefault(require("./request"));
@@ -62,7 +62,9 @@ var _joinWebinarError = _interopRequireDefault(require("../common/errors/join-we
62
62
  var _webexErrors = require("../common/errors/webex-errors");
63
63
  var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting-info"));
64
64
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
65
- 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); }
65
+ var _utils = require("../hashTree/utils");
66
+ var _locusInfo = require("../locus-info");
67
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _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); }
66
68
  function ownKeys(e, r) { var t = _Object$keys2(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
67
69
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
68
70
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -193,6 +195,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
193
195
  (0, _defineProperty2.default)(_this, "preferredWebexSite", void 0);
194
196
  (0, _defineProperty2.default)(_this, "reachability", void 0);
195
197
  (0, _defineProperty2.default)(_this, "registered", void 0);
198
+ (0, _defineProperty2.default)(_this, "registrationPromise", void 0);
199
+ (0, _defineProperty2.default)(_this, "unregistrationPromise", void 0);
196
200
  (0, _defineProperty2.default)(_this, "request", void 0);
197
201
  (0, _defineProperty2.default)(_this, "geoHintInfo", void 0);
198
202
  (0, _defineProperty2.default)(_this, "meetingInfo", void 0);
@@ -350,11 +354,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
350
354
  return (0, _createClass2.default)(Meetings, [{
351
355
  key: "isNeedHandleMainLocus",
352
356
  value: function isNeedHandleMainLocus(meeting, newLocus) {
353
- var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _newLocus$self2, _newLocus$self3, _breakoutLocus$joined, _newLocus$self4;
357
+ var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _breakoutLocus$joined, _newLocus$self2;
354
358
  var breakoutUrl = (_newLocus$controls = newLocus.controls) === null || _newLocus$controls === void 0 ? void 0 : (_newLocus$controls$br = _newLocus$controls.breakout) === null || _newLocus$controls$br === void 0 ? void 0 : _newLocus$controls$br.url;
355
359
  var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
356
360
  var isSelfJoined = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self = newLocus.self) === null || _newLocus$self === void 0 ? void 0 : _newLocus$self.state) === _constants._JOINED_;
357
- 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_;
361
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
358
362
  // @ts-ignore
359
363
  var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
360
364
  var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants._MOVED_;
@@ -379,7 +383,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
379
383
  _loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> there is active breakout session and joined on this device, and don't need to handle main session: ".concat(breakoutUrl));
380
384
  return false;
381
385
  }
382
- if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self4 = newLocus.self) !== null && _newLocus$self4 !== void 0 && _newLocus$self4.removed || isResourceMovedOnThisDevice)) {
386
+ if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self2 = newLocus.self) !== null && _newLocus$self2 !== void 0 && _newLocus$self2.removed || isResourceMovedOnThisDevice)) {
383
387
  _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status or with device resource moved, not need to handle');
384
388
  return false;
385
389
  }
@@ -403,15 +407,15 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
403
407
  key: "isNeedHandleLocusDTO",
404
408
  value: function isNeedHandleLocusDTO(meeting, newLocus) {
405
409
  if (newLocus) {
406
- var _newLocus$self5, _newLocus$self6, _newLocus$self7, _newLocus$self7$devic, _newLocus$self7$devic2, _newLocus$self8, _newLocus$self8$devic, _newLocus$self8$devic2;
410
+ var _newLocus$self3, _newLocus$self3$devic, _newLocus$self3$devic2, _newLocus$self4, _newLocus$self4$devic, _newLocus$self4$devic2;
407
411
  var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
408
- 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_;
409
- 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_;
412
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
413
+ var isSelfMovedToLobby = (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self3 = newLocus.self) === null || _newLocus$self3 === void 0 ? void 0 : (_newLocus$self3$devic = _newLocus$self3.devices[0]) === null || _newLocus$self3$devic === void 0 ? void 0 : (_newLocus$self3$devic2 = _newLocus$self3$devic.intent) === null || _newLocus$self3$devic2 === void 0 ? void 0 : _newLocus$self3$devic2.reason) === _constants._ON_HOLD_LOBBY_ && (newLocus === null || newLocus === void 0 ? void 0 : (_newLocus$self4 = newLocus.self) === null || _newLocus$self4 === void 0 ? void 0 : (_newLocus$self4$devic = _newLocus$self4.devices[0]) === null || _newLocus$self4$devic === void 0 ? void 0 : (_newLocus$self4$devic2 = _newLocus$self4$devic.intent) === null || _newLocus$self4$devic2 === void 0 ? void 0 : _newLocus$self4$devic2.type) === _constants._WAIT_;
410
414
  if (!meeting) {
411
415
  if (isNewLocusAsBreakout) {
412
- var _newLocus$fullState, _newLocus$self9;
416
+ var _newLocus$fullState, _newLocus$self5;
413
417
  _loggerProxy.default.logger.log("Meetings:index#isNeedHandleLocusDTO --> the first breakout session locusDTO active status: ".concat((_newLocus$fullState = newLocus.fullState) === null || _newLocus$fullState === void 0 ? void 0 : _newLocus$fullState.active));
414
- return ((_newLocus$self9 = newLocus.self) === null || _newLocus$self9 === void 0 ? void 0 : _newLocus$self9.state) === _constants._JOINED_;
418
+ return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._JOINED_;
415
419
  }
416
420
  return this.isNeedHandleMainLocus(meeting, newLocus);
417
421
  }
@@ -435,19 +439,39 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
435
439
  }, {
436
440
  key: "getCorrespondingMeetingByLocus",
437
441
  value: function getCorrespondingMeetingByLocus(data) {
438
- var _data$stateElementsMe, _data$locus, _data$locus$self, _data$locus$self$call, _data$locus2, _data$locus2$info, _data$locus3, _data$locus4, _data$locus4$info;
439
- if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED && (_data$stateElementsMe = data.stateElementsMessage) !== null && _data$stateElementsMe !== void 0 && _data$stateElementsMe.locusUrl) {
440
- return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.stateElementsMessage.locusUrl);
442
+ var _data$stateElementsMe, _data$stateElementsMe2, _data$stateElementsMe3, _data$stateElementsMe4, _data$locus, _self$callbackInfo, _data$locus2, _data$locus2$info, _data$locus3, _data$locus4, _data$locus4$info;
443
+ var locusUrl = ((_data$stateElementsMe = data.stateElementsMessage) === null || _data$stateElementsMe === void 0 ? void 0 : _data$stateElementsMe.locusUrl) ||
444
+ // hash tree event
445
+ data.locusUrl; // classic event
446
+
447
+ // first try to find by locusUrl - that's the simplest and quickest way
448
+ var existingMeeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, locusUrl);
449
+ if (existingMeeting) {
450
+ return existingMeeting;
451
+ }
452
+ if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
453
+ // need to check if maybe this event indicates a move to/from breakout
454
+ var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data === null || data === void 0 ? void 0 : data.stateElementsMessage, this.meetingCollection);
455
+ if (meetingForHashTreeMessage) {
456
+ return meetingForHashTreeMessage;
457
+ }
441
458
  }
442
459
 
443
- // getting meeting by correlationId. This will happen for the new event
444
- // Either the locus
445
- // TODO : Add check for the callBack Address
446
- return this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locusUrl) ||
447
- // @ts-ignore
448
- this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
449
- // @ts-ignore
450
- _util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, (_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$self = _data$locus.self) === null || _data$locus$self === void 0 ? void 0 : (_data$locus$self$call = _data$locus$self.callbackInfo) === null || _data$locus$self$call === void 0 ? void 0 : _data$locus$self$call.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId);
460
+ // if that didn't work, fallback to other fields like correlationId, sipUri, etc
461
+
462
+ // If the event is a hash tree event, we need to extract "self" object from it
463
+ // We don't care about the version, just need to find the meeting this event is for,
464
+ // so any hash tree object of type "self" will do
465
+ var hashTreeEventSelf = (_data$stateElementsMe2 = data.stateElementsMessage) === null || _data$stateElementsMe2 === void 0 ? void 0 : (_data$stateElementsMe3 = _data$stateElementsMe2.locusStateElements) === null || _data$stateElementsMe3 === void 0 ? void 0 : (_data$stateElementsMe4 = _data$stateElementsMe3.find(function (obj) {
466
+ return (0, _utils.isSelf)(obj);
467
+ })) === null || _data$stateElementsMe4 === void 0 ? void 0 : _data$stateElementsMe4.data;
468
+ var self = hashTreeEventSelf || ((_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : _data$locus.self);
469
+ return (
470
+ // @ts-ignore
471
+ this.meetingCollection.getByKey(_meetings.MEETING_KEY.CORRELATION_ID,
472
+ // @ts-ignore
473
+ _util2.default.getCorrelationIdForDevice(this.webex.internal.device.url, self)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.SIP_URI, self === null || self === void 0 ? void 0 : (_self$callbackInfo = self.callbackInfo) === null || _self$callbackInfo === void 0 ? void 0 : _self$callbackInfo.callbackAddress) || ((_data$locus2 = data.locus) !== null && _data$locus2 !== void 0 && (_data$locus2$info = _data$locus2.info) !== null && _data$locus2$info !== void 0 && _data$locus2$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_meetings.MEETING_KEY.CONVERSATION_URL, (_data$locus3 = data.locus) === null || _data$locus3 === void 0 ? void 0 : _data$locus3.conversationUrl)) || this.meetingCollection.getByKey(_meetings.MEETING_KEY.MEETINGNUMBER, (_data$locus4 = data.locus) === null || _data$locus4 === void 0 ? void 0 : (_data$locus4$info = _data$locus4.info) === null || _data$locus4$info === void 0 ? void 0 : _data$locus4$info.webExMeetingId)
474
+ );
451
475
  }
452
476
 
453
477
  /**
@@ -467,6 +491,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
467
491
  var _this2 = this;
468
492
  var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
469
493
  var meeting = this.getCorrespondingMeetingByLocus(data);
494
+ // @ts-ignore
495
+ if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
496
+ (0, _meeting.storeEventForDebugging)('mercury', data);
497
+ }
470
498
 
471
499
  // Special case when locus has got replaced, This only happend once if a replace locus exists
472
500
  // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
@@ -478,7 +506,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
478
506
  meeting = this.meetingCollection.getByKey(_meetings.MEETING_KEY.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
479
507
  }
480
508
  if (meeting && !_util2.default.isBreakoutLocusDTO(data.locus)) {
481
- meeting.locusInfo.updateMainSessionLocusCache(data.locus);
509
+ meeting.locusInfo.updateMainSessionLocusCache(data.locus); // here data.locus will never be a complete locus
482
510
  }
483
511
  if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
484
512
  _loggerProxy.default.logger.log("Meetings:index#handleLocusEvent --> doesn't need to process locus event");
@@ -505,25 +533,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
505
533
  // };
506
534
  // rather then locus object change to locus url
507
535
 
508
- if (data.eventType !== _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
509
- if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
510
- // just ignore the event as its already ended and not active
511
- _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
512
- return;
513
- }
536
+ if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
537
+ // We're about to create a new meeting object from this hash tree message.
538
+ // There is some existing (pre-hash trees) SDK logic here that requires a locus object
539
+ // (at the very minimum we need locus.url to be set)
540
+ // so we try to create locus from the received hash tree message
541
+ // it will not be complete, in most cases it will only have the self part, but that's still better than nothing
542
+ var _createLocusFromHashT = (0, _locusInfo.createLocusFromHashTreeMessage)(data.stateElementsMessage),
543
+ locus = _createLocusFromHashT.locus;
544
+ data.locus = locus;
545
+ }
546
+ if (data.locus && data.locus.fullState && data.locus.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
547
+ // just ignore the event as its already ended and not active
548
+ _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
549
+ return;
550
+ }
514
551
 
515
- // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
516
- // Any future events will be neglected
552
+ // When its wireless share or guest and user leaves the meeting we dont have to keep the meeting object
553
+ // Any future events will be neglected
517
554
 
518
- if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
519
- // just ignore the event as its already ended and not active
520
- _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
521
- return;
522
- }
523
- }
524
- if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
525
- // in hash tree messages we don't ge the locus object, but the meeting constructor needs at least locus.url
526
- (0, _lodash.set)(data, 'locus.url', data.stateElementsMessage.locusUrl);
555
+ if (data.locus && data.locus.self && data.locus.self.state === _constants._LEFT_ && data.locus.self.removed === true) {
556
+ // just ignore the event as its already ended and not active
557
+ _loggerProxy.default.logger.warn('Meetings:index#handleLocusEvent --> Locus event received for meeting, after it was ended.');
558
+ return;
527
559
  }
528
560
  this.create(data.locus, _constants.DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo).then(/*#__PURE__*/function () {
529
561
  var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
@@ -538,6 +570,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
538
570
  trigger: data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS ? 'get-loci-response' : 'locus-message',
539
571
  locus: data.locus,
540
572
  hashTreeMessage: data.stateElementsMessage
573
+ }, function (locus) {
574
+ meeting.finalizeMeetingAfterInitialLocusSetup(locus);
541
575
  });
542
576
  case 2:
543
577
  _context3.next = 4;
@@ -594,7 +628,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
594
628
  }
595
629
 
596
630
  /**
597
- * handles locus events through mercury that are not roap
631
+ * handles locus events through mercury that are not roap or approval request events
598
632
  * @param {Object} envelope
599
633
  * @param {Object} envelope.data
600
634
  * @param {String} envelope.data.eventType
@@ -608,7 +642,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
608
642
  var data = envelope.data;
609
643
  // eslint-disable-next-line @typescript-eslint/no-shadow
610
644
  var eventType = data.eventType;
611
- if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP) {
645
+ if (eventType && eventType !== _constants.LOCUSEVENT.MESSAGE_ROAP && eventType !== _constants.LOCUSEVENT.APPROVAL_REQUEST) {
612
646
  this.handleLocusEvent(data, true);
613
647
  }
614
648
  }
@@ -790,46 +824,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
790
824
  }
791
825
  }
792
826
 
793
- /**
794
- * API to toggle TCP reachability, needs to be called before webex.meetings.register()
795
- * @param {Boolean} newValue
796
- * @private
797
- * @memberof Meetings
798
- * @returns {undefined}
799
- */
800
- }, {
801
- key: "_toggleTcpReachability",
802
- value: function _toggleTcpReachability(newValue) {
803
- if (typeof newValue !== 'boolean') {
804
- return;
805
- }
806
- // @ts-ignore
807
- if (this.config.experimental.enableTcpReachability !== newValue) {
808
- // @ts-ignore
809
- this.config.experimental.enableTcpReachability = newValue;
810
- }
811
- }
812
-
813
- /**
814
- * API to toggle TLS reachability, needs to be called before webex.meetings.register()
815
- * @param {Boolean} newValue
816
- * @private
817
- * @memberof Meetings
818
- * @returns {undefined}
819
- */
820
- }, {
821
- key: "_toggleTlsReachability",
822
- value: function _toggleTlsReachability(newValue) {
823
- if (typeof newValue !== 'boolean') {
824
- return;
825
- }
826
- // @ts-ignore
827
- if (this.config.experimental.enableTlsReachability !== newValue) {
828
- // @ts-ignore
829
- this.config.experimental.enableTlsReachability = newValue;
830
- }
831
- }
832
-
833
827
  /**
834
828
  * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
835
829
  *
@@ -895,6 +889,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
895
889
  }
896
890
  }
897
891
 
892
+ /**
893
+ * API to toggle AV1 codec support for video slides in multistream,
894
+ * needs to be called before webex.meetings.joinWithMedia()
895
+ *
896
+ * @param {Boolean} newValue
897
+ * @private
898
+ * @memberof Meetings
899
+ * @returns {undefined}
900
+ */
901
+ }, {
902
+ key: "_toggleEnableAv1SlidesSupport",
903
+ value: function _toggleEnableAv1SlidesSupport(newValue) {
904
+ if (typeof newValue !== 'boolean') {
905
+ return;
906
+ }
907
+
908
+ // @ts-ignore
909
+ if (this.config.enableAv1SlidesSupport !== newValue) {
910
+ // @ts-ignore
911
+ this.config.enableAv1SlidesSupport = newValue;
912
+ }
913
+ }
914
+
898
915
  /**
899
916
  * API to toggle stopping ICE Candidates Gathering after first relay candidate,
900
917
  * needs to be called before webex.meetings.joinWithMedia()
@@ -929,7 +946,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
929
946
  value: function executeRegistrationStep(step, stepName) {
930
947
  var _this5 = this;
931
948
  return step().then(function () {
949
+ _loggerProxy.default.logger.info("Meetings:index#executeRegistrationStep --> INFO, ".concat(stepName, " completed"));
932
950
  _this5.registrationStatus[stepName] = true;
951
+ }).catch(function (error) {
952
+ _loggerProxy.default.logger.error("Meetings:index#executeRegistrationStep --> ERROR, ".concat(stepName, " failed: ").concat(error.message));
953
+ return _promise.default.reject(error);
933
954
  });
934
955
  }
935
956
 
@@ -946,7 +967,20 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
946
967
  key: "register",
947
968
  value: function register(deviceRegistrationOptions) {
948
969
  var _this6 = this;
949
- this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
970
+ if (this.unregistrationPromise) {
971
+ _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration in progress, waiting to register');
972
+ this.registrationPromise = this.unregistrationPromise.catch(function () {}) // It doesn't matter what happened during unregistration
973
+ .finally(function () {
974
+ _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin unregistration completed, proceeding to register');
975
+ _this6.registrationPromise = null;
976
+ return _this6.register(deviceRegistrationOptions);
977
+ });
978
+ return this.registrationPromise;
979
+ }
980
+ if (this.registrationPromise) {
981
+ _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin registration in progress, returning existing promise');
982
+ return this.registrationPromise;
983
+ }
950
984
 
951
985
  // @ts-ignore
952
986
  if (!this.webex.canAuthorize) {
@@ -957,7 +991,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
957
991
  _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Meetings plugin already registered');
958
992
  return _promise.default.resolve();
959
993
  }
960
- return _promise.default.all([this.executeRegistrationStep(function () {
994
+ _loggerProxy.default.logger.info('Meetings:index#register --> INFO, Registering Meetings plugin');
995
+ this.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
996
+ this.registrationPromise = _promise.default.all([this.executeRegistrationStep(function () {
961
997
  return _this6.fetchUserPreferredWebexSite();
962
998
  }, 'fetchWebexSite'), this.executeRegistrationStep(function () {
963
999
  return _this6.getGeoHint();
@@ -998,7 +1034,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
998
1034
  stack: error.stack
999
1035
  });
1000
1036
  return _promise.default.reject(error);
1037
+ }).finally(function () {
1038
+ _this6.registrationPromise = null;
1001
1039
  });
1040
+ return this.registrationPromise;
1002
1041
  }
1003
1042
 
1004
1043
  /**
@@ -1013,35 +1052,61 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1013
1052
  key: "unregister",
1014
1053
  value: function unregister() {
1015
1054
  var _this7 = this;
1055
+ if (this.unregistrationPromise) {
1056
+ _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin unregistration in progress, returning existing promise');
1057
+ return this.unregistrationPromise;
1058
+ }
1059
+ if (this.registrationPromise) {
1060
+ _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration in progress, waiting to unregister');
1061
+
1062
+ // Wait for registration to complete (success or failure), then call unregister again
1063
+ this.unregistrationPromise = this.registrationPromise.catch(function () {}) // It doesn't matter what happened during registration
1064
+ .finally(function () {
1065
+ _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin registration completed, proceeding to unregister');
1066
+ _this7.unregistrationPromise = null;
1067
+ return _this7.unregister();
1068
+ });
1069
+ return this.unregistrationPromise;
1070
+ }
1016
1071
  if (!this.registered) {
1017
1072
  _loggerProxy.default.logger.info('Meetings:index#unregister --> INFO, Meetings plugin already unregistered');
1018
1073
  return _promise.default.resolve();
1019
1074
  }
1020
1075
  this.stopListeningForEvents();
1021
- return (
1022
- // @ts-ignore
1023
- this.webex.internal.mercury.disconnect()
1024
- // @ts-ignore
1025
- .then(function () {
1026
- return _this7.webex.internal.device.unregister();
1027
- }).catch(function (error) {
1028
- // If error status code is 404, continue the chain
1029
- if (error.statusCode === 404) {
1030
- _loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
1031
- return; // returning undefined allows the chain to continue
1032
- }
1033
- // For any other status code, break the chain by rethrowing
1034
- _loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
1035
- throw error; // rethrow to break the promise chain
1036
- }).then(function () {
1037
- _triggerProxy.default.trigger(_this7, {
1038
- file: 'meetings',
1039
- function: 'unregister'
1040
- }, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
1041
- _this7.registered = false;
1042
- _this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1043
- })
1044
- );
1076
+ this.unregistrationPromise =
1077
+ // @ts-ignore
1078
+ this.webex.internal.mercury
1079
+ // Use code 3050 with a non-reconnecting reason to prevent Mercury auto-reconnect
1080
+ // during unregister. Without this, disconnect() defaults to code 1000/"Done" which
1081
+ // force-closes as "Done (forced)" - a normalReconnectReason that triggers auto-reconnect,
1082
+ // causing a race condition with device.unregister().
1083
+ .disconnect({
1084
+ code: 3050,
1085
+ reason: 'meetings unregister'
1086
+ })
1087
+ // @ts-ignore
1088
+ .then(function () {
1089
+ return _this7.webex.internal.device.unregister();
1090
+ }).catch(function (error) {
1091
+ // If error status code is 404, continue the chain
1092
+ if (error.statusCode === 404) {
1093
+ _loggerProxy.default.logger.info('Meetings:index#unregister --> 404 error during device unregister, proceeding normally');
1094
+ return; // returning undefined allows the chain to continue
1095
+ }
1096
+ // For any other status code, break the chain by rethrowing
1097
+ _loggerProxy.default.logger.error("Meetings:index#unregister --> Failed to unregister device: ".concat(error.message));
1098
+ throw error; // rethrow to break the promise chain
1099
+ }).then(function () {
1100
+ _triggerProxy.default.trigger(_this7, {
1101
+ file: 'meetings',
1102
+ function: 'unregister'
1103
+ }, _constants.EVENT_TRIGGERS.MEETINGS_UNREGISTERED);
1104
+ _this7.registered = false;
1105
+ _this7.registrationStatus = (0, _lodash.clone)(_constants.INITIAL_REGISTRATION_STATUS);
1106
+ }).finally(function () {
1107
+ _this7.unregistrationPromise = null;
1108
+ });
1109
+ return this.unregistrationPromise;
1045
1110
  }
1046
1111
  }, {
1047
1112
  key: "uploadLogs",
@@ -1192,6 +1257,31 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1192
1257
  return this.personalMeetingRoom;
1193
1258
  }
1194
1259
 
1260
+ /**
1261
+ * Fetches site preferences for the provided Webex site, or the preferred Webex site.
1262
+ * This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
1263
+ *
1264
+ * @param {object} [options]
1265
+ * @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
1266
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
1267
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
1268
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
1269
+ * @throws {ParameterError}
1270
+ * @public
1271
+ * @memberof Meetings
1272
+ * @example
1273
+ * const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
1274
+ * const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
1275
+ */
1276
+ }, {
1277
+ key: "fetchSitePreferencesMeViaSite",
1278
+ value: function fetchSitePreferencesMeViaSite() {
1279
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1280
+ return this.request.fetchSitePreferencesMeViaSite(_objectSpread(_objectSpread({}, options), {}, {
1281
+ siteUrl: options.siteUrl || this.preferredWebexSite
1282
+ }));
1283
+ }
1284
+
1195
1285
  /**
1196
1286
  * Returns basic information about a meeting that exists or
1197
1287
  * used to exist in the MeetingCollection
@@ -1484,6 +1574,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1484
1574
  isMeetingActive,
1485
1575
  enableUnifiedMeetings,
1486
1576
  meetingInfoOptions,
1577
+ shouldDeferMeetingInfoFetch,
1578
+ isOneOnOneCallLocus,
1487
1579
  meetingAddedType,
1488
1580
  _args4 = arguments,
1489
1581
  _t2;
@@ -1538,16 +1630,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1538
1630
  extraParams: infoExtraParams,
1539
1631
  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
1540
1632
  };
1633
+ shouldDeferMeetingInfoFetch = type === _constants.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
1634
+ isOneOnOneCallLocus = type === _constants.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
1541
1635
  if (!meetingInfo) {
1542
1636
  _context4.next = 2;
1543
1637
  break;
1544
1638
  }
1545
1639
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1546
- _context4.next = 4;
1640
+ _context4.next = 6;
1547
1641
  break;
1548
1642
  case 2:
1549
- if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
1550
- _context4.next = 4;
1643
+ if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
1644
+ _context4.next = 6;
1551
1645
  break;
1552
1646
  }
1553
1647
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
@@ -1558,41 +1652,54 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1558
1652
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1559
1653
  }, waitingTime);
1560
1654
  meeting.parseMeetingInfo(undefined, destination);
1561
- _context4.next = 4;
1655
+ _context4.next = 6;
1562
1656
  break;
1563
1657
  case 3:
1658
+ if (shouldDeferMeetingInfoFetch) {
1659
+ _context4.next = 5;
1660
+ break;
1661
+ }
1564
1662
  _context4.next = 4;
1565
1663
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1566
1664
  case 4:
1567
- _context4.next = 8;
1665
+ _context4.next = 6;
1568
1666
  break;
1569
1667
  case 5:
1570
- _context4.prev = 5;
1668
+ _loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
1669
+ case 6:
1670
+ _context4.next = 10;
1671
+ break;
1672
+ case 7:
1673
+ _context4.prev = 7;
1571
1674
  _t2 = _context4["catch"](1);
1572
1675
  if (!(!(_t2 instanceof _captchaError.default) && !(_t2 instanceof _passwordError.default) && !(_t2 instanceof _permission.default) && !(_t2 instanceof _joinWebinarError.default) && !(_t2 instanceof _joinForbiddenError.default))) {
1573
- _context4.next = 7;
1676
+ _context4.next = 9;
1574
1677
  break;
1575
1678
  }
1576
1679
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1577
1680
  if (!failOnMissingMeetingInfo) {
1578
- _context4.next = 6;
1681
+ _context4.next = 8;
1579
1682
  break;
1580
1683
  }
1581
1684
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1582
1685
  // @ts-ignore
1583
1686
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1584
1687
  throw new _noMeetingInfo.default();
1585
- case 6:
1688
+ case 8:
1586
1689
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1587
1690
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1588
- case 7:
1691
+ case 9:
1589
1692
  _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
1590
- case 8:
1591
- _context4.prev = 8;
1693
+ case 10:
1694
+ _context4.prev = 10;
1592
1695
  // For type LOCUS_ID we need to parse the locus object to get the information
1593
1696
  // about the caller and callee
1594
1697
  // Meeting Added event will be created in `handleLocusEvent`
1595
- if (type !== _constants.DESTINATION_TYPE.LOCUS_ID) {
1698
+ // Only emit MEETING_ADDED if the meeting still exists in the collection.
1699
+ // If fetchMeetingInfo failed and the meeting was destroyed in the catch block,
1700
+ // skip emitting to prevent orphaned meeting references on the consumer side.
1701
+ // @ts-ignore - getMeetingByType types value as object but accepts strings (same as handleLocusEvent)
1702
+ if (type !== _constants.DESTINATION_TYPE.LOCUS_ID && this.getMeetingByType(_constants._ID_, meeting.id)) {
1596
1703
  if (!meeting.sipUri) {
1597
1704
  meeting.setSipUri(destination);
1598
1705
  }
@@ -1608,14 +1715,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1608
1715
  type: meetingAddedType
1609
1716
  });
1610
1717
  }
1611
- return _context4.finish(8);
1612
- case 9:
1718
+ return _context4.finish(10);
1719
+ case 11:
1613
1720
  return _context4.abrupt("return", meeting);
1614
- case 10:
1721
+ case 12:
1615
1722
  case "end":
1616
1723
  return _context4.stop();
1617
1724
  }
1618
- }, _callee4, this, [[1, 5, 8, 9]]);
1725
+ }, _callee4, this, [[1, 7, 10, 11]]);
1619
1726
  }));
1620
1727
  function createMeeting(_x4) {
1621
1728
  return _createMeeting.apply(this, arguments);
@@ -1658,51 +1765,141 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1658
1765
  */
1659
1766
  }, {
1660
1767
  key: "syncMeetings",
1661
- value: function syncMeetings() {
1662
- var _this11 = this;
1663
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1664
- _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings,
1665
- keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe;
1666
- // @ts-ignore
1667
- if (this.webex.credentials.isUnverifiedGuest) {
1668
- _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> skipping meeting sync as unverified guest');
1669
- return _promise.default.resolve();
1670
- }
1671
- return this.request.getActiveMeetings().then(function (locusArray) {
1672
- var activeLocusUrl = [];
1673
- if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1674
- var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
1675
- lociToUpdate.forEach(function (locus) {
1676
- activeLocusUrl.push(locus.url);
1677
- _this11.handleLocusEvent({
1678
- eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1679
- locus: locus,
1680
- locusUrl: locus.url
1681
- });
1682
- });
1683
- }
1684
- var meetingsCollection = _this11.meetingCollection.getAll();
1685
- if ((0, _keys.default)(meetingsCollection).length > 0) {
1686
- // Sometimes the mercury events are lost after mercury reconnect
1687
- // Remove any Locus meetings that are not returned by Locus
1688
- // (they had a locusUrl previously but are no longer active) in the sync
1689
- for (var _i = 0, _Object$values = (0, _values.default)(meetingsCollection); _i < _Object$values.length; _i++) {
1690
- var meeting = _Object$values[_i];
1691
- // @ts-ignore
1692
- var locusUrl = meeting.locusUrl;
1693
- if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1694
- // destroy function also uploads logs
1695
- // @ts-ignore
1696
- _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1697
- }
1768
+ value: (function () {
1769
+ var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1770
+ var _this11 = this;
1771
+ var _ref4,
1772
+ _ref4$keepOnlyLocusMe,
1773
+ keepOnlyLocusMeetings,
1774
+ _ref4$skipHashTreeSyn,
1775
+ skipHashTreeSync,
1776
+ locusArray,
1777
+ activeLocusUrl,
1778
+ lociToUpdate,
1779
+ meetingsCollection,
1780
+ _loop,
1781
+ _i,
1782
+ _Object$values,
1783
+ remainingMeetings,
1784
+ syncPromises,
1785
+ _i2,
1786
+ _arr,
1787
+ meeting,
1788
+ _args6 = arguments,
1789
+ _t3;
1790
+ return _regenerator.default.wrap(function (_context6) {
1791
+ while (1) switch (_context6.prev = _context6.next) {
1792
+ case 0:
1793
+ _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;
1794
+ if (!this.webex.credentials.isUnverifiedGuest) {
1795
+ _context6.next = 1;
1796
+ break;
1797
+ }
1798
+ _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
1799
+ _context6.next = 7;
1800
+ break;
1801
+ case 1:
1802
+ _context6.prev = 1;
1803
+ _context6.next = 2;
1804
+ return this.request.getActiveMeetings();
1805
+ case 2:
1806
+ locusArray = _context6.sent;
1807
+ activeLocusUrl = [];
1808
+ if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1809
+ lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
1810
+ lociToUpdate.forEach(function (locus) {
1811
+ activeLocusUrl.push(locus.url);
1812
+ _this11.handleLocusEvent({
1813
+ eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1814
+ locus: locus,
1815
+ locusUrl: locus.url
1816
+ });
1817
+ });
1818
+ }
1819
+ meetingsCollection = this.meetingCollection.getAll();
1820
+ if (!((0, _keys.default)(meetingsCollection).length > 0)) {
1821
+ _context6.next = 5;
1822
+ break;
1823
+ }
1824
+ _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
1825
+ var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
1826
+ return _regenerator.default.wrap(function (_context5) {
1827
+ while (1) switch (_context5.prev = _context5.next) {
1828
+ case 0:
1829
+ meeting = _Object$values[_i];
1830
+ // @ts-ignore
1831
+ locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
1832
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1833
+ globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
1834
+ if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
1835
+ var _locus$info;
1836
+ return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
1837
+ })) {
1838
+ // don't destroy the meeting as Locus API still returned some Locus that shares
1839
+ // the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
1840
+ // is in a breakout and gets moved to a different breakout while we were offline
1841
+ } else {
1842
+ // destroy function also uploads logs
1843
+ // @ts-ignore
1844
+ _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1845
+ }
1846
+ }
1847
+ case 1:
1848
+ case "end":
1849
+ return _context5.stop();
1850
+ }
1851
+ }, _loop);
1852
+ });
1853
+ _i = 0, _Object$values = (0, _values.default)(meetingsCollection);
1854
+ case 3:
1855
+ if (!(_i < _Object$values.length)) {
1856
+ _context6.next = 5;
1857
+ break;
1858
+ }
1859
+ return _context6.delegateYield(_loop(), "t0", 4);
1860
+ case 4:
1861
+ _i++;
1862
+ _context6.next = 3;
1863
+ break;
1864
+ case 5:
1865
+ _context6.next = 7;
1866
+ break;
1867
+ case 6:
1868
+ _context6.prev = 6;
1869
+ _t3 = _context6["catch"](1);
1870
+ _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
1871
+ throw _t3;
1872
+ case 7:
1873
+ if (skipHashTreeSync) {
1874
+ _context6.next = 8;
1875
+ break;
1876
+ }
1877
+ // Trigger hash tree syncs for all remaining meetings
1878
+ remainingMeetings = this.meetingCollection.getAll();
1879
+ syncPromises = [];
1880
+ for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
1881
+ meeting = _arr[_i2];
1882
+ if (meeting.locusInfo) {
1883
+ syncPromises.push(meeting.locusInfo.syncAllHashTreeDatasets());
1884
+ }
1885
+ }
1886
+ if (!(syncPromises.length > 0)) {
1887
+ _context6.next = 8;
1888
+ break;
1889
+ }
1890
+ _context6.next = 8;
1891
+ return _promise.default.all(syncPromises);
1892
+ case 8:
1893
+ case "end":
1894
+ return _context6.stop();
1698
1895
  }
1699
- }
1700
- }).catch(function (error) {
1701
- _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
1702
- throw new Error(error);
1703
- });
1704
- }
1705
-
1896
+ }, _callee5, this, [[1, 6]]);
1897
+ }));
1898
+ function syncMeetings() {
1899
+ return _syncMeetings.apply(this, arguments);
1900
+ }
1901
+ return syncMeetings;
1902
+ }()
1706
1903
  /**
1707
1904
  * sort out locus array for initial creating
1708
1905
  * @param {Array} loci original locus array
@@ -1710,6 +1907,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1710
1907
  * @public
1711
1908
  * @memberof Meetings
1712
1909
  */
1910
+ )
1713
1911
  }, {
1714
1912
  key: "sortLocusArrayToUpdate",
1715
1913
  value: function sortLocusArrayToUpdate(loci) {
@@ -1724,8 +1922,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1724
1922
  var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1725
1923
  breakoutLoci.forEach(function (breakoutLocus) {
1726
1924
  var associateMainLocus = mainLoci.find(function (mainLocus) {
1727
- var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1728
- 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);
1925
+ return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
1729
1926
  });
1730
1927
  var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1731
1928
  eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
@@ -1761,15 +1958,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1761
1958
  return;
1762
1959
  }
1763
1960
  var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
1764
- var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
1765
- 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);
1961
+ return _util2.default.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus);
1766
1962
  });
1767
1963
  if (existIndex < 0) {
1768
1964
  return;
1769
1965
  }
1770
1966
  var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
1771
1967
  this.handleLocusEvent({
1772
- eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
1968
+ eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1773
1969
  locus: associateBreakoutLocus,
1774
1970
  locusUrl: associateBreakoutLocus.url
1775
1971
  });