@webex/plugin-meetings 3.12.0-next.16 → 3.12.0-next.160

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 (301) 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/dist/aiEnableRequest/index.js +15 -2
  40. package/dist/aiEnableRequest/index.js.map +1 -1
  41. package/dist/annotation/index.js +2 -2
  42. package/dist/annotation/index.js.map +1 -1
  43. package/dist/breakouts/breakout.js +8 -3
  44. package/dist/breakouts/breakout.js.map +1 -1
  45. package/dist/breakouts/events.js +29 -14
  46. package/dist/breakouts/events.js.map +1 -1
  47. package/dist/breakouts/index.js +99 -4
  48. package/dist/breakouts/index.js.map +1 -1
  49. package/dist/common/errors/webex-errors.js +49 -5
  50. package/dist/common/errors/webex-errors.js.map +1 -1
  51. package/dist/config.js +2 -2
  52. package/dist/config.js.map +1 -1
  53. package/dist/constants.js +37 -10
  54. package/dist/constants.js.map +1 -1
  55. package/dist/controls-options-manager/index.js +46 -10
  56. package/dist/controls-options-manager/index.js.map +1 -1
  57. package/dist/hashTree/constants.js +4 -1
  58. package/dist/hashTree/constants.js.map +1 -1
  59. package/dist/hashTree/hashTreeParser.js +1096 -391
  60. package/dist/hashTree/hashTreeParser.js.map +1 -1
  61. package/dist/hashTree/utils.js +20 -0
  62. package/dist/hashTree/utils.js.map +1 -1
  63. package/dist/index.js +7 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  66. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  67. package/dist/interceptors/locusRetry.js +24 -9
  68. package/dist/interceptors/locusRetry.js.map +1 -1
  69. package/dist/interpretation/index.js +55 -12
  70. package/dist/interpretation/index.js.map +1 -1
  71. package/dist/interpretation/interpretation.types.js +7 -0
  72. package/dist/interpretation/interpretation.types.js.map +1 -0
  73. package/dist/interpretation/siLanguage.js +1 -1
  74. package/dist/locus-info/controlsUtils.js +4 -1
  75. package/dist/locus-info/controlsUtils.js.map +1 -1
  76. package/dist/locus-info/index.js +615 -176
  77. package/dist/locus-info/index.js.map +1 -1
  78. package/dist/locus-info/infoUtils.js +36 -5
  79. package/dist/locus-info/infoUtils.js.map +1 -1
  80. package/dist/locus-info/types.js +20 -0
  81. package/dist/locus-info/types.js.map +1 -1
  82. package/dist/media/MediaConnectionAwaiter.js +15 -2
  83. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  84. package/dist/media/index.js +8 -2
  85. package/dist/media/index.js.map +1 -1
  86. package/dist/media/properties.js +4 -5
  87. package/dist/media/properties.js.map +1 -1
  88. package/dist/meeting/in-meeting-actions.js +7 -1
  89. package/dist/meeting/in-meeting-actions.js.map +1 -1
  90. package/dist/meeting/index.js +1688 -835
  91. package/dist/meeting/index.js.map +1 -1
  92. package/dist/meeting/locusMediaRequest.js +229 -82
  93. package/dist/meeting/locusMediaRequest.js.map +1 -1
  94. package/dist/meeting/muteState.js +10 -1
  95. package/dist/meeting/muteState.js.map +1 -1
  96. package/dist/meeting/request.js +5 -2
  97. package/dist/meeting/request.js.map +1 -1
  98. package/dist/meeting/util.js +37 -3
  99. package/dist/meeting/util.js.map +1 -1
  100. package/dist/meeting/voicea-meeting.js +2 -1
  101. package/dist/meeting/voicea-meeting.js.map +1 -1
  102. package/dist/meeting-info/meeting-info-v2.js +9 -3
  103. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  104. package/dist/meetings/index.js +300 -128
  105. package/dist/meetings/index.js.map +1 -1
  106. package/dist/meetings/meetings.types.js +6 -1
  107. package/dist/meetings/meetings.types.js.map +1 -1
  108. package/dist/meetings/request.js +39 -0
  109. package/dist/meetings/request.js.map +1 -1
  110. package/dist/meetings/util.js +116 -18
  111. package/dist/meetings/util.js.map +1 -1
  112. package/dist/member/index.js +10 -0
  113. package/dist/member/index.js.map +1 -1
  114. package/dist/member/types.js.map +1 -1
  115. package/dist/member/util.js +30 -0
  116. package/dist/member/util.js.map +1 -1
  117. package/dist/members/index.js +101 -43
  118. package/dist/members/index.js.map +1 -1
  119. package/dist/members/util.js +8 -1
  120. package/dist/members/util.js.map +1 -1
  121. package/dist/metrics/constants.js +7 -1
  122. package/dist/metrics/constants.js.map +1 -1
  123. package/dist/multistream/codec/constants.js +63 -0
  124. package/dist/multistream/codec/constants.js.map +1 -0
  125. package/dist/multistream/mediaRequestManager.js +62 -15
  126. package/dist/multistream/mediaRequestManager.js.map +1 -1
  127. package/dist/multistream/receiveSlot.js +9 -0
  128. package/dist/multistream/receiveSlot.js.map +1 -1
  129. package/dist/multistream/remoteMediaManager.js +32 -4
  130. package/dist/multistream/remoteMediaManager.js.map +1 -1
  131. package/dist/reachability/clusterReachability.js.map +1 -1
  132. package/dist/reachability/index.js +121 -83
  133. package/dist/reachability/index.js.map +1 -1
  134. package/dist/reachability/reachability.types.js +2 -0
  135. package/dist/reachability/reachability.types.js.map +1 -1
  136. package/dist/reachability/util.js +45 -0
  137. package/dist/reachability/util.js.map +1 -1
  138. package/dist/reactions/reactions.type.js.map +1 -1
  139. package/dist/recording-controller/index.js +1 -3
  140. package/dist/recording-controller/index.js.map +1 -1
  141. package/dist/roap/turnDiscovery.js +8 -1
  142. package/dist/roap/turnDiscovery.js.map +1 -1
  143. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  144. package/dist/types/config.d.ts +2 -2
  145. package/dist/types/constants.d.ts +13 -1
  146. package/dist/types/controls-options-manager/index.d.ts +16 -0
  147. package/dist/types/hashTree/constants.d.ts +1 -0
  148. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  149. package/dist/types/hashTree/utils.d.ts +7 -0
  150. package/dist/types/index.d.ts +3 -0
  151. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  152. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  153. package/dist/types/locus-info/index.d.ts +106 -8
  154. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  155. package/dist/types/locus-info/types.d.ts +22 -1
  156. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  157. package/dist/types/media/properties.d.ts +6 -2
  158. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  159. package/dist/types/meeting/index.d.ts +176 -11
  160. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  161. package/dist/types/meeting/request.d.ts +1 -0
  162. package/dist/types/meeting/util.d.ts +9 -0
  163. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  164. package/dist/types/meetings/index.d.ts +40 -19
  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 +1 -0
  168. package/dist/types/member/types.d.ts +1 -0
  169. package/dist/types/member/util.d.ts +9 -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 +6 -0
  173. package/dist/types/multistream/codec/constants.d.ts +7 -0
  174. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  175. package/dist/types/multistream/remoteMediaManager.d.ts +18 -0
  176. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  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 +3 -0
  181. package/dist/webinar/index.js +307 -161
  182. package/dist/webinar/index.js.map +1 -1
  183. package/package.json +23 -23
  184. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  185. package/src/aiEnableRequest/index.ts +16 -0
  186. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  187. package/src/annotation/index.ts +6 -4
  188. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  189. package/src/breakouts/breakout.ts +3 -1
  190. package/src/breakouts/events.ts +33 -11
  191. package/src/breakouts/index.ts +122 -2
  192. package/src/common/errors/webex-errors.ts +50 -3
  193. package/src/config.ts +2 -2
  194. package/src/constants.ts +21 -3
  195. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  196. package/src/controls-options-manager/index.ts +62 -10
  197. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  198. package/src/hashTree/constants.ts +7 -0
  199. package/src/hashTree/hashTreeParser.ts +861 -193
  200. package/src/hashTree/utils.ts +19 -0
  201. package/src/index.ts +6 -0
  202. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  203. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  204. package/src/interceptors/locusRetry.ts +26 -5
  205. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  206. package/src/interpretation/index.ts +65 -10
  207. package/src/interpretation/interpretation.types.ts +11 -0
  208. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  209. package/src/locus-info/controlsUtils.ts +3 -1
  210. package/src/locus-info/index.ts +566 -164
  211. package/src/locus-info/infoUtils.ts +41 -6
  212. package/src/locus-info/types.ts +26 -1
  213. package/src/media/MediaConnectionAwaiter.ts +21 -4
  214. package/src/media/ai-docs/media-spec.md +267 -0
  215. package/src/media/index.ts +10 -1
  216. package/src/media/properties.ts +8 -3
  217. package/src/meeting/ai-docs/meeting-spec.md +401 -0
  218. package/src/meeting/in-meeting-actions.ts +12 -0
  219. package/src/meeting/index.ts +946 -120
  220. package/src/meeting/locusMediaRequest.ts +106 -6
  221. package/src/meeting/muteState.ts +10 -1
  222. package/src/meeting/request.ts +11 -0
  223. package/src/meeting/util.ts +51 -7
  224. package/src/meeting/voicea-meeting.ts +1 -1
  225. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  226. package/src/meeting-info/meeting-info-v2.ts +10 -4
  227. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  228. package/src/meetings/index.ts +200 -80
  229. package/src/meetings/meetings.types.ts +19 -0
  230. package/src/meetings/request.ts +43 -0
  231. package/src/meetings/util.ts +117 -4
  232. package/src/member/ai-docs/member-spec.md +196 -0
  233. package/src/member/index.ts +10 -0
  234. package/src/member/types.ts +1 -0
  235. package/src/member/util.ts +29 -0
  236. package/src/members/ai-docs/members-spec.md +256 -0
  237. package/src/members/index.ts +70 -7
  238. package/src/members/util.ts +12 -4
  239. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  240. package/src/metrics/constants.ts +6 -0
  241. package/src/multistream/ai-docs/multistream-spec.md +292 -0
  242. package/src/multistream/codec/constants.ts +58 -0
  243. package/src/multistream/mediaRequestManager.ts +119 -28
  244. package/src/multistream/receiveSlot.ts +18 -0
  245. package/src/multistream/remoteMediaManager.ts +23 -1
  246. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  247. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  248. package/src/reachability/clusterReachability.ts +3 -2
  249. package/src/reachability/index.ts +47 -16
  250. package/src/reachability/reachability.types.ts +11 -0
  251. package/src/reachability/util.ts +36 -0
  252. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  253. package/src/reactions/reactions.type.ts +3 -0
  254. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  255. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  256. package/src/recording-controller/index.ts +1 -2
  257. package/src/roap/ai-docs/roap-spec.md +241 -0
  258. package/src/roap/turnDiscovery.ts +9 -1
  259. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  260. package/src/webinar/index.ts +216 -38
  261. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  262. package/test/unit/spec/annotation/index.ts +3 -3
  263. package/test/unit/spec/breakouts/breakout.ts +9 -3
  264. package/test/unit/spec/breakouts/events.ts +120 -2
  265. package/test/unit/spec/breakouts/index.ts +223 -3
  266. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  267. package/test/unit/spec/controls-options-manager/index.js +139 -32
  268. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  269. package/test/unit/spec/hashTree/utils.ts +37 -0
  270. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  271. package/test/unit/spec/interceptors/locusRetry.ts +234 -5
  272. package/test/unit/spec/interpretation/index.ts +119 -4
  273. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  274. package/test/unit/spec/locus-info/index.js +1014 -58
  275. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  276. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  277. package/test/unit/spec/media/index.ts +92 -0
  278. package/test/unit/spec/media/properties.ts +23 -23
  279. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  280. package/test/unit/spec/meeting/index.js +2838 -109
  281. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  282. package/test/unit/spec/meeting/muteState.js +81 -0
  283. package/test/unit/spec/meeting/request.js +12 -0
  284. package/test/unit/spec/meeting/utils.js +189 -17
  285. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  286. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  287. package/test/unit/spec/meetings/index.js +544 -49
  288. package/test/unit/spec/meetings/request.js +141 -0
  289. package/test/unit/spec/meetings/utils.js +402 -51
  290. package/test/unit/spec/member/index.js +7 -0
  291. package/test/unit/spec/member/util.js +89 -0
  292. package/test/unit/spec/members/index.js +216 -0
  293. package/test/unit/spec/members/request.js +37 -1
  294. package/test/unit/spec/members/utils.js +63 -0
  295. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  296. package/test/unit/spec/multistream/remoteMediaManager.ts +46 -0
  297. package/test/unit/spec/reachability/index.ts +128 -46
  298. package/test/unit/spec/reachability/util.ts +31 -0
  299. package/test/unit/spec/recording-controller/index.js +9 -8
  300. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  301. package/test/unit/spec/webinar/index.ts +332 -31
