@webex/plugin-meetings 3.12.0-next.18 → 3.12.0-next.181

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 (307) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +135 -0
  22. package/ai-docs/ARCHITECTURE.md +207 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/assets/README.md +26 -0
  40. package/assets/e2ee-0.0.1.js +2 -0
  41. package/assets/e2ee-0.0.1.wasm +0 -0
  42. package/dist/aiEnableRequest/index.js +15 -2
  43. package/dist/aiEnableRequest/index.js.map +1 -1
  44. package/dist/annotation/index.js +55 -19
  45. package/dist/annotation/index.js.map +1 -1
  46. package/dist/assets/e2ee-0.0.1.js +2 -0
  47. package/dist/assets/e2ee-0.0.1.wasm +0 -0
  48. package/dist/breakouts/breakout.js +8 -3
  49. package/dist/breakouts/breakout.js.map +1 -1
  50. package/dist/breakouts/events.js +29 -14
  51. package/dist/breakouts/events.js.map +1 -1
  52. package/dist/breakouts/index.js +128 -7
  53. package/dist/breakouts/index.js.map +1 -1
  54. package/dist/common/errors/webex-errors.js +54 -5
  55. package/dist/common/errors/webex-errors.js.map +1 -1
  56. package/dist/config.js +3 -2
  57. package/dist/config.js.map +1 -1
  58. package/dist/constants.js +39 -11
  59. package/dist/constants.js.map +1 -1
  60. package/dist/controls-options-manager/index.js +46 -10
  61. package/dist/controls-options-manager/index.js.map +1 -1
  62. package/dist/hashTree/constants.js +4 -1
  63. package/dist/hashTree/constants.js.map +1 -1
  64. package/dist/hashTree/hashTreeParser.js +1096 -391
  65. package/dist/hashTree/hashTreeParser.js.map +1 -1
  66. package/dist/hashTree/utils.js +20 -0
  67. package/dist/hashTree/utils.js.map +1 -1
  68. package/dist/index.js +8 -0
  69. package/dist/index.js.map +1 -1
  70. package/dist/interceptors/dataChannelAuthToken.js +58 -16
  71. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  72. package/dist/interceptors/locusRetry.js +24 -9
  73. package/dist/interceptors/locusRetry.js.map +1 -1
  74. package/dist/interpretation/index.js +55 -12
  75. package/dist/interpretation/index.js.map +1 -1
  76. package/dist/interpretation/interpretation.types.js +7 -0
  77. package/dist/interpretation/interpretation.types.js.map +1 -0
  78. package/dist/interpretation/siLanguage.js +1 -1
  79. package/dist/locus-info/controlsUtils.js +4 -1
  80. package/dist/locus-info/controlsUtils.js.map +1 -1
  81. package/dist/locus-info/index.js +615 -176
  82. package/dist/locus-info/index.js.map +1 -1
  83. package/dist/locus-info/infoUtils.js +36 -5
  84. package/dist/locus-info/infoUtils.js.map +1 -1
  85. package/dist/locus-info/types.js +20 -0
  86. package/dist/locus-info/types.js.map +1 -1
  87. package/dist/media/MediaConnectionAwaiter.js +229 -166
  88. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  89. package/dist/media/index.js +8 -2
  90. package/dist/media/index.js.map +1 -1
  91. package/dist/media/properties.js +4 -5
  92. package/dist/media/properties.js.map +1 -1
  93. package/dist/meeting/in-meeting-actions.js +5 -1
  94. package/dist/meeting/in-meeting-actions.js.map +1 -1
  95. package/dist/meeting/index.js +1844 -959
  96. package/dist/meeting/index.js.map +1 -1
  97. package/dist/meeting/locusMediaRequest.js +229 -82
  98. package/dist/meeting/locusMediaRequest.js.map +1 -1
  99. package/dist/meeting/muteState.js +10 -1
  100. package/dist/meeting/muteState.js.map +1 -1
  101. package/dist/meeting/request.js +5 -2
  102. package/dist/meeting/request.js.map +1 -1
  103. package/dist/meeting/util.js +42 -4
  104. package/dist/meeting/util.js.map +1 -1
  105. package/dist/meeting/voicea-meeting.js +2 -1
  106. package/dist/meeting/voicea-meeting.js.map +1 -1
  107. package/dist/meeting-info/meeting-info-v2.js +12 -5
  108. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  109. package/dist/meetings/index.js +304 -129
  110. package/dist/meetings/index.js.map +1 -1
  111. package/dist/meetings/meetings.types.js +6 -1
  112. package/dist/meetings/meetings.types.js.map +1 -1
  113. package/dist/meetings/request.js +39 -0
  114. package/dist/meetings/request.js.map +1 -1
  115. package/dist/meetings/util.js +116 -18
  116. package/dist/meetings/util.js.map +1 -1
  117. package/dist/member/index.js +10 -0
  118. package/dist/member/index.js.map +1 -1
  119. package/dist/member/types.js.map +1 -1
  120. package/dist/member/util.js +30 -0
  121. package/dist/member/util.js.map +1 -1
  122. package/dist/members/index.js +101 -43
  123. package/dist/members/index.js.map +1 -1
  124. package/dist/members/util.js +8 -1
  125. package/dist/members/util.js.map +1 -1
  126. package/dist/metrics/constants.js +7 -1
  127. package/dist/metrics/constants.js.map +1 -1
  128. package/dist/multistream/codec/constants.js +63 -0
  129. package/dist/multistream/codec/constants.js.map +1 -0
  130. package/dist/multistream/mediaRequestManager.js +62 -15
  131. package/dist/multistream/mediaRequestManager.js.map +1 -1
  132. package/dist/multistream/receiveSlot.js +9 -0
  133. package/dist/multistream/receiveSlot.js.map +1 -1
  134. package/dist/multistream/remoteMediaManager.js +32 -4
  135. package/dist/multistream/remoteMediaManager.js.map +1 -1
  136. package/dist/reachability/clusterReachability.js.map +1 -1
  137. package/dist/reachability/index.js +121 -83
  138. package/dist/reachability/index.js.map +1 -1
  139. package/dist/reachability/reachability.types.js +2 -0
  140. package/dist/reachability/reachability.types.js.map +1 -1
  141. package/dist/reachability/util.js +45 -0
  142. package/dist/reachability/util.js.map +1 -1
  143. package/dist/reactions/reactions.type.js.map +1 -1
  144. package/dist/recording-controller/index.js +1 -3
  145. package/dist/recording-controller/index.js.map +1 -1
  146. package/dist/roap/turnDiscovery.js +8 -1
  147. package/dist/roap/turnDiscovery.js.map +1 -1
  148. package/dist/types/annotation/index.d.ts +19 -0
  149. package/dist/types/common/errors/webex-errors.d.ts +36 -2
  150. package/dist/types/config.d.ts +3 -2
  151. package/dist/types/constants.d.ts +15 -2
  152. package/dist/types/controls-options-manager/index.d.ts +16 -0
  153. package/dist/types/hashTree/constants.d.ts +1 -0
  154. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  155. package/dist/types/hashTree/utils.d.ts +7 -0
  156. package/dist/types/index.d.ts +4 -0
  157. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  158. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  159. package/dist/types/locus-info/index.d.ts +106 -8
  160. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  161. package/dist/types/locus-info/types.d.ts +22 -1
  162. package/dist/types/media/MediaConnectionAwaiter.d.ts +66 -49
  163. package/dist/types/media/properties.d.ts +6 -2
  164. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  165. package/dist/types/meeting/index.d.ts +217 -16
  166. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  167. package/dist/types/meeting/request.d.ts +1 -0
  168. package/dist/types/meeting/util.d.ts +12 -1
  169. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  170. package/dist/types/meetings/index.d.ts +40 -19
  171. package/dist/types/meetings/meetings.types.d.ts +15 -0
  172. package/dist/types/meetings/request.d.ts +14 -0
  173. package/dist/types/member/index.d.ts +1 -0
  174. package/dist/types/member/types.d.ts +1 -0
  175. package/dist/types/member/util.d.ts +9 -0
  176. package/dist/types/members/index.d.ts +15 -2
  177. package/dist/types/members/util.d.ts +1 -5
  178. package/dist/types/metrics/constants.d.ts +6 -0
  179. package/dist/types/multistream/codec/constants.d.ts +7 -0
  180. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  181. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  182. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  183. package/dist/types/reachability/index.d.ts +10 -3
  184. package/dist/types/reachability/reachability.types.d.ts +7 -0
  185. package/dist/types/reachability/util.d.ts +17 -0
  186. package/dist/types/reactions/reactions.type.d.ts +3 -0
  187. package/dist/webinar/index.js +441 -252
  188. package/dist/webinar/index.js.map +1 -1
  189. package/package.json +26 -24
  190. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  191. package/src/aiEnableRequest/index.ts +16 -0
  192. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  193. package/src/annotation/index.ts +61 -29
  194. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  195. package/src/breakouts/breakout.ts +3 -1
  196. package/src/breakouts/events.ts +33 -11
  197. package/src/breakouts/index.ts +145 -3
  198. package/src/common/errors/webex-errors.ts +56 -3
  199. package/src/config.ts +3 -2
  200. package/src/constants.ts +23 -4
  201. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  202. package/src/controls-options-manager/index.ts +62 -10
  203. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  204. package/src/hashTree/constants.ts +7 -0
  205. package/src/hashTree/hashTreeParser.ts +861 -193
  206. package/src/hashTree/utils.ts +19 -0
  207. package/src/index.ts +7 -0
  208. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  209. package/src/interceptors/dataChannelAuthToken.ts +59 -12
  210. package/src/interceptors/locusRetry.ts +26 -5
  211. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  212. package/src/interpretation/index.ts +65 -10
  213. package/src/interpretation/interpretation.types.ts +11 -0
  214. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  215. package/src/locus-info/controlsUtils.ts +3 -1
  216. package/src/locus-info/index.ts +566 -164
  217. package/src/locus-info/infoUtils.ts +41 -6
  218. package/src/locus-info/types.ts +26 -1
  219. package/src/media/MediaConnectionAwaiter.ts +229 -196
  220. package/src/media/ai-docs/media-spec.md +267 -0
  221. package/src/media/index.ts +10 -1
  222. package/src/media/properties.ts +8 -3
  223. package/src/meeting/ai-docs/meeting-spec.md +401 -0
  224. package/src/meeting/in-meeting-actions.ts +8 -0
  225. package/src/meeting/index.ts +1085 -252
  226. package/src/meeting/locusMediaRequest.ts +106 -6
  227. package/src/meeting/muteState.ts +10 -1
  228. package/src/meeting/request.ts +11 -0
  229. package/src/meeting/util.ts +53 -9
  230. package/src/meeting/voicea-meeting.ts +1 -1
  231. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  232. package/src/meeting-info/meeting-info-v2.ts +11 -4
  233. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  234. package/src/meetings/index.ts +202 -81
  235. package/src/meetings/meetings.types.ts +19 -0
  236. package/src/meetings/request.ts +43 -0
  237. package/src/meetings/util.ts +117 -4
  238. package/src/member/ai-docs/member-spec.md +196 -0
  239. package/src/member/index.ts +10 -0
  240. package/src/member/types.ts +1 -0
  241. package/src/member/util.ts +29 -0
  242. package/src/members/ai-docs/members-spec.md +256 -0
  243. package/src/members/index.ts +70 -7
  244. package/src/members/util.ts +12 -4
  245. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  246. package/src/metrics/constants.ts +6 -0
  247. package/src/multistream/ai-docs/multistream-spec.md +292 -0
  248. package/src/multistream/codec/constants.ts +58 -0
  249. package/src/multistream/mediaRequestManager.ts +119 -28
  250. package/src/multistream/receiveSlot.ts +18 -0
  251. package/src/multistream/remoteMediaManager.ts +23 -1
  252. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  253. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  254. package/src/reachability/clusterReachability.ts +3 -2
  255. package/src/reachability/index.ts +47 -16
  256. package/src/reachability/reachability.types.ts +11 -0
  257. package/src/reachability/util.ts +36 -0
  258. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  259. package/src/reactions/reactions.type.ts +3 -0
  260. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  261. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  262. package/src/recording-controller/index.ts +1 -2
  263. package/src/roap/ai-docs/roap-spec.md +241 -0
  264. package/src/roap/turnDiscovery.ts +9 -1
  265. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  266. package/src/webinar/index.ts +247 -89
  267. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  268. package/test/unit/spec/annotation/index.ts +214 -182
  269. package/test/unit/spec/breakouts/breakout.ts +9 -3
  270. package/test/unit/spec/breakouts/events.ts +120 -2
  271. package/test/unit/spec/breakouts/index.ts +336 -15
  272. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  273. package/test/unit/spec/controls-options-manager/index.js +139 -32
  274. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  275. package/test/unit/spec/hashTree/utils.ts +37 -0
  276. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +179 -1
  277. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  278. package/test/unit/spec/interpretation/index.ts +119 -4
  279. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  280. package/test/unit/spec/locus-info/index.js +1014 -58
  281. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  282. package/test/unit/spec/media/MediaConnectionAwaiter.ts +479 -17
  283. package/test/unit/spec/media/index.ts +92 -0
  284. package/test/unit/spec/media/properties.ts +26 -26
  285. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  286. package/test/unit/spec/meeting/index.js +3462 -493
  287. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  288. package/test/unit/spec/meeting/muteState.js +81 -0
  289. package/test/unit/spec/meeting/request.js +12 -0
  290. package/test/unit/spec/meeting/utils.js +205 -19
  291. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  292. package/test/unit/spec/meeting-info/meetinginfov2.js +88 -11
  293. package/test/unit/spec/meetings/index.js +549 -49
  294. package/test/unit/spec/meetings/request.js +141 -0
  295. package/test/unit/spec/meetings/utils.js +402 -51
  296. package/test/unit/spec/member/index.js +7 -0
  297. package/test/unit/spec/member/util.js +89 -0
  298. package/test/unit/spec/members/index.js +216 -0
  299. package/test/unit/spec/members/request.js +37 -1
  300. package/test/unit/spec/members/utils.js +63 -0
  301. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  302. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  303. package/test/unit/spec/reachability/index.ts +128 -46
  304. package/test/unit/spec/reachability/util.ts +31 -0
  305. package/test/unit/spec/recording-controller/index.js +9 -8
  306. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  307. package/test/unit/spec/webinar/index.ts +935 -466
