@webex/plugin-meetings 2.60.0 → 2.60.1-next.10

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 (539) hide show
  1. package/README.md +58 -8
  2. package/dist/annotation/annotation.types.d.ts +42 -0
  3. package/dist/annotation/annotation.types.js +7 -0
  4. package/dist/annotation/annotation.types.js.map +1 -0
  5. package/dist/annotation/constants.d.ts +31 -0
  6. package/dist/annotation/constants.js +41 -0
  7. package/dist/annotation/constants.js.map +1 -0
  8. package/dist/annotation/index.d.ts +117 -0
  9. package/dist/annotation/index.js +357 -0
  10. package/dist/annotation/index.js.map +1 -0
  11. package/dist/breakouts/breakout.d.ts +8 -0
  12. package/dist/breakouts/breakout.js +215 -0
  13. package/dist/breakouts/breakout.js.map +1 -0
  14. package/dist/breakouts/collection.d.ts +5 -0
  15. package/dist/breakouts/collection.js +22 -0
  16. package/dist/breakouts/collection.js.map +1 -0
  17. package/dist/breakouts/edit-lock-error.d.ts +15 -0
  18. package/dist/breakouts/edit-lock-error.js +51 -0
  19. package/dist/breakouts/edit-lock-error.js.map +1 -0
  20. package/dist/breakouts/events.d.ts +8 -0
  21. package/dist/breakouts/events.js +44 -0
  22. package/dist/breakouts/events.js.map +1 -0
  23. package/dist/breakouts/index.d.ts +5 -0
  24. package/dist/breakouts/index.js +1047 -0
  25. package/dist/breakouts/index.js.map +1 -0
  26. package/dist/breakouts/request.d.ts +22 -0
  27. package/dist/breakouts/request.js +77 -0
  28. package/dist/breakouts/request.js.map +1 -0
  29. package/dist/breakouts/utils.d.ts +15 -0
  30. package/dist/breakouts/utils.js +64 -0
  31. package/dist/breakouts/utils.js.map +1 -0
  32. package/dist/common/browser-detection.js +2 -3
  33. package/dist/common/browser-detection.js.map +1 -1
  34. package/dist/common/collection.js +3 -4
  35. package/dist/common/collection.js.map +1 -1
  36. package/dist/common/config.js +1 -2
  37. package/dist/common/config.js.map +1 -1
  38. package/dist/common/errors/captcha-error.js +1 -2
  39. package/dist/common/errors/captcha-error.js.map +1 -1
  40. package/dist/common/errors/intent-to-join.js +1 -2
  41. package/dist/common/errors/intent-to-join.js.map +1 -1
  42. package/dist/common/errors/join-meeting.js +1 -2
  43. package/dist/common/errors/join-meeting.js.map +1 -1
  44. package/dist/common/errors/media.js +1 -2
  45. package/dist/common/errors/media.js.map +1 -1
  46. package/dist/common/errors/no-meeting-info.d.ts +14 -0
  47. package/dist/common/errors/no-meeting-info.js +50 -0
  48. package/dist/common/errors/no-meeting-info.js.map +1 -0
  49. package/dist/common/errors/parameter.js +3 -4
  50. package/dist/common/errors/parameter.js.map +1 -1
  51. package/dist/common/errors/password-error.js +1 -2
  52. package/dist/common/errors/password-error.js.map +1 -1
  53. package/dist/common/errors/permission.js +1 -2
  54. package/dist/common/errors/permission.js.map +1 -1
  55. package/dist/common/errors/{reclaim-host-role-error.js → reclaim-host-role-errors.js} +7 -11
  56. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  57. package/dist/common/errors/reconnection-in-progress.js +1 -2
  58. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  59. package/dist/common/errors/reconnection.js +1 -2
  60. package/dist/common/errors/reconnection.js.map +1 -1
  61. package/dist/common/errors/stats.js +1 -2
  62. package/dist/common/errors/stats.js.map +1 -1
  63. package/dist/common/errors/webex-errors.d.ts +20 -8
  64. package/dist/common/errors/webex-errors.js +48 -28
  65. package/dist/common/errors/webex-errors.js.map +1 -1
  66. package/dist/common/errors/webex-meetings-error.js +1 -2
  67. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  68. package/dist/common/events/events-scope.js +1 -2
  69. package/dist/common/events/events-scope.js.map +1 -1
  70. package/dist/common/events/events.js +1 -2
  71. package/dist/common/events/events.js.map +1 -1
  72. package/dist/common/events/trigger-proxy.js +1 -2
  73. package/dist/common/events/trigger-proxy.js.map +1 -1
  74. package/dist/common/events/util.js +1 -2
  75. package/dist/common/events/util.js.map +1 -1
  76. package/dist/common/logs/logger-config.js +1 -2
  77. package/dist/common/logs/logger-config.js.map +1 -1
  78. package/dist/common/logs/logger-proxy.js +2 -3
  79. package/dist/common/logs/logger-proxy.js.map +1 -1
  80. package/dist/common/logs/request.d.ts +3 -1
  81. package/dist/common/logs/request.js +8 -5
  82. package/dist/common/logs/request.js.map +1 -1
  83. package/dist/common/queue.d.ts +9 -7
  84. package/dist/common/queue.js +22 -9
  85. package/dist/common/queue.js.map +1 -1
  86. package/dist/config.d.ts +6 -7
  87. package/dist/config.js +8 -10
  88. package/dist/config.js.map +1 -1
  89. package/dist/constants.d.ts +234 -100
  90. package/dist/constants.js +433 -444
  91. package/dist/constants.js.map +1 -1
  92. package/dist/controls-options-manager/constants.js +3 -6
  93. package/dist/controls-options-manager/constants.js.map +1 -1
  94. package/dist/controls-options-manager/enums.d.ts +11 -1
  95. package/dist/controls-options-manager/enums.js +15 -6
  96. package/dist/controls-options-manager/enums.js.map +1 -1
  97. package/dist/controls-options-manager/index.d.ts +17 -1
  98. package/dist/controls-options-manager/index.js +127 -38
  99. package/dist/controls-options-manager/index.js.map +1 -1
  100. package/dist/controls-options-manager/types.d.ts +43 -0
  101. package/dist/controls-options-manager/types.js +7 -0
  102. package/dist/controls-options-manager/types.js.map +1 -0
  103. package/dist/controls-options-manager/util.d.ts +1 -7
  104. package/dist/controls-options-manager/util.js +309 -19
  105. package/dist/controls-options-manager/util.js.map +1 -1
  106. package/dist/index.d.ts +6 -3
  107. package/dist/index.js +121 -5
  108. package/dist/index.js.map +1 -1
  109. package/dist/interceptors/index.d.ts +2 -0
  110. package/dist/interceptors/index.js +15 -0
  111. package/dist/interceptors/index.js.map +1 -0
  112. package/dist/interceptors/locusRetry.d.ts +27 -0
  113. package/dist/interceptors/locusRetry.js +94 -0
  114. package/dist/interceptors/locusRetry.js.map +1 -0
  115. package/dist/interpretation/collection.d.ts +5 -0
  116. package/dist/interpretation/collection.js +22 -0
  117. package/dist/interpretation/collection.js.map +1 -0
  118. package/dist/interpretation/index.d.ts +5 -0
  119. package/dist/interpretation/index.js +365 -0
  120. package/dist/interpretation/index.js.map +1 -0
  121. package/dist/interpretation/siLanguage.d.ts +5 -0
  122. package/dist/interpretation/siLanguage.js +24 -0
  123. package/dist/interpretation/siLanguage.js.map +1 -0
  124. package/dist/locus-info/controlsUtils.js +100 -11
  125. package/dist/locus-info/controlsUtils.js.map +1 -1
  126. package/dist/locus-info/embeddedAppsUtils.js +3 -4
  127. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  128. package/dist/locus-info/fullState.js +1 -2
  129. package/dist/locus-info/fullState.js.map +1 -1
  130. package/dist/locus-info/hostUtils.js +1 -2
  131. package/dist/locus-info/hostUtils.js.map +1 -1
  132. package/dist/locus-info/index.d.ts +57 -4
  133. package/dist/locus-info/index.js +425 -84
  134. package/dist/locus-info/index.js.map +1 -1
  135. package/dist/locus-info/infoUtils.js +13 -5
  136. package/dist/locus-info/infoUtils.js.map +1 -1
  137. package/dist/locus-info/mediaSharesUtils.js +58 -3
  138. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  139. package/dist/locus-info/parser.d.ts +66 -6
  140. package/dist/locus-info/parser.js +253 -80
  141. package/dist/locus-info/parser.js.map +1 -1
  142. package/dist/locus-info/selfUtils.js +97 -13
  143. package/dist/locus-info/selfUtils.js.map +1 -1
  144. package/dist/media/index.d.ts +2 -0
  145. package/dist/media/index.js +107 -319
  146. package/dist/media/index.js.map +1 -1
  147. package/dist/media/properties.d.ts +38 -53
  148. package/dist/media/properties.js +96 -153
  149. package/dist/media/properties.js.map +1 -1
  150. package/dist/media/util.js +1 -22
  151. package/dist/media/util.js.map +1 -1
  152. package/dist/mediaQualityMetrics/config.d.ts +234 -230
  153. package/dist/mediaQualityMetrics/config.js +302 -498
  154. package/dist/mediaQualityMetrics/config.js.map +1 -1
  155. package/dist/meeting/in-meeting-actions.d.ts +88 -0
  156. package/dist/meeting/in-meeting-actions.js +94 -3
  157. package/dist/meeting/in-meeting-actions.js.map +1 -1
  158. package/dist/meeting/index.d.ts +705 -520
  159. package/dist/meeting/index.js +5047 -3089
  160. package/dist/meeting/index.js.map +1 -1
  161. package/dist/meeting/locusMediaRequest.d.ts +74 -0
  162. package/dist/meeting/locusMediaRequest.js +291 -0
  163. package/dist/meeting/locusMediaRequest.js.map +1 -0
  164. package/dist/meeting/muteState.d.ts +93 -25
  165. package/dist/meeting/muteState.js +224 -133
  166. package/dist/meeting/muteState.js.map +1 -1
  167. package/dist/meeting/request.d.ts +82 -47
  168. package/dist/meeting/request.js +304 -199
  169. package/dist/meeting/request.js.map +1 -1
  170. package/dist/meeting/request.type.d.ts +11 -0
  171. package/dist/meeting/request.type.js +7 -0
  172. package/dist/meeting/request.type.js.map +1 -0
  173. package/dist/meeting/state.js +1 -2
  174. package/dist/meeting/state.js.map +1 -1
  175. package/dist/meeting/util.d.ts +118 -1
  176. package/dist/meeting/util.js +676 -435
  177. package/dist/meeting/util.js.map +1 -1
  178. package/dist/meeting/voicea-meeting.d.ts +20 -0
  179. package/dist/meeting/voicea-meeting.js +201 -0
  180. package/dist/meeting/voicea-meeting.js.map +1 -0
  181. package/dist/meeting-info/collection.js +3 -4
  182. package/dist/meeting-info/collection.js.map +1 -1
  183. package/dist/meeting-info/index.d.ts +13 -1
  184. package/dist/meeting-info/index.js +74 -7
  185. package/dist/meeting-info/index.js.map +1 -1
  186. package/dist/meeting-info/meeting-info-v2.d.ts +31 -1
  187. package/dist/meeting-info/meeting-info-v2.js +200 -63
  188. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  189. package/dist/meeting-info/request.js +1 -2
  190. package/dist/meeting-info/request.js.map +1 -1
  191. package/dist/meeting-info/util.js +2 -3
  192. package/dist/meeting-info/util.js.map +1 -1
  193. package/dist/meeting-info/utilv2.js +39 -41
  194. package/dist/meeting-info/utilv2.js.map +1 -1
  195. package/dist/meetings/collection.d.ts +17 -0
  196. package/dist/meetings/collection.js +42 -4
  197. package/dist/meetings/collection.js.map +1 -1
  198. package/dist/meetings/index.d.ts +114 -20
  199. package/dist/meetings/index.js +540 -126
  200. package/dist/meetings/index.js.map +1 -1
  201. package/dist/meetings/meetings.types.d.ts +4 -0
  202. package/dist/meetings/meetings.types.js +7 -0
  203. package/dist/meetings/meetings.types.js.map +1 -0
  204. package/dist/meetings/request.js +4 -3
  205. package/dist/meetings/request.js.map +1 -1
  206. package/dist/meetings/util.js +107 -6
  207. package/dist/meetings/util.js.map +1 -1
  208. package/dist/member/index.d.ts +13 -1
  209. package/dist/member/index.js +45 -2
  210. package/dist/member/index.js.map +1 -1
  211. package/dist/member/member.types.js +3 -4
  212. package/dist/member/member.types.js.map +1 -1
  213. package/dist/member/types.d.ts +32 -0
  214. package/dist/member/types.js +23 -0
  215. package/dist/member/types.js.map +1 -0
  216. package/dist/member/util.js +120 -29
  217. package/dist/member/util.js.map +1 -1
  218. package/dist/members/collection.d.ts +5 -0
  219. package/dist/members/collection.js +11 -2
  220. package/dist/members/collection.js.map +1 -1
  221. package/dist/members/index.d.ts +56 -11
  222. package/dist/members/index.js +174 -47
  223. package/dist/members/index.js.map +1 -1
  224. package/dist/members/request.d.ts +67 -11
  225. package/dist/members/request.js +102 -54
  226. package/dist/members/request.js.map +1 -1
  227. package/dist/members/types.js +3 -4
  228. package/dist/members/types.js.map +1 -1
  229. package/dist/members/util.d.ts +214 -1
  230. package/dist/members/util.js +327 -284
  231. package/dist/members/util.js.map +1 -1
  232. package/dist/metrics/constants.d.ts +15 -6
  233. package/dist/metrics/constants.js +17 -9
  234. package/dist/metrics/constants.js.map +1 -1
  235. package/dist/metrics/index.d.ts +4 -111
  236. package/dist/metrics/index.js +4 -452
  237. package/dist/metrics/index.js.map +1 -1
  238. package/dist/multistream/mediaRequestManager.d.ts +118 -0
  239. package/dist/multistream/mediaRequestManager.js +344 -0
  240. package/dist/multistream/mediaRequestManager.js.map +1 -0
  241. package/dist/multistream/receiveSlot.d.ts +68 -0
  242. package/dist/multistream/receiveSlot.js +200 -0
  243. package/dist/multistream/receiveSlot.js.map +1 -0
  244. package/dist/multistream/receiveSlotManager.d.ts +56 -0
  245. package/dist/multistream/receiveSlotManager.js +174 -0
  246. package/dist/multistream/receiveSlotManager.js.map +1 -0
  247. package/dist/multistream/remoteMedia.d.ts +72 -0
  248. package/dist/multistream/remoteMedia.js +268 -0
  249. package/dist/multistream/remoteMedia.js.map +1 -0
  250. package/dist/multistream/remoteMediaGroup.d.ts +47 -0
  251. package/dist/multistream/remoteMediaGroup.js +267 -0
  252. package/dist/multistream/remoteMediaGroup.js.map +1 -0
  253. package/dist/multistream/remoteMediaManager.d.ts +285 -0
  254. package/dist/multistream/remoteMediaManager.js +1211 -0
  255. package/dist/multistream/remoteMediaManager.js.map +1 -0
  256. package/dist/multistream/sendSlotManager.d.ts +61 -0
  257. package/dist/multistream/sendSlotManager.js +236 -0
  258. package/dist/multistream/sendSlotManager.js.map +1 -0
  259. package/dist/networkQualityMonitor/index.js +5 -4
  260. package/dist/networkQualityMonitor/index.js.map +1 -1
  261. package/dist/personal-meeting-room/index.js +2 -3
  262. package/dist/personal-meeting-room/index.js.map +1 -1
  263. package/dist/personal-meeting-room/request.js +2 -3
  264. package/dist/personal-meeting-room/request.js.map +1 -1
  265. package/dist/personal-meeting-room/util.js +1 -2
  266. package/dist/personal-meeting-room/util.js.map +1 -1
  267. package/dist/reachability/clusterReachability.d.ts +109 -0
  268. package/dist/reachability/clusterReachability.js +357 -0
  269. package/dist/reachability/clusterReachability.js.map +1 -0
  270. package/dist/reachability/index.d.ts +61 -95
  271. package/dist/reachability/index.js +304 -392
  272. package/dist/reachability/index.js.map +1 -1
  273. package/dist/reachability/request.d.ts +7 -3
  274. package/dist/reachability/request.js +18 -10
  275. package/dist/reachability/request.js.map +1 -1
  276. package/dist/reachability/util.d.ts +8 -0
  277. package/dist/reachability/util.js +29 -0
  278. package/dist/reachability/util.js.map +1 -0
  279. package/dist/reactions/constants.d.ts +3 -0
  280. package/dist/reactions/constants.js +12 -0
  281. package/dist/reactions/constants.js.map +1 -0
  282. package/dist/reactions/reactions.d.ts +2 -2
  283. package/dist/reactions/reactions.js +4 -6
  284. package/dist/reactions/reactions.js.map +1 -1
  285. package/dist/reactions/reactions.type.d.ts +23 -3
  286. package/dist/reactions/reactions.type.js +21 -23
  287. package/dist/reactions/reactions.type.js.map +1 -1
  288. package/dist/reconnection-manager/index.d.ts +32 -8
  289. package/dist/reconnection-manager/index.js +285 -232
  290. package/dist/reconnection-manager/index.js.map +1 -1
  291. package/dist/recording-controller/enums.js +4 -5
  292. package/dist/recording-controller/enums.js.map +1 -1
  293. package/dist/recording-controller/index.d.ts +15 -1
  294. package/dist/recording-controller/index.js +57 -46
  295. package/dist/recording-controller/index.js.map +1 -1
  296. package/dist/recording-controller/util.d.ts +5 -4
  297. package/dist/recording-controller/util.js +10 -10
  298. package/dist/recording-controller/util.js.map +1 -1
  299. package/dist/roap/index.d.ts +9 -47
  300. package/dist/roap/index.js +100 -238
  301. package/dist/roap/index.js.map +1 -1
  302. package/dist/roap/request.d.ts +18 -12
  303. package/dist/roap/request.js +126 -180
  304. package/dist/roap/request.js.map +1 -1
  305. package/dist/roap/turnDiscovery.d.ts +27 -16
  306. package/dist/roap/turnDiscovery.js +115 -105
  307. package/dist/roap/turnDiscovery.js.map +1 -1
  308. package/dist/rtcMetrics/constants.d.ts +4 -0
  309. package/dist/rtcMetrics/constants.js +11 -0
  310. package/dist/rtcMetrics/constants.js.map +1 -0
  311. package/dist/rtcMetrics/index.d.ts +54 -0
  312. package/dist/rtcMetrics/index.js +140 -0
  313. package/dist/rtcMetrics/index.js.map +1 -0
  314. package/dist/statsAnalyzer/global.d.ts +1 -83
  315. package/dist/statsAnalyzer/global.js +2 -85
  316. package/dist/statsAnalyzer/global.js.map +1 -1
  317. package/dist/statsAnalyzer/index.d.ts +50 -30
  318. package/dist/statsAnalyzer/index.js +436 -511
  319. package/dist/statsAnalyzer/index.js.map +1 -1
  320. package/dist/statsAnalyzer/mqaUtil.d.ts +8 -6
  321. package/dist/statsAnalyzer/mqaUtil.js +130 -90
  322. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  323. package/dist/transcription/index.js +1 -2
  324. package/dist/transcription/index.js.map +1 -1
  325. package/dist/webinar/collection.d.ts +16 -0
  326. package/dist/webinar/collection.js +43 -0
  327. package/dist/webinar/collection.js.map +1 -0
  328. package/dist/webinar/index.d.ts +5 -0
  329. package/dist/webinar/index.js +68 -0
  330. package/dist/webinar/index.js.map +1 -0
  331. package/package.json +39 -26
  332. package/src/annotation/annotation.types.ts +50 -0
  333. package/src/annotation/constants.ts +36 -0
  334. package/src/annotation/index.ts +328 -0
  335. package/src/breakouts/README.md +220 -0
  336. package/src/breakouts/breakout.ts +188 -0
  337. package/src/breakouts/collection.ts +19 -0
  338. package/src/breakouts/edit-lock-error.ts +25 -0
  339. package/src/breakouts/events.ts +56 -0
  340. package/src/breakouts/index.ts +925 -0
  341. package/src/breakouts/request.ts +55 -0
  342. package/src/breakouts/utils.ts +57 -0
  343. package/src/common/errors/no-meeting-info.ts +24 -0
  344. package/src/common/errors/webex-errors.ts +36 -12
  345. package/src/common/logs/logger-proxy.ts +1 -1
  346. package/src/common/logs/request.ts +5 -1
  347. package/src/common/queue.ts +22 -8
  348. package/src/config.ts +6 -7
  349. package/src/constants.ts +265 -100
  350. package/src/controls-options-manager/enums.ts +12 -0
  351. package/src/controls-options-manager/index.ts +116 -21
  352. package/src/controls-options-manager/types.ts +59 -0
  353. package/src/controls-options-manager/util.ts +294 -14
  354. package/src/index.ts +44 -0
  355. package/src/interceptors/index.ts +3 -0
  356. package/src/interceptors/locusRetry.ts +67 -0
  357. package/src/interpretation/README.md +60 -0
  358. package/src/interpretation/collection.ts +19 -0
  359. package/src/interpretation/index.ts +332 -0
  360. package/src/interpretation/siLanguage.ts +18 -0
  361. package/src/locus-info/controlsUtils.ts +110 -0
  362. package/src/locus-info/index.ts +450 -61
  363. package/src/locus-info/infoUtils.ts +14 -2
  364. package/src/locus-info/mediaSharesUtils.ts +64 -0
  365. package/src/locus-info/parser.ts +258 -47
  366. package/src/locus-info/selfUtils.ts +85 -2
  367. package/src/media/index.ts +153 -370
  368. package/src/media/properties.ts +106 -136
  369. package/src/media/util.ts +0 -21
  370. package/src/mediaQualityMetrics/config.ts +244 -377
  371. package/src/meeting/in-meeting-actions.ts +176 -0
  372. package/src/meeting/index.ts +4306 -2581
  373. package/src/meeting/locusMediaRequest.ts +313 -0
  374. package/src/meeting/muteState.ts +224 -138
  375. package/src/meeting/request.ts +214 -127
  376. package/src/meeting/request.type.ts +13 -0
  377. package/src/meeting/util.ts +687 -423
  378. package/src/meeting/voicea-meeting.ts +161 -0
  379. package/src/meeting-info/index.ts +81 -8
  380. package/src/meeting-info/meeting-info-v2.ts +163 -13
  381. package/src/meeting-info/util.ts +1 -1
  382. package/src/meeting-info/utilv2.ts +28 -28
  383. package/src/meetings/collection.ts +33 -0
  384. package/src/meetings/index.ts +529 -127
  385. package/src/meetings/meetings.types.ts +12 -0
  386. package/src/meetings/request.ts +2 -0
  387. package/src/meetings/util.ts +116 -5
  388. package/src/member/index.ts +43 -1
  389. package/src/member/types.ts +38 -0
  390. package/src/member/util.ts +125 -28
  391. package/src/members/collection.ts +8 -0
  392. package/src/members/index.ts +187 -52
  393. package/src/members/request.ts +87 -27
  394. package/src/members/util.ts +332 -291
  395. package/src/metrics/constants.ts +15 -6
  396. package/src/metrics/index.ts +1 -471
  397. package/src/multistream/mediaRequestManager.ts +440 -0
  398. package/src/multistream/receiveSlot.ts +184 -0
  399. package/src/multistream/receiveSlotManager.ts +166 -0
  400. package/src/multistream/remoteMedia.ts +254 -0
  401. package/src/multistream/remoteMediaGroup.ts +284 -0
  402. package/src/multistream/remoteMediaManager.ts +1145 -0
  403. package/src/multistream/sendSlotManager.ts +170 -0
  404. package/src/networkQualityMonitor/index.ts +6 -6
  405. package/src/reachability/clusterReachability.ts +320 -0
  406. package/src/reachability/index.ts +246 -347
  407. package/src/reachability/request.ts +17 -8
  408. package/src/reachability/util.ts +24 -0
  409. package/src/reactions/constants.ts +4 -0
  410. package/src/reactions/reactions.ts +4 -4
  411. package/src/reactions/reactions.type.ts +30 -4
  412. package/src/reconnection-manager/index.ts +168 -156
  413. package/src/recording-controller/index.ts +20 -3
  414. package/src/recording-controller/util.ts +26 -9
  415. package/src/roap/index.ts +96 -241
  416. package/src/roap/request.ts +74 -148
  417. package/src/roap/turnDiscovery.ts +62 -56
  418. package/src/rtcMetrics/constants.ts +3 -0
  419. package/src/rtcMetrics/index.ts +124 -0
  420. package/src/statsAnalyzer/global.ts +1 -84
  421. package/src/statsAnalyzer/index.ts +479 -645
  422. package/src/statsAnalyzer/mqaUtil.ts +128 -126
  423. package/src/webinar/collection.ts +31 -0
  424. package/src/webinar/index.ts +62 -0
  425. package/test/integration/spec/converged-space-meetings.js +233 -0
  426. package/test/integration/spec/journey.js +320 -264
  427. package/test/integration/spec/space-meeting.js +77 -4
  428. package/test/unit/spec/annotation/index.ts +418 -0
  429. package/test/unit/spec/breakouts/breakout.ts +237 -0
  430. package/test/unit/spec/breakouts/collection.ts +15 -0
  431. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  432. package/test/unit/spec/breakouts/events.ts +89 -0
  433. package/test/unit/spec/breakouts/index.ts +1790 -0
  434. package/test/unit/spec/breakouts/request.ts +104 -0
  435. package/test/unit/spec/breakouts/utils.js +72 -0
  436. package/test/unit/spec/common/queue.js +31 -2
  437. package/test/unit/spec/controls-options-manager/index.js +163 -0
  438. package/test/unit/spec/controls-options-manager/util.js +576 -60
  439. package/test/unit/spec/fixture/locus.js +1 -0
  440. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  441. package/test/unit/spec/interpretation/collection.ts +15 -0
  442. package/test/unit/spec/interpretation/index.ts +589 -0
  443. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  444. package/test/unit/spec/locus-info/controlsUtils.js +323 -30
  445. package/test/unit/spec/locus-info/index.js +1438 -16
  446. package/test/unit/spec/locus-info/infoUtils.js +54 -16
  447. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  448. package/test/unit/spec/locus-info/lib/selfConstant.js +48 -0
  449. package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
  450. package/test/unit/spec/locus-info/parser.js +116 -35
  451. package/test/unit/spec/locus-info/selfUtils.js +275 -0
  452. package/test/unit/spec/media/index.ts +290 -0
  453. package/test/unit/spec/media/properties.ts +75 -84
  454. package/test/unit/spec/meeting/in-meeting-actions.ts +86 -0
  455. package/test/unit/spec/meeting/index.js +8886 -2815
  456. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  457. package/test/unit/spec/meeting/muteState.js +409 -213
  458. package/test/unit/spec/meeting/request.js +523 -43
  459. package/test/unit/spec/meeting/utils.js +834 -24
  460. package/test/unit/spec/meeting-info/index.js +300 -0
  461. package/test/unit/spec/meeting-info/meetinginfov2.js +527 -5
  462. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  463. package/test/unit/spec/meetings/collection.js +26 -0
  464. package/test/unit/spec/meetings/index.js +1446 -217
  465. package/test/unit/spec/meetings/utils.js +202 -2
  466. package/test/unit/spec/member/index.js +32 -9
  467. package/test/unit/spec/member/util.js +499 -61
  468. package/test/unit/spec/members/index.js +394 -5
  469. package/test/unit/spec/members/request.js +206 -27
  470. package/test/unit/spec/members/utils.js +173 -38
  471. package/test/unit/spec/metrics/index.js +1 -50
  472. package/test/unit/spec/multistream/mediaRequestManager.ts +1418 -0
  473. package/test/unit/spec/multistream/receiveSlot.ts +163 -0
  474. package/test/unit/spec/multistream/receiveSlotManager.ts +203 -0
  475. package/test/unit/spec/multistream/remoteMedia.ts +255 -0
  476. package/test/unit/spec/multistream/remoteMediaGroup.ts +662 -0
  477. package/test/unit/spec/multistream/remoteMediaManager.ts +1924 -0
  478. package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
  479. package/test/unit/spec/networkQualityMonitor/index.js +4 -4
  480. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  481. package/test/unit/spec/reachability/index.ts +532 -24
  482. package/test/unit/spec/reachability/request.js +68 -0
  483. package/test/unit/spec/reachability/util.ts +40 -0
  484. package/test/unit/spec/reconnection-manager/index.js +163 -24
  485. package/test/unit/spec/recording-controller/index.js +293 -218
  486. package/test/unit/spec/recording-controller/util.js +223 -96
  487. package/test/unit/spec/roap/index.ts +187 -77
  488. package/test/unit/spec/roap/request.ts +255 -0
  489. package/test/unit/spec/roap/turnDiscovery.ts +86 -48
  490. package/test/unit/spec/rtcMetrics/index.ts +93 -0
  491. package/test/unit/spec/stats-analyzer/index.js +644 -165
  492. package/test/unit/spec/webinar/collection.ts +13 -0
  493. package/test/unit/spec/webinar/index.ts +60 -0
  494. package/test/utils/constants.js +9 -0
  495. package/test/utils/integrationTestUtils.js +46 -0
  496. package/test/utils/testUtils.js +0 -45
  497. package/test/utils/webex-config.js +4 -0
  498. package/test/utils/webex-test-users.js +7 -3
  499. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  500. package/dist/meeting/effectsState.d.ts +0 -42
  501. package/dist/meeting/effectsState.js +0 -260
  502. package/dist/meeting/effectsState.js.map +0 -1
  503. package/dist/metrics/config.d.ts +0 -169
  504. package/dist/metrics/config.js +0 -289
  505. package/dist/metrics/config.js.map +0 -1
  506. package/dist/peer-connection-manager/index.d.ts +0 -6
  507. package/dist/peer-connection-manager/index.js +0 -671
  508. package/dist/peer-connection-manager/index.js.map +0 -1
  509. package/dist/peer-connection-manager/util.d.ts +0 -6
  510. package/dist/peer-connection-manager/util.js +0 -110
  511. package/dist/peer-connection-manager/util.js.map +0 -1
  512. package/dist/roap/collection.d.ts +0 -10
  513. package/dist/roap/collection.js +0 -63
  514. package/dist/roap/collection.js.map +0 -1
  515. package/dist/roap/handler.d.ts +0 -47
  516. package/dist/roap/handler.js +0 -279
  517. package/dist/roap/handler.js.map +0 -1
  518. package/dist/roap/state.d.ts +0 -9
  519. package/dist/roap/state.js +0 -127
  520. package/dist/roap/state.js.map +0 -1
  521. package/dist/roap/util.d.ts +0 -2
  522. package/dist/roap/util.js +0 -76
  523. package/dist/roap/util.js.map +0 -1
  524. package/src/index.js +0 -15
  525. package/src/meeting/effectsState.ts +0 -209
  526. package/src/metrics/config.ts +0 -485
  527. package/src/peer-connection-manager/index.ts +0 -847
  528. package/src/peer-connection-manager/util.ts +0 -119
  529. package/src/roap/collection.ts +0 -62
  530. package/src/roap/handler.ts +0 -294
  531. package/src/roap/state.ts +0 -156
  532. package/src/roap/util.ts +0 -100
  533. package/test/unit/spec/meeting/effectsState.js +0 -281
  534. package/test/unit/spec/peerconnection-manager/index.js +0 -218
  535. package/test/unit/spec/peerconnection-manager/utils.js +0 -49
  536. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -388
  537. package/test/unit/spec/roap/util.js +0 -30
  538. /package/dist/common/errors/{reclaim-host-role-error.d.ts → reclaim-host-role-errors.d.ts} +0 -0
  539. /package/src/common/errors/{reclaim-host-role-error.ts → reclaim-host-role-errors.ts} +0 -0