@@ -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,11 @@ 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;
1361
+ var _meeting$locusInfo, _meeting$locusInfo2, _meeting$locusInfo3, _meeting$locusInfo3$f, _meeting$locusInfo4, _meeting$locusInfo4$f;
1303
1362
  _util.default.cleanUp(meeting);
1363
+ // Tear down hash tree parsers here (and not in MeetingUtil.cleanUp) so they survive
1364
+ // leave/endMeetingForAll to consume the final sentinel END message from Locus.
1365
+ (_meeting$locusInfo = meeting.locusInfo) === null || _meeting$locusInfo === void 0 ? void 0 : _meeting$locusInfo.cleanUp();
1304
1366
  // keep some basic info about the deleted meeting forever
1305
1367
  this.deletedMeetings.set(meeting.id, {
1306
1368
  id: meeting.id,
@@ -1312,10 +1374,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1312
1374
  meetingInfo: (0, _lodash.cloneDeep)(meeting.meetingInfo),
1313
1375
  locusInfo: {
1314
1376
  // 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,
1377
+ url: (_meeting$locusInfo2 = meeting.locusInfo) === null || _meeting$locusInfo2 === void 0 ? void 0 : _meeting$locusInfo2.url,
1316
1378
  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
1379
+ 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,
1380
+ 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
1381
  }
1320
1382
  },
1321
1383
  roles: meeting.roles,
@@ -1470,6 +1532,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1470
1532
  });