@@ -14,12 +14,13 @@ _Object$defineProperty(exports, "__esModule", {
14
14
  value: true
15
15
  });
16
16
  exports.default = void 0;
17
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
18
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
17
19
  var _map = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/map"));
18
20
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
19
21
  var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
20
22
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
21
23
  var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
22
- var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
23
24
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
24
25
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
25
26
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
@@ -29,6 +30,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
29
30
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
30
31
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
31
32
  var _lodash = require("lodash");
33
+ var _webCapabilities = require("@webex/web-capabilities");
32
34
  require("@webex/internal-plugin-mercury");
33
35
  require("@webex/internal-plugin-conversation");
34
36
  require("@webex/internal-plugin-metrics");
@@ -64,7 +66,7 @@ var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting
64
66
  var _joinForbiddenError = _interopRequireDefault(require("../common/errors/join-forbidden-error"));
65
67
  var _utils = require("../hashTree/utils");
66
68
  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); }
69
+ 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
70
  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
71
  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
72
  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 +206,51 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
204
206
  (0, _defineProperty2.default)(_this, "breakoutLocusForHandleLater", void 0);
205
207
  (0, _defineProperty2.default)(_this, "namespace", _constants.MEETINGS);
206
208
  (0, _defineProperty2.default)(_this, "registrationStatus", void 0);