@@ -1,32 +1,43 @@
1
1
  "use strict";
2
2
 
3
+ var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
3
4
  var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
5
+ var _Object$keys2 = require("@babel/runtime-corejs2/core-js/object/keys");
6
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
7
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
8
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
9
+ var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
4
10
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
11
+ var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
5
12
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
6
13
  _Object$defineProperty(exports, "__esModule", {
7
14
  value: true
8
15
  });
9
16
  exports.default = void 0;
10
- var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
11
17
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
12
18
  var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
13
19
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
14
20
  var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
21
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
22
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
15
23
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
16
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
17
- var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
18
24
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
19
25
  var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
20
26
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
21
27
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
22
28
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
29
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
30
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
23
31
  require("@webex/internal-plugin-mercury");
32
+ require("@webex/internal-plugin-conversation");
33
+ require("@webex/internal-plugin-metrics");
24
34
  var _webexCore = require("@webex/webex-core");
35
+ var _internalMediaCore = require("@webex/internal-media-core");
36
+ var mediaHelpersModule = _interopRequireWildcard(require("@webex/media-helpers"));
25
37
  require("webrtc-adapter");
26
38
  var _metrics = _interopRequireDefault(require("../metrics"));
27
- var _config = require("../metrics/config");
28
39
  var _loggerConfig = _interopRequireDefault(require("../common/logs/logger-config"));