1471
1533
  }
1472
1534
  });
1535
+ _this1.emitWasmRuntimePerformance(createdMeeting.correlationId);
1473
1536
  } else {
1474
1537
  _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
1538
  }
@@ -1567,6 +1630,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1567
1630
  isMeetingActive,
1568
1631
  enableUnifiedMeetings,
1569
1632
  meetingInfoOptions,
1633
+ shouldDeferMeetingInfoFetch,
1634
+ isOneOnOneCallLocus,
1570
1635
  meetingAddedType,
1571
1636
  _args4 = arguments,
1572
1637
  _t2;
@@ -1621,16 +1686,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1621
1686
  extraParams: infoExtraParams,
1622
1687
  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
1688
  };
1689
+ shouldDeferMeetingInfoFetch = type === _constants.DESTINATION_TYPE.LOCUS_ID && !(destination !== null && destination !== void 0 && destination.info);
1690
+ isOneOnOneCallLocus = type === _constants.DESTINATION_TYPE.LOCUS_ID && _util2.default.isOneOnOneCall(destination);
1624
1691
  if (!meetingInfo) {
1625
1692
  _context4.next = 2;
1626
1693
  break;
1627
1694
  }
1628
1695
  meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1629
- _context4.next = 4;
1696
+ _context4.next = 6;
1630
1697
  break;