209
+ /**
210
+ * Emits a metric describing how well this browser runs WebAssembly, used to spot browsers
211
+ * where real-time WASM effects (e.g. background noise removal) run poorly.
212
+ *
213
+ * @param {string} correlationId - correlation id to report the result against
214
+ * @returns {void}
215
+ */
216
+ (0, _defineProperty2.default)(_this, "emitWasmRuntimePerformance", (0, _lodash.once)(function (correlationId) {
217
+ // Probe and telemetry failures must not prevent meeting creation.
218
+ _webCapabilities.WasmRuntimeProbe.check().then(function (result) {
219
+ var status = result.status,
220
+ capability = result.capability,
221
+ reason = result.reason,
222
+ measurements = result.measurements;
223
+ var _ref = measurements !== null && measurements !== void 0 ? measurements : {},
224
+ _ref$divRatio = _ref.divRatio,
225
+ divRatio = _ref$divRatio === void 0 ? null : _ref$divRatio,
226
+ _ref$sqrtRatio = _ref.sqrtRatio,
227
+ sqrtRatio = _ref$sqrtRatio === void 0 ? null : _ref$sqrtRatio,
228
+ _ref$addNsPerOp = _ref.addNsPerOp,
229
+ addNsPerOp = _ref$addNsPerOp === void 0 ? null : _ref$addNsPerOp,
230
+ _ref$addMedianMs = _ref.addMedianMs,
231
+ addMedianMs = _ref$addMedianMs === void 0 ? null : _ref$addMedianMs,
232
+ _ref$divMedianMs = _ref.divMedianMs,
233
+ divMedianMs = _ref$divMedianMs === void 0 ? null : _ref$divMedianMs,
234
+ _ref$sqrtMedianMs = _ref.sqrtMedianMs,
235
+ sqrtMedianMs = _ref$sqrtMedianMs === void 0 ? null : _ref$sqrtMedianMs;
236
+ var measurementsLog = (0, _stringify.default)(measurements);
237
+ _loggerProxy.default.logger.log("Meetings:index#emitWasmRuntimePerformance --> WASM runtime performance status: ".concat(status, ", capability: ").concat(capability, ", reason: ").concat(reason, ", measurements: ").concat(measurementsLog));
238
+ return _metrics.default.sendBehavioralMetric(_constants2.default.WASM_RUNTIME_PERFORMANCE, {
239
+ status: status,
240
+ capability: capability,
241
+ reason: reason,
242
+ divRatio: divRatio,
243
+ sqrtRatio: sqrtRatio,
244
+ addNsPerOp: addNsPerOp,
245
+ addMedianMs: addMedianMs,
246
+ divMedianMs: divMedianMs,
247
+ sqrtMedianMs: sqrtMedianMs,
248
+ correlation_id: correlationId
249
+ });
250
+ }).catch(function (error) {
251
+ _loggerProxy.default.logger.error("Meetings:index#emitWasmRuntimePerformance --> ERROR, failed to probe or report WASM runtime performance: ".concat(error.message));
252
+ });
253
+ }));
207
254
  /**
208
255
  * Creates a noise reduction effect
209
256
  *
@@ -213,7 +260,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
213
260
  * @memberof Meetings
214
261
  */