29
- var _config2 = _interopRequireDefault(require("../common/config"));
40
+ var _config = _interopRequireDefault(require("../common/config"));
30
41
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
31
42
  var _request = _interopRequireDefault(require("../common/logs/request"));
32
43
  var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
@@ -44,8 +55,59 @@ var _passwordError = _interopRequireDefault(require("../common/errors/password-e
44
55
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
45
56
  var _collection = _interopRequireDefault(require("./collection"));
46
57
  var _util2 = _interopRequireDefault(require("./util"));
58
+ var _permission = _interopRequireDefault(require("../common/errors/permission"));
59
+ var _webexErrors = require("../common/errors/webex-errors");
60
+ var _noMeetingInfo = _interopRequireDefault(require("../common/errors/no-meeting-info"));
61
+ function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
62
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
63
+ 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; }
64
+ 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; }
47
65
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
48
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
66
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint no-shadow: ["error", { "allow": ["eventType"] }] */ // @ts-ignore
67
+ var mediaLogger;
68
+ var MediaLogger = /*#__PURE__*/function () {
69
+ function MediaLogger() {
70
+ (0, _classCallCheck2.default)(this, MediaLogger);
71
+ }
72
+ (0, _createClass2.default)(MediaLogger, [{
73
+ key: "info",
74
+ value: function info() {
75
+ var _LoggerProxy$logger;
76
+ (_LoggerProxy$logger = _loggerProxy.default.logger).info.apply(_LoggerProxy$logger, arguments);
77
+ }
78
+ }, {
79
+ key: "log",
80
+ value: function log() {
81
+ var _LoggerProxy$logger2;
82
+ (_LoggerProxy$logger2 = _loggerProxy.default.logger).log.apply(_LoggerProxy$logger2, arguments);
83
+ }
84
+ }, {
85
+ key: "error",
86
+ value: function error() {
87
+ var _LoggerProxy$logger3;
88
+ (_LoggerProxy$logger3 = _loggerProxy.default.logger).error.apply(_LoggerProxy$logger3, arguments);
89
+ }
90
+ }, {
91
+ key: "warn",
92
+ value: function warn() {
93
+ var _LoggerProxy$logger4;
94
+ (_LoggerProxy$logger4 = _loggerProxy.default.logger).warn.apply(_LoggerProxy$logger4, arguments);
95
+ }
96
+ }, {
97
+ key: "trace",
98
+ value: function trace() {
99
+ var _LoggerProxy$logger5;
100
+ (_LoggerProxy$logger5 = _loggerProxy.default.logger).trace.apply(_LoggerProxy$logger5, arguments);
101
+ }
102
+ }, {
103
+ key: "debug",
104
+ value: function debug() {
105
+ var _LoggerProxy$logger6;
106
+ (_LoggerProxy$logger6 = _loggerProxy.default.logger).debug.apply(_LoggerProxy$logger6, arguments);
107
+ }
108
+ }]);
109
+ return MediaLogger;
110
+ }();
49
111
  /**
50
112
  * Meetings Ready Event
51
113
  * Emitted when the meetings instance on webex is ready
@@ -93,7 +155,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
93
155
  * Maintain a cache of meetings and sync with services.
94
156
  * @class
95
157
  */