1631
1698
  case 2:
1632
- if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL)) {
1633
- _context4.next = 4;
1699
+ if (!(type !== _constants.DESTINATION_TYPE.ONE_ON_ONE_CALL && !isOneOnOneCallLocus)) {
1700
+ _context4.next = 6;
1634
1701
  break;
1635
1702
  }
1636
1703
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
@@ -1641,37 +1708,46 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1641
1708
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1642
1709
  }, waitingTime);
1643
1710
  meeting.parseMeetingInfo(undefined, destination);
1644
- _context4.next = 4;
1711
+ _context4.next = 6;
1645
1712
  break;
1646
1713
  case 3:
1714
+ if (shouldDeferMeetingInfoFetch) {
1715
+ _context4.next = 5;
1716
+ break;
1717
+ }
1647
1718
  _context4.next = 4;
1648
1719
  return meeting.fetchMeetingInfo(meetingInfoOptions);
1649
1720
  case 4:
1650
- _context4.next = 8;
1721
+ _context4.next = 6;
1651
1722
  break;
1652
1723
  case 5:
1653
- _context4.prev = 5;
1724
+ _loggerProxy.default.logger.info('Meetings:index#createMeeting --> defer fetchMeetingInfo for incomplete locus, will do it after locus initialSetup');
1725
+ case 6:
1726
+ _context4.next = 10;
1727
+ break;
1728
+ case 7:
1729
+ _context4.prev = 7;
1654
1730
  _t2 = _context4["catch"](1);