215
262
  (0, _defineProperty2.default)(_this, "createNoiseReductionEffect", /*#__PURE__*/function () {
216
- var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(options) {
263
+ var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(options) {
217
264
  var authToken;
218
265
  return _regenerator.default.wrap(function (_context) {
219
266
  while (1) switch (_context.prev = _context.next) {
@@ -230,7 +277,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
230
277
  }, _callee);
231
278
  }));
232
279
  return function (_x) {
233
- return _ref.apply(this, arguments);
280
+ return _ref2.apply(this, arguments);
234
281
  };
235
282
  }());
236
283
  /**
@@ -242,7 +289,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
242
289
  * @memberof Meetings
243
290
  */
244
291
  (0, _defineProperty2.default)(_this, "createVirtualBackgroundEffect", /*#__PURE__*/function () {
245
- var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
292
+ var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
246
293
  var authToken;
247
294
  return _regenerator.default.wrap(function (_context2) {
248
295
  while (1) switch (_context2.prev = _context2.next) {
@@ -259,7 +306,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
259
306
  }, _callee2);
260
307
  }));
261
308
  return function (_x2) {
262
- return _ref2.apply(this, arguments);
309
+ return _ref3.apply(this, arguments);
263
310
  };
264
311
  }());
265
312
  _this.mediaHelpers = mediaHelpersModule;
@@ -354,11 +401,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
354
401
  return (0, _createClass2.default)(Meetings, [{
355
402
  key: "isNeedHandleMainLocus",
356
403
  value: function isNeedHandleMainLocus(meeting, newLocus) {
357
- var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _newLocus$self2, _newLocus$self3, _breakoutLocus$joined, _newLocus$self4;
404
+ var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _breakoutLocus$joined, _newLocus$self2;
358
405
  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
406
  var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
360
407
  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_;
408
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
362
409
  // @ts-ignore
363
410
  var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
364
411
  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 +430,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
383
430
  _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
431
  return false;
385
432
  }
386
- if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self4 = newLocus.self) !== null && _newLocus$self4 !== void 0 && _newLocus$self4.removed || isResourceMovedOnThisDevice)) {
433
+ if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self2 = newLocus.self) !== null && _newLocus$self2 !== void 0 && _newLocus$self2.removed || isResourceMovedOnThisDevice)) {
387
434
  _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
435
  return false;
389
436
  }
@@ -407,15 +454,15 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
407
454
  key: "isNeedHandleLocusDTO",