96
- var Meetings = /*#__PURE__*/function (_WebexPlugin) {
158
+ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
97
159
  (0, _inherits2.default)(Meetings, _WebexPlugin);
98
160
  var _super = _createSuper(Meetings);
99
161
  /**
@@ -111,13 +173,14 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
111
173
  _this = _super.call.apply(_super, [this].concat(args));
112
174
 
113
175
  /**
114
- * The Meetings request to interact with server
176
+ * The webrtc-core media helpers. This is a temporary solution required for the SDK sample app
177
+ * to be able to call media helper functions.
178
+ *
115
179
  * @instance
116
180
  * @type {Object}
117
181
  * @private
118
182
  * @memberof Meetings
119
183
  */
120
- // @ts-ignore
121
184
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "loggerRequest", void 0);
122
185
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "media", void 0);
123
186
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingCollection", void 0);
@@ -128,7 +191,77 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
128
191
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "request", void 0);
129
192
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "geoHintInfo", void 0);
130
193
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingInfo", void 0);
194
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaHelpers", void 0);
195
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "breakoutLocusForHandleLater", void 0);
131
196
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _constants.MEETINGS);
197
+ /**
198
+ * Creates a noise reduction effect
199
+ *
200
+ * @param {INoiseReductionEffect} options optional custom effect options
201
+ * @returns {Promise<effect>} noise reduction effect.
202
+ * @public
203
+ * @memberof Meetings
204
+ */
205
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createNoiseReductionEffect", /*#__PURE__*/function () {
206
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {
207
+ var authToken;
208
+ return _regenerator.default.wrap(function _callee$(_context) {
209
+ while (1) switch (_context.prev = _context.next) {
210
+ case 0:
211
+ // @ts-ignore
212
+ authToken = _this.webex.credentials.supertoken.access_token;
213
+ return _context.abrupt("return", new mediaHelpersModule.NoiseReductionEffect(_objectSpread({
214
+ authToken: authToken
215
+ }, options)));
216
+ case 2:
217
+ case "end":
218
+ return _context.stop();
219
+ }
220
+ }, _callee);
221
+ }));
222
+ return function (_x) {
223
+ return _ref.apply(this, arguments);
224
+ };
225
+ }());
226
+ /**
227
+ * Creates a virtual background effect
228
+ *
229
+ * @param {IVirtualBackgroundEffect} options optional custom effect options
230
+ * @returns {Promise<effect>} virtual background effect.
231
+ * @public
232
+ * @memberof Meetings
233
+ */
234
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "createVirtualBackgroundEffect", /*#__PURE__*/function () {
235
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
236
+ var authToken;
237
+ return _regenerator.default.wrap(function _callee2$(_context2) {
238
+ while (1) switch (_context2.prev = _context2.next) {
239
+ case 0:
240
+ // @ts-ignore
241
+ authToken = _this.webex.credentials.supertoken.access_token;
242
+ return _context2.abrupt("return", new mediaHelpersModule.VirtualBackgroundEffect(_objectSpread({
243
+ authToken: authToken
244
+ }, options)));
245
+ case 2:
246
+ case "end":
247
+ return _context2.stop();
248
+ }
249
+ }, _callee2);
250
+ }));
251
+ return function (_x2) {
252
+ return _ref2.apply(this, arguments);
253
+ };
254
+ }());
255
+ _this.mediaHelpers = mediaHelpersModule;
256
+
257
+ /**
258
+ * The Meetings request to interact with server
259
+ * @instance
260
+ * @type {Object}
261
+ * @private
262
+ * @memberof Meetings
263
+ */
264
+ // @ts-ignore
132
265
  _this.request = new _request2.default({}, {
133
266
  parent: _this.webex
134
267
  });
@@ -152,15 +285,17 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
152
285
  * @memberof Meetings
153
286
  */