1655
1731
  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;
1732
+ _context4.next = 9;
1657
1733
  break;
1658
1734
  }
1659
1735
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1660
1736
  if (!failOnMissingMeetingInfo) {
1661
- _context4.next = 6;
1737
+ _context4.next = 8;
1662
1738
  break;
1663
1739
  }
1664
1740
  _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1665
1741
  // @ts-ignore
1666
1742
  this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1667
1743
  throw new _noMeetingInfo.default();
1668
- case 6:
1744
+ case 8:
1669
1745
  // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1670
1746
  _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1671
- case 7:
1747
+ case 9:
1672
1748
  _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_t2, " fetching /meetingInfo for creation."));
1673
- case 8:
1674
- _context4.prev = 8;
1749
+ case 10:
1750
+ _context4.prev = 10;
1675
1751
  // For type LOCUS_ID we need to parse the locus object to get the information
1676
1752
  // about the caller and callee
1677
1753
  // Meeting Added event will be created in `handleLocusEvent`
@@ -1695,14 +1771,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1695
1771
  type: meetingAddedType
1696
1772
  });
1697
1773
  }
1698
- return _context4.finish(8);
1699
- case 9:
1774
+ return _context4.finish(10);
1775
+ case 11:
1700
1776
  return _context4.abrupt("return", meeting);
1701
- case 10:
1777
+ case 12:
1702
1778
  case "end":
1703
1779
  return _context4.stop();
1704
1780
  }
1705
- }, _callee4, this, [[1, 5, 8, 9]]);
1781
+ }, _callee4, this, [[1, 7, 10, 11]]);
1706
1782
  }));
1707
1783
  function createMeeting(_x4) {
1708
1784
  return _createMeeting.apply(this, arguments);
@@ -1737,7 +1813,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1737
1813
  }
1738
1814
 
1739
1815
  /**
1740
- * Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
1816
+ * Syncs all the meetings from server. For unverified guests it skips the getActiveMeetings() call
1817
+ * (which Locus rejects for them) and instead resyncs each meeting individually via LocusInfo#sync.
1741
1818
  * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
1742
1819
  * @returns {Promise<void>}
1743
1820
  * @public
@@ -1745,51 +1822,147 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1745
1822
  */