408
455
  value: function isNeedHandleLocusDTO(meeting, newLocus) {
409
456
  if (newLocus) {
410
- var _newLocus$self5, _newLocus$self6, _newLocus$self7, _newLocus$self7$devic, _newLocus$self7$devic2, _newLocus$self8, _newLocus$self8$devic, _newLocus$self8$devic2;
457
+ var _newLocus$self3, _newLocus$self3$devic, _newLocus$self3$devic2, _newLocus$self4, _newLocus$self4$devic, _newLocus$self4$devic2;
411
458
  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_;
459
+ var isSelfMoved = _util2.default.isSelfMovedOrBreakoutEnded(newLocus);
460
+ 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
461
  if (!meeting) {
415
462
  if (isNewLocusAsBreakout) {
416
- var _newLocus$fullState, _newLocus$self9;
463
+ var _newLocus$fullState, _newLocus$self5;
417
464
  _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_;
465
+ return ((_newLocus$self5 = newLocus.self) === null || _newLocus$self5 === void 0 ? void 0 : _newLocus$self5.state) === _constants._JOINED_;
419
466
  }
420
467
  return this.isNeedHandleMainLocus(meeting, newLocus);
421
468
  }
@@ -451,9 +498,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
451
498
  }
452
499
  if (data.eventType === _constants.LOCUSEVENT.HASH_TREE_DATA_UPDATED) {
453
500
  // 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);
501
+ var meetingForHashTreeMessage = (0, _locusInfo.findMeetingForHashTreeMessage)(data === null || data === void 0 ? void 0 : data.stateElementsMessage, this.meetingCollection);
457
502
  if (meetingForHashTreeMessage) {
458
503
  return meetingForHashTreeMessage;
459
504
  }
@@ -493,7 +538,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
493
538
  var _this2 = this;
494
539
  var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
495
540
  var meeting = this.getCorrespondingMeetingByLocus(data);
496
-
497
541
  // @ts-ignore
498
542
  if (this.config.experimental.storeLocusHashTreeEventsForDebugging) {
499
543
  (0, _meeting.storeEventForDebugging)('mercury', data);
@@ -561,7 +605,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
561
605
  return;
562
606
  }
563
607
  this.create(data.locus, _constants.DESTINATION_TYPE.LOCUS_ID, useRandomDelayForInfo).then(/*#__PURE__*/function () {
564
- var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
608
+ var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(newMeeting) {
565
609
  var _t;
566
610
  return _regenerator.default.wrap(function (_context3) {
567
611
  while (1) switch (_context3.prev = _context3.next) {
@@ -573,6 +617,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
573
617
  trigger: data.eventType === _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS ? 'get-loci-response' : 'locus-message',
574
618
  locus: data.locus,
575
619
  hashTreeMessage: data.stateElementsMessage
620
+ }, function (locus) {
621
+ meeting.finalizeMeetingAfterInitialLocusSetup(locus);
576
622
  });
577
623
  case 2:
578
624
  _context3.next = 4;
@@ -592,7 +638,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
592
638
  }, _callee3, null, [[1, 3]]);
593
639
  }));
594
640
  return function (_x3) {
595
- return _ref3.apply(this, arguments);
641
+ return _ref4.apply(this, arguments);
596
642
  };
597
643
  }()).catch(function (e) {
598
644
  _loggerProxy.default.logger.error(e);
@@ -684,8 +730,13 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
684
730
 
685
731
  // @ts-ignore
686
732
  this.webex.internal.mercury.on(_constants.ONLINE, function () {
733
+ // Fire-and-forget sync on socket recovery. Unlike the reconnection manager (which awaits and
734
+ // retries), nothing consumes this promise, so catch its rejection to avoid an unhandled
735
+ // promise rejection (a transient guest classic-sync failure would otherwise crash Node hosts).
687
736
  _this3.syncMeetings({
688
737
  keepOnlyLocusMeetings: false
738
+ }).catch(function (error) {
739
+ _loggerProxy.default.logger.warn("Meetings:index#listenForEvents --> syncMeetings after ONLINE event failed: ".concat(error));
689
740
  });
690
741
  });
691
742
 
@@ -825,46 +876,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
825
876
  }
826
877
  }