154
287
  _this.personalMeetingRoom = null;
288
+
155
289
  /**
156
- * The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
290
+ * The Reachability object to interact with server
157
291
  * starts as null
158
292
  * @instance
159
293
  * @type {Object}
160
294
  * @private
161
295
  * @memberof Meetings
162
296
  */
163
- _this.reachability = null;
297
+ // @ts-ignore
298
+ _this.reachability = new _reachability.default(_this.webex);
164
299
 
165
300
  /**
166
301
  * If the meetings plugin has been registered and listening via {@link Meetings#register}
@@ -189,50 +324,152 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
189
324
  * @memberof Meetings
190
325
  */
191
326
  _this.media = {
192
- getUserMedia: _media.default.getUserMedia,
193
- getSupportedDevice: _media.default.getSupportedDevice
327
+ getUserMedia: _media.default.getUserMedia
194
328
  };
195
329
  _this.onReady();
196
330
  return _this;
197
331
  }
198
332
 
199
333
  /**
200
- * handle locus events and takes meeting actions with them as they come in
201
- * @param {Object} data a locus event
202
- * @param {String} data.locusUrl
203
- * @param {Object} data.locus
204
- * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
205
- * @param {String} data.eventType
206
- * @returns {undefined}
334
+ * check whether you need to handle this main session's locus data or not
335
+ * @param {Object} meeting current meeting data
336
+ * @param {Object} newLocus new locus data
337
+ * @returns {boolean}
207
338
  * @private
208
339
  * @memberof Meetings
209
340
  */
210
341
  (0, _createClass2.default)(Meetings, [{
211
- key: "handleLocusEvent",
212
- value: function handleLocusEvent(data) {
213
- var _data$locus$info,
214
- _data$locus,
215
- _data$locus$replaces,
216
- _this2 = this;
217
- var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
218
- var meeting = null;
342
+ key: "isNeedHandleMainLocus",
343
+ value: function isNeedHandleMainLocus(meeting, newLocus) {
344
+ var _newLocus$controls, _newLocus$controls$br, _newLocus$self, _newLocus$self2, _newLocus$self3, _breakoutLocus$joined, _newLocus$self4;
345
+ 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;
346
+ var breakoutLocus = this.meetingCollection.getActiveBreakoutLocus(breakoutUrl);
347
+ 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_;
348
+ 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_;
349
+ // @ts-ignore
350
+ var deviceFromNewLocus = _util2.default.getThisDevice(newLocus, this.webex.internal.device.url);
351
+ var isResourceMovedOnThisDevice = (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.state) === _constants._LEFT_ && (deviceFromNewLocus === null || deviceFromNewLocus === void 0 ? void 0 : deviceFromNewLocus.reason) === _constants._MOVED_;
352
+ var isNewLocusJoinThisDevice = _util2.default.joinedOnThisDevice(meeting, newLocus,
353
+ // @ts-ignore
354
+ this.webex.internal.device.url);
355
+ var isBreakoutLocusJoinThisDevice = (breakoutLocus === null || breakoutLocus === void 0 ? void 0 : (_breakoutLocus$joined = breakoutLocus.joinedWith) === null || _breakoutLocus$joined === void 0 ? void 0 : _breakoutLocus$joined.correlationId) && breakoutLocus.joinedWith.correlationId === (meeting === null || meeting === void 0 ? void 0 : meeting.correlationId);
356
+ if (isSelfJoined && isNewLocusJoinThisDevice) {
357
+ _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self this device shown as JOINED in the main session');
358
+ if (breakoutLocus !== null && breakoutLocus !== void 0 && breakoutLocus.joinedWith && deviceFromNewLocus) {
359
+ var _breakoutLocus$joined2, _deviceFromNewLocus$r;
360
+ var breakoutReplaceAt = ((_breakoutLocus$joined2 = breakoutLocus.joinedWith.replaces) === null || _breakoutLocus$joined2 === void 0 ? void 0 : _breakoutLocus$joined2.length) > 0 ? breakoutLocus.joinedWith.replaces[0].replaceAt : '';
361
+ var newLocusReplaceAt = ((_deviceFromNewLocus$r = deviceFromNewLocus.replaces) === null || _deviceFromNewLocus$r === void 0 ? void 0 : _deviceFromNewLocus$r.length) > 0 ? deviceFromNewLocus.replaces[0].replaceAt : '';
362
+ if (breakoutReplaceAt && newLocusReplaceAt && breakoutReplaceAt > newLocusReplaceAt) {
363
+ _loggerProxy.default.logger.log("Meetings:index#isNeedHandleMainLocus --> this is expired main joined status locus_dto replacedAt ".concat(newLocusReplaceAt, " bo replacedAt ").concat(breakoutReplaceAt));
364
+ return false;
365
+ }
366
+ }
367
+ return true;
368
+ }
369
+ if (isBreakoutLocusJoinThisDevice) {
370
+ _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));
371
+ return false;
372
+ }
373
+ if (isSelfMoved && (newLocus !== null && newLocus !== void 0 && (_newLocus$self4 = newLocus.self) !== null && _newLocus$self4 !== void 0 && _newLocus$self4.removed || isResourceMovedOnThisDevice)) {
374
+ _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self moved main locus with self removed status or with device resource moved, not need to handle');
375
+ return false;
376
+ }
377
+ if (isSelfJoined && isResourceMovedOnThisDevice) {
378
+ _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> self device left&moved in main locus with self joined status, not need to handle');
379
+ return false;
380
+ }
381
+ _loggerProxy.default.logger.log('Meetings:index#isNeedHandleMainLocus --> this is a normal main session locusDTO update case');
382
+ return true;
383
+ }
219
384
 
385
+ /**
386
+ * check whether you need to handle this locus data or not
387
+ * @param {Object} meeting old locus data
388
+ * @param {Object} newLocus new locus data
389
+ * @returns {boolean}
390
+ * @private
391
+ * @memberof Meetings
392
+ */
393
+ }, {
394
+ key: "isNeedHandleLocusDTO",
395
+ value: function isNeedHandleLocusDTO(meeting, newLocus) {
396
+ if (newLocus) {
397
+ var _newLocus$self5, _newLocus$self6;
398
+ var isNewLocusAsBreakout = _util2.default.isBreakoutLocusDTO(newLocus);
399
+ 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_;
400
+ if (!meeting) {
401
+ if (isNewLocusAsBreakout) {
402
+ var _newLocus$fullState, _newLocus$self7;
403
+ _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));
404
+ return ((_newLocus$self7 = newLocus.self) === null || _newLocus$self7 === void 0 ? void 0 : _newLocus$self7.state) === _constants._JOINED_;
405
+ }
406
+ return this.isNeedHandleMainLocus(meeting, newLocus);
407
+ }
408
+ if (!isNewLocusAsBreakout) {
409
+ return this.isNeedHandleMainLocus(meeting, newLocus);
410
+ }
411
+ return !isSelfMoved;
412
+ }
413
+ return true;
414
+ }
415
+
416
+ /**
417
+ * get corresponding meeting object by locus data
418
+ * @param {Object} data a locus event
419
+ * @param {String} data.locusUrl
420
+ * @param {Object} data.locus
421
+ * @returns {Object}
422
+ * @private
423
+ * @memberof Meetings
424
+ */
425
+ }, {
426
+ key: "getCorrespondingMeetingByLocus",
427
+ value: function getCorrespondingMeetingByLocus(data) {
428
+ var _data$locus$info, _data$locus, _data$locus$info2;
220
429
  // getting meeting by correlationId. This will happen for the new event
221
430
  // Either the locus
222
431
  // TODO : Add check for the callBack Address
223
- meeting = this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locusUrl) ||
432
+ return this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locusUrl) ||
224
433
  // @ts-ignore
225
434
  this.meetingCollection.getByKey(_constants.CORRELATION_ID,
226
435
  // @ts-ignore
227
- _util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_constants.SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) || ((_data$locus$info = data.locus.info) !== null && _data$locus$info !== void 0 && _data$locus$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_constants.CONVERSATION_URL, data.locus.conversationUrl));
436
+ _util2.default.checkForCorrelationId(this.webex.internal.device.url, data.locus)) || this.meetingCollection.getByKey(_constants.SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) || ((_data$locus$info = data.locus.info) !== null && _data$locus$info !== void 0 && _data$locus$info.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(_constants.CONVERSATION_URL, data.locus.conversationUrl)) || this.meetingCollection.getByKey(_constants.MEETINGNUMBER, (_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$info2 = _data$locus.info) === null || _data$locus$info2 === void 0 ? void 0 : _data$locus$info2.webExMeetingId);
437
+ }
438
+
439
+ /**
440
+ * handle locus events and takes meeting actions with them as they come in
441
+ * @param {Object} data a locus event
442
+ * @param {String} data.locusUrl
443
+ * @param {Object} data.locus
444
+ * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
445
+ * @param {String} data.eventType
446
+ * @returns {undefined}
447
+ * @private
448
+ * @memberof Meetings
449
+ */
450
+ }, {
451
+ key: "handleLocusEvent",
452
+ value: function handleLocusEvent(data) {
453
+ var _data$locus2,
454
+ _data$locus2$replaces,
455
+ _this2 = this;
456
+ var useRandomDelayForInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
457
+ var meeting = this.getCorrespondingMeetingByLocus(data);
228
458
 
229
459
  // Special case when locus has got replaced, This only happend once if a replace locus exists
230
460
  // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
231
461
 
232
- if (!meeting && ((_data$locus = data.locus) === null || _data$locus === void 0 ? void 0 : (_data$locus$replaces = _data$locus.replaces) === null || _data$locus$replaces === void 0 ? void 0 : _data$locus$replaces.length) > 0) {
462
+ if (!meeting && ((_data$locus2 = data.locus) === null || _data$locus2 === void 0 ? void 0 : (_data$locus2$replaces = _data$locus2.replaces) === null || _data$locus2$replaces === void 0 ? void 0 : _data$locus2$replaces.length) > 0) {
233
463
  // Always the last element in the replace is the active one
234
464
  meeting = this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
235
465
  }
466
+ if (meeting && !_util2.default.isBreakoutLocusDTO(data.locus)) {
467
+ meeting.locusInfo.updateMainSessionLocusCache(data.locus);
468
+ }
469
+ if (!this.isNeedHandleLocusDTO(meeting, data.locus)) {
470
+ _loggerProxy.default.logger.log("Meetings:index#handleLocusEvent --> doesn't need to process locus event");
471
+ return;
472
+ }
236
473
  if (!meeting) {
237
474
  // TODO: create meeting when we get a meeting object
238
475
  // const checkForEnded = (locus) => {
@@ -272,6 +509,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
272
509
 
273
510
  // It's a new meeting so initialize the locus data
274
511
  meeting.locusInfo.initialSetup(data.locus);
512
+ _this2.checkHandleBreakoutLocus(data.locus);
275
513
  }).catch(function (e) {
276
514
  _loggerProxy.default.logger.error(e);
277
515
  }).finally(function () {
@@ -279,11 +517,14 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
279
517
  // because the other user left so before sending 'added' event make sure it exists in the collection
280
518
 
281
519
  if (_this2.getMeetingByType(_constants._ID_, meeting.id)) {
282
- _metrics.default.postEvent({
283
- event: _config.eventType.REMOTE_STARTED,
284
- meeting: meeting,
285
- data: {
286
- trigger: _config.trigger.MERCURY_EVENT
520
+ // @ts-ignore
521
+ _this2.webex.internal.newMetrics.submitClientEvent({
522
+ name: 'client.call.remote-started',
523
+ payload: {
524
+ trigger: 'mercury-event'
525
+ },
526
+ options: {
527
+ meetingId: meeting.id
287
528
  }
288
529
  });
289
530
  _triggerProxy.default.trigger(_this2, {
@@ -359,7 +600,9 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
359
600
 
360
601
  // @ts-ignore
361
602
  this.webex.internal.mercury.on(_constants.ONLINE, function () {
362
- _this3.syncMeetings();
603
+ _this3.syncMeetings({
604
+ keepOnlyLocusMeetings: false
605
+ });
363
606
  });
364
607
 
365
608
  // @ts-ignore
@@ -397,11 +640,13 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
397
640
  // @ts-ignore
398
641
  this.webex.once(_constants.READY, function () {
399
642
  // @ts-ignore
400
- _config2.default.set(_this4.config);
643
+ _config.default.set(_this4.config);
401
644
  // @ts-ignore
402
645
  _loggerConfig.default.set(_this4.config.logging);
403
646
  // @ts-ignore
404
647
  _loggerProxy.default.set(_this4.webex.logger);
648
+ mediaLogger = new MediaLogger();
649
+ (0, _internalMediaCore.setLogger)(mediaLogger);
405
650
 
406
651
  /**
407
652
  * The MeetingInfo object to interact with server
@@ -432,7 +677,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
432
677
  disableNotifications: true
433
678
  });
434
679
  // @ts-ignore
435
- _metrics.default.initialSetup(_this4.meetingCollection, _this4.webex);
680
+ _metrics.default.initialSetup(_this4.webex);
436
681
  });
437
682
  }
438
683
 
@@ -460,40 +705,43 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
460
705
  }
461
706
 
462
707
  /**
463
- * API to enable or disable TURN discovery
464
- * @param {Boolean} enable
708
+ * API to toggle starting adhoc meeting
709
+ * @param {Boolean} changeState
465
710
  * @private
466
711
  * @memberof Meetings
467
712
  * @returns {undefined}
468
713
  */
469
714
  }, {
470
- key: "_toggleTurnDiscovery",
471
- value: function _toggleTurnDiscovery(enable) {
472
- if (typeof enable !== 'boolean') {
715
+ key: "_toggleAdhocMeetings",
716
+ value: function _toggleAdhocMeetings(changeState) {
717
+ var _this$config2, _this$config2$experim;
718
+ if (typeof changeState !== 'boolean') {
473
719
  return;
474
720
  }
475
721
  // @ts-ignore
476
- this.config.experimental.enableTurnDiscovery = enable;
722
+ if (((_this$config2 = this.config) === null || _this$config2 === void 0 ? void 0 : (_this$config2$experim = _this$config2.experimental) === null || _this$config2$experim === void 0 ? void 0 : _this$config2$experim.enableAdhocMeetings) !== changeState) {
723
+ // @ts-ignore
724
+ this.config.experimental.enableAdhocMeetings = changeState;
725
+ }
477
726
  }
478
727
 
479
728
  /**
480
- * API to toggle starting adhoc meeting
481
- * @param {Boolean} changeState
729
+ * API to toggle TCP reachability, needs to be called before webex.meetings.register()
730
+ * @param {Boolean} newValue
482
731
  * @private
483
732
  * @memberof Meetings
484
733
  * @returns {undefined}
485
734
  */
486
735
  }, {
487
- key: "_toggleAdhocMeetings",
488
- value: function _toggleAdhocMeetings(changeState) {
489
- var _this$config2, _this$config2$experim;
490
- if (typeof changeState !== 'boolean') {
736
+ key: "_toggleTcpReachability",
737
+ value: function _toggleTcpReachability(newValue) {
738
+ if (typeof newValue !== 'boolean') {
491
739
  return;
492
740
  }
493
741
  // @ts-ignore
494
- if (((_this$config2 = this.config) === null || _this$config2 === void 0 ? void 0 : (_this$config2$experim = _this$config2.experimental) === null || _this$config2$experim === void 0 ? void 0 : _this$config2$experim.enableAdhocMeetings) !== changeState) {
742
+ if (this.config.experimental.enableTcpReachability !== newValue) {
495
743
  // @ts-ignore
496
- this.config.experimental.enableAdhocMeetings = changeState;
744
+ this.config.experimental.enableTcpReachability = newValue;
497
745
  }
498
746
  }
499
747
 
@@ -581,7 +829,9 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
581
829
  })
582
830
  );
583
831
  }
584
-
832
+ }, {
833
+ key: "uploadLogs",
834
+ value:
585
835
  /**
586
836
  * Uploads logs to the webex services for tracking
587
837
  * @param {Object} [options={}]
@@ -594,14 +844,13 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
594
844
  * @param {String} [options.orgId] org id
595
845
  * @returns {String} feedback ID logs were submitted under
596
846
  */
597
- }, {
598
- key: "uploadLogs",
599
- value: function uploadLogs() {
847
+ function uploadLogs() {
600
848
  var _this7 = this;
601
849
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
602
850
  _loggerProxy.default.logger.info('Meetings:index#uploadLogs --> uploading logs');
603
851
  return this.loggerRequest.uploadLogs(options).then(function (uploadResult) {
604
852
  _loggerProxy.default.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);
853
+ _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_SUCCESS, options);
605
854
  _triggerProxy.default.trigger(_this7, {
606
855
  file: 'meetings',
607
856
  function: 'uploadLogs'
@@ -619,29 +868,14 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
619
868
  meetingId: options.meetingId,
620
869
  reason: uploadError
621
870
  });
622
- _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_FAILURE, {
623
- // @ts-ignore - seems like typo
624
- meetingId: options.meetingsId,
871
+ _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_FAILURE, _objectSpread(_objectSpread({}, options), {}, {
625
872
  reason: uploadError.message,
626
873
  stack: uploadError.stack,
627
874
  code: uploadError.code
628
- });
875
+ }));
629
876
  });
630
877
  }
631
878
 
632
- /**
633
- * initializes the reachability instance for Meetings
634
- * @returns {undefined}
635
- * @public
636
- * @memberof Meetings
637
- */
638
- }, {
639
- key: "setReachability",
640
- value: function setReachability() {
641
- // @ts-ignore
642
- this.reachability = new _reachability.default(this.webex);
643
- }
644
-
645
879
  /**
646
880
  * gets the reachability instance for Meetings
647
881
  * @returns {Reachability}
@@ -663,9 +897,6 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
663
897
  }, {
664
898
  key: "startReachability",
665
899
  value: function startReachability() {
666
- if (!this.reachability) {
667
- this.setReachability();
668
- }
669
900
  return this.getReachability().gatherReachability();
670
901
  }
671
902
 
@@ -699,6 +930,23 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
699
930
  if (res) {
700
931
  _this9.preferredWebexSite = _util2.default.parseDefaultSiteFromMeetingPreferences(res);
701
932
  }
933
+
934
+ // fall back to getting the preferred site from the user information
935
+ if (!_this9.preferredWebexSite) {
936
+ // @ts-ignore
937
+ return _this9.webex.internal.user.get().then(function (user) {
938
+ var _user$userPreferences, _user$userPreferences2;
939
+ var preferredWebexSite = user === null || user === void 0 ? void 0 : (_user$userPreferences = user.userPreferences) === null || _user$userPreferences === void 0 ? void 0 : (_user$userPreferences2 = _user$userPreferences.userPreferencesItems) === null || _user$userPreferences2 === void 0 ? void 0 : _user$userPreferences2.preferredWebExSite;
940
+ if (preferredWebexSite) {
941
+ _this9.preferredWebexSite = preferredWebexSite;
942
+ } else {
943
+ throw new Error('site not found');
944
+ }
945
+ }).catch(function () {
946
+ _loggerProxy.default.logger.error('Failed to fetch preferred site from user - no site will be set');
947
+ });
948
+ }
949
+ return _promise.default.resolve();
702
950
  });
703
951
  }
704
952
 
@@ -737,10 +985,19 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
737
985
  }
738
986
 
739
987
  /**
740
- * Create a meeting.
741
- * @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
988
+ * Create a meeting or return an existing meeting.
989
+ *
990
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
991
+ *
992
+ * @param {string} destination - sipURL, phonenumber, or locus object}
742
993
  * @param {string} [type] - the optional specified type, such as locusId
743
994
  * @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
995
+ * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
996
+ * @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
997
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
998
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
999
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
1000
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
744
1001
  * @returns {Promise<Meeting>} A new Meeting.
745
1002
  * @public
746
1003
  * @memberof Meetings
@@ -751,16 +1008,30 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
751
1008
  var _this10 = this;
752
1009
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
753
1010
  var useRandomDelayForInfo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1011
+ var infoExtraParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1012
+ var correlationId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
1013
+ var failOnMissingMeetingInfo = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
1014
+ var callStateForMetrics = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : undefined;
1015
+ var meetingInfo = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : undefined;
1016
+ var meetingLookupUrl = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : undefined;
754
1017
  // TODO: type should be from a dictionary
755
1018
 
756
1019
  // Validate meeting information based on the provided destination and
757
1020
  // type. This must be performed prior to determining if the meeting is
758
1021
  // found in the collection, as we mutate the destination for hydra person
759
1022
  // id values.
1023
+ if (correlationId) {
1024
+ callStateForMetrics = _objectSpread(_objectSpread({}, callStateForMetrics || {}), {}, {
1025
+ correlationId: correlationId
1026
+ });
1027
+ }
760
1028
  return this.meetingInfo.fetchInfoOptions(destination, type)
761
1029
  // Catch a failure to fetch info options.
762
1030
  .catch(function (error) {
763
- _loggerProxy.default.logger.info("Meetings:index#create --> INFO, unable to determine info options: ".concat(error.message));
1031
+ _loggerProxy.default.logger.error("Meetings:index#create --> ERROR, unable to determine info options: ".concat(error.message));
1032
+ if (error instanceof _webexErrors.SpaceIDDeprecatedError) {
1033
+ throw new _webexErrors.SpaceIDDeprecatedError();
1034
+ }
764
1035
  }).then(function () {
765
1036
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
766
1037
  // Normalize the destination.
@@ -789,20 +1060,22 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
789
1060
  // Validate if a meeting was found.
790
1061
  if (!meeting) {
791
1062
  // Create a meeting based on the normalized destination and type.
792
- return _this10.createMeeting(targetDest, type, useRandomDelayForInfo).then(function (createdMeeting) {
1063
+ return _this10.createMeeting(targetDest, type, useRandomDelayForInfo, infoExtraParams, callStateForMetrics, failOnMissingMeetingInfo, meetingInfo, meetingLookupUrl).then(function (createdMeeting) {
793
1064
  // If the meeting was successfully created.
794
1065
  if (createdMeeting && createdMeeting.on) {
795
1066
  // Create a destruction event for the meeting.
796
1067
  createdMeeting.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
797
1068
  // @ts-ignore
798
1069
  if (_this10.config.autoUploadLogs) {
799
- var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4;
1070
+ var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4, _createdMeeting$locus5, _createdMeeting$locus6;
800
1071
  _this10.uploadLogs({
801
1072
  callStart: (_createdMeeting$locus = createdMeeting.locusInfo) === null || _createdMeeting$locus === void 0 ? void 0 : (_createdMeeting$locus2 = _createdMeeting$locus.fullState) === null || _createdMeeting$locus2 === void 0 ? void 0 : _createdMeeting$locus2.lastActive,
1073
+ locussessionid: (_createdMeeting$locus3 = createdMeeting.locusInfo) === null || _createdMeeting$locus3 === void 0 ? void 0 : (_createdMeeting$locus4 = _createdMeeting$locus3.fullState) === null || _createdMeeting$locus4 === void 0 ? void 0 : _createdMeeting$locus4.sessionId,
802
1074
  correlationId: createdMeeting.correlationId,
803
1075
  feedbackId: createdMeeting.correlationId,
804
1076
  locusId: createdMeeting.locusId,
805
- meetingId: (_createdMeeting$locus3 = createdMeeting.locusInfo) === null || _createdMeeting$locus3 === void 0 ? void 0 : (_createdMeeting$locus4 = _createdMeeting$locus3.info) === null || _createdMeeting$locus4 === void 0 ? void 0 : _createdMeeting$locus4.webExMeetingId
1077
+ meetingId: (_createdMeeting$locus5 = createdMeeting.locusInfo) === null || _createdMeeting$locus5 === void 0 ? void 0 : (_createdMeeting$locus6 = _createdMeeting$locus5.info) === null || _createdMeeting$locus6 === void 0 ? void 0 : _createdMeeting$locus6.webExMeetingId,
1078
+ autoupload: true
806
1079
  }).then(function () {
807
1080
  return _this10.destroy(createdMeeting, payload.reason);
808
1081
  });
@@ -813,13 +1086,15 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
813
1086
  createdMeeting.on(_constants.EVENTS.REQUEST_UPLOAD_LOGS, function (meetingInstance) {
814
1087
  // @ts-ignore
815
1088
  if (_this10.config.autoUploadLogs) {
816
- var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4;
1089
+ var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4, _meetingInstance$locu5, _meetingInstance$locu6;
817
1090
  _this10.uploadLogs({
818
1091
  callStart: meetingInstance === null || meetingInstance === void 0 ? void 0 : (_meetingInstance$locu = meetingInstance.locusInfo) === null || _meetingInstance$locu === void 0 ? void 0 : (_meetingInstance$locu2 = _meetingInstance$locu.fullState) === null || _meetingInstance$locu2 === void 0 ? void 0 : _meetingInstance$locu2.lastActive,
1092
+ locussessionid: meetingInstance === null || meetingInstance === void 0 ? void 0 : (_meetingInstance$locu3 = meetingInstance.locusInfo) === null || _meetingInstance$locu3 === void 0 ? void 0 : (_meetingInstance$locu4 = _meetingInstance$locu3.fullState) === null || _meetingInstance$locu4 === void 0 ? void 0 : _meetingInstance$locu4.sessionId,
819
1093
  correlationId: meetingInstance.correlationId,
820
1094
  feedbackId: meetingInstance.correlationId,
821
1095
  locusId: meetingInstance.locusId,
822
- meetingId: (_meetingInstance$locu3 = meetingInstance.locusInfo) === null || _meetingInstance$locu3 === void 0 ? void 0 : (_meetingInstance$locu4 = _meetingInstance$locu3.info) === null || _meetingInstance$locu4 === void 0 ? void 0 : _meetingInstance$locu4.webExMeetingId
1096
+ meetingId: (_meetingInstance$locu5 = meetingInstance.locusInfo) === null || _meetingInstance$locu5 === void 0 ? void 0 : (_meetingInstance$locu6 = _meetingInstance$locu5.info) === null || _meetingInstance$locu6 === void 0 ? void 0 : _meetingInstance$locu6.webExMeetingId,
1097
+ autoupload: true
823
1098
  });
824
1099
  }
825
1100
  });
@@ -831,6 +1106,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
831
1106
  return _promise.default.resolve(createdMeeting);
832
1107
  });
833
1108
  }
1109
+ meeting.setCallStateForMetrics(callStateForMetrics);
834
1110
 
835
1111
  // Return the existing meeting.
836
1112
  return _promise.default.resolve(meeting);
@@ -838,19 +1114,33 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
838
1114
  }
839
1115
 
840
1116
  /**
1117
+ * Create meeting
1118
+ *
1119
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
1120
+ *
841
1121
  * @param {String} destination see create()
842
1122
  * @param {String} type see create()
843
1123
  * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
1124
+ * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
1125
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
1126
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
1127
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
1128
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
844
1129
  * @returns {Promise} a new meeting instance complete with meeting info and destination
845
1130
  * @private
846
1131
  * @memberof Meetings
847
1132
  */
848
1133
  }, {
849
1134
  key: "createMeeting",
850
- value: function () {
851
- var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(destination) {
1135
+ value: (function () {
1136
+ var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(destination) {
852
1137
  var type,
853
1138
  useRandomDelayForInfo,
1139
+ infoExtraParams,
1140
+ callStateForMetrics,
1141
+ failOnMissingMeetingInfo,
1142
+ meetingInfo,
1143
+ meetingLookupUrl,
854
1144
  meeting,
855
1145
  _destination$fullStat,
856
1146
  waitingTime,
@@ -861,13 +1151,19 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
861
1151
  maxWaitingTime,
862
1152
  isMeetingActive,
863
1153
  enableUnifiedMeetings,
1154
+ meetingInfoOptions,
864
1155
  meetingAddedType,
865
- _args = arguments;
866
- return _regenerator.default.wrap(function _callee$(_context) {
867
- while (1) switch (_context.prev = _context.next) {
1156
+ _args3 = arguments;
1157
+ return _regenerator.default.wrap(function _callee3$(_context3) {
1158
+ while (1) switch (_context3.prev = _context3.next) {
868
1159
  case 0:
869
- type = _args.length > 1 && _args[1] !== undefined ? _args[1] : null;
870
- useRandomDelayForInfo = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
1160
+ type = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : null;
1161
+ useRandomDelayForInfo = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : false;
1162
+ infoExtraParams = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {};
1163
+ callStateForMetrics = _args3.length > 4 && _args3[4] !== undefined ? _args3[4] : undefined;
1164
+ failOnMissingMeetingInfo = _args3.length > 5 && _args3[5] !== undefined ? _args3[5] : false;
1165
+ meetingInfo = _args3.length > 6 && _args3[6] !== undefined ? _args3[6] : undefined;
1166
+ meetingLookupUrl = _args3.length > 7 && _args3[7] !== undefined ? _args3[7] : undefined;
871
1167
  meeting = new _meeting.default({
872
1168
  // @ts-ignore
873
1169
  userId: this.webex.internal.device.userId,
@@ -875,18 +1171,18 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
875
1171
  deviceUrl: this.webex.internal.device.url,
876
1172
  // @ts-ignore
877
1173
  orgId: this.webex.internal.device.orgId,
878
- roapSeq: 0,
879
1174
  locus: type === _constants._LOCUS_ID_ ? destination : null,
880
1175
  // pass the locus object if present
881
1176
  meetingInfoProvider: this.meetingInfo,
882
1177
  destination: destination,
883
- destinationType: type
1178
+ destinationType: type,
1179
+ callStateForMetrics: callStateForMetrics
884
1180
  }, {
885
1181
  // @ts-ignore
886
1182
  parent: this.webex
887
1183
  });
888
1184
  this.meetingCollection.set(meeting);
889
- _context.prev = 4;
1185
+ _context3.prev = 9;
890
1186
  // if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
891
1187
  // it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
892
1188
  // between 5 and 2 min (random between 3 minutes) before the meeting starts
@@ -902,33 +1198,57 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
902
1198
  }
903
1199
  isMeetingActive = !!((_destination$fullStat = destination.fullState) !== null && _destination$fullStat !== void 0 && _destination$fullStat.active); // @ts-ignore
904
1200
  enableUnifiedMeetings = this.config.experimental.enableUnifiedMeetings;
1201
+ meetingInfoOptions = {
1202
+ extraParams: infoExtraParams,
1203
+ 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
1204
+ };
1205
+ if (!meetingInfo) {
1206
+ _context3.next = 19;
1207
+ break;
1208
+ }
1209
+ meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1210
+ _context3.next = 26;
1211
+ break;
1212
+ case 19:
905
1213
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
906
- _context.next = 14;
1214
+ _context3.next = 24;
907
1215
  break;
908
1216
  }
909
1217
  meeting.fetchMeetingInfoTimeoutId = setTimeout(function () {
910
- return meeting.fetchMeetingInfo({});
1218
+ return meeting.fetchMeetingInfo(meetingInfoOptions);
911
1219
  }, waitingTime);
912
1220
  meeting.parseMeetingInfo(undefined, destination);
913
- _context.next = 16;
1221
+ _context3.next = 26;
914
1222
  break;
915
- case 14:
916
- _context.next = 16;
917
- return meeting.fetchMeetingInfo({});
918
- case 16:
919
- _context.next = 22;
1223
+ case 24:
1224
+ _context3.next = 26;
1225
+ return meeting.fetchMeetingInfo(meetingInfoOptions);
1226
+ case 26:
1227
+ _context3.next = 38;
920
1228
  break;
921
- case 18:
922
- _context.prev = 18;
923
- _context.t0 = _context["catch"](4);
924
- if (!(_context.t0 instanceof _captchaError.default) && !(_context.t0 instanceof _passwordError.default)) {
925
- // if there is no meeting info we assume its a 1:1 call or wireless share
926
- _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
927
- _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1229
+ case 28:
1230
+ _context3.prev = 28;
1231
+ _context3.t0 = _context3["catch"](9);
1232
+ if (!(!(_context3.t0 instanceof _captchaError.default) && !(_context3.t0 instanceof _passwordError.default) && !(_context3.t0 instanceof _permission.default))) {
1233
+ _context3.next = 37;
1234
+ break;
928
1235
  }
929
- _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context.t0, " fetching /meetingInfo for creation."));
930
- case 22:
931
- _context.prev = 22;
1236
+ _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1237
+ if (!failOnMissingMeetingInfo) {
1238
+ _context3.next = 36;
1239
+ break;
1240
+ }
1241
+ _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1242
+ // @ts-ignore
1243
+ this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1244
+ throw new _noMeetingInfo.default();
1245
+ case 36:
1246
+ // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1247
+ _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1248
+ case 37:
1249
+ _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context3.t0, " fetching /meetingInfo for creation."));
1250
+ case 38:
1251
+ _context3.prev = 38;
932
1252
  // For type LOCUS_ID we need to parse the locus object to get the information
933
1253
  // about the caller and callee
934
1254
  // Meeting Added event will be created in `handleLocusEvent`
@@ -948,16 +1268,16 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
948
1268
  type: meetingAddedType
949
1269
  });
950
1270
  }
951
- return _context.finish(22);
952
- case 25:
953
- return _context.abrupt("return", meeting);
954
- case 26:
1271
+ return _context3.finish(38);
1272
+ case 41:
1273
+ return _context3.abrupt("return", meeting);
1274
+ case 42:
955
1275
  case "end":
956
- return _context.stop();
1276
+ return _context3.stop();
957
1277
  }
958
- }, _callee, this, [[4, 18, 22, 25]]);
1278
+ }, _callee3, this, [[9, 28, 38, 41]]);
959
1279
  }));
960
- function createMeeting(_x) {
1280
+ function createMeeting(_x3) {
961
1281
  return _createMeeting.apply(this, arguments);
962
1282
  }
963
1283
  return createMeeting;
@@ -970,6 +1290,7 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
970
1290
  * @public
971
1291
  * @memberof Meetings
972
1292
  */
1293
+ )
973
1294
  }, {
974
1295
  key: "getMeetingByType",
975
1296
  value: function getMeetingByType(type, value) {
@@ -996,7 +1317,8 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
996
1317
 
997
1318
  /**
998
1319
  * syncs all the meeting from server
999
- * @returns {undefined}
1320
+ * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
1321
+ * @returns {Promise<void>}
1000
1322
  * @public
1001
1323
  * @memberof Meetings
1002
1324
  */
@@ -1004,10 +1326,14 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
1004
1326
  key: "syncMeetings",
1005
1327
  value: function syncMeetings() {
1006
1328
  var _this11 = this;
1329
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1330
+ _ref3$keepOnlyLocusMe = _ref3.keepOnlyLocusMeetings,
1331
+ keepOnlyLocusMeetings = _ref3$keepOnlyLocusMe === void 0 ? true : _ref3$keepOnlyLocusMe;
1007
1332
  return this.request.getActiveMeetings().then(function (locusArray) {
1008
1333
  var activeLocusUrl = [];
1009
1334
  if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1010
- locusArray.loci.forEach(function (locus) {
1335
+ var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
1336
+ lociToUpdate.forEach(function (locus) {
1011
1337
  activeLocusUrl.push(locus.url);
1012
1338
  _this11.handleLocusEvent({
1013
1339
  locus: locus,
@@ -1017,19 +1343,95 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
1017
1343
  }
1018
1344
  var meetingsCollection = _this11.meetingCollection.getAll();
1019
1345
  if ((0, _keys.default)(meetingsCollection).length > 0) {
1020
- // Some time the mercury event is missed after mercury reconnect
1021
- // if sync returns no locus then clear all the meetings
1346
+ // Sometimes the mercury events are lost after mercury reconnect
1347
+ // Remove any Locus meetings that are not returned by Locus
1348
+ // (they had a locusUrl previously but are no longer active) in the sync
1022
1349
  for (var _i = 0, _Object$values = (0, _values.default)(meetingsCollection); _i < _Object$values.length; _i++) {
1023
1350
  var meeting = _Object$values[_i];
1024
1351
  // @ts-ignore
1025
- if (!activeLocusUrl.includes(meeting.locusUrl)) {
1352
+ var locusUrl = meeting.locusUrl;
1353
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1026
1354
  // destroy function also uploads logs
1027
1355
  // @ts-ignore
1028
1356
  _this11.destroy(meeting, _constants.MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
1029
1357
  }
1030
1358
  }
1031
1359
  }
1360
+ }).catch(function (error) {
1361
+ _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
1362
+ throw new Error(error);
1363
+ });
1364
+ }
1365
+
1366
+ /**
1367
+ * sort out locus array for initial creating
1368
+ * @param {Array} loci original locus array
1369
+ * @returns {undefined}
1370
+ * @public
1371
+ * @memberof Meetings
1372
+ */
1373
+ }, {
1374
+ key: "sortLocusArrayToUpdate",
1375
+ value: function sortLocusArrayToUpdate(loci) {
1376
+ var _this12 = this;
1377
+ var mainLoci = loci.filter(function (locus) {
1378
+ return !_util2.default.isBreakoutLocusDTO(locus);
1379
+ });
1380
+ var breakoutLoci = loci.filter(function (locus) {
1381
+ return _util2.default.isValidBreakoutLocus(locus);
1382
+ });
1383
+ this.breakoutLocusForHandleLater = [];
1384
+ var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1385
+ breakoutLoci.forEach(function (breakoutLocus) {
1386
+ var associateMainLocus = mainLoci.find(function (mainLocus) {
1387
+ var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1388
+ 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);
1389
+ });
1390
+ var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1391
+ locus: breakoutLocus,
1392
+ locusUrl: breakoutLocus.url
1393
+ });
1394
+ if (associateMainLocus && !existCorrespondingMeeting) {
1395
+ // if exists both main session and breakout session locus of the same non-exist meeting, handle main locus first,
1396
+ // after meeting create with main locus, then handle the associate breakout locus.
1397
+ // if only handle breakout locus, will miss some date
1398
+ _this12.breakoutLocusForHandleLater.push(breakoutLocus);
1399
+ } else {
1400
+ lociToUpdate.push(breakoutLocus);
1401
+ }
1032
1402
  });
1403
+ return lociToUpdate;
1404
+ }
1405
+
1406
+ /**
1407
+ * check breakout locus which waiting for main locus's meeting to be created, then handle the breakout locus
1408
+ * @param {Object} newCreatedLocus the locus which just create meeting object of it
1409
+ * @returns {undefined}
1410
+ * @public
1411
+ * @memberof Meetings
1412
+ */
1413
+ }, {
1414
+ key: "checkHandleBreakoutLocus",
1415
+ value: function checkHandleBreakoutLocus(newCreatedLocus) {
1416
+ if (!newCreatedLocus || !this.breakoutLocusForHandleLater || !this.breakoutLocusForHandleLater.length) {
1417
+ return;
1418
+ }
1419
+ if (_util2.default.isBreakoutLocusDTO(newCreatedLocus)) {
1420
+ return;
1421
+ }
1422
+ var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
1423
+ var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
1424
+ 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);
1425
+ });
1426
+ if (existIndex < 0) {
1427
+ return;
1428
+ }
1429
+ var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
1430
+ this.handleLocusEvent({
1431
+ locus: associateBreakoutLocus,
1432
+ locusUrl: associateBreakoutLocus.url
1433
+ });
1434
+ this.breakoutLocusForHandleLater.splice(existIndex, 1);
1033
1435
  }
1034
1436
 
1035
1437
  /**
@@ -1057,8 +1459,20 @@ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
1057
1459
  value: function getLogger() {
1058
1460
  return _loggerProxy.default.get();
1059
1461
  }
1462
+
1463
+ /**
1464
+ * Returns the first meeting it finds that has the webrtc media connection created.
1465
+ * Useful for debugging in the console.
1466
+ *
1467
+ * @private
1468
+ * @returns {Meeting} Meeting object that has a webrtc media connection, else undefined
1469
+ */
1470
+ }, {
1471
+ key: "getActiveWebrtcMeeting",
1472
+ value: function getActiveWebrtcMeeting() {
1473
+ return this.meetingCollection.getActiveWebrtcMeeting();
1474
+ }
1060
1475
  }]);
1061
1476
  return Meetings;
1062
1477
  }(_webexCore.WebexPlugin);
1063
- exports.default = Meetings;
1064
1478
  //# sourceMappingURL=index.js.map