@webex/plugin-meetings 3.0.0-stream-classes.5 → 3.0.0

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 (465) hide show
  1. package/.eslintrc.js +6 -0
  2. package/README.md +12 -0
  3. package/babel.config.js +3 -0
  4. package/dist/annotation/constants.js +12 -20
  5. package/dist/annotation/constants.js.map +1 -1
  6. package/dist/annotation/index.js +25 -10
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +2 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/collection.js +1 -2
  11. package/dist/breakouts/collection.js.map +1 -1
  12. package/dist/breakouts/edit-lock-error.js +1 -2
  13. package/dist/breakouts/edit-lock-error.js.map +1 -1
  14. package/dist/breakouts/events.js +1 -2
  15. package/dist/breakouts/events.js.map +1 -1
  16. package/dist/breakouts/index.js +13 -14
  17. package/dist/breakouts/index.js.map +1 -1
  18. package/dist/breakouts/request.js +1 -2
  19. package/dist/breakouts/request.js.map +1 -1
  20. package/dist/breakouts/utils.js +3 -6
  21. package/dist/breakouts/utils.js.map +1 -1
  22. package/dist/common/browser-detection.js +2 -3
  23. package/dist/common/browser-detection.js.map +1 -1
  24. package/dist/common/collection.js +3 -4
  25. package/dist/common/collection.js.map +1 -1
  26. package/dist/common/config.js +1 -2
  27. package/dist/common/config.js.map +1 -1
  28. package/dist/common/errors/captcha-error.js +1 -2
  29. package/dist/common/errors/captcha-error.js.map +1 -1
  30. package/dist/common/errors/intent-to-join.js +1 -2
  31. package/dist/common/errors/intent-to-join.js.map +1 -1
  32. package/dist/common/errors/join-meeting.js +1 -2
  33. package/dist/common/errors/join-meeting.js.map +1 -1
  34. package/dist/common/errors/media.js +1 -2
  35. package/dist/common/errors/media.js.map +1 -1
  36. package/dist/common/errors/no-meeting-info.d.ts +14 -0
  37. package/dist/common/errors/no-meeting-info.js +50 -0
  38. package/dist/common/errors/no-meeting-info.js.map +1 -0
  39. package/dist/common/errors/parameter.js +3 -4
  40. package/dist/common/errors/parameter.js.map +1 -1
  41. package/dist/common/errors/password-error.js +1 -2
  42. package/dist/common/errors/password-error.js.map +1 -1
  43. package/dist/common/errors/permission.js +1 -2
  44. package/dist/common/errors/permission.js.map +1 -1
  45. package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
  46. package/dist/common/errors/reclaim-host-role-errors.js +154 -0
  47. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  48. package/dist/common/errors/reconnection-in-progress.js +1 -2
  49. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  50. package/dist/common/errors/reconnection.js +1 -2
  51. package/dist/common/errors/reconnection.js.map +1 -1
  52. package/dist/common/errors/stats.js +1 -2
  53. package/dist/common/errors/stats.js.map +1 -1
  54. package/dist/{types/common → common}/errors/webex-errors.d.ts +13 -1
  55. package/dist/common/errors/webex-errors.js +35 -16
  56. package/dist/common/errors/webex-errors.js.map +1 -1
  57. package/dist/common/errors/webex-meetings-error.js +1 -2
  58. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  59. package/dist/common/events/events-scope.js +1 -2
  60. package/dist/common/events/events-scope.js.map +1 -1
  61. package/dist/common/events/events.js +1 -2
  62. package/dist/common/events/events.js.map +1 -1
  63. package/dist/common/events/trigger-proxy.js +1 -2
  64. package/dist/common/events/trigger-proxy.js.map +1 -1
  65. package/dist/common/events/util.js +1 -2
  66. package/dist/common/events/util.js.map +1 -1
  67. package/dist/common/logs/logger-config.js +1 -2
  68. package/dist/common/logs/logger-config.js.map +1 -1
  69. package/dist/common/logs/logger-proxy.js +1 -2
  70. package/dist/common/logs/logger-proxy.js.map +1 -1
  71. package/dist/{types/common → common}/logs/request.d.ts +3 -1
  72. package/dist/common/logs/request.js +8 -5
  73. package/dist/common/logs/request.js.map +1 -1
  74. package/dist/common/queue.js +2 -4
  75. package/dist/common/queue.js.map +1 -1
  76. package/dist/{types/config.d.ts → config.d.ts} +1 -1
  77. package/dist/config.js +3 -3
  78. package/dist/config.js.map +1 -1
  79. package/dist/{types/constants.d.ts → constants.d.ts} +71 -15
  80. package/dist/constants.js +252 -371
  81. package/dist/constants.js.map +1 -1
  82. package/dist/controls-options-manager/constants.js +3 -6
  83. package/dist/controls-options-manager/constants.js.map +1 -1
  84. package/dist/controls-options-manager/enums.js +7 -10
  85. package/dist/controls-options-manager/enums.js.map +1 -1
  86. package/dist/controls-options-manager/index.js +27 -32
  87. package/dist/controls-options-manager/index.js.map +1 -1
  88. package/dist/controls-options-manager/util.js +1 -2
  89. package/dist/controls-options-manager/util.js.map +1 -1
  90. package/dist/index.js +8 -5
  91. package/dist/index.js.map +1 -1
  92. package/dist/interceptors/index.d.ts +2 -0
  93. package/dist/interceptors/index.js +15 -0
  94. package/dist/interceptors/index.js.map +1 -0
  95. package/dist/interceptors/locusRetry.d.ts +27 -0
  96. package/dist/interceptors/locusRetry.js +94 -0
  97. package/dist/interceptors/locusRetry.js.map +1 -0
  98. package/dist/interpretation/collection.js +1 -2
  99. package/dist/interpretation/collection.js.map +1 -1
  100. package/dist/interpretation/index.js +2 -3
  101. package/dist/interpretation/index.js.map +1 -1
  102. package/dist/interpretation/siLanguage.js +2 -3
  103. package/dist/interpretation/siLanguage.js.map +1 -1
  104. package/dist/locus-info/controlsUtils.js +12 -13
  105. package/dist/locus-info/controlsUtils.js.map +1 -1
  106. package/dist/locus-info/embeddedAppsUtils.js +3 -4
  107. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  108. package/dist/locus-info/fullState.js +1 -2
  109. package/dist/locus-info/fullState.js.map +1 -1
  110. package/dist/locus-info/hostUtils.js +1 -2
  111. package/dist/locus-info/hostUtils.js.map +1 -1
  112. package/dist/{types/locus-info → locus-info}/index.d.ts +1 -1
  113. package/dist/locus-info/index.js +38 -37
  114. package/dist/locus-info/index.js.map +1 -1
  115. package/dist/locus-info/infoUtils.js +3 -4
  116. package/dist/locus-info/infoUtils.js.map +1 -1
  117. package/dist/locus-info/mediaSharesUtils.js +16 -3
  118. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  119. package/dist/{types/locus-info → locus-info}/parser.d.ts +3 -2
  120. package/dist/locus-info/parser.js +43 -31
  121. package/dist/locus-info/parser.js.map +1 -1
  122. package/dist/locus-info/selfUtils.js +7 -6
  123. package/dist/locus-info/selfUtils.js.map +1 -1
  124. package/dist/media/index.js +15 -10
  125. package/dist/media/index.js.map +1 -1
  126. package/dist/media/properties.js +16 -7
  127. package/dist/media/properties.js.map +1 -1
  128. package/dist/media/util.js +1 -2
  129. package/dist/media/util.js.map +1 -1
  130. package/dist/mediaQualityMetrics/config.d.ts +241 -0
  131. package/dist/mediaQualityMetrics/config.js +135 -339
  132. package/dist/mediaQualityMetrics/config.js.map +1 -1
  133. package/dist/{types/meeting → meeting}/in-meeting-actions.d.ts +4 -0
  134. package/dist/meeting/in-meeting-actions.js +18 -2
  135. package/dist/meeting/in-meeting-actions.js.map +1 -1
  136. package/dist/{types/meeting → meeting}/index.d.ts +318 -45
  137. package/dist/meeting/index.js +2620 -1405
  138. package/dist/meeting/index.js.map +1 -1
  139. package/dist/meeting/locusMediaRequest.js +4 -5
  140. package/dist/meeting/locusMediaRequest.js.map +1 -1
  141. package/dist/meeting/muteState.js +2 -4
  142. package/dist/meeting/muteState.js.map +1 -1
  143. package/dist/{types/meeting → meeting}/request.d.ts +2 -0
  144. package/dist/meeting/request.js +46 -31
  145. package/dist/meeting/request.js.map +1 -1
  146. package/dist/meeting/state.js +1 -2
  147. package/dist/meeting/state.js.map +1 -1
  148. package/dist/{types/meeting → meeting}/util.d.ts +17 -0
  149. package/dist/meeting/util.js +83 -10
  150. package/dist/meeting/util.js.map +1 -1
  151. package/dist/meeting/voicea-meeting.d.ts +16 -0
  152. package/dist/meeting/voicea-meeting.js +169 -0
  153. package/dist/meeting/voicea-meeting.js.map +1 -0
  154. package/dist/meeting-info/collection.js +3 -4
  155. package/dist/meeting-info/collection.js.map +1 -1
  156. package/dist/{types/meeting-info → meeting-info}/index.d.ts +7 -0
  157. package/dist/meeting-info/index.js +53 -27
  158. package/dist/meeting-info/index.js.map +1 -1
  159. package/dist/{types/meeting-info → meeting-info}/meeting-info-v2.d.ts +1 -0
  160. package/dist/meeting-info/meeting-info-v2.js +52 -33
  161. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  162. package/dist/meeting-info/request.js +1 -2
  163. package/dist/meeting-info/request.js.map +1 -1
  164. package/dist/meeting-info/util.js +8 -8
  165. package/dist/meeting-info/util.js.map +1 -1
  166. package/dist/meeting-info/utilv2.js +12 -9
  167. package/dist/meeting-info/utilv2.js.map +1 -1
  168. package/dist/{types/meetings → meetings}/collection.d.ts +9 -0
  169. package/dist/meetings/collection.js +21 -5
  170. package/dist/meetings/collection.js.map +1 -1
  171. package/dist/{types/meetings → meetings}/index.d.ts +45 -16
  172. package/dist/meetings/index.js +166 -74
  173. package/dist/meetings/index.js.map +1 -1
  174. package/dist/meetings/request.js +2 -3
  175. package/dist/meetings/request.js.map +1 -1
  176. package/dist/meetings/util.js +3 -10
  177. package/dist/meetings/util.js.map +1 -1
  178. package/dist/{types/member → member}/index.d.ts +1 -0
  179. package/dist/member/index.js +10 -3
  180. package/dist/member/index.js.map +1 -1
  181. package/dist/member/member.types.d.ts +11 -0
  182. package/dist/member/member.types.js +17 -0
  183. package/dist/member/member.types.js.map +1 -0
  184. package/dist/member/types.js +6 -8
  185. package/dist/member/types.js.map +1 -1
  186. package/dist/member/util.js +12 -2
  187. package/dist/member/util.js.map +1 -1
  188. package/dist/members/collection.js +1 -2
  189. package/dist/members/collection.js.map +1 -1
  190. package/dist/members/index.js +25 -8
  191. package/dist/members/index.js.map +1 -1
  192. package/dist/members/request.js +2 -3
  193. package/dist/members/request.js.map +1 -1
  194. package/dist/{types/members → members}/types.d.ts +1 -0
  195. package/dist/members/types.js +3 -4
  196. package/dist/members/types.js.map +1 -1
  197. package/dist/{types/members → members}/util.d.ts +6 -1
  198. package/dist/members/util.js +18 -8
  199. package/dist/members/util.js.map +1 -1
  200. package/dist/{types/metrics → metrics}/constants.d.ts +12 -0
  201. package/dist/metrics/constants.js +14 -3
  202. package/dist/metrics/constants.js.map +1 -1
  203. package/dist/metrics/index.js +3 -2
  204. package/dist/metrics/index.js.map +1 -1
  205. package/dist/multistream/mediaRequestManager.js +9 -11
  206. package/dist/multistream/mediaRequestManager.js.map +1 -1
  207. package/dist/multistream/receiveSlot.js +3 -5
  208. package/dist/multistream/receiveSlot.js.map +1 -1
  209. package/dist/multistream/receiveSlotManager.js +7 -9
  210. package/dist/multistream/receiveSlotManager.js.map +1 -1
  211. package/dist/multistream/remoteMedia.js +3 -5
  212. package/dist/multistream/remoteMedia.js.map +1 -1
  213. package/dist/multistream/remoteMediaGroup.js +7 -6
  214. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  215. package/dist/multistream/remoteMediaManager.js +28 -27
  216. package/dist/multistream/remoteMediaManager.js.map +1 -1
  217. package/dist/multistream/sendSlotManager.js +9 -6
  218. package/dist/multistream/sendSlotManager.js.map +1 -1
  219. package/dist/networkQualityMonitor/index.js +1 -2
  220. package/dist/networkQualityMonitor/index.js.map +1 -1
  221. package/dist/personal-meeting-room/index.js +2 -3
  222. package/dist/personal-meeting-room/index.js.map +1 -1
  223. package/dist/personal-meeting-room/request.js +2 -3
  224. package/dist/personal-meeting-room/request.js.map +1 -1
  225. package/dist/personal-meeting-room/util.js +1 -2
  226. package/dist/personal-meeting-room/util.js.map +1 -1
  227. package/dist/reachability/clusterReachability.d.ts +109 -0
  228. package/dist/reachability/clusterReachability.js +357 -0
  229. package/dist/reachability/clusterReachability.js.map +1 -0
  230. package/dist/reachability/index.d.ts +105 -0
  231. package/dist/reachability/index.js +279 -436
  232. package/dist/reachability/index.js.map +1 -1
  233. package/dist/reachability/request.js +14 -11
  234. package/dist/reachability/request.js.map +1 -1
  235. package/dist/reachability/util.d.ts +8 -0
  236. package/dist/reachability/util.js +29 -0
  237. package/dist/reachability/util.js.map +1 -0
  238. package/dist/reactions/constants.js +1 -2
  239. package/dist/reactions/constants.js.map +1 -1
  240. package/dist/reactions/reactions.js +2 -4
  241. package/dist/reactions/reactions.js.map +1 -1
  242. package/dist/reactions/reactions.type.js +6 -8
  243. package/dist/reactions/reactions.type.js.map +1 -1
  244. package/dist/{types/reconnection-manager → reconnection-manager}/index.d.ts +10 -0
  245. package/dist/reconnection-manager/index.js +129 -106
  246. package/dist/reconnection-manager/index.js.map +1 -1
  247. package/dist/recording-controller/enums.js +4 -5
  248. package/dist/recording-controller/enums.js.map +1 -1
  249. package/dist/recording-controller/index.js +43 -51
  250. package/dist/recording-controller/index.js.map +1 -1
  251. package/dist/recording-controller/util.js +1 -2
  252. package/dist/recording-controller/util.js.map +1 -1
  253. package/dist/{types/roap → roap}/index.d.ts +2 -1
  254. package/dist/roap/index.js +59 -28
  255. package/dist/roap/index.js.map +1 -1
  256. package/dist/roap/request.js +14 -22
  257. package/dist/roap/request.js.map +1 -1
  258. package/dist/{types/roap → roap}/turnDiscovery.d.ts +21 -4
  259. package/dist/roap/turnDiscovery.js +182 -89
  260. package/dist/roap/turnDiscovery.js.map +1 -1
  261. package/dist/rtcMetrics/constants.js +1 -2
  262. package/dist/rtcMetrics/constants.js.map +1 -1
  263. package/dist/{types/rtcMetrics → rtcMetrics}/index.d.ts +15 -1
  264. package/dist/rtcMetrics/index.js +72 -12
  265. package/dist/rtcMetrics/index.js.map +1 -1
  266. package/dist/statsAnalyzer/global.js +1 -2
  267. package/dist/statsAnalyzer/global.js.map +1 -1
  268. package/dist/{types/statsAnalyzer → statsAnalyzer}/index.d.ts +28 -11
  269. package/dist/statsAnalyzer/index.js +371 -318
  270. package/dist/statsAnalyzer/index.js.map +1 -1
  271. package/dist/statsAnalyzer/mqaUtil.d.ts +48 -0
  272. package/dist/statsAnalyzer/mqaUtil.js +295 -162
  273. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  274. package/dist/transcription/index.js +1 -2
  275. package/dist/transcription/index.js.map +1 -1
  276. package/dist/webinar/collection.d.ts +16 -0
  277. package/dist/webinar/collection.js +43 -0
  278. package/dist/webinar/collection.js.map +1 -0
  279. package/dist/webinar/index.d.ts +5 -0
  280. package/dist/webinar/index.js +68 -0
  281. package/dist/webinar/index.js.map +1 -0
  282. package/jest.config.js +3 -0
  283. package/package.json +44 -24
  284. package/process +1 -0
  285. package/src/common/errors/no-meeting-info.ts +24 -0
  286. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  287. package/src/common/errors/webex-errors.ts +19 -2
  288. package/src/common/logs/request.ts +5 -1
  289. package/src/config.ts +3 -5
  290. package/src/constants.ts +77 -8
  291. package/src/index.ts +4 -0
  292. package/src/interceptors/index.ts +3 -0
  293. package/src/interceptors/locusRetry.ts +67 -0
  294. package/src/locus-info/index.ts +19 -14
  295. package/src/locus-info/mediaSharesUtils.ts +16 -0
  296. package/src/locus-info/parser.ts +40 -21
  297. package/src/media/index.ts +8 -6
  298. package/src/media/properties.ts +17 -2
  299. package/src/mediaQualityMetrics/config.ts +103 -238
  300. package/src/meeting/in-meeting-actions.ts +8 -0
  301. package/src/meeting/index.ts +1664 -642
  302. package/src/meeting/request.ts +18 -0
  303. package/src/meeting/util.ts +102 -1
  304. package/src/meeting/voicea-meeting.ts +122 -0
  305. package/src/meeting-info/index.ts +47 -20
  306. package/src/meeting-info/meeting-info-v2.ts +32 -16
  307. package/src/meeting-info/util.ts +12 -9
  308. package/src/meeting-info/utilv2.ts +25 -15
  309. package/src/meetings/collection.ts +13 -0
  310. package/src/meetings/index.ts +112 -31
  311. package/src/meetings/util.ts +2 -8
  312. package/src/member/index.ts +9 -1
  313. package/src/member/member.types.ts +13 -0
  314. package/src/member/util.ts +14 -0
  315. package/src/members/index.ts +29 -2
  316. package/src/members/types.ts +1 -0
  317. package/src/members/util.ts +15 -1
  318. package/src/metrics/constants.ts +12 -0
  319. package/src/reachability/clusterReachability.ts +320 -0
  320. package/src/reachability/index.ts +221 -382
  321. package/src/reachability/request.ts +1 -1
  322. package/src/reachability/util.ts +24 -0
  323. package/src/reconnection-manager/index.ts +87 -83
  324. package/src/roap/index.ts +60 -24
  325. package/src/roap/request.ts +4 -17
  326. package/src/roap/turnDiscovery.ts +112 -39
  327. package/src/rtcMetrics/index.ts +71 -5
  328. package/src/statsAnalyzer/index.ts +430 -427
  329. package/src/statsAnalyzer/mqaUtil.ts +317 -168
  330. package/src/webinar/collection.ts +31 -0
  331. package/src/webinar/index.ts +62 -0
  332. package/test/integration/spec/journey.js +12 -12
  333. package/test/integration/spec/space-meeting.js +1 -1
  334. package/test/unit/spec/breakouts/breakout.ts +2 -1
  335. package/test/unit/spec/breakouts/index.ts +7 -4
  336. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  337. package/test/unit/spec/locus-info/index.js +88 -12
  338. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  339. package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
  340. package/test/unit/spec/locus-info/parser.js +54 -13
  341. package/test/unit/spec/locus-info/selfUtils.js +1 -1
  342. package/test/unit/spec/media/index.ts +25 -4
  343. package/test/unit/spec/media/properties.ts +2 -2
  344. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  345. package/test/unit/spec/meeting/index.js +4388 -1382
  346. package/test/unit/spec/meeting/request.js +63 -12
  347. package/test/unit/spec/meeting/utils.js +145 -10
  348. package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
  349. package/test/unit/spec/meeting-info/index.js +180 -61
  350. package/test/unit/spec/meeting-info/meetinginfov2.js +216 -68
  351. package/test/unit/spec/meetings/collection.js +12 -0
  352. package/test/unit/spec/meetings/index.js +674 -193
  353. package/test/unit/spec/meetings/utils.js +35 -12
  354. package/test/unit/spec/member/index.js +8 -7
  355. package/test/unit/spec/member/util.js +32 -0
  356. package/test/unit/spec/members/index.js +130 -17
  357. package/test/unit/spec/members/utils.js +26 -0
  358. package/test/unit/spec/metrics/index.js +1 -2
  359. package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
  360. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  361. package/test/unit/spec/reachability/index.ts +505 -135
  362. package/test/unit/spec/reachability/util.ts +40 -0
  363. package/test/unit/spec/reconnection-manager/index.js +74 -17
  364. package/test/unit/spec/recording-controller/index.js +0 -1
  365. package/test/unit/spec/roap/index.ts +181 -61
  366. package/test/unit/spec/roap/request.ts +27 -3
  367. package/test/unit/spec/roap/turnDiscovery.ts +363 -102
  368. package/test/unit/spec/rtcMetrics/index.ts +57 -3
  369. package/test/unit/spec/stats-analyzer/index.js +1225 -12
  370. package/test/unit/spec/webinar/collection.ts +13 -0
  371. package/test/unit/spec/webinar/index.ts +60 -0
  372. package/test/utils/webex-test-users.js +12 -4
  373. package/dist/types/mediaQualityMetrics/config.d.ts +0 -365
  374. package/dist/types/reachability/index.d.ts +0 -152
  375. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -24
  376. /package/dist/{types/annotation → annotation}/annotation.types.d.ts +0 -0
  377. /package/dist/{types/annotation → annotation}/constants.d.ts +0 -0
  378. /package/dist/{types/annotation → annotation}/index.d.ts +0 -0
  379. /package/dist/{types/breakouts → breakouts}/breakout.d.ts +0 -0
  380. /package/dist/{types/breakouts → breakouts}/collection.d.ts +0 -0
  381. /package/dist/{types/breakouts → breakouts}/edit-lock-error.d.ts +0 -0
  382. /package/dist/{types/breakouts → breakouts}/events.d.ts +0 -0
  383. /package/dist/{types/breakouts → breakouts}/index.d.ts +0 -0
  384. /package/dist/{types/breakouts → breakouts}/request.d.ts +0 -0
  385. /package/dist/{types/breakouts → breakouts}/utils.d.ts +0 -0
  386. /package/dist/{types/common → common}/browser-detection.d.ts +0 -0
  387. /package/dist/{types/common → common}/collection.d.ts +0 -0
  388. /package/dist/{types/common → common}/config.d.ts +0 -0
  389. /package/dist/{types/common → common}/errors/captcha-error.d.ts +0 -0
  390. /package/dist/{types/common → common}/errors/intent-to-join.d.ts +0 -0
  391. /package/dist/{types/common → common}/errors/join-meeting.d.ts +0 -0
  392. /package/dist/{types/common → common}/errors/media.d.ts +0 -0
  393. /package/dist/{types/common → common}/errors/parameter.d.ts +0 -0
  394. /package/dist/{types/common → common}/errors/password-error.d.ts +0 -0
  395. /package/dist/{types/common → common}/errors/permission.d.ts +0 -0
  396. /package/dist/{types/common → common}/errors/reconnection-in-progress.d.ts +0 -0
  397. /package/dist/{types/common → common}/errors/reconnection.d.ts +0 -0
  398. /package/dist/{types/common → common}/errors/stats.d.ts +0 -0
  399. /package/dist/{types/common → common}/errors/webex-meetings-error.d.ts +0 -0
  400. /package/dist/{types/common → common}/events/events-scope.d.ts +0 -0
  401. /package/dist/{types/common → common}/events/events.d.ts +0 -0
  402. /package/dist/{types/common → common}/events/trigger-proxy.d.ts +0 -0
  403. /package/dist/{types/common → common}/events/util.d.ts +0 -0
  404. /package/dist/{types/common → common}/logs/logger-config.d.ts +0 -0
  405. /package/dist/{types/common → common}/logs/logger-proxy.d.ts +0 -0
  406. /package/dist/{types/common → common}/queue.d.ts +0 -0
  407. /package/dist/{types/controls-options-manager → controls-options-manager}/constants.d.ts +0 -0
  408. /package/dist/{types/controls-options-manager → controls-options-manager}/enums.d.ts +0 -0
  409. /package/dist/{types/controls-options-manager → controls-options-manager}/index.d.ts +0 -0
  410. /package/dist/{types/controls-options-manager → controls-options-manager}/types.d.ts +0 -0
  411. /package/dist/{types/controls-options-manager → controls-options-manager}/util.d.ts +0 -0
  412. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  413. /package/dist/{types/interpretation → interpretation}/collection.d.ts +0 -0
  414. /package/dist/{types/interpretation → interpretation}/index.d.ts +0 -0
  415. /package/dist/{types/interpretation → interpretation}/siLanguage.d.ts +0 -0
  416. /package/dist/{types/locus-info → locus-info}/controlsUtils.d.ts +0 -0
  417. /package/dist/{types/locus-info → locus-info}/embeddedAppsUtils.d.ts +0 -0
  418. /package/dist/{types/locus-info → locus-info}/fullState.d.ts +0 -0
  419. /package/dist/{types/locus-info → locus-info}/hostUtils.d.ts +0 -0
  420. /package/dist/{types/locus-info → locus-info}/infoUtils.d.ts +0 -0
  421. /package/dist/{types/locus-info → locus-info}/mediaSharesUtils.d.ts +0 -0
  422. /package/dist/{types/locus-info → locus-info}/selfUtils.d.ts +0 -0
  423. /package/dist/{types/media → media}/index.d.ts +0 -0
  424. /package/dist/{types/media → media}/properties.d.ts +0 -0
  425. /package/dist/{types/media → media}/util.d.ts +0 -0
  426. /package/dist/{types/meeting → meeting}/locusMediaRequest.d.ts +0 -0
  427. /package/dist/{types/meeting → meeting}/muteState.d.ts +0 -0
  428. /package/dist/{types/meeting → meeting}/request.type.d.ts +0 -0
  429. /package/dist/{types/meeting → meeting}/state.d.ts +0 -0
  430. /package/dist/{types/meeting-info → meeting-info}/collection.d.ts +0 -0
  431. /package/dist/{types/meeting-info → meeting-info}/request.d.ts +0 -0
  432. /package/dist/{types/meeting-info → meeting-info}/util.d.ts +0 -0
  433. /package/dist/{types/meeting-info → meeting-info}/utilv2.d.ts +0 -0
  434. /package/dist/{types/meetings → meetings}/meetings.types.d.ts +0 -0
  435. /package/dist/{types/meetings → meetings}/request.d.ts +0 -0
  436. /package/dist/{types/meetings → meetings}/util.d.ts +0 -0
  437. /package/dist/{types/member → member}/types.d.ts +0 -0
  438. /package/dist/{types/member → member}/util.d.ts +0 -0
  439. /package/dist/{types/members → members}/collection.d.ts +0 -0
  440. /package/dist/{types/members → members}/index.d.ts +0 -0
  441. /package/dist/{types/members → members}/request.d.ts +0 -0
  442. /package/dist/{types/metrics → metrics}/index.d.ts +0 -0
  443. /package/dist/{types/multistream → multistream}/mediaRequestManager.d.ts +0 -0
  444. /package/dist/{types/multistream → multistream}/receiveSlot.d.ts +0 -0
  445. /package/dist/{types/multistream → multistream}/receiveSlotManager.d.ts +0 -0
  446. /package/dist/{types/multistream → multistream}/remoteMedia.d.ts +0 -0
  447. /package/dist/{types/multistream → multistream}/remoteMediaGroup.d.ts +0 -0
  448. /package/dist/{types/multistream → multistream}/remoteMediaManager.d.ts +0 -0
  449. /package/dist/{types/multistream → multistream}/sendSlotManager.d.ts +0 -0
  450. /package/dist/{types/networkQualityMonitor → networkQualityMonitor}/index.d.ts +0 -0
  451. /package/dist/{types/personal-meeting-room → personal-meeting-room}/index.d.ts +0 -0
  452. /package/dist/{types/personal-meeting-room → personal-meeting-room}/request.d.ts +0 -0
  453. /package/dist/{types/personal-meeting-room → personal-meeting-room}/util.d.ts +0 -0
  454. /package/dist/{types/reachability → reachability}/request.d.ts +0 -0
  455. /package/dist/{types/reactions → reactions}/constants.d.ts +0 -0
  456. /package/dist/{types/reactions → reactions}/reactions.d.ts +0 -0
  457. /package/dist/{types/reactions → reactions}/reactions.type.d.ts +0 -0
  458. /package/dist/{types/recording-controller → recording-controller}/enums.d.ts +0 -0
  459. /package/dist/{types/recording-controller → recording-controller}/index.d.ts +0 -0
  460. /package/dist/{types/recording-controller → recording-controller}/util.d.ts +0 -0
  461. /package/dist/{types/roap → roap}/request.d.ts +0 -0
  462. /package/dist/{types/rtcMetrics → rtcMetrics}/constants.d.ts +0 -0
  463. /package/dist/{types/statsAnalyzer → statsAnalyzer}/global.d.ts +0 -0
  464. /package/dist/{types/transcription → transcription}/index.d.ts +0 -0
  465. /package/test/unit/spec/locus-info/{selfConstant.js → lib/selfConstant.js} +0 -0