827
878
 
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
879
  /**
869
880
  * API to toggle backend ipv6 native support config, needs to be called before webex.meetings.register()
870
881
  *
@@ -930,6 +941,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
930
941
  }
931
942
  }
932
943
 
944
+ /**
945
+ * API to toggle AV1 codec support for video slides in multistream,
946
+ * needs to be called before webex.meetings.joinWithMedia()
947
+ *
948
+ * @param {Boolean} newValue
949
+ * @private
950
+ * @memberof Meetings
951
+ * @returns {undefined}
952
+ */
953
+ }, {
954
+ key: "_toggleEnableAv1SlidesSupport",
955
+ value: function _toggleEnableAv1SlidesSupport(newValue) {
956
+ if (typeof newValue !== 'boolean') {
957
+ return;
958
+ }
959
+
960
+ // @ts-ignore
961
+ if (this.config.enableAv1SlidesSupport !== newValue) {
962
+ // @ts-ignore
963
+ this.config.enableAv1SlidesSupport = newValue;
964
+ }
965
+ }
966
+
933
967
  /**
934
968
  * API to toggle stopping ICE Candidates Gathering after first relay candidate,
935
969
  * needs to be called before webex.meetings.joinWithMedia()
@@ -1275,6 +1309,31 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1275
1309
  return this.personalMeetingRoom;
1276
1310
  }
1277
1311
 
1312
+ /**
1313
+ * Fetches site preferences for the provided Webex site, or the preferred Webex site.
1314
+ * This is used to determine capabilities of the site, such as whether scheduling a webinar is supported.
1315
+ *
1316
+ * @param {object} [options]
1317
+ * @param {string} [options.siteUrl] - Webex site URL. Defaults to preferredWebexSite, for example "cisco.webex.com".
1318
+ * @param {string} [options.siteName] - Site name query override. Defaults to the site name derived from siteUrl, for example "cisco" for "cisco.webex.com".
1319
+ * @param {SitePreferenceSelectOption[]} [options.selectOptions] - Preference sections to fetch. Defaults to 'scheduling'.
1320
+ * @returns {Promise<SitePreferencesResponse>} site preferences response body
1321
+ * @throws {ParameterError}
1322
+ * @public
1323
+ * @memberof Meetings
1324
+ * @example
1325
+ * const preferences = await webex.meetings.fetchSitePreferencesMeViaSite();
1326
+ * const supportScheduleWebinar = preferences?.scheduling?.supportScheduleWebinar;
1327
+ */
1328
+ }, {
1329
+ key: "fetchSitePreferencesMeViaSite",
1330
+ value: function fetchSitePreferencesMeViaSite() {
1331
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1332
+ return this.request.fetchSitePreferencesMeViaSite(_objectSpread(_objectSpread({}, options), {}, {
1333
+ siteUrl: options.siteUrl || this.preferredWebexSite
1334
+ }));
1335
+ }
1336
+
1278
1337
  /**
1279
1338
  * Returns basic information about a meeting that exists or
1280
1339
  * used to exist in the MeetingCollection
@@ -1299,8 +1358,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1299
1358
  }, {
1300
1359
  key: "destroy",
1301
1360
  value: function destroy(meeting, reason) {
1302
- var _meeting$locusInfo, _meeting$locusInfo2, _meeting$locusInfo2$f, _meeting$locusInfo3, _meeting$locusInfo3$f;
1303
- _util.default.cleanUp(meeting);
1361
+ var _meeting$locusInfo, _meeting$locusInfo2, _meeting$locusInfo3, _meeting$locusInfo3$f, _meeting$locusInfo4, _meeting$locusInfo4$f;
1362
+ _util.default.cleanUp(meeting, {
1363
+ preserveVoiceaChannel: false
1364
+ });
1365
+
1366
+ // Tear down hash tree parsers here (and not in MeetingUtil.cleanUp) so they survive
1367
+ // leave/endMeetingForAll to consume the final sentinel END message from Locus.
1368
+ (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.cleanUp();
1304
1369
  // keep some basic info about the deleted meeting forever
1305
1370
  this.deletedMeetings.set(meeting.id, {
1306
1371
  id: meeting.id,
@@ -1312,10 +1377,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1312
1377
  meetingInfo: (0, _lodash.cloneDeep)(meeting.meetingInfo),
1313
1378
  locusInfo: {
1314
1379
  // locusInfo can be quite big, so keep just the minimal info
1315
- url: (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.url,
1380
+ url: (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : _meeting$locusInfo2.url,
1316
1381
  fullState: {
1317
- lastActive: (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : (_meeting$locusInfo2$f = _meeting$locusInfo2.fullState) === null || _meeting$locusInfo2$f === void 0 ? void 0 : _meeting$locusInfo2$f.lastActive,
1318
- sessionId: (_meeting$locusInfo3 = meeting.locusInfo) === null || _meeting$locusInfo3 === void 0 ? void 0 : (_meeting$locusInfo3$f = _meeting$locusInfo3.fullState) === null || _meeting$locusInfo3$f === void 0 ? void 0 : _meeting$locusInfo3$f.sessionId
1382
+ lastActive: (_meeting$locusInfo3 = meeting.locusInfo) === null || _meeting$locusInfo3 === void 0 ? void 0 : (_meeting$locusInfo3$f = _meeting$locusInfo3.fullState) === null || _meeting$locusInfo3$f === void 0 ? void 0 : _meeting$locusInfo3$f.lastActive,
1383
+ sessionId: (_meeting$locusInfo4 = meeting.locusInfo) === null || _meeting$locusInfo4 === void 0 ? void 0 : (_meeting$locusInfo4$f = _meeting$locusInfo4.fullState) === null || _meeting$locusInfo4$f === void 0 ? void 0 : _meeting$locusInfo4$f.sessionId
1319
1384
  }
1320
1385
  },
1321
1386
  roles: meeting.roles,
@@ -1470,6 +1535,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1470
1535
  });
1471
1536
  }
1472
1537
  });
1538
+ _this1.emitWasmRuntimePerformance(createdMeeting.correlationId);
1473
1539
  } else {
1474
1540
  _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
1541
  }
@@ -1567,6 +1633,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1567
1633
  isMeetingActive,
1568
1634
  enableUnifiedMeetings,
1569
1635
  meetingInfoOptions,
1636
+ shouldDeferMeetingInfoFetch,
1637
+ isOneOnOneCallLocus,
1570
1638
  meetingAddedType,
1571
1639
  _args4 = arguments,
1572
1640
  _t2;
@@ -1621,16 +1689,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1621
1689
  extraParams: infoExtraParams,
1622
1690
  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
1691
  };
1692
+ shouldDeferMeetingInfoFetch = type === _constants.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
1693
+ isOneOnOneCallLocus = type === _constants.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
1624
1694
  if (!meetingInfo) {
1625
1695
  _context4.next = 2;
1626
1696
  break;
1627
1697
  }
1628
1698
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1629
- _context4.next = 4;
1699
+ _context4.next = 6;
1630
1700
  break;
1631
1701
  case 2:
1632
- if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
1633
- _context4.next = 4;
1702
+ if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
1703
+ _context4.next = 6;
1634
1704
  break;
1635
1705
  }
1636
1706
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
@@ -1641,37 +1711,46 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1641
1711
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1642
1712
  }, waitingTime);
1643
1713
  meeting.parseMeetingInfo(undefined, destination);
1644
- _context4.next = 4;
1714
+ _context4.next = 6;
1645
1715
  break;
1646
1716
  case 3:
1717
+ if (shouldDeferMeetingInfoFetch) {
1718
+ _context4.next = 5;
1719
+ break;
1720
+ }
1647
1721
  _context4.next = 4;
1648
1722
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1649
1723
  case 4:
1650
- _context4.next = 8;
1724
+ _context4.next = 6;
1651
1725
  break;
1652
1726
  case 5:
1653
- _context4.prev = 5;
1727
+ _loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
1728
+ case 6:
1729
+ _context4.next = 10;
1730
+ break;
1731
+ case 7:
1732
+ _context4.prev = 7;
1654
1733
  _t2 = _context4["catch"](1);
1655
1734
  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;
1735
+ _context4.next = 9;
1657
1736
  break;
1658
1737
  }
1659
1738
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1660
1739
  if (!failOnMissingMeetingInfo) {
1661
- _context4.next = 6;
1740
+ _context4.next = 8;
1662
1741
  break;
1663
1742
  }
1664
1743
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1665
1744
  // @ts-ignore
1666
1745
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1667
1746
  throw new _noMeetingInfo.default();
1668
- case 6:
1747
+ case 8:
1669
1748
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1670
1749
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1671
- case 7:
1750
+ case 9:
1672
1751
  _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
1673
- case 8:
1674
- _context4.prev = 8;
1752
+ case 10:
1753
+ _context4.prev = 10;
1675
1754
  // For type LOCUS_ID we need to parse the locus object to get the information
1676
1755
  // about the caller and callee
1677
1756
  // Meeting Added event will be created in `handleLocusEvent`
@@ -1695,14 +1774,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1695
1774
  type: meetingAddedType
1696
1775
  });
1697
1776
  }
1698
- return _context4.finish(8);
1699
- case 9:
1777
+ return _context4.finish(10);
1778
+ case 11:
1700
1779
  return _context4.abrupt("return", meeting);
1701
- case 10:
1780
+ case 12:
1702
1781
  case "end":
1703
1782
  return _context4.stop();
1704
1783
  }
1705
- }, _callee4, this, [[1, 5, 8, 9]]);
1784
+ }, _callee4, this, [[1, 7, 10, 11]]);
1706
1785
  }));
1707
1786
  function createMeeting(_x4) {
1708
1787
  return _createMeeting.apply(this, arguments);
@@ -1737,7 +1816,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1737
1816
  }
1738
1817
 
1739
1818
  /**
1740
- * Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
1819
+ * Syncs all the meetings from server. For unverified guests it skips the getActiveMeetings() call
1820
+ * (which Locus rejects for them) and instead resyncs each meeting individually via LocusInfo#sync.
1741
1821
  * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
1742
1822
  * @returns {Promise<void>}
1743
1823
  * @public
@@ -1745,51 +1825,147 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1745
1825
  */
1746
1826
  }, {
1747
1827
  key: "syncMeetings",
1748
- value: function syncMeetings() {
1749
- var _this11 = this;
1750
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1751
- _ref4$keepOnlyLocusMe = _ref4.keepOnlyLocusMeetings,
1752
- keepOnlyLocusMeetings = _ref4$keepOnlyLocusMe === void 0 ? true : _ref4$keepOnlyLocusMe;
1753
- // @ts-ignore
1754
- if (this.webex.credentials.isUnverifiedGuest) {
1755
- _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> skipping meeting sync as unverified guest');
1756
- return _promise.default.resolve();
1757
- }
1758
- return this.request.getActiveMeetings().then(function (locusArray) {
1759
- var activeLocusUrl = [];
1760
- if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1761
- var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
1762
- lociToUpdate.forEach(function (locus) {
1763
- activeLocusUrl.push(locus.url);
1764
- _this11.handleLocusEvent({
1765
- eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1766
- locus: locus,
1767
- locusUrl: locus.url
1768
- });
1769
- });
1770
- }
1771
- var meetingsCollection = _this11.meetingCollection.getAll();
1772
- if ((0, _keys.default)(meetingsCollection).length > 0) {
1773
- // Sometimes the mercury events are lost after mercury reconnect
1774
- // Remove any Locus meetings that are not returned by Locus
1775
- // (they had a locusUrl previously but are no longer active) in the sync
1776
- for (var _i = 0, _Object$values = (0, _values.default)(meetingsCollection); _i < _Object$values.length; _i++) {
1777
- var meeting = _Object$values[_i];
1778
- // @ts-ignore
1779
- var locusUrl = meeting.locusUrl;
1780
- if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1781
- // destroy function also uploads logs
1828
+ value: (function () {
1829
+ var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1830
+ var _this11 = this;
1831
+ var _ref5,
1832
+ _ref5$keepOnlyLocusMe,
1833
+ keepOnlyLocusMeetings,
1834
+ _ref5$skipHashTreeSyn,
1835
+ skipHashTreeSync,
1836
+ isUnverifiedGuest,
1837
+ locusArray,
1838
+ activeLocusUrl,
1839
+ lociToUpdate,
1840
+ meetingsCollection,
1841
+ _loop,
1842
+ _i,
1843
+ _Object$values,
1844
+ remainingMeetings,
1845
+ syncPromises,
1846
+ _i2,
1847
+ _arr,
1848
+ meeting,
1849
+ _args6 = arguments,
1850
+ _t3;
1851
+ return _regenerator.default.wrap(function (_context6) {
1852
+ while (1) switch (_context6.prev = _context6.next) {
1853
+ case 0:
1854
+ _ref5 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, _ref5$keepOnlyLocusMe = _ref5.keepOnlyLocusMeetings, keepOnlyLocusMeetings = _ref5$keepOnlyLocusMe === void 0 ? true : _ref5$keepOnlyLocusMe, _ref5$skipHashTreeSyn = _ref5.skipHashTreeSync, skipHashTreeSync = _ref5$skipHashTreeSyn === void 0 ? false : _ref5$skipHashTreeSyn;
1782
1855
  // @ts-ignore
1783
- _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1784
- }
1785
- }
1786
- }
1787
- }).catch(function (error) {
1788
- _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
1789
- throw new Error(error);
1790
- });
1791
- }
1856
+ isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
1857
+ if (!isUnverifiedGuest) {
1858
+ _context6.next = 1;
1859
+ break;
1860
+ }
1861
+ _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
1792
1862
 
1863
+ // Locus rejects getActiveMeetings() for unverified guests, so the per-meeting sync below
1864
+ // (with canSyncClassicLocus enabled) resyncs each classic meeting individually instead.
1865
+ _context6.next = 7;
1866
+ break;
1867
+ case 1:
1868
+ _context6.prev = 1;
1869
+ _context6.next = 2;
1870
+ return this.request.getActiveMeetings();
1871
+ case 2:
1872
+ locusArray = _context6.sent;
1873
+ activeLocusUrl = [];
1874
+ if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1875
+ lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
1876
+ lociToUpdate.forEach(function (locus) {
1877
+ activeLocusUrl.push(locus.url);
1878
+ _this11.handleLocusEvent({
1879
+ eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1880
+ locus: locus,
1881
+ locusUrl: locus.url
1882
+ });
1883
+ });
1884
+ }
1885
+ meetingsCollection = this.meetingCollection.getAll();
1886
+ if (!((0, _keys.default)(meetingsCollection).length > 0)) {
1887
+ _context6.next = 5;
1888
+ break;
1889
+ }
1890
+ _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
1891
+ var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
1892
+ return _regenerator.default.wrap(function (_context5) {
1893
+ while (1) switch (_context5.prev = _context5.next) {
1894
+ case 0:
1895
+ meeting = _Object$values[_i];
1896
+ // @ts-ignore
1897
+ locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
1898
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1899
+ globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
1900
+ if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
1901
+ var _locus$info;
1902
+ return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
1903
+ })) {
1904
+ // don't destroy the meeting as Locus API still returned some Locus that shares
1905
+ // the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
1906
+ // is in a breakout and gets moved to a different breakout while we were offline
1907
+ } else {
1908
+ // destroy function also uploads logs
1909
+ // @ts-ignore
1910
+ _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1911
+ }
1912
+ }
1913
+ case 1:
1914
+ case "end":
1915
+ return _context5.stop();
1916
+ }
1917
+ }, _loop);
1918
+ });
1919
+ _i = 0, _Object$values = (0, _values.default)(meetingsCollection);
1920
+ case 3:
1921
+ if (!(_i < _Object$values.length)) {
1922
+ _context6.next = 5;
1923
+ break;
1924
+ }
1925
+ return _context6.delegateYield(_loop(), "t0", 4);
1926
+ case 4:
1927
+ _i++;
1928
+ _context6.next = 3;
1929
+ break;
1930
+ case 5:
1931
+ _context6.next = 7;
1932
+ break;
1933
+ case 6:
1934
+ _context6.prev = 6;
1935
+ _t3 = _context6["catch"](1);
1936
+ _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
1937
+ throw _t3;
1938
+ case 7:
1939
+ // Resync each remaining meeting via LocusInfo#sync, which routes to hash tree or classic. For
1940
+ // signed-in users classic meetings were already synced above, so only the hash tree sync runs.
1941
+ remainingMeetings = this.meetingCollection.getAll();
1942
+ syncPromises = [];
1943
+ for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
1944
+ meeting = _arr[_i2];
1945
+ if (meeting.locusInfo) {
1946
+ syncPromises.push(meeting.locusInfo.sync(meeting, {
1947
+ canSyncClassicLocus: isUnverifiedGuest,
1948
+ canSyncHashTree: !skipHashTreeSync
1949
+ }));
1950
+ }
1951
+ }
1952
+ if (!(syncPromises.length > 0)) {
1953
+ _context6.next = 8;
1954
+ break;
1955
+ }
1956
+ _context6.next = 8;
1957
+ return _promise.default.all(syncPromises);
1958
+ case 8:
1959
+ case "end":
1960
+ return _context6.stop();
1961
+ }
1962
+ }, _callee5, this, [[1, 6]]);
1963
+ }));
1964
+ function syncMeetings() {
1965
+ return _syncMeetings.apply(this, arguments);
1966
+ }
1967
+ return syncMeetings;
1968
+ }()
1793
1969
  /**
1794
1970
  * sort out locus array for initial creating
1795
1971
  * @param {Array} loci original locus array
@@ -1797,6 +1973,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1797
1973
  * @public
1798
1974
  * @memberof Meetings
1799
1975
  */
1976
+ )
1800
1977
  }, {
1801
1978
  key: "sortLocusArrayToUpdate",
1802
1979
  value: function sortLocusArrayToUpdate(loci) {
@@ -1811,8 +1988,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1811
1988
  var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1812
1989
  breakoutLoci.forEach(function (breakoutLocus) {
1813
1990
  var associateMainLocus = mainLoci.find(function (mainLocus) {
1814
- var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1815
- 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);
1991
+ return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
1816
1992
  });
1817
1993
  var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1818
1994
  eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
@@ -1848,8 +2024,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1848
2024
  return;
1849
2025
  }
1850
2026
  var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
1851
- var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
1852
- 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);
2027
+ return _util2.default.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus);
1853
2028
  });
1854
2029
  if (existIndex < 0) {
1855
2030
  return;