1746
1823
  }, {
1747
1824
  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
1825
+ value: (function () {
1826
+ var _syncMeetings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5() {
1827
+ var _this11 = this;
1828
+ var _ref5,
1829
+ _ref5$keepOnlyLocusMe,
1830
+ keepOnlyLocusMeetings,
1831
+ _ref5$skipHashTreeSyn,
1832
+ skipHashTreeSync,
1833
+ isUnverifiedGuest,
1834
+ locusArray,
1835
+ activeLocusUrl,
1836
+ lociToUpdate,
1837
+ meetingsCollection,
1838
+ _loop,
1839
+ _i,
1840
+ _Object$values,
1841
+ remainingMeetings,
1842
+ syncPromises,
1843
+ _i2,
1844
+ _arr,
1845
+ meeting,
1846
+ _args6 = arguments,
1847
+ _t3;
1848
+ return _regenerator.default.wrap(function (_context6) {
1849
+ while (1) switch (_context6.prev = _context6.next) {
1850
+ case 0:
1851
+ _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
1852
  // @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
- }
1853
+ isUnverifiedGuest = Boolean(this.webex.credentials.isUnverifiedGuest);
1854
+ if (!isUnverifiedGuest) {
1855
+ _context6.next = 1;
1856
+ break;
1857
+ }
1858
+ _loggerProxy.default.logger.info('Meetings:index#syncMeetings --> user is unverified guest, skipping calling Locus for meeting sync');
1792
1859
 
1860
+ // Locus rejects getActiveMeetings() for unverified guests, so the per-meeting sync below
1861
+ // (with canSyncClassicLocus enabled) resyncs each classic meeting individually instead.
1862
+ _context6.next = 7;
1863
+ break;
1864
+ case 1:
1865
+ _context6.prev = 1;
1866
+ _context6.next = 2;
1867
+ return this.request.getActiveMeetings();
1868
+ case 2:
1869
+ locusArray = _context6.sent;
1870
+ activeLocusUrl = [];
1871
+ if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1872
+ lociToUpdate = this.sortLocusArrayToUpdate(locusArray.loci);
1873
+ lociToUpdate.forEach(function (locus) {
1874
+ activeLocusUrl.push(locus.url);
1875
+ _this11.handleLocusEvent({
1876
+ eventType: _constants.LOCUSEVENT.SDK_LOCUS_FROM_SYNC_MEETINGS,
1877
+ locus: locus,
1878
+ locusUrl: locus.url
1879
+ });
1880
+ });
1881
+ }
1882
+ meetingsCollection = this.meetingCollection.getAll();
1883
+ if (!((0, _keys.default)(meetingsCollection).length > 0)) {
1884
+ _context6.next = 5;
1885
+ break;
1886
+ }
1887
+ _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
1888
+ var meeting, locusUrl, locusInfo, _locusInfo$info, _locusArray$loci, globalMeetingId;
1889
+ return _regenerator.default.wrap(function (_context5) {
1890
+ while (1) switch (_context5.prev = _context5.next) {
1891
+ case 0:
1892
+ meeting = _Object$values[_i];
1893
+ // @ts-ignore
1894
+ locusUrl = meeting.locusUrl, locusInfo = meeting.locusInfo;
1895
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1896
+ globalMeetingId = locusInfo === null || locusInfo === void 0 ? void 0 : (_locusInfo$info = locusInfo.info) === null || _locusInfo$info === void 0 ? void 0 : _locusInfo$info.globalMeetingId;
1897
+ if (globalMeetingId && locusArray !== null && locusArray !== void 0 && (_locusArray$loci = locusArray.loci) !== null && _locusArray$loci !== void 0 && _locusArray$loci.some(function (locus) {
1898
+ var _locus$info;
1899
+ return ((_locus$info = locus.info) === null || _locus$info === void 0 ? void 0 : _locus$info.globalMeetingId) === globalMeetingId;
1900
+ })) {
1901
+ // don't destroy the meeting as Locus API still returned some Locus that shares
1902
+ // the same globalMeetingId - that happens for example if a webinar user (who hasn't scheduled it)
1903
+ // is in a breakout and gets moved to a different breakout while we were offline
1904
+ } else {
1905
+ // destroy function also uploads logs
1906
+ // @ts-ignore
1907
+ _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1908
+ }
1909
+ }
1910
+ case 1:
1911
+ case "end":
1912
+ return _context5.stop();
1913
+ }
1914
+ }, _loop);
1915
+ });
1916
+ _i = 0, _Object$values = (0, _values.default)(meetingsCollection);
1917
+ case 3:
1918
+ if (!(_i < _Object$values.length)) {
1919
+ _context6.next = 5;
1920
+ break;
1921
+ }
1922
+ return _context6.delegateYield(_loop(), "t0", 4);
1923
+ case 4:
1924
+ _i++;
1925
+ _context6.next = 3;
1926
+ break;
1927
+ case 5:
1928
+ _context6.next = 7;
1929
+ break;
1930
+ case 6:
1931
+ _context6.prev = 6;
1932
+ _t3 = _context6["catch"](1);
1933
+ _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(_t3));
1934
+ throw _t3;
1935
+ case 7:
1936
+ // Resync each remaining meeting via LocusInfo#sync, which routes to hash tree or classic. For
1937
+ // signed-in users classic meetings were already synced above, so only the hash tree sync runs.
1938
+ remainingMeetings = this.meetingCollection.getAll();
1939
+ syncPromises = [];
1940
+ for (_i2 = 0, _arr = (0, _values.default)(remainingMeetings); _i2 < _arr.length; _i2++) {
1941
+ meeting = _arr[_i2];
1942
+ if (meeting.locusInfo) {
1943
+ syncPromises.push(meeting.locusInfo.sync(meeting, {
1944
+ canSyncClassicLocus: isUnverifiedGuest,
1945
+ canSyncHashTree: !skipHashTreeSync
1946
+ }));
1947
+ }
1948
+ }
1949
+ if (!(syncPromises.length > 0)) {
1950
+ _context6.next = 8;
1951
+ break;
1952
+ }
1953
+ _context6.next = 8;
1954
+ return _promise.default.all(syncPromises);
1955
+ case 8:
1956
+ case "end":
1957
+ return _context6.stop();
1958
+ }
1959
+ }, _callee5, this, [[1, 6]]);
1960
+ }));
1961
+ function syncMeetings() {
1962
+ return _syncMeetings.apply(this, arguments);
1963
+ }
1964
+ return syncMeetings;
1965
+ }()
1793
1966
  /**
1794
1967
  * sort out locus array for initial creating
1795
1968
  * @param {Array} loci original locus array
@@ -1797,6 +1970,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1797
1970
  * @public
1798
1971
  * @memberof Meetings
1799
1972
  */
1973
+ )
1800
1974
  }, {
1801
1975
  key: "sortLocusArrayToUpdate",
1802
1976
  value: function sortLocusArrayToUpdate(loci) {
@@ -1811,8 +1985,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1811
1985
  var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1812
1986
  breakoutLoci.forEach(function (breakoutLocus) {
1813
1987
  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);
1988
+ return _util2.default.isMainAssociatedWithBreakout(mainLocus, breakoutLocus);
1816
1989
  });
1817
1990
  var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1818
1991
  eventType: _constants.LOCUSEVENT.SDK_NO_EVENT,
@@ -1848,8 +2021,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1848
2021
  return;
1849
2022
  }
1850
2023
  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);
2024
+ return _util2.default.isMainAssociatedWithBreakout(newCreatedLocus, breakoutLocus);
1853
2025
  });
1854
2026
  if (existIndex < 0) {
1855
2027
  return;