@@ -49,7 +49,7 @@ import {
49
49
  import BEHAVIORAL_METRICS from '../metrics/constants';
50
50
  import MeetingInfo from '../meeting-info';
51
51
  import MeetingInfoV2 from '../meeting-info/meeting-info-v2';
52
- import Meeting from '../meeting';
52
+ import Meeting, {CallStateForMetrics} from '../meeting';
53
53
  import PersonalMeetingRoom from '../personal-meeting-room';
54
54
  import Reachability from '../reachability';
55
55
  import Request from './request';
@@ -61,6 +61,7 @@ import MeetingsUtil from './util';
61
61
  import PermissionError from '../common/errors/permission';
62
62
  import {INoiseReductionEffect, IVirtualBackgroundEffect} from './meetings.types';
63
63
  import {SpaceIDDeprecatedError} from '../common/errors/webex-errors';
64
+ import NoMeetingInfoError from '../common/errors/no-meeting-info';
64
65
 
65
66
  let mediaLogger;
66
67
 
@@ -583,7 +584,7 @@ export default class Meetings extends WebexPlugin {
583
584
 
584
585
  // @ts-ignore
585
586
  this.webex.internal.mercury.on(ONLINE, () => {
586
- this.syncMeetings();
587
+ this.syncMeetings({keepOnlyLocusMeetings: false});
587
588
  });
588
589
 
589
590
  // @ts-ignore
@@ -681,35 +682,38 @@ export default class Meetings extends WebexPlugin {
681
682
  }
682
683
 
683
684
  /**
684
- * API to enable or disable TURN discovery
685
- * @param {Boolean} enable
685
+ * API to toggle starting adhoc meeting
686
+ * @param {Boolean} changeState
686
687
  * @private
687
688
  * @memberof Meetings
688
689
  * @returns {undefined}
689
690
  */
690
- private _toggleTurnDiscovery(enable: boolean) {
691
- if (typeof enable !== 'boolean') {
691
+ private _toggleAdhocMeetings(changeState: boolean) {
692
+ if (typeof changeState !== 'boolean') {
692
693
  return;
693
694
  }
694
695
  // @ts-ignore
695
- this.config.experimental.enableTurnDiscovery = enable;
696
+ if (this.config?.experimental?.enableAdhocMeetings !== changeState) {
697
+ // @ts-ignore
698
+ this.config.experimental.enableAdhocMeetings = changeState;
699
+ }
696
700
  }
697
701
 
698
702
  /**
699
- * API to toggle starting adhoc meeting
700
- * @param {Boolean} changeState
703
+ * API to toggle TCP reachability, needs to be called before webex.meetings.register()
704
+ * @param {Boolean} newValue
701
705
  * @private
702
706
  * @memberof Meetings
703
707
  * @returns {undefined}
704
708
  */
705
- private _toggleAdhocMeetings(changeState: boolean) {
706
- if (typeof changeState !== 'boolean') {
709
+ private _toggleTcpReachability(newValue: boolean) {
710
+ if (typeof newValue !== 'boolean') {
707
711
  return;
708
712
  }
709
713
  // @ts-ignore
710
- if (this.config?.experimental?.enableAdhocMeetings !== changeState) {
714
+ if (this.config.experimental.enableTcpReachability !== newValue) {
711
715
  // @ts-ignore
712
- this.config.experimental.enableAdhocMeetings = changeState;
716
+ this.config.experimental.enableTcpReachability = newValue;
713
717
  }
714
718
  }
715
719
 
@@ -869,8 +873,10 @@ export default class Meetings extends WebexPlugin {
869
873
  */
870
874
  uploadLogs(
871
875
  options: {
876
+ autoupload?: boolean;
872
877
  callStart?: string;
873
878
  feedbackId?: string;
879
+ locussessionid?: string;
874
880
  locusId?: string;
875
881
  correlationId?: string;
876
882
  meetingId?: string;
@@ -1037,12 +1043,19 @@ export default class Meetings extends WebexPlugin {
1037
1043
  }
1038
1044
 
1039
1045
  /**
1040
- * Create a meeting.
1046
+ * Create a meeting or return an existing meeting.
1047
+ *
1048
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
1049
+ *
1041
1050
  * @param {string} destination - sipURL, phonenumber, or locus object}
1042
1051
  * @param {string} [type] - the optional specified type, such as locusId
1043
1052
  * @param {Boolean} useRandomDelayForInfo - whether a random delay should be added to fetching meeting info
1044
1053
  * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
1045
- * @param {string} correlationId - the optional specified correlationId
1054
+ * @param {string} correlationId - the optional specified correlationId (callStateForMetrics.correlationId can be provided instead)
1055
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
1056
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
1057
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
1058
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
1046
1059
  * @returns {Promise<Meeting>} A new Meeting.
1047
1060
  * @public
1048
1061
  * @memberof Meetings
@@ -1052,7 +1065,11 @@ export default class Meetings extends WebexPlugin {
1052
1065
  type: string = null,
1053
1066
  useRandomDelayForInfo = false,
1054
1067
  infoExtraParams = {},
1055
- correlationId: string = undefined
1068
+ correlationId: string = undefined,
1069
+ failOnMissingMeetingInfo = false,
1070
+ callStateForMetrics: CallStateForMetrics = undefined,
1071
+ meetingInfo = undefined,
1072
+ meetingLookupUrl = undefined
1056
1073
  ) {
1057
1074
  // TODO: type should be from a dictionary
1058
1075
 
@@ -1060,6 +1077,10 @@ export default class Meetings extends WebexPlugin {
1060
1077
  // type. This must be performed prior to determining if the meeting is
1061
1078
  // found in the collection, as we mutate the destination for hydra person
1062
1079
  // id values.
1080
+ if (correlationId) {
1081
+ callStateForMetrics = {...(callStateForMetrics || {}), correlationId};
1082
+ }
1083
+
1063
1084
  return (
1064
1085
  this.meetingInfo
1065
1086
  .fetchInfoOptions(destination, type)
@@ -1106,7 +1127,10 @@ export default class Meetings extends WebexPlugin {
1106
1127
  type,
1107
1128
  useRandomDelayForInfo,
1108
1129
  infoExtraParams,
1109
- correlationId
1130
+ callStateForMetrics,
1131
+ failOnMissingMeetingInfo,
1132
+ meetingInfo,
1133
+ meetingLookupUrl
1110
1134
  ).then((createdMeeting: any) => {
1111
1135
  // If the meeting was successfully created.
1112
1136
  if (createdMeeting && createdMeeting.on) {
@@ -1116,10 +1140,12 @@ export default class Meetings extends WebexPlugin {
1116
1140
  if (this.config.autoUploadLogs) {
1117
1141
  this.uploadLogs({
1118
1142
  callStart: createdMeeting.locusInfo?.fullState?.lastActive,
1143
+ locussessionid: createdMeeting.locusInfo?.fullState?.sessionId,
1119
1144
  correlationId: createdMeeting.correlationId,
1120
1145
  feedbackId: createdMeeting.correlationId,
1121
1146
  locusId: createdMeeting.locusId,
1122
1147
  meetingId: createdMeeting.locusInfo?.info?.webExMeetingId,
1148
+ autoupload: true,
1123
1149
  }).then(() => this.destroy(createdMeeting, payload.reason));
1124
1150
  } else {
1125
1151
  this.destroy(createdMeeting, payload.reason);
@@ -1131,10 +1157,12 @@ export default class Meetings extends WebexPlugin {
1131
1157
  if (this.config.autoUploadLogs) {
1132
1158
  this.uploadLogs({
1133
1159
  callStart: meetingInstance?.locusInfo?.fullState?.lastActive,
1160
+ locussessionid: meetingInstance?.locusInfo?.fullState?.sessionId,
1134
1161
  correlationId: meetingInstance.correlationId,
1135
1162
  feedbackId: meetingInstance.correlationId,
1136
1163
  locusId: meetingInstance.locusId,
1137
1164
  meetingId: meetingInstance.locusInfo?.info?.webExMeetingId,
1165
+ autoupload: true,
1138
1166
  });
1139
1167
  }
1140
1168
  });
@@ -1148,6 +1176,7 @@ export default class Meetings extends WebexPlugin {
1148
1176
  return Promise.resolve(createdMeeting);
1149
1177
  });
1150
1178
  }
1179
+ meeting.setCallStateForMetrics(callStateForMetrics);
1151
1180
 
1152
1181
  // Return the existing meeting.
1153
1182
  return Promise.resolve(meeting);
@@ -1156,11 +1185,18 @@ export default class Meetings extends WebexPlugin {
1156
1185
  }
1157
1186
 
1158
1187
  /**
1188
+ * Create meeting
1189
+ *
1190
+ * When meeting info passed it should be complete, e.g.: fetched after password or captcha provided
1191
+ *
1159
1192
  * @param {String} destination see create()
1160
1193
  * @param {String} type see create()
1161
1194
  * @param {Boolean} useRandomDelayForInfo whether a random delay should be added to fetching meeting info
1162
1195
  * @param {Object} infoExtraParams extra parameters to be provided when fetching meeting info
1163
- * @param {String} correlationId the optional specified correlationId
1196
+ * @param {CallStateForMetrics} callStateForMetrics - information about call state for metrics
1197
+ * @param {Boolean} failOnMissingMeetingInfo - whether to throw an error if meeting info fails to fetch (for calls that are not 1:1 or content share)
1198
+ * @param {Object} [meetingInfo] - Pre-fetched complete meeting info
1199
+ * @param {String} [meetingLookupUrl] - meeting info prefetch url
1164
1200
  * @returns {Promise} a new meeting instance complete with meeting info and destination
1165
1201
  * @private
1166
1202
  * @memberof Meetings
@@ -1170,7 +1206,10 @@ export default class Meetings extends WebexPlugin {
1170
1206
  type: string = null,
1171
1207
  useRandomDelayForInfo = false,
1172
1208
  infoExtraParams = {},
1173
- correlationId: string = undefined
1209
+ callStateForMetrics: CallStateForMetrics = undefined,
1210
+ failOnMissingMeetingInfo = false,
1211
+ meetingInfo = undefined,
1212
+ meetingLookupUrl = undefined
1174
1213
  ) {
1175
1214
  const meeting = new Meeting(
1176
1215
  {
@@ -1184,7 +1223,7 @@ export default class Meetings extends WebexPlugin {
1184
1223
  meetingInfoProvider: this.meetingInfo,
1185
1224
  destination,
1186
1225
  destinationType: type,
1187
- correlationId,
1226
+ callStateForMetrics,
1188
1227
  },
1189
1228
  {
1190
1229
  // @ts-ignore
@@ -1216,15 +1255,26 @@ export default class Meetings extends WebexPlugin {
1216
1255
  const isMeetingActive = !!destination.fullState?.active;
1217
1256
  // @ts-ignore
1218
1257
  const {enableUnifiedMeetings} = this.config.experimental;
1219
-
1220
- if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
1258
+ const meetingInfoOptions = {
1259
+ extraParams: infoExtraParams,
1260
+ sendCAevents: !!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
1261
+ };
1262
+
1263
+ if (meetingInfo) {
1264
+ meeting.injectMeetingInfo(meetingInfo, meetingInfoOptions, meetingLookupUrl);
1265
+ } else if (
1266
+ enableUnifiedMeetings &&
1267
+ !isMeetingActive &&
1268
+ useRandomDelayForInfo &&
1269
+ waitingTime > 0
1270
+ ) {
1221
1271
  meeting.fetchMeetingInfoTimeoutId = setTimeout(
1222
- () => meeting.fetchMeetingInfo({extraParams: infoExtraParams}),
1272
+ () => meeting.fetchMeetingInfo(meetingInfoOptions),
1223
1273
  waitingTime
1224
1274
  );
1225
1275
  meeting.parseMeetingInfo(undefined, destination);
1226
1276
  } else {
1227
- await meeting.fetchMeetingInfo({extraParams: infoExtraParams});
1277
+ await meeting.fetchMeetingInfo(meetingInfoOptions);
1228
1278
  }
1229
1279
  } catch (err) {
1230
1280
  if (
@@ -1232,10 +1282,18 @@ export default class Meetings extends WebexPlugin {
1232
1282
  !(err instanceof PasswordError) &&
1233
1283
  !(err instanceof PermissionError)
1234
1284
  ) {
1235
- // if there is no meeting info we assume its a 1:1 call or wireless share
1236
1285
  LoggerProxy.logger.info(
1237
1286
  `Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`
1238
1287
  );
1288
+ if (failOnMissingMeetingInfo) {
1289
+ LoggerProxy.logger.info(
1290
+ `Meetings:index#createMeeting --> Destroying meeting due to missing meeting info.`
1291
+ );
1292
+ // @ts-ignore
1293
+ this.destroy(meeting, MEETING_REMOVED_REASON.MISSING_MEETING_INFO);
1294
+ throw new NoMeetingInfoError();
1295
+ }
1296
+ // if there is no meeting info and no error should be thrown then we assume its a 1:1 call or wireless share
1239
1297
  LoggerProxy.logger.info(
1240
1298
  'Meetings:index#createMeeting --> Info assuming this destination is a 1:1 or wireless share'
1241
1299
  );
@@ -1326,12 +1384,22 @@ export default class Meetings extends WebexPlugin {
1326
1384
  }
1327
1385
 
1328
1386
  /**
1329
- * syncs all the meeting from server
1330
- * @returns {undefined}
1387
+ * Syncs all the meetings from server. Does nothing and returns immediately if unverified guest.
1388
+ * @param {boolean} keepOnlyLocusMeetings - whether the sync should keep only locus meetings or any other meeting in meetingCollection
1389
+ * @returns {Promise<void>}
1331
1390
  * @public
1332
1391
  * @memberof Meetings
1333
1392
  */
1334
- public syncMeetings() {
1393
+ public syncMeetings({keepOnlyLocusMeetings = true} = {}): Promise<void> {
1394
+ // @ts-ignore
1395
+ if (this.webex.credentials.isUnverifiedGuest) {
1396
+ LoggerProxy.logger.info(
1397
+ 'Meetings:index#syncMeetings --> skipping meeting sync as unverified guest'
1398
+ );
1399
+
1400
+ return Promise.resolve();
1401
+ }
1402
+
1335
1403
  return this.request
1336
1404
  .getActiveMeetings()
1337
1405
  .then((locusArray) => {
@@ -1350,11 +1418,13 @@ export default class Meetings extends WebexPlugin {
1350
1418
  const meetingsCollection = this.meetingCollection.getAll();
1351
1419
 
1352
1420
  if (Object.keys(meetingsCollection).length > 0) {
1353
- // Some time the mercury event is missed after mercury reconnect
1354
- // if sync returns no locus then clear all the meetings
1421
+ // Sometimes the mercury events are lost after mercury reconnect
1422
+ // Remove any Locus meetings that are not returned by Locus
1423
+ // (they had a locusUrl previously but are no longer active) in the sync
1355
1424
  for (const meeting of Object.values(meetingsCollection)) {
1356
1425
  // @ts-ignore
1357
- if (!activeLocusUrl.includes(meeting.locusUrl)) {
1426
+ const {locusUrl} = meeting;
1427
+ if ((keepOnlyLocusMeetings || locusUrl) && !activeLocusUrl.includes(locusUrl)) {
1358
1428
  // destroy function also uploads logs
1359
1429
  // @ts-ignore
1360
1430
  this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
@@ -1455,4 +1525,15 @@ export default class Meetings extends WebexPlugin {
1455
1525
  getLogger() {
1456
1526
  return LoggerProxy.get();
1457
1527
  }
1528
+
1529
+ /**
1530
+ * Returns the first meeting it finds that has the webrtc media connection created.
1531
+ * Useful for debugging in the console.
1532
+ *
1533
+ * @private
1534
+ * @returns {Meeting} Meeting object that has a webrtc media connection, else undefined
1535
+ */
1536
+ getActiveWebrtcMeeting() {
1537
+ return this.meetingCollection.getActiveWebrtcMeeting();
1538
+ }
1458
1539
  }
@@ -62,7 +62,7 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
62
62
  if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
63
63
  // turn discovery is not part of normal roap protocol and so we are not handling it
64
64
  // through the usual roap state machine
65
- meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message);
65
+ meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message, 'from mercury');
66
66
  } else {
67
67
  const roapMessage = {
68
68
  seq,
@@ -73,13 +73,7 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
73
73
  errorCause,
74
74
  };
75
75
 
76
- const mediaServer = MeetingsUtil.getMediaServer(roapMessage.sdp);
77
-
78
- meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
79
-
80
- if (mediaServer) {
81
- meeting.mediaProperties.webrtcMediaConnection.mediaServer = mediaServer;
82
- }
76
+ meeting.roapMessageReceived(roapMessage);
83
77
  }
84
78
  }
85
79
  }
@@ -11,6 +11,7 @@ import MemberUtil from './util';
11
11
  */
12
12
  export default class Member {
13
13
  associatedUser: any;
14
+ canReclaimHost: boolean;
14
15
  id: any;
15
16
  isAudioMuted: any;
16
17
  isContentSharing: any;
@@ -61,6 +62,13 @@ export default class Member {
61
62
  }
62
63
  | any = {}
63
64
  ) {
65
+ /**
66
+ * @instance
67
+ * @type {Boolean}
68
+ * @public
69
+ * @memberof Member
70
+ */
71
+ this.canReclaimHost = false;
64
72
  /**
65
73
  * The server participant object
66
74
  * @instance
@@ -260,7 +268,6 @@ export default class Member {
260
268
  audio: null,
261
269
  video: null,
262
270
  };
263
-
264
271
  // TODO: more participant types
265
272
  // such as native client, web client, is a device, what type of phone, etc
266
273
  this.processParticipant(participant);
@@ -278,6 +285,7 @@ export default class Member {
278
285
  private processParticipant(participant: object) {
279
286
  this.participant = participant;
280
287
  if (participant) {
288
+ this.canReclaimHost = MemberUtil.canReclaimHost(participant);
281
289
  this.id = MemberUtil.extractId(participant);
282
290
  this.name = MemberUtil.extractName(participant);
283
291
  this.isAudioMuted = MemberUtil.isAudioMuted(participant);
@@ -0,0 +1,13 @@
1
+ // values are inherited from locus so don't update these
2
+ export enum MediaStatus {
3
+ RECVONLY = 'RECVONLY', // participant only receiving and not sending
4
+ SENDONLY = 'SENDONLY', // participant only sending and not receiving
5
+ SENDRECV = 'SENDRECV', // participant both sending and receiving
6
+ INACTIVE = 'INACTIVE', // participant is not connected to media source
7
+ UNKNOWN = 'UNKNOWN', // participant has not added media in the meeting
8
+ }
9
+
10
+ export interface IMediaStatus {
11
+ audio: MediaStatus;
12
+ video: MediaStatus;
13
+ }
@@ -28,6 +28,20 @@ import ParameterError from '../common/errors/parameter';
28
28
 
29
29
  const MemberUtil: any = {};
30
30
 
31
+ /**
32
+ * @param {Object} participant the locus participant
33
+ * @returns {Boolean}
34
+ */
35
+ MemberUtil.canReclaimHost = (participant) => {
36
+ if (!participant) {
37
+ throw new ParameterError(
38
+ 'canReclaimHostRole could not be processed, participant is undefined.'
39
+ );
40
+ }
41
+
42
+ return participant.canReclaimHostRole || false;
43
+ };
44
+
31
45
  /**
32
46
  * @param {Object} participant the locus participant
33
47
  * @returns {[ServerRoleShape]}
@@ -5,11 +5,24 @@ import {isEmpty} from 'lodash';
5
5
  // @ts-ignore
6
6
  import {StatelessWebexPlugin} from '@webex/webex-core';
7
7
 
8
- import {MEETINGS, EVENT_TRIGGERS, FLOOR_ACTION, CONTENT, WHITEBOARD} from '../constants';
8
+ import {
9
+ MEETINGS,
10
+ EVENT_TRIGGERS,
11
+ FLOOR_ACTION,
12
+ CONTENT,
13
+ WHITEBOARD,
14
+ ASSIGN_ROLES_ERROR_CODES,
15
+ } from '../constants';
9
16
  import Trigger from '../common/events/trigger-proxy';
10
17
  import Member from '../member';
11
18
  import LoggerProxy from '../common/logs/logger-proxy';
12
19
  import ParameterError from '../common/errors/parameter';
20
+ import {
21
+ ReclaimHostEmptyWrongKeyError,
22
+ ReclaimHostIsHostAlreadyError,
23
+ ReclaimHostNotAllowedError,
24
+ ReclaimHostNotSupportedError,
25
+ } from '../common/errors/reclaim-host-role-errors';
13
26
 
14
27
  import MembersCollection from './collection';
15
28
  import MembersRequest from './request';
@@ -856,7 +869,21 @@ export default class Members extends StatelessWebexPlugin {
856
869
  }
857
870
  const options = MembersUtil.generateRoleAssignmentMemberOptions(memberId, roles, this.locusUrl);
858
871
 
859
- return this.membersRequest.assignRolesMember(options);
872
+ return this.membersRequest.assignRolesMember(options).catch((error: any) => {
873
+ const errorCode = error.body?.errorCode;
874
+ switch (errorCode) {
875
+ case ASSIGN_ROLES_ERROR_CODES.ReclaimHostNotSupportedErrorCode:
876
+ return Promise.reject(new ReclaimHostNotSupportedError());
877
+ case ASSIGN_ROLES_ERROR_CODES.ReclaimHostNotAllowedErrorCode:
878
+ return Promise.reject(new ReclaimHostNotAllowedError());
879
+ case ASSIGN_ROLES_ERROR_CODES.ReclaimHostEmptyWrongKeyErrorCode:
880
+ return Promise.reject(new ReclaimHostEmptyWrongKeyError());
881
+ case ASSIGN_ROLES_ERROR_CODES.ReclaimHostIsHostAlreadyErrorCode:
882
+ return Promise.reject(new ReclaimHostIsHostAlreadyError());
883
+ default:
884
+ return Promise.reject(error);
885
+ }
886
+ });
860
887
  }
861
888
 
862
889
  /**
@@ -7,6 +7,7 @@ export enum ServerRoles {
7
7
  export type ServerRoleShape = {
8
8
  type: ServerRoles;
9
9
  hasRole: boolean;
10
+ hostKey?: string;
10
11
  };
11
12
 
12
13
  export type RoleAssignmentOptions = {
@@ -201,6 +201,20 @@ const MembersUtil = {
201
201
  };
202
202
  },
203
203
 
204
+ /**
205
+ * @param {ServerRoleShape} role
206
+ * @returns {ServerRoleShape} the role shape to be added to the body
207
+ */
208
+ getAddedRoleShape: (role: ServerRoleShape): ServerRoleShape => {
209
+ const roleShape: ServerRoleShape = {type: role.type, hasRole: role.hasRole};
210
+
211
+ if (role.hostKey) {
212
+ roleShape.hostKey = role.hostKey;
213
+ }
214
+
215
+ return roleShape;
216
+ },
217
+
204
218
  /**
205
219
  * @param {RoleAssignmentOptions} options
206
220
  * @returns {RoleAssignmentRequest} the request parameters (method, uri, body) needed to make a addMember request
@@ -208,7 +222,7 @@ const MembersUtil = {
208
222
  getRoleAssignmentMemberRequestParams: (options: RoleAssignmentOptions): RoleAssignmentRequest => {
209
223
  const body = {role: {roles: []}};
210
224
  options.roles.forEach((role) => {
211
- body.role.roles.push({type: role.type, hasRole: role.hasRole});
225
+ body.role.roles.push(MembersUtil.getAddedRoleShape(role));
212
226
  });
213
227
 
214
228
  const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${CONTROLS}`;
@@ -3,12 +3,14 @@
3
3
  const BEHAVIORAL_METRICS = {
4
4
  MEETINGS_REGISTRATION_FAILED: 'js_sdk_meetings_registration_failed',
5
5
  MEETINGS_REGISTRATION_SUCCESS: 'js_sdk_meetings_registration_success',
6
+ MEETINGS_REGISTRATION_STEP: 'meetings_registration_step',
6
7
  MERCURY_CONNECTION_FAILURE: 'js_sdk_mercury_connection_failure',
7
8
  MERCURY_CONNECTION_RESTORED: 'js_sdk_mercury_connection_restored',
8
9
  JOIN_SUCCESS: 'js_sdk_join_success',
9
10
  JOIN_FAILURE: 'js_sdk_join_failures',
10
11
  ADD_MEDIA_SUCCESS: 'js_sdk_add_media_success',
11
12
  ADD_MEDIA_FAILURE: 'js_sdk_add_media_failures',
13
+ ADD_MEDIA_RETRY: 'js_sdk_add_media_retry',
12
14
  ROAP_MERCURY_EVENT_RECEIVED: 'js_sdk_roap_mercury_received',
13
15
  CONNECTION_SUCCESS: 'js_sdk_connection_success',
14
16
  CONNECTION_FAILURE: 'js_sdk_connection_failures',
@@ -18,14 +20,18 @@ const BEHAVIORAL_METRICS = {
18
20
  GET_USER_MEDIA_FAILURE: 'js_sdk_get_user_media_failures',
19
21
  GET_DISPLAY_MEDIA_FAILURE: 'js_sdk_get_display_media_failures',
20
22
  JOIN_WITH_MEDIA_FAILURE: 'js_sdk_join_with_media_failures',
23
+ LLM_CONNECTION_AFTER_JOIN_FAILURE: 'js_sdk_llm_connection_after_join_failure',
24
+ RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: 'js_sdk_receive_transcription_after_join_failure',
21
25
 
22
26
  DISCONNECT_DUE_TO_INACTIVITY: 'js_sdk_disconnect_due_to_inactivity',
23
27
  MEETING_MEDIA_INACTIVE: 'js_sdk_meeting_media_inactive',
24
28
  MEETING_RECONNECT_FAILURE: 'js_sdk_meeting_reconnect_failures',
25
29
  MEETING_MAX_REJOIN_FAILURE: 'js_sdk_meeting_max_rejoin_failure',
30
+ MEETING_SHARE_SUCCESS: 'js_sdk_meeting_share_success',
26
31
  MEETING_SHARE_FAILURE: 'js_sdk_meeting_share_failures',
27
32
  MEETING_START_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_start_whiteboard_share_failures',
28
33
  MEETING_STOP_WHITEBOARD_SHARE_FAILURE: 'js_sdk_meeting_stop_whiteboard_share_failures',
34
+ MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE: 'js_sdk_meeting_share_video_mute_state_change',
29
35
  MUTE_AUDIO_FAILURE: 'js_sdk_mute_audio_failures',
30
36
  MUTE_VIDEO_FAILURE: 'js_sdk_mute_video_failures',
31
37
  SET_MEETING_QUALITY_FAILURE: 'js_sdk_set_meeting_quality_failures',
@@ -57,6 +63,12 @@ const BEHAVIORAL_METRICS = {
57
63
  MEETING_INFO_POLICY_ERROR: 'js_sdk_meeting_info_policy_error',
58
64
  LOCUS_DELTA_SYNC_FAILED: 'js_sdk_locus_delta_sync_failed',
59
65
  LOCUS_DELTA_OUT_OF_ORDER: 'js_sdk_locus_delta_ooo',
66
+ PERMISSION_TOKEN_REFRESH: 'js_sdk_permission_token_refresh',
67
+ PERMISSION_TOKEN_REFRESH_ERROR: 'js_sdk_permission_token_refresh_error',
68
+ TURN_DISCOVERY_LATENCY: 'js_sdk_turn_discovery_latency',
69
+ ROAP_OFFER_TO_ANSWER_LATENCY: 'js_sdk_roap_offer_to_answer_latency',
70
+ ROAP_HTTP_RESPONSE_MISSING: 'js_sdk_roap_http_response_missing',
71
+ TURN_DISCOVERY_REQUIRES_OK: 'js_sdk_turn_discovery_requires_ok',
60
72
  };
61
73
 
62
74
  export {BEHAVIORAL_METRICS as default};