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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/README.md +8 -46
  2. package/dist/common/browser-detection.js +3 -2
  3. package/dist/common/browser-detection.js.map +1 -1
  4. package/dist/common/collection.js +4 -3
  5. package/dist/common/collection.js.map +1 -1
  6. package/dist/common/config.js +2 -1
  7. package/dist/common/config.js.map +1 -1
  8. package/dist/common/errors/captcha-error.js +2 -1
  9. package/dist/common/errors/captcha-error.js.map +1 -1
  10. package/dist/common/errors/intent-to-join.js +2 -1
  11. package/dist/common/errors/intent-to-join.js.map +1 -1
  12. package/dist/common/errors/join-meeting.js +2 -1
  13. package/dist/common/errors/join-meeting.js.map +1 -1
  14. package/dist/common/errors/media.js +2 -1
  15. package/dist/common/errors/media.js.map +1 -1
  16. package/dist/common/errors/parameter.js +4 -3
  17. package/dist/common/errors/parameter.js.map +1 -1
  18. package/dist/common/errors/password-error.js +2 -1
  19. package/dist/common/errors/password-error.js.map +1 -1
  20. package/dist/common/errors/permission.js +2 -1
  21. package/dist/common/errors/permission.js.map +1 -1
  22. package/dist/common/errors/{reclaim-host-role-errors.js → reclaim-host-role-error.js} +11 -7
  23. package/dist/common/errors/reclaim-host-role-error.js.map +1 -0
  24. package/dist/common/errors/reconnection-in-progress.js +2 -1
  25. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  26. package/dist/common/errors/reconnection.js +2 -1
  27. package/dist/common/errors/reconnection.js.map +1 -1
  28. package/dist/common/errors/stats.js +2 -1
  29. package/dist/common/errors/stats.js.map +1 -1
  30. package/dist/common/errors/webex-errors.d.ts +8 -20
  31. package/dist/common/errors/webex-errors.js +28 -48
  32. package/dist/common/errors/webex-errors.js.map +1 -1
  33. package/dist/common/errors/webex-meetings-error.js +2 -1
  34. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  35. package/dist/common/events/events-scope.js +2 -1
  36. package/dist/common/events/events-scope.js.map +1 -1
  37. package/dist/common/events/events.js +2 -1
  38. package/dist/common/events/events.js.map +1 -1
  39. package/dist/common/events/trigger-proxy.js +2 -1
  40. package/dist/common/events/trigger-proxy.js.map +1 -1
  41. package/dist/common/events/util.js +2 -1
  42. package/dist/common/events/util.js.map +1 -1
  43. package/dist/common/logs/logger-config.js +2 -1
  44. package/dist/common/logs/logger-config.js.map +1 -1
  45. package/dist/common/logs/logger-proxy.js +3 -2
  46. package/dist/common/logs/logger-proxy.js.map +1 -1
  47. package/dist/common/logs/request.d.ts +1 -3
  48. package/dist/common/logs/request.js +5 -8
  49. package/dist/common/logs/request.js.map +1 -1
  50. package/dist/common/queue.d.ts +7 -9
  51. package/dist/common/queue.js +9 -22
  52. package/dist/common/queue.js.map +1 -1
  53. package/dist/config.d.ts +7 -5
  54. package/dist/config.js +11 -8
  55. package/dist/config.js.map +1 -1
  56. package/dist/constants.d.ts +97 -217
  57. package/dist/constants.js +441 -416
  58. package/dist/constants.js.map +1 -1
  59. package/dist/controls-options-manager/constants.js +6 -3
  60. package/dist/controls-options-manager/constants.js.map +1 -1
  61. package/dist/controls-options-manager/enums.d.ts +1 -11
  62. package/dist/controls-options-manager/enums.js +6 -15
  63. package/dist/controls-options-manager/enums.js.map +1 -1
  64. package/dist/controls-options-manager/index.d.ts +1 -17
  65. package/dist/controls-options-manager/index.js +38 -127
  66. package/dist/controls-options-manager/index.js.map +1 -1
  67. package/dist/controls-options-manager/util.d.ts +7 -1
  68. package/dist/controls-options-manager/util.js +19 -309
  69. package/dist/controls-options-manager/util.js.map +1 -1
  70. package/dist/index.d.ts +3 -6
  71. package/dist/index.js +4 -116
  72. package/dist/index.js.map +1 -1
  73. package/dist/locus-info/controlsUtils.js +11 -100
  74. package/dist/locus-info/controlsUtils.js.map +1 -1
  75. package/dist/locus-info/embeddedAppsUtils.js +4 -3
  76. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  77. package/dist/locus-info/fullState.js +2 -1
  78. package/dist/locus-info/fullState.js.map +1 -1
  79. package/dist/locus-info/hostUtils.js +2 -1
  80. package/dist/locus-info/hostUtils.js.map +1 -1
  81. package/dist/locus-info/index.d.ts +4 -57
  82. package/dist/locus-info/index.js +84 -425
  83. package/dist/locus-info/index.js.map +1 -1
  84. package/dist/locus-info/infoUtils.js +5 -13
  85. package/dist/locus-info/infoUtils.js.map +1 -1
  86. package/dist/locus-info/mediaSharesUtils.js +3 -58
  87. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  88. package/dist/locus-info/parser.d.ts +6 -66
  89. package/dist/locus-info/parser.js +80 -253
  90. package/dist/locus-info/parser.js.map +1 -1
  91. package/dist/locus-info/selfUtils.js +13 -97
  92. package/dist/locus-info/selfUtils.js.map +1 -1
  93. package/dist/media/index.d.ts +0 -2
  94. package/dist/media/index.js +319 -107
  95. package/dist/media/index.js.map +1 -1
  96. package/dist/media/properties.d.ts +53 -38
  97. package/dist/media/properties.js +153 -96
  98. package/dist/media/properties.js.map +1 -1
  99. package/dist/media/util.js +22 -1
  100. package/dist/media/util.js.map +1 -1
  101. package/dist/mediaQualityMetrics/config.d.ts +230 -234
  102. package/dist/mediaQualityMetrics/config.js +498 -302
  103. package/dist/mediaQualityMetrics/config.js.map +1 -1
  104. package/dist/meeting/effectsState.d.ts +42 -0
  105. package/dist/meeting/effectsState.js +260 -0
  106. package/dist/meeting/effectsState.js.map +1 -0
  107. package/dist/meeting/in-meeting-actions.d.ts +0 -88
  108. package/dist/meeting/in-meeting-actions.js +3 -94
  109. package/dist/meeting/in-meeting-actions.js.map +1 -1
  110. package/dist/meeting/index.d.ts +494 -591
  111. package/dist/meeting/index.js +2969 -4707
  112. package/dist/meeting/index.js.map +1 -1
  113. package/dist/meeting/muteState.d.ts +25 -93
  114. package/dist/meeting/muteState.js +133 -224
  115. package/dist/meeting/muteState.js.map +1 -1
  116. package/dist/meeting/request.d.ts +47 -82
  117. package/dist/meeting/request.js +199 -297
  118. package/dist/meeting/request.js.map +1 -1
  119. package/dist/meeting/state.js +2 -1
  120. package/dist/meeting/state.js.map +1 -1
  121. package/dist/meeting/util.d.ts +1 -102
  122. package/dist/meeting/util.js +435 -605
  123. package/dist/meeting/util.js.map +1 -1
  124. package/dist/meeting-info/collection.js +4 -3
  125. package/dist/meeting-info/collection.js.map +1 -1
  126. package/dist/meeting-info/index.d.ts +1 -13
  127. package/dist/meeting-info/index.js +7 -74
  128. package/dist/meeting-info/index.js.map +1 -1
  129. package/dist/meeting-info/meeting-info-v2.d.ts +1 -31
  130. package/dist/meeting-info/meeting-info-v2.js +63 -200
  131. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  132. package/dist/meeting-info/request.js +2 -1
  133. package/dist/meeting-info/request.js.map +1 -1
  134. package/dist/meeting-info/util.js +3 -2
  135. package/dist/meeting-info/util.js.map +1 -1
  136. package/dist/meeting-info/utilv2.js +41 -39
  137. package/dist/meeting-info/utilv2.js.map +1 -1
  138. package/dist/meetings/collection.d.ts +0 -17
  139. package/dist/meetings/collection.js +4 -42
  140. package/dist/meetings/collection.js.map +1 -1
  141. package/dist/meetings/index.d.ts +21 -103
  142. package/dist/meetings/index.js +124 -486
  143. package/dist/meetings/index.js.map +1 -1
  144. package/dist/meetings/request.js +3 -4
  145. package/dist/meetings/request.js.map +1 -1
  146. package/dist/meetings/util.js +6 -107
  147. package/dist/meetings/util.js.map +1 -1
  148. package/dist/member/index.d.ts +1 -13
  149. package/dist/member/index.js +2 -45
  150. package/dist/member/index.js.map +1 -1
  151. package/dist/member/member.types.js +4 -3
  152. package/dist/member/member.types.js.map +1 -1
  153. package/dist/member/util.js +29 -120
  154. package/dist/member/util.js.map +1 -1
  155. package/dist/members/collection.d.ts +0 -5
  156. package/dist/members/collection.js +2 -11
  157. package/dist/members/collection.js.map +1 -1
  158. package/dist/members/index.d.ts +11 -56
  159. package/dist/members/index.js +47 -174
  160. package/dist/members/index.js.map +1 -1
  161. package/dist/members/request.d.ts +11 -67
  162. package/dist/members/request.js +54 -102
  163. package/dist/members/request.js.map +1 -1
  164. package/dist/members/types.js +4 -3
  165. package/dist/members/types.js.map +1 -1
  166. package/dist/members/util.d.ts +1 -214
  167. package/dist/members/util.js +284 -327
  168. package/dist/members/util.js.map +1 -1
  169. package/dist/metrics/config.d.ts +169 -0
  170. package/dist/metrics/config.js +289 -0
  171. package/dist/metrics/config.js.map +1 -0
  172. package/dist/metrics/constants.d.ts +6 -15
  173. package/dist/metrics/constants.js +9 -17
  174. package/dist/metrics/constants.js.map +1 -1
  175. package/dist/metrics/index.d.ts +111 -4
  176. package/dist/metrics/index.js +452 -4
  177. package/dist/metrics/index.js.map +1 -1
  178. package/dist/networkQualityMonitor/index.js +4 -5
  179. package/dist/networkQualityMonitor/index.js.map +1 -1
  180. package/dist/peer-connection-manager/index.d.ts +6 -0
  181. package/dist/peer-connection-manager/index.js +671 -0
  182. package/dist/peer-connection-manager/index.js.map +1 -0
  183. package/dist/peer-connection-manager/util.d.ts +6 -0
  184. package/dist/peer-connection-manager/util.js +110 -0
  185. package/dist/peer-connection-manager/util.js.map +1 -0
  186. package/dist/personal-meeting-room/index.js +3 -2
  187. package/dist/personal-meeting-room/index.js.map +1 -1
  188. package/dist/personal-meeting-room/request.js +3 -2
  189. package/dist/personal-meeting-room/request.js.map +1 -1
  190. package/dist/personal-meeting-room/util.js +2 -1
  191. package/dist/personal-meeting-room/util.js.map +1 -1
  192. package/dist/reachability/index.d.ts +7 -62
  193. package/dist/reachability/index.js +72 -265
  194. package/dist/reachability/index.js.map +1 -1
  195. package/dist/reachability/request.d.ts +3 -7
  196. package/dist/reachability/request.js +10 -18
  197. package/dist/reachability/request.js.map +1 -1
  198. package/dist/reactions/reactions.d.ts +2 -2
  199. package/dist/reactions/reactions.js +6 -4
  200. package/dist/reactions/reactions.js.map +1 -1
  201. package/dist/reactions/reactions.type.d.ts +3 -23
  202. package/dist/reactions/reactions.type.js +23 -21
  203. package/dist/reactions/reactions.type.js.map +1 -1
  204. package/dist/reconnection-manager/index.d.ts +8 -32
  205. package/dist/reconnection-manager/index.js +231 -282
  206. package/dist/reconnection-manager/index.js.map +1 -1
  207. package/dist/recording-controller/enums.js +5 -4
  208. package/dist/recording-controller/enums.js.map +1 -1
  209. package/dist/recording-controller/index.d.ts +1 -15
  210. package/dist/recording-controller/index.js +46 -57
  211. package/dist/recording-controller/index.js.map +1 -1
  212. package/dist/recording-controller/util.d.ts +4 -5
  213. package/dist/recording-controller/util.js +10 -10
  214. package/dist/recording-controller/util.js.map +1 -1
  215. package/dist/roap/collection.d.ts +10 -0
  216. package/dist/roap/collection.js +63 -0
  217. package/dist/roap/collection.js.map +1 -0
  218. package/dist/roap/handler.d.ts +47 -0
  219. package/dist/roap/handler.js +279 -0
  220. package/dist/roap/handler.js.map +1 -0
  221. package/dist/roap/index.d.ts +47 -9
  222. package/dist/roap/index.js +235 -101
  223. package/dist/roap/index.js.map +1 -1
  224. package/dist/roap/request.d.ts +12 -18
  225. package/dist/roap/request.js +180 -126
  226. package/dist/roap/request.js.map +1 -1
  227. package/dist/roap/state.d.ts +9 -0
  228. package/dist/roap/state.js +127 -0
  229. package/dist/roap/state.js.map +1 -0
  230. package/dist/roap/turnDiscovery.d.ts +16 -27
  231. package/dist/roap/turnDiscovery.js +105 -115
  232. package/dist/roap/turnDiscovery.js.map +1 -1
  233. package/dist/roap/util.d.ts +2 -0
  234. package/dist/roap/util.js +76 -0
  235. package/dist/roap/util.js.map +1 -0
  236. package/dist/statsAnalyzer/global.d.ts +83 -1
  237. package/dist/statsAnalyzer/global.js +85 -2
  238. package/dist/statsAnalyzer/global.js.map +1 -1
  239. package/dist/statsAnalyzer/index.d.ts +30 -28
  240. package/dist/statsAnalyzer/index.js +509 -374
  241. package/dist/statsAnalyzer/index.js.map +1 -1
  242. package/dist/statsAnalyzer/mqaUtil.d.ts +6 -8
  243. package/dist/statsAnalyzer/mqaUtil.js +83 -116
  244. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  245. package/dist/transcription/index.js +2 -1
  246. package/dist/transcription/index.js.map +1 -1
  247. package/package.json +26 -35
  248. package/src/common/errors/webex-errors.ts +12 -36
  249. package/src/common/logs/logger-proxy.ts +1 -1
  250. package/src/common/logs/request.ts +1 -5
  251. package/src/common/queue.ts +8 -22
  252. package/src/config.ts +7 -5
  253. package/src/constants.ts +97 -244
  254. package/src/controls-options-manager/enums.ts +0 -12
  255. package/src/controls-options-manager/index.ts +21 -116
  256. package/src/controls-options-manager/util.ts +14 -294
  257. package/src/index.js +15 -0
  258. package/src/locus-info/controlsUtils.ts +0 -110
  259. package/src/locus-info/index.ts +61 -449
  260. package/src/locus-info/infoUtils.ts +2 -14
  261. package/src/locus-info/mediaSharesUtils.ts +0 -64
  262. package/src/locus-info/parser.ts +47 -258
  263. package/src/locus-info/selfUtils.ts +2 -85
  264. package/src/media/index.ts +370 -153
  265. package/src/media/properties.ts +136 -106
  266. package/src/media/util.ts +21 -0
  267. package/src/mediaQualityMetrics/config.ts +377 -244
  268. package/src/meeting/effectsState.ts +209 -0
  269. package/src/meeting/in-meeting-actions.ts +0 -176
  270. package/src/meeting/index.ts +2482 -3929
  271. package/src/meeting/muteState.ts +138 -224
  272. package/src/meeting/request.ts +127 -207
  273. package/src/meeting/util.ts +423 -590
  274. package/src/meeting-info/index.ts +8 -81
  275. package/src/meeting-info/meeting-info-v2.ts +13 -163
  276. package/src/meeting-info/util.ts +1 -1
  277. package/src/meeting-info/utilv2.ts +28 -28
  278. package/src/meetings/collection.ts +0 -33
  279. package/src/meetings/index.ts +126 -486
  280. package/src/meetings/request.ts +0 -2
  281. package/src/meetings/util.ts +5 -116
  282. package/src/member/index.ts +1 -43
  283. package/src/member/util.ts +28 -125
  284. package/src/members/collection.ts +0 -8
  285. package/src/members/index.ts +52 -187
  286. package/src/members/request.ts +27 -87
  287. package/src/members/util.ts +291 -332
  288. package/src/metrics/config.ts +485 -0
  289. package/src/metrics/constants.ts +6 -15
  290. package/src/metrics/index.ts +471 -1
  291. package/src/networkQualityMonitor/index.ts +6 -6
  292. package/src/peer-connection-manager/index.ts +847 -0
  293. package/src/peer-connection-manager/util.ts +119 -0
  294. package/src/reachability/index.ts +45 -238
  295. package/src/reachability/request.ts +8 -17
  296. package/src/reactions/reactions.ts +4 -4
  297. package/src/reactions/reactions.type.ts +4 -30
  298. package/src/reconnection-manager/index.ts +156 -168
  299. package/src/recording-controller/index.ts +3 -20
  300. package/src/recording-controller/util.ts +9 -26
  301. package/src/roap/collection.ts +62 -0
  302. package/src/roap/handler.ts +294 -0
  303. package/src/roap/index.ts +241 -98
  304. package/src/roap/request.ts +148 -74
  305. package/src/roap/state.ts +156 -0
  306. package/src/roap/turnDiscovery.ts +56 -62
  307. package/src/roap/util.ts +100 -0
  308. package/src/statsAnalyzer/global.ts +84 -1
  309. package/src/statsAnalyzer/index.ts +642 -413
  310. package/src/statsAnalyzer/mqaUtil.ts +114 -111
  311. package/test/integration/spec/journey.js +264 -320
  312. package/test/integration/spec/space-meeting.js +4 -77
  313. package/test/unit/spec/common/queue.js +2 -31
  314. package/test/unit/spec/controls-options-manager/index.js +0 -163
  315. package/test/unit/spec/controls-options-manager/util.js +60 -576
  316. package/test/unit/spec/fixture/locus.js +0 -1
  317. package/test/unit/spec/locus-info/controlsUtils.js +30 -323
  318. package/test/unit/spec/locus-info/index.js +15 -1389
  319. package/test/unit/spec/locus-info/infoUtils.js +16 -54
  320. package/test/unit/spec/locus-info/lib/SeqCmp.json +0 -16
  321. package/test/unit/spec/locus-info/lib/selfConstant.js +0 -48
  322. package/test/unit/spec/locus-info/parser.js +35 -116
  323. package/test/unit/spec/locus-info/selfUtils.js +0 -275
  324. package/test/unit/spec/media/properties.ts +84 -75
  325. package/test/unit/spec/meeting/effectsState.js +281 -0
  326. package/test/unit/spec/meeting/in-meeting-actions.ts +0 -86
  327. package/test/unit/spec/meeting/index.js +3136 -8547
  328. package/test/unit/spec/meeting/muteState.js +213 -409
  329. package/test/unit/spec/meeting/request.js +42 -512
  330. package/test/unit/spec/meeting/utils.js +24 -741
  331. package/test/unit/spec/meeting-info/meetinginfov2.js +5 -527
  332. package/test/unit/spec/meeting-info/utilv2.js +0 -21
  333. package/test/unit/spec/meetings/collection.js +0 -26
  334. package/test/unit/spec/meetings/index.js +211 -1278
  335. package/test/unit/spec/meetings/utils.js +2 -202
  336. package/test/unit/spec/member/index.js +9 -32
  337. package/test/unit/spec/member/util.js +61 -499
  338. package/test/unit/spec/members/index.js +5 -394
  339. package/test/unit/spec/members/request.js +27 -206
  340. package/test/unit/spec/members/utils.js +38 -173
  341. package/test/unit/spec/metrics/index.js +50 -1
  342. package/test/unit/spec/networkQualityMonitor/index.js +4 -4
  343. package/test/unit/spec/peerconnection-manager/index.js +218 -0
  344. package/test/unit/spec/peerconnection-manager/utils.js +49 -0
  345. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +388 -0
  346. package/test/unit/spec/reachability/index.ts +24 -598
  347. package/test/unit/spec/reconnection-manager/index.js +24 -162
  348. package/test/unit/spec/recording-controller/index.js +218 -293
  349. package/test/unit/spec/recording-controller/util.js +96 -223
  350. package/test/unit/spec/roap/index.ts +76 -200
  351. package/test/unit/spec/roap/turnDiscovery.ts +48 -86
  352. package/test/unit/spec/roap/util.js +30 -0
  353. package/test/unit/spec/stats-analyzer/index.js +174 -188
  354. package/test/utils/testUtils.js +45 -0
  355. package/test/utils/webex-config.js +0 -4
  356. package/test/utils/webex-test-users.js +3 -7
  357. package/dist/annotation/annotation.types.d.ts +0 -42
  358. package/dist/annotation/annotation.types.js +0 -7
  359. package/dist/annotation/annotation.types.js.map +0 -1
  360. package/dist/annotation/constants.d.ts +0 -31
  361. package/dist/annotation/constants.js +0 -41
  362. package/dist/annotation/constants.js.map +0 -1
  363. package/dist/annotation/index.d.ts +0 -117
  364. package/dist/annotation/index.js +0 -357
  365. package/dist/annotation/index.js.map +0 -1
  366. package/dist/breakouts/breakout.d.ts +0 -8
  367. package/dist/breakouts/breakout.js +0 -215
  368. package/dist/breakouts/breakout.js.map +0 -1
  369. package/dist/breakouts/collection.d.ts +0 -5
  370. package/dist/breakouts/collection.js +0 -22
  371. package/dist/breakouts/collection.js.map +0 -1
  372. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  373. package/dist/breakouts/edit-lock-error.js +0 -51
  374. package/dist/breakouts/edit-lock-error.js.map +0 -1
  375. package/dist/breakouts/events.d.ts +0 -8
  376. package/dist/breakouts/events.js +0 -44
  377. package/dist/breakouts/events.js.map +0 -1
  378. package/dist/breakouts/index.d.ts +0 -5
  379. package/dist/breakouts/index.js +0 -1047
  380. package/dist/breakouts/index.js.map +0 -1
  381. package/dist/breakouts/request.d.ts +0 -22
  382. package/dist/breakouts/request.js +0 -77
  383. package/dist/breakouts/request.js.map +0 -1
  384. package/dist/breakouts/utils.d.ts +0 -15
  385. package/dist/breakouts/utils.js +0 -64
  386. package/dist/breakouts/utils.js.map +0 -1
  387. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  388. package/dist/common/errors/no-meeting-info.js +0 -50
  389. package/dist/common/errors/no-meeting-info.js.map +0 -1
  390. package/dist/common/errors/reclaim-host-role-errors.js.map +0 -1
  391. package/dist/controls-options-manager/types.d.ts +0 -43
  392. package/dist/controls-options-manager/types.js +0 -7
  393. package/dist/controls-options-manager/types.js.map +0 -1
  394. package/dist/interpretation/collection.d.ts +0 -5
  395. package/dist/interpretation/collection.js +0 -22
  396. package/dist/interpretation/collection.js.map +0 -1
  397. package/dist/interpretation/index.d.ts +0 -5
  398. package/dist/interpretation/index.js +0 -365
  399. package/dist/interpretation/index.js.map +0 -1
  400. package/dist/interpretation/siLanguage.d.ts +0 -5
  401. package/dist/interpretation/siLanguage.js +0 -24
  402. package/dist/interpretation/siLanguage.js.map +0 -1
  403. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  404. package/dist/meeting/locusMediaRequest.js +0 -291
  405. package/dist/meeting/locusMediaRequest.js.map +0 -1
  406. package/dist/meeting/request.type.d.ts +0 -11
  407. package/dist/meeting/request.type.js +0 -7
  408. package/dist/meeting/request.type.js.map +0 -1
  409. package/dist/meetings/meetings.types.d.ts +0 -4
  410. package/dist/meetings/meetings.types.js +0 -7
  411. package/dist/meetings/meetings.types.js.map +0 -1
  412. package/dist/member/types.d.ts +0 -32
  413. package/dist/member/types.js +0 -23
  414. package/dist/member/types.js.map +0 -1
  415. package/dist/multistream/mediaRequestManager.d.ts +0 -118
  416. package/dist/multistream/mediaRequestManager.js +0 -344
  417. package/dist/multistream/mediaRequestManager.js.map +0 -1
  418. package/dist/multistream/receiveSlot.d.ts +0 -68
  419. package/dist/multistream/receiveSlot.js +0 -200
  420. package/dist/multistream/receiveSlot.js.map +0 -1
  421. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  422. package/dist/multistream/receiveSlotManager.js +0 -174
  423. package/dist/multistream/receiveSlotManager.js.map +0 -1
  424. package/dist/multistream/remoteMedia.d.ts +0 -72
  425. package/dist/multistream/remoteMedia.js +0 -268
  426. package/dist/multistream/remoteMedia.js.map +0 -1
  427. package/dist/multistream/remoteMediaGroup.d.ts +0 -47
  428. package/dist/multistream/remoteMediaGroup.js +0 -267
  429. package/dist/multistream/remoteMediaGroup.js.map +0 -1
  430. package/dist/multistream/remoteMediaManager.d.ts +0 -285
  431. package/dist/multistream/remoteMediaManager.js +0 -1211
  432. package/dist/multistream/remoteMediaManager.js.map +0 -1
  433. package/dist/multistream/sendSlotManager.d.ts +0 -61
  434. package/dist/multistream/sendSlotManager.js +0 -236
  435. package/dist/multistream/sendSlotManager.js.map +0 -1
  436. package/dist/reactions/constants.d.ts +0 -3
  437. package/dist/reactions/constants.js +0 -12
  438. package/dist/reactions/constants.js.map +0 -1
  439. package/dist/rtcMetrics/constants.d.ts +0 -4
  440. package/dist/rtcMetrics/constants.js +0 -11
  441. package/dist/rtcMetrics/constants.js.map +0 -1
  442. package/dist/rtcMetrics/index.d.ts +0 -54
  443. package/dist/rtcMetrics/index.js +0 -140
  444. package/dist/rtcMetrics/index.js.map +0 -1
  445. package/dist/webinar/collection.d.ts +0 -16
  446. package/dist/webinar/collection.js +0 -43
  447. package/dist/webinar/collection.js.map +0 -1
  448. package/dist/webinar/index.d.ts +0 -5
  449. package/dist/webinar/index.js +0 -68
  450. package/dist/webinar/index.js.map +0 -1
  451. package/src/annotation/annotation.types.ts +0 -50
  452. package/src/annotation/constants.ts +0 -36
  453. package/src/annotation/index.ts +0 -328
  454. package/src/breakouts/README.md +0 -220
  455. package/src/breakouts/breakout.ts +0 -188
  456. package/src/breakouts/collection.ts +0 -19
  457. package/src/breakouts/edit-lock-error.ts +0 -25
  458. package/src/breakouts/events.ts +0 -56
  459. package/src/breakouts/index.ts +0 -925
  460. package/src/breakouts/request.ts +0 -55
  461. package/src/breakouts/utils.ts +0 -57
  462. package/src/common/errors/no-meeting-info.ts +0 -24
  463. package/src/controls-options-manager/types.ts +0 -59
  464. package/src/index.ts +0 -40
  465. package/src/interpretation/README.md +0 -60
  466. package/src/interpretation/collection.ts +0 -19
  467. package/src/interpretation/index.ts +0 -332
  468. package/src/interpretation/siLanguage.ts +0 -18
  469. package/src/meeting/locusMediaRequest.ts +0 -313
  470. package/src/meeting/request.type.ts +0 -13
  471. package/src/meetings/meetings.types.ts +0 -12
  472. package/src/member/types.ts +0 -38
  473. package/src/multistream/mediaRequestManager.ts +0 -440
  474. package/src/multistream/receiveSlot.ts +0 -184
  475. package/src/multistream/receiveSlotManager.ts +0 -166
  476. package/src/multistream/remoteMedia.ts +0 -254
  477. package/src/multistream/remoteMediaGroup.ts +0 -284
  478. package/src/multistream/remoteMediaManager.ts +0 -1145
  479. package/src/multistream/sendSlotManager.ts +0 -170
  480. package/src/reactions/constants.ts +0 -4
  481. package/src/rtcMetrics/constants.ts +0 -3
  482. package/src/rtcMetrics/index.ts +0 -124
  483. package/src/webinar/collection.ts +0 -31
  484. package/src/webinar/index.ts +0 -62
  485. package/test/integration/spec/converged-space-meetings.js +0 -233
  486. package/test/unit/spec/annotation/index.ts +0 -418
  487. package/test/unit/spec/breakouts/breakout.ts +0 -237
  488. package/test/unit/spec/breakouts/collection.ts +0 -15
  489. package/test/unit/spec/breakouts/edit-lock-error.ts +0 -30
  490. package/test/unit/spec/breakouts/events.ts +0 -89
  491. package/test/unit/spec/breakouts/index.ts +0 -1790
  492. package/test/unit/spec/breakouts/request.ts +0 -104
  493. package/test/unit/spec/breakouts/utils.js +0 -72
  494. package/test/unit/spec/interpretation/collection.ts +0 -15
  495. package/test/unit/spec/interpretation/index.ts +0 -589
  496. package/test/unit/spec/interpretation/siLanguage.ts +0 -28
  497. package/test/unit/spec/locus-info/mediaSharesUtils.ts +0 -32
  498. package/test/unit/spec/media/index.ts +0 -290
  499. package/test/unit/spec/meeting/locusMediaRequest.ts +0 -442
  500. package/test/unit/spec/meeting-info/index.js +0 -300
  501. package/test/unit/spec/multistream/mediaRequestManager.ts +0 -1418
  502. package/test/unit/spec/multistream/receiveSlot.ts +0 -163
  503. package/test/unit/spec/multistream/receiveSlotManager.ts +0 -203
  504. package/test/unit/spec/multistream/remoteMedia.ts +0 -255
  505. package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -662
  506. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1924
  507. package/test/unit/spec/multistream/sendSlotManager.ts +0 -242
  508. package/test/unit/spec/reachability/request.js +0 -68
  509. package/test/unit/spec/roap/request.ts +0 -232
  510. package/test/unit/spec/rtcMetrics/index.ts +0 -93
  511. package/test/unit/spec/webinar/collection.ts +0 -13
  512. package/test/unit/spec/webinar/index.ts +0 -60
  513. package/test/utils/constants.js +0 -9
  514. package/test/utils/integrationTestUtils.js +0 -46
  515. /package/dist/common/errors/{reclaim-host-role-errors.d.ts → reclaim-host-role-error.d.ts} +0 -0
  516. /package/src/common/errors/{reclaim-host-role-errors.ts → reclaim-host-role-error.ts} +0 -0
@@ -1,43 +1,32 @@
1
1
  "use strict";
2
2
 
3
- var _typeof = require("@babel/runtime-corejs2/helpers/typeof");
4
3
  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");
10
4
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
11
- var _WeakMap = require("@babel/runtime-corejs2/core-js/weak-map");
12
5
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
13
6
  _Object$defineProperty(exports, "__esModule", {
14
7
  value: true
15
8
  });
16
9
  exports.default = void 0;
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
17
11
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
18
12
  var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
19
13
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
20
14
  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"));
23
15
  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"));
24
18
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
25
19
  var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
26
20
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
27
21
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
28
22
  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"));
31
23
  require("@webex/internal-plugin-mercury");
32
- require("@webex/internal-plugin-conversation");
33
- require("@webex/internal-plugin-metrics");
34
24
  var _webexCore = require("@webex/webex-core");
35
- var _internalMediaCore = require("@webex/internal-media-core");
36
- var mediaHelpersModule = _interopRequireWildcard(require("@webex/media-helpers"));
37
25
  require("webrtc-adapter");
38
26
  var _metrics = _interopRequireDefault(require("../metrics"));
27
+ var _config = require("../metrics/config");
39
28
  var _loggerConfig = _interopRequireDefault(require("../common/logs/logger-config"));
40
- var _config = _interopRequireDefault(require("../common/config"));
29
+ var _config2 = _interopRequireDefault(require("../common/config"));
41
30
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
42
31
  var _request = _interopRequireDefault(require("../common/logs/request"));
43
32
  var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
@@ -55,59 +44,8 @@ var _passwordError = _interopRequireDefault(require("../common/errors/password-e
55
44
  var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
56
45
  var _collection = _interopRequireDefault(require("./collection"));
57
46
  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; }
65
47
  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); }; }
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
- }();
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; } }
111
49
  /**
112
50
  * Meetings Ready Event
113
51
  * Emitted when the meetings instance on webex is ready
@@ -155,7 +93,7 @@ var MediaLogger = /*#__PURE__*/function () {
155
93
  * Maintain a cache of meetings and sync with services.
156
94
  * @class
157
95
  */
158
- var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
96
+ var Meetings = /*#__PURE__*/function (_WebexPlugin) {
159
97
  (0, _inherits2.default)(Meetings, _WebexPlugin);
160
98
  var _super = _createSuper(Meetings);
161
99
  /**
@@ -173,14 +111,13 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
173
111
  _this = _super.call.apply(_super, [this].concat(args));
174
112
 
175
113
  /**
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
- *
114
+ * The Meetings request to interact with server
179
115
  * @instance
180
116
  * @type {Object}
181
117
  * @private
182
118
  * @memberof Meetings
183
119
  */
120
+ // @ts-ignore
184
121
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "loggerRequest", void 0);
185
122
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "media", void 0);
186
123
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingCollection", void 0);
@@ -191,77 +128,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
191
128
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "request", void 0);
192
129
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "geoHintInfo", void 0);
193
130
  (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);
196
131
  (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
265
132
  _this.request = new _request2.default({}, {
266
133
  parent: _this.webex
267
134
  });
@@ -285,17 +152,15 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
285
152
  * @memberof Meetings
286
153
  */
287
154
  _this.personalMeetingRoom = null;
288
-
289
155
  /**
290
- * The Reachability object to interact with server
156
+ * The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
291
157
  * starts as null
292
158
  * @instance
293
159
  * @type {Object}
294
160
  * @private
295
161
  * @memberof Meetings
296
162
  */
297
- // @ts-ignore
298
- _this.reachability = new _reachability.default(_this.webex);
163
+ _this.reachability = null;
299
164
 
300
165
  /**
301
166
  * If the meetings plugin has been registered and listening via {@link Meetings#register}
@@ -324,152 +189,50 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
324
189
  * @memberof Meetings
325
190
  */
326
191
  _this.media = {
327
- getUserMedia: _media.default.getUserMedia
192
+ getUserMedia: _media.default.getUserMedia,
193
+ getSupportedDevice: _media.default.getSupportedDevice
328
194
  };
329
195
  _this.onReady();
330
196
  return _this;
331
197
  }
332
198
 
333
199
  /**
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}
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}
338
207
  * @private
339
208
  * @memberof Meetings
340
209
  */
341
210
  (0, _createClass2.default)(Meetings, [{
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
- }
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
- }
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;
415
219
 
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;
429
220
  // getting meeting by correlationId. This will happen for the new event
430
221
  // Either the locus
431
222
  // TODO : Add check for the callBack Address
432
- return this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locusUrl) ||
223
+ meeting = this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locusUrl) ||
433
224
  // @ts-ignore
434
225
  this.meetingCollection.getByKey(_constants.CORRELATION_ID,
435
226
  // @ts-ignore
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);
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));
458
228
 
459
229
  // Special case when locus has got replaced, This only happend once if a replace locus exists
460
230
  // https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-changing-mid-call
461
231
 
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) {
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) {
463
233
  // Always the last element in the replace is the active one
464
234
  meeting = this.meetingCollection.getByKey(_constants.LOCUS_URL, data.locus.replaces[data.locus.replaces.length - 1].locusUrl);
465
235
  }
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
- }
473
236
  if (!meeting) {
474
237
  // TODO: create meeting when we get a meeting object
475
238
  // const checkForEnded = (locus) => {
@@ -509,7 +272,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
509
272
 
510
273
  // It's a new meeting so initialize the locus data
511
274
  meeting.locusInfo.initialSetup(data.locus);
512
- _this2.checkHandleBreakoutLocus(data.locus);
513
275
  }).catch(function (e) {
514
276
  _loggerProxy.default.logger.error(e);
515
277
  }).finally(function () {
@@ -517,14 +279,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
517
279
  // because the other user left so before sending 'added' event make sure it exists in the collection
518
280
 
519
281
  if (_this2.getMeetingByType(_constants._ID_, meeting.id)) {
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
282
+ _metrics.default.postEvent({
283
+ event: _config.eventType.REMOTE_STARTED,
284
+ meeting: meeting,
285
+ data: {
286
+ trigger: _config.trigger.MERCURY_EVENT
528
287
  }
529
288
  });
530
289
  _triggerProxy.default.trigger(_this2, {
@@ -638,13 +397,11 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
638
397
  // @ts-ignore
639
398
  this.webex.once(_constants.READY, function () {
640
399
  // @ts-ignore
641
- _config.default.set(_this4.config);
400
+ _config2.default.set(_this4.config);
642
401
  // @ts-ignore
643
402
  _loggerConfig.default.set(_this4.config.logging);
644
403
  // @ts-ignore
645
404
  _loggerProxy.default.set(_this4.webex.logger);
646
- mediaLogger = new MediaLogger();
647
- (0, _internalMediaCore.setLogger)(mediaLogger);
648
405
 
649
406
  /**
650
407
  * The MeetingInfo object to interact with server
@@ -675,7 +432,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
675
432
  disableNotifications: true
676
433
  });
677
434
  // @ts-ignore
678
- _metrics.default.initialSetup(_this4.webex);
435
+ _metrics.default.initialSetup(_this4.meetingCollection, _this4.webex);
679
436
  });
680
437
  }
681
438
 
@@ -702,6 +459,23 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
702
459
  }
703
460
  }
704
461
 
462
+ /**
463
+ * API to enable or disable TURN discovery
464
+ * @param {Boolean} enable
465
+ * @private
466
+ * @memberof Meetings
467
+ * @returns {undefined}
468
+ */
469
+ }, {
470
+ key: "_toggleTurnDiscovery",
471
+ value: function _toggleTurnDiscovery(enable) {
472
+ if (typeof enable !== 'boolean') {
473
+ return;
474
+ }
475
+ // @ts-ignore
476
+ this.config.experimental.enableTurnDiscovery = enable;
477
+ }
478
+
705
479
  /**
706
480
  * API to toggle starting adhoc meeting
707
481
  * @param {Boolean} changeState
@@ -807,9 +581,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
807
581
  })
808
582
  );
809
583
  }
810
- }, {
811
- key: "uploadLogs",
812
- value:
584
+
813
585
  /**
814
586
  * Uploads logs to the webex services for tracking
815
587
  * @param {Object} [options={}]
@@ -822,13 +594,14 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
822
594
  * @param {String} [options.orgId] org id
823
595
  * @returns {String} feedback ID logs were submitted under
824
596
  */
825
- function uploadLogs() {
597
+ }, {
598
+ key: "uploadLogs",
599
+ value: function uploadLogs() {
826
600
  var _this7 = this;
827
601
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
828
602
  _loggerProxy.default.logger.info('Meetings:index#uploadLogs --> uploading logs');
829
603
  return this.loggerRequest.uploadLogs(options).then(function (uploadResult) {
830
604
  _loggerProxy.default.logger.info('Meetings:index#uploadLogs --> Upload logs for meeting completed.', uploadResult);
831
- _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_SUCCESS, options);
832
605
  _triggerProxy.default.trigger(_this7, {
833
606
  file: 'meetings',
834
607
  function: 'uploadLogs'
@@ -846,14 +619,29 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
846
619
  meetingId: options.meetingId,
847
620
  reason: uploadError
848
621
  });
849
- _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_FAILURE, _objectSpread(_objectSpread({}, options), {}, {
622
+ _metrics.default.sendBehavioralMetric(_constants2.default.UPLOAD_LOGS_FAILURE, {
623
+ // @ts-ignore - seems like typo
624
+ meetingId: options.meetingsId,
850
625
  reason: uploadError.message,
851
626
  stack: uploadError.stack,
852
627
  code: uploadError.code
853
- }));
628
+ });
854
629
  });
855
630
  }
856
631
 
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
+
857
645
  /**
858
646
  * gets the reachability instance for Meetings
859
647
  * @returns {Reachability}
@@ -875,6 +663,9 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
875
663
  }, {
876
664
  key: "startReachability",
877
665
  value: function startReachability() {
666
+ if (!this.reachability) {
667
+ this.setReachability();
668
+ }
878
669
  return this.getReachability().gatherReachability();
879
670
  }
880
671
 
@@ -908,23 +699,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
908
699
  if (res) {
909
700
  _this9.preferredWebexSite = _util2.default.parseDefaultSiteFromMeetingPreferences(res);
910
701
  }
911
-
912
- // fall back to getting the preferred site from the user information
913
- if (!_this9.preferredWebexSite) {
914
- // @ts-ignore
915
- return _this9.webex.internal.user.get().then(function (user) {
916
- var _user$userPreferences, _user$userPreferences2;
917
- 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;
918
- if (preferredWebexSite) {
919
- _this9.preferredWebexSite = preferredWebexSite;
920
- } else {
921
- throw new Error('site not found');
922
- }
923
- }).catch(function () {
924
- _loggerProxy.default.logger.error('Failed to fetch preferred site from user - no site will be set');
925
- });
926
- }
927
- return _promise.default.resolve();
928
702
  });
929
703
  }
930
704
 
@@ -963,14 +737,10 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
963
737
  }
964
738
 
965
739
  /**
966
- * Create a meeting or return an existing meeting.
967
- * @param {string} destination - sipURL, phonenumber, or locus object}
740
+ * Create a meeting.
741
+ * @param {string} destination - sipURL, spaceId, phonenumber, or locus object}
968
742
  * @param {string} [type] - the optional specified type, such as locusId
969
743
  * @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
970
- * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
971
- * @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
972
- * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
973
- * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
974
744
  * @returns {Promise<Meeting>} A new Meeting.
975
745
  * @public
976
746
  * @memberof Meetings
@@ -981,28 +751,16 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
981
751
  var _this10 = this;
982
752
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
983
753
  var useRandomDelayForInfo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
984
- var infoExtraParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
985
- var correlationId = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
986
- var failOnMissingMeetingInfo = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
987
- var callStateForMetrics = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : undefined;
988
754
  // TODO: type should be from a dictionary
989
755
 
990
756
  // Validate meeting information based on the provided destination and
991
757
  // type. This must be performed prior to determining if the meeting is
992
758
  // found in the collection, as we mutate the destination for hydra person
993
759
  // id values.
994
- if (correlationId) {
995
- callStateForMetrics = _objectSpread(_objectSpread({}, callStateForMetrics || {}), {}, {
996
- correlationId: correlationId
997
- });
998
- }
999
760
  return this.meetingInfo.fetchInfoOptions(destination, type)
1000
761
  // Catch a failure to fetch info options.
1001
762
  .catch(function (error) {
1002
- _loggerProxy.default.logger.error("Meetings:index#create --> ERROR, unable to determine info options: ".concat(error.message));
1003
- if (error instanceof _webexErrors.SpaceIDDeprecatedError) {
1004
- throw new _webexErrors.SpaceIDDeprecatedError();
1005
- }
763
+ _loggerProxy.default.logger.info("Meetings:index#create --> INFO, unable to determine info options: ".concat(error.message));
1006
764
  }).then(function () {
1007
765
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1008
766
  // Normalize the destination.
@@ -1031,22 +789,20 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1031
789
  // Validate if a meeting was found.
1032
790
  if (!meeting) {
1033
791
  // Create a meeting based on the normalized destination and type.
1034
- return _this10.createMeeting(targetDest, type, useRandomDelayForInfo, infoExtraParams, callStateForMetrics, failOnMissingMeetingInfo).then(function (createdMeeting) {
792
+ return _this10.createMeeting(targetDest, type, useRandomDelayForInfo).then(function (createdMeeting) {
1035
793
  // If the meeting was successfully created.
1036
794
  if (createdMeeting && createdMeeting.on) {
1037
795
  // Create a destruction event for the meeting.
1038
796
  createdMeeting.on(_constants.EVENTS.DESTROY_MEETING, function (payload) {
1039
797
  // @ts-ignore
1040
798
  if (_this10.config.autoUploadLogs) {
1041
- var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4, _createdMeeting$locus5, _createdMeeting$locus6;
799
+ var _createdMeeting$locus, _createdMeeting$locus2, _createdMeeting$locus3, _createdMeeting$locus4;
1042
800
  _this10.uploadLogs({
1043
801
  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,
1044
- 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,
1045
802
  correlationId: createdMeeting.correlationId,
1046
803
  feedbackId: createdMeeting.correlationId,
1047
804
  locusId: createdMeeting.locusId,
1048
- 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,
1049
- autoupload: true
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
1050
806
  }).then(function () {
1051
807
  return _this10.destroy(createdMeeting, payload.reason);
1052
808
  });
@@ -1057,15 +813,13 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1057
813
  createdMeeting.on(_constants.EVENTS.REQUEST_UPLOAD_LOGS, function (meetingInstance) {
1058
814
  // @ts-ignore
1059
815
  if (_this10.config.autoUploadLogs) {
1060
- var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4, _meetingInstance$locu5, _meetingInstance$locu6;
816
+ var _meetingInstance$locu, _meetingInstance$locu2, _meetingInstance$locu3, _meetingInstance$locu4;
1061
817
  _this10.uploadLogs({
1062
818
  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,
1063
- 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,
1064
819
  correlationId: meetingInstance.correlationId,
1065
820
  feedbackId: meetingInstance.correlationId,
1066
821
  locusId: meetingInstance.locusId,
1067
- 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,
1068
- autoupload: true
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
1069
823
  });
1070
824
  }
1071
825
  });
@@ -1077,7 +831,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1077
831
  return _promise.default.resolve(createdMeeting);
1078
832
  });
1079
833
  }
1080
- meeting.setCallStateForMetrics(callStateForMetrics);
1081
834
 
1082
835
  // Return the existing meeting.
1083
836
  return _promise.default.resolve(meeting);
@@ -1088,22 +841,16 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1088
841
  * @param {String} destination see create()
1089
842
  * @param {String} type see create()
1090
843
  * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
1091
- * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
1092
- * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
1093
- * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
1094
844
  * @returns {Promise} a new meeting instance complete with meeting info and destination
1095
845
  * @private
1096
846
  * @memberof Meetings
1097
847
  */
1098
848
  }, {
1099
849
  key: "createMeeting",
1100
- value: (function () {
1101
- var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(destination) {
850
+ value: function () {
851
+ var _createMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(destination) {
1102
852
  var type,
1103
853
  useRandomDelayForInfo,
1104
- infoExtraParams,
1105
- callStateForMetrics,
1106
- failOnMissingMeetingInfo,
1107
854
  meeting,
1108
855
  _destination$fullStat,
1109
856
  waitingTime,
@@ -1115,15 +862,12 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1115
862
  isMeetingActive,
1116
863
  enableUnifiedMeetings,
1117
864
  meetingAddedType,
1118
- _args3 = arguments;
1119
- return _regenerator.default.wrap(function _callee3$(_context3) {
1120
- while (1) switch (_context3.prev = _context3.next) {
865
+ _args = arguments;
866
+ return _regenerator.default.wrap(function _callee$(_context) {
867
+ while (1) switch (_context.prev = _context.next) {
1121
868
  case 0:
1122
- type = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : null;
1123
- useRandomDelayForInfo = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : false;
1124
- infoExtraParams = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {};
1125
- callStateForMetrics = _args3.length > 4 && _args3[4] !== undefined ? _args3[4] : undefined;
1126
- failOnMissingMeetingInfo = _args3.length > 5 && _args3[5] !== undefined ? _args3[5] : false;
869
+ type = _args.length > 1 && _args[1] !== undefined ? _args[1] : null;
870
+ useRandomDelayForInfo = _args.length > 2 && _args[2] !== undefined ? _args[2] : false;
1127
871
  meeting = new _meeting.default({
1128
872
  // @ts-ignore
1129
873
  userId: this.webex.internal.device.userId,
@@ -1131,18 +875,18 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1131
875
  deviceUrl: this.webex.internal.device.url,
1132
876
  // @ts-ignore
1133
877
  orgId: this.webex.internal.device.orgId,
878
+ roapSeq: 0,
1134
879
  locus: type === _constants._LOCUS_ID_ ? destination : null,
1135
880
  // pass the locus object if present
1136
881
  meetingInfoProvider: this.meetingInfo,
1137
882
  destination: destination,
1138
- destinationType: type,
1139
- callStateForMetrics: callStateForMetrics
883
+ destinationType: type
1140
884
  }, {
1141
885
  // @ts-ignore
1142
886
  parent: this.webex
1143
887
  });
1144
888
  this.meetingCollection.set(meeting);
1145
- _context3.prev = 7;
889
+ _context.prev = 4;
1146
890
  // if no participant has joined the scheduled meeting (meaning meeting is not active) and we get a locusEvent,
1147
891
  // it means the meeting will start in 5-6 min. In that case, we want to fetchMeetingInfo
1148
892
  // between 5 and 2 min (random between 3 minutes) before the meeting starts
@@ -1159,50 +903,32 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1159
903
  isMeetingActive = !!((_destination$fullStat = destination.fullState) !== null && _destination$fullStat !== void 0 && _destination$fullStat.active); // @ts-ignore
1160
904
  enableUnifiedMeetings = this.config.experimental.enableUnifiedMeetings;
1161
905
  if (!(enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0)) {
1162
- _context3.next = 17;
906
+ _context.next = 14;
1163
907
  break;
1164
908
  }
1165
909
  meeting.fetchMeetingInfoTimeoutId = setTimeout(function () {
1166
- return meeting.fetchMeetingInfo({
1167
- extraParams: infoExtraParams,
1168
- 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
1169
- });
910
+ return meeting.fetchMeetingInfo({});
1170
911
  }, waitingTime);
1171
912
  meeting.parseMeetingInfo(undefined, destination);
1172
- _context3.next = 19;
913
+ _context.next = 16;
1173
914
  break;
1174
- case 17:
1175
- _context3.next = 19;
1176
- return meeting.fetchMeetingInfo({
1177
- extraParams: infoExtraParams,
1178
- 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
1179
- });
1180
- case 19:
1181
- _context3.next = 31;
915
+ case 14:
916
+ _context.next = 16;
917
+ return meeting.fetchMeetingInfo({});
918
+ case 16:
919
+ _context.next = 22;
1182
920
  break;
1183
- case 21:
1184
- _context3.prev = 21;
1185
- _context3.t0 = _context3["catch"](7);
1186
- if (!(!(_context3.t0 instanceof _captchaError.default) && !(_context3.t0 instanceof _passwordError.default) && !(_context3.t0 instanceof _permission.default))) {
1187
- _context3.next = 30;
1188
- break;
1189
- }
1190
- _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Info Unable to fetch meeting info for ".concat(destination, "."));
1191
- if (!failOnMissingMeetingInfo) {
1192
- _context3.next = 29;
1193
- 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');
1194
928
  }
1195
- _loggerProxy.default.logger.info("Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.");
1196
- // @ts-ignore
1197
- this.destroy(meeting, _constants.MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1198
- throw new _noMeetingInfo.default();
1199
- case 29:
1200
- // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1201
- _loggerProxy.default.logger.info('Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share');
1202
- case 30:
1203
- _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context3.t0, " fetching /meetingInfo for creation."));
1204
- case 31:
1205
- _context3.prev = 31;
929
+ _loggerProxy.default.logger.debug("Meetings:index#createMeeting --> Debug ".concat(_context.t0, " fetching /meetingInfo for creation."));
930
+ case 22:
931
+ _context.prev = 22;
1206
932
  // For type LOCUS_ID we need to parse the locus object to get the information
1207
933
  // about the caller and callee
1208
934
  // Meeting Added event will be created in `handleLocusEvent`
@@ -1222,16 +948,16 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1222
948
  type: meetingAddedType
1223
949
  });
1224
950
  }
1225
- return _context3.finish(31);
1226
- case 34:
1227
- return _context3.abrupt("return", meeting);
1228
- case 35:
951
+ return _context.finish(22);
952
+ case 25:
953
+ return _context.abrupt("return", meeting);
954
+ case 26:
1229
955
  case "end":
1230
- return _context3.stop();
956
+ return _context.stop();
1231
957
  }
1232
- }, _callee3, this, [[7, 21, 31, 34]]);
958
+ }, _callee, this, [[4, 18, 22, 25]]);
1233
959
  }));
1234
- function createMeeting(_x3) {
960
+ function createMeeting(_x) {
1235
961
  return _createMeeting.apply(this, arguments);
1236
962
  }
1237
963
  return createMeeting;
@@ -1244,7 +970,6 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1244
970
  * @public
1245
971
  * @memberof Meetings
1246
972
  */
1247
- )
1248
973
  }, {
1249
974
  key: "getMeetingByType",
1250
975
  value: function getMeetingByType(type, value) {
@@ -1282,8 +1007,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1282
1007
  return this.request.getActiveMeetings().then(function (locusArray) {
1283
1008
  var activeLocusUrl = [];
1284
1009
  if (locusArray !== null && locusArray !== void 0 && locusArray.loci && locusArray.loci.length > 0) {
1285
- var lociToUpdate = _this11.sortLocusArrayToUpdate(locusArray.loci);
1286
- lociToUpdate.forEach(function (locus) {
1010
+ locusArray.loci.forEach(function (locus) {
1287
1011
  activeLocusUrl.push(locus.url);
1288
1012
  _this11.handleLocusEvent({
1289
1013
  locus: locus,
@@ -1305,81 +1029,7 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1305
1029
  }
1306
1030
  }
1307
1031
  }
1308
- }).catch(function (error) {
1309
- _loggerProxy.default.logger.error("Meetings:index#syncMeetings --> failed to sync meetings, ".concat(error));
1310
- throw new Error(error);
1311
- });
1312
- }
1313
-
1314
- /**
1315
- * sort out locus array for initial creating
1316
- * @param {Array} loci original locus array
1317
- * @returns {undefined}
1318
- * @public
1319
- * @memberof Meetings
1320
- */
1321
- }, {
1322
- key: "sortLocusArrayToUpdate",
1323
- value: function sortLocusArrayToUpdate(loci) {
1324
- var _this12 = this;
1325
- var mainLoci = loci.filter(function (locus) {
1326
- return !_util2.default.isBreakoutLocusDTO(locus);
1327
- });
1328
- var breakoutLoci = loci.filter(function (locus) {
1329
- return _util2.default.isValidBreakoutLocus(locus);
1330
- });
1331
- this.breakoutLocusForHandleLater = [];
1332
- var lociToUpdate = (0, _toConsumableArray2.default)(mainLoci);
1333
- breakoutLoci.forEach(function (breakoutLocus) {
1334
- var associateMainLocus = mainLoci.find(function (mainLocus) {
1335
- var _mainLocus$controls, _mainLocus$controls$b, _breakoutLocus$contro, _breakoutLocus$contro2;
1336
- 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);
1337
- });
1338
- var existCorrespondingMeeting = _this12.getCorrespondingMeetingByLocus({
1339
- locus: breakoutLocus,
1340
- locusUrl: breakoutLocus.url
1341
- });
1342
- if (associateMainLocus && !existCorrespondingMeeting) {
1343
- // if exists both main session and breakout session locus of the same non-exist meeting, handle main locus first,
1344
- // after meeting create with main locus, then handle the associate breakout locus.
1345
- // if only handle breakout locus, will miss some date
1346
- _this12.breakoutLocusForHandleLater.push(breakoutLocus);
1347
- } else {
1348
- lociToUpdate.push(breakoutLocus);
1349
- }
1350
1032
  });
1351
- return lociToUpdate;
1352
- }
1353
-
1354
- /**
1355
- * check breakout locus which waiting for main locus's meeting to be created, then handle the breakout locus
1356
- * @param {Object} newCreatedLocus the locus which just create meeting object of it
1357
- * @returns {undefined}
1358
- * @public
1359
- * @memberof Meetings
1360
- */
1361
- }, {
1362
- key: "checkHandleBreakoutLocus",
1363
- value: function checkHandleBreakoutLocus(newCreatedLocus) {
1364
- if (!newCreatedLocus || !this.breakoutLocusForHandleLater || !this.breakoutLocusForHandleLater.length) {
1365
- return;
1366
- }
1367
- if (_util2.default.isBreakoutLocusDTO(newCreatedLocus)) {
1368
- return;
1369
- }
1370
- var existIndex = this.breakoutLocusForHandleLater.findIndex(function (breakoutLocus) {
1371
- var _breakoutLocus$contro3, _breakoutLocus$contro4, _newCreatedLocus$cont, _newCreatedLocus$cont2;
1372
- 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);
1373
- });
1374
- if (existIndex < 0) {
1375
- return;
1376
- }
1377
- var associateBreakoutLocus = this.breakoutLocusForHandleLater[existIndex];
1378
- this.handleLocusEvent({
1379
- locus: associateBreakoutLocus,
1380
- locusUrl: associateBreakoutLocus.url
1381
- });
1382
- this.breakoutLocusForHandleLater.splice(existIndex, 1);
1383
1033
  }
1384
1034
 
1385
1035
  /**
@@ -1407,20 +1057,8 @@ var Meetings = exports.default = /*#__PURE__*/function (_WebexPlugin) {
1407
1057
  value: function getLogger() {
1408
1058
  return _loggerProxy.default.get();
1409
1059
  }
1410
-
1411
- /**
1412
- * Returns the first meeting it finds that has the webrtc media connection created.
1413
- * Useful for debugging in the console.
1414
- *
1415
- * @private
1416
- * @returns {Meeting} Meeting object that has a webrtc media connection, else undefined
1417
- */
1418
- }, {
1419
- key: "getActiveWebrtcMeeting",
1420
- value: function getActiveWebrtcMeeting() {
1421
- return this.meetingCollection.getActiveWebrtcMeeting();
1422
- }
1423
1060
  }]);
1424
1061
  return Meetings;
1425
1062
  }(_webexCore.WebexPlugin);
1063
+ exports.default = Meetings;
1426
1064
  //# sourceMappingURL=index.js.map