@webex/plugin-meetings 3.0.0-test.1 → 3.1.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 (431) hide show
  1. package/.eslintrc.js +6 -0
  2. package/babel.config.js +3 -0
  3. package/dist/annotation/constants.js +12 -20
  4. package/dist/annotation/constants.js.map +1 -1
  5. package/dist/annotation/index.js +25 -10
  6. package/dist/annotation/index.js.map +1 -1
  7. package/dist/breakouts/breakout.js +2 -3
  8. package/dist/breakouts/breakout.js.map +1 -1
  9. package/dist/breakouts/collection.js +1 -2
  10. package/dist/breakouts/collection.js.map +1 -1
  11. package/dist/breakouts/edit-lock-error.js +1 -2
  12. package/dist/breakouts/edit-lock-error.js.map +1 -1
  13. package/dist/breakouts/events.js +1 -2
  14. package/dist/breakouts/events.js.map +1 -1
  15. package/dist/breakouts/index.js +13 -14
  16. package/dist/breakouts/index.js.map +1 -1
  17. package/dist/breakouts/request.js +1 -2
  18. package/dist/breakouts/request.js.map +1 -1
  19. package/dist/breakouts/utils.js +3 -6
  20. package/dist/breakouts/utils.js.map +1 -1
  21. package/dist/common/browser-detection.js +2 -3
  22. package/dist/common/browser-detection.js.map +1 -1
  23. package/dist/common/collection.js +3 -4
  24. package/dist/common/collection.js.map +1 -1
  25. package/dist/common/config.js +1 -2
  26. package/dist/common/config.js.map +1 -1
  27. package/dist/common/errors/captcha-error.js +1 -2
  28. package/dist/common/errors/captcha-error.js.map +1 -1
  29. package/dist/common/errors/intent-to-join.js +1 -2
  30. package/dist/common/errors/intent-to-join.js.map +1 -1
  31. package/dist/common/errors/join-meeting.js +1 -2
  32. package/dist/common/errors/join-meeting.js.map +1 -1
  33. package/dist/common/errors/media.js +1 -2
  34. package/dist/common/errors/media.js.map +1 -1
  35. package/dist/common/errors/no-meeting-info.js +1 -2
  36. package/dist/common/errors/no-meeting-info.js.map +1 -1
  37. package/dist/common/errors/parameter.js +3 -4
  38. package/dist/common/errors/parameter.js.map +1 -1
  39. package/dist/common/errors/password-error.js +1 -2
  40. package/dist/common/errors/password-error.js.map +1 -1
  41. package/dist/common/errors/permission.js +1 -2
  42. package/dist/common/errors/permission.js.map +1 -1
  43. package/dist/common/errors/reclaim-host-role-errors.js +6 -10
  44. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  45. package/dist/common/errors/reconnection-in-progress.js +1 -2
  46. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  47. package/dist/common/errors/reconnection.js +1 -2
  48. package/dist/common/errors/reconnection.js.map +1 -1
  49. package/dist/common/errors/stats.js +1 -2
  50. package/dist/common/errors/stats.js.map +1 -1
  51. package/dist/common/errors/webex-errors.js +14 -15
  52. package/dist/common/errors/webex-errors.js.map +1 -1
  53. package/dist/common/errors/webex-meetings-error.js +1 -2
  54. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  55. package/dist/common/events/events-scope.js +1 -2
  56. package/dist/common/events/events-scope.js.map +1 -1
  57. package/dist/common/events/events.js +1 -2
  58. package/dist/common/events/events.js.map +1 -1
  59. package/dist/common/events/trigger-proxy.js +1 -2
  60. package/dist/common/events/trigger-proxy.js.map +1 -1
  61. package/dist/common/events/util.js +1 -2
  62. package/dist/common/events/util.js.map +1 -1
  63. package/dist/common/logs/logger-config.js +1 -2
  64. package/dist/common/logs/logger-config.js.map +1 -1
  65. package/dist/common/logs/logger-proxy.js +1 -2
  66. package/dist/common/logs/logger-proxy.js.map +1 -1
  67. package/dist/{types/common → common}/logs/request.d.ts +1 -1
  68. package/dist/common/logs/request.js +3 -4
  69. package/dist/common/logs/request.js.map +1 -1
  70. package/dist/common/queue.js +2 -4
  71. package/dist/common/queue.js.map +1 -1
  72. package/dist/{types/config.d.ts → config.d.ts} +1 -0
  73. package/dist/config.js +4 -3
  74. package/dist/config.js.map +1 -1
  75. package/dist/{types/constants.d.ts → constants.d.ts} +10 -5
  76. package/dist/constants.js +207 -380
  77. package/dist/constants.js.map +1 -1
  78. package/dist/controls-options-manager/constants.js +3 -6
  79. package/dist/controls-options-manager/constants.js.map +1 -1
  80. package/dist/controls-options-manager/enums.js +7 -10
  81. package/dist/controls-options-manager/enums.js.map +1 -1
  82. package/dist/controls-options-manager/index.js +27 -32
  83. package/dist/controls-options-manager/index.js.map +1 -1
  84. package/dist/controls-options-manager/util.js +1 -2
  85. package/dist/controls-options-manager/util.js.map +1 -1
  86. package/dist/index.js +3 -4
  87. package/dist/index.js.map +1 -1
  88. package/dist/interceptors/index.js.map +1 -1
  89. package/dist/interceptors/locusRetry.js +4 -3
  90. package/dist/interceptors/locusRetry.js.map +1 -1
  91. package/dist/interpretation/collection.js +1 -2
  92. package/dist/interpretation/collection.js.map +1 -1
  93. package/dist/interpretation/index.js +4 -5
  94. package/dist/interpretation/index.js.map +1 -1
  95. package/dist/interpretation/siLanguage.js +2 -3
  96. package/dist/interpretation/siLanguage.js.map +1 -1
  97. package/dist/locus-info/controlsUtils.js +12 -13
  98. package/dist/locus-info/controlsUtils.js.map +1 -1
  99. package/dist/locus-info/embeddedAppsUtils.js +3 -4
  100. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  101. package/dist/locus-info/fullState.js +1 -2
  102. package/dist/locus-info/fullState.js.map +1 -1
  103. package/dist/locus-info/hostUtils.js +1 -2
  104. package/dist/locus-info/hostUtils.js.map +1 -1
  105. package/dist/locus-info/index.js +23 -27
  106. package/dist/locus-info/index.js.map +1 -1
  107. package/dist/locus-info/infoUtils.js +3 -4
  108. package/dist/locus-info/infoUtils.js.map +1 -1
  109. package/dist/locus-info/mediaSharesUtils.js +16 -3
  110. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  111. package/dist/locus-info/parser.js +6 -10
  112. package/dist/locus-info/parser.js.map +1 -1
  113. package/dist/locus-info/selfUtils.js +12 -6
  114. package/dist/locus-info/selfUtils.js.map +1 -1
  115. package/dist/media/MediaConnectionAwaiter.d.ts +61 -0
  116. package/dist/media/MediaConnectionAwaiter.js +163 -0
  117. package/dist/media/MediaConnectionAwaiter.js.map +1 -0
  118. package/dist/media/index.js +9 -5
  119. package/dist/media/index.js.map +1 -1
  120. package/dist/media/properties.js +7 -28
  121. package/dist/media/properties.js.map +1 -1
  122. package/dist/media/util.js +1 -2
  123. package/dist/media/util.js.map +1 -1
  124. package/dist/mediaQualityMetrics/config.js +9 -18
  125. package/dist/mediaQualityMetrics/config.js.map +1 -1
  126. package/dist/meeting/in-meeting-actions.js +14 -2
  127. package/dist/meeting/in-meeting-actions.js.map +1 -1
  128. package/dist/{types/meeting → meeting}/index.d.ts +71 -16
  129. package/dist/meeting/index.js +1411 -1036
  130. package/dist/meeting/index.js.map +1 -1
  131. package/dist/meeting/locusMediaRequest.js +4 -5
  132. package/dist/meeting/locusMediaRequest.js.map +1 -1
  133. package/dist/meeting/muteState.js +2 -4
  134. package/dist/meeting/muteState.js.map +1 -1
  135. package/dist/{types/meeting → meeting}/request.d.ts +3 -0
  136. package/dist/meeting/request.js +45 -36
  137. package/dist/meeting/request.js.map +1 -1
  138. package/dist/meeting/state.js +1 -2
  139. package/dist/meeting/state.js.map +1 -1
  140. package/dist/{types/meeting → meeting}/util.d.ts +1 -0
  141. package/dist/meeting/util.js +13 -10
  142. package/dist/meeting/util.js.map +1 -1
  143. package/dist/meeting/voicea-meeting.d.ts +16 -0
  144. package/dist/meeting/voicea-meeting.js +169 -0
  145. package/dist/meeting/voicea-meeting.js.map +1 -0
  146. package/dist/meeting-info/collection.js +3 -4
  147. package/dist/meeting-info/collection.js.map +1 -1
  148. package/dist/meeting-info/index.js +5 -4
  149. package/dist/meeting-info/index.js.map +1 -1
  150. package/dist/meeting-info/meeting-info-v2.js +27 -29
  151. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  152. package/dist/meeting-info/request.js +1 -2
  153. package/dist/meeting-info/request.js.map +1 -1
  154. package/dist/meeting-info/util.js +8 -8
  155. package/dist/meeting-info/util.js.map +1 -1
  156. package/dist/meeting-info/utilv2.js +15 -9
  157. package/dist/meeting-info/utilv2.js.map +1 -1
  158. package/dist/meetings/collection.js +5 -6
  159. package/dist/meetings/collection.js.map +1 -1
  160. package/dist/{types/meetings → meetings}/index.d.ts +11 -2
  161. package/dist/meetings/index.js +44 -17
  162. package/dist/meetings/index.js.map +1 -1
  163. package/dist/meetings/request.js +2 -3
  164. package/dist/meetings/request.js.map +1 -1
  165. package/dist/meetings/util.js +1 -4
  166. package/dist/meetings/util.js.map +1 -1
  167. package/dist/member/index.js +1 -3
  168. package/dist/member/index.js.map +1 -1
  169. package/dist/member/types.js +6 -8
  170. package/dist/member/types.js.map +1 -1
  171. package/dist/member/util.js +1 -2
  172. package/dist/member/util.js.map +1 -1
  173. package/dist/members/collection.js +1 -2
  174. package/dist/members/collection.js.map +1 -1
  175. package/dist/members/index.js +8 -7
  176. package/dist/members/index.js.map +1 -1
  177. package/dist/members/request.js +2 -3
  178. package/dist/members/request.js.map +1 -1
  179. package/dist/members/types.js +3 -4
  180. package/dist/members/types.js.map +1 -1
  181. package/dist/{types/members → members}/util.d.ts +1 -1
  182. package/dist/members/util.js +3 -4
  183. package/dist/members/util.js.map +1 -1
  184. package/dist/metrics/constants.js +1 -2
  185. package/dist/metrics/constants.js.map +1 -1
  186. package/dist/metrics/index.js +3 -2
  187. package/dist/metrics/index.js.map +1 -1
  188. package/dist/{types/multistream → multistream}/mediaRequestManager.d.ts +1 -2
  189. package/dist/multistream/mediaRequestManager.js +9 -11
  190. package/dist/multistream/mediaRequestManager.js.map +1 -1
  191. package/dist/multistream/receiveSlot.js +3 -5
  192. package/dist/multistream/receiveSlot.js.map +1 -1
  193. package/dist/multistream/receiveSlotManager.js +7 -9
  194. package/dist/multistream/receiveSlotManager.js.map +1 -1
  195. package/dist/multistream/remoteMedia.js +3 -5
  196. package/dist/multistream/remoteMedia.js.map +1 -1
  197. package/dist/{types/multistream → multistream}/remoteMediaGroup.d.ts +1 -1
  198. package/dist/multistream/remoteMediaGroup.js +7 -6
  199. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  200. package/dist/{types/multistream → multistream}/remoteMediaManager.d.ts +1 -2
  201. package/dist/multistream/remoteMediaManager.js +32 -29
  202. package/dist/multistream/remoteMediaManager.js.map +1 -1
  203. package/dist/{types/multistream → multistream}/sendSlotManager.d.ts +1 -2
  204. package/dist/multistream/sendSlotManager.js +9 -6
  205. package/dist/multistream/sendSlotManager.js.map +1 -1
  206. package/dist/networkQualityMonitor/index.js +1 -2
  207. package/dist/networkQualityMonitor/index.js.map +1 -1
  208. package/dist/personal-meeting-room/index.js +2 -3
  209. package/dist/personal-meeting-room/index.js.map +1 -1
  210. package/dist/personal-meeting-room/request.js +2 -3
  211. package/dist/personal-meeting-room/request.js.map +1 -1
  212. package/dist/personal-meeting-room/util.js +1 -2
  213. package/dist/personal-meeting-room/util.js.map +1 -1
  214. package/dist/{types/reachability → reachability}/clusterReachability.d.ts +1 -0
  215. package/dist/reachability/clusterReachability.js +35 -20
  216. package/dist/reachability/clusterReachability.js.map +1 -1
  217. package/dist/{types/reachability → reachability}/index.d.ts +4 -0
  218. package/dist/reachability/index.js +41 -12
  219. package/dist/reachability/index.js.map +1 -1
  220. package/dist/reachability/request.js +25 -20
  221. package/dist/reachability/request.js.map +1 -1
  222. package/dist/{types/reachability → reachability}/util.d.ts +7 -0
  223. package/dist/reachability/util.js +19 -0
  224. package/dist/reachability/util.js.map +1 -1
  225. package/dist/reactions/constants.js +1 -2
  226. package/dist/reactions/constants.js.map +1 -1
  227. package/dist/reactions/reactions.js +2 -4
  228. package/dist/reactions/reactions.js.map +1 -1
  229. package/dist/reactions/reactions.type.js +6 -8
  230. package/dist/reactions/reactions.type.js.map +1 -1
  231. package/dist/reconnection-manager/index.js +18 -11
  232. package/dist/reconnection-manager/index.js.map +1 -1
  233. package/dist/recording-controller/enums.js +4 -5
  234. package/dist/recording-controller/enums.js.map +1 -1
  235. package/dist/recording-controller/index.js +43 -51
  236. package/dist/recording-controller/index.js.map +1 -1
  237. package/dist/recording-controller/util.js +1 -2
  238. package/dist/recording-controller/util.js.map +1 -1
  239. package/dist/{types/roap → roap}/index.d.ts +10 -2
  240. package/dist/roap/index.js +17 -3
  241. package/dist/roap/index.js.map +1 -1
  242. package/dist/roap/request.js +10 -10
  243. package/dist/roap/request.js.map +1 -1
  244. package/dist/{types/roap → roap}/turnDiscovery.d.ts +64 -17
  245. package/dist/roap/turnDiscovery.js +316 -134
  246. package/dist/roap/turnDiscovery.js.map +1 -1
  247. package/dist/rtcMetrics/constants.js +1 -2
  248. package/dist/rtcMetrics/constants.js.map +1 -1
  249. package/dist/rtcMetrics/index.js +4 -6
  250. package/dist/rtcMetrics/index.js.map +1 -1
  251. package/dist/statsAnalyzer/global.js +1 -2
  252. package/dist/statsAnalyzer/global.js.map +1 -1
  253. package/dist/statsAnalyzer/index.js +123 -96
  254. package/dist/statsAnalyzer/index.js.map +1 -1
  255. package/dist/statsAnalyzer/mqaUtil.js +24 -31
  256. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  257. package/dist/transcription/index.js +1 -2
  258. package/dist/transcription/index.js.map +1 -1
  259. package/dist/webinar/collection.js +1 -2
  260. package/dist/webinar/collection.js.map +1 -1
  261. package/dist/webinar/index.js +2 -3
  262. package/dist/webinar/index.js.map +1 -1
  263. package/jest.config.js +3 -0
  264. package/package.json +44 -25
  265. package/process +1 -0
  266. package/src/config.ts +3 -4
  267. package/src/constants.ts +13 -4
  268. package/src/interpretation/index.ts +2 -2
  269. package/src/locus-info/mediaSharesUtils.ts +16 -0
  270. package/src/locus-info/selfUtils.ts +5 -0
  271. package/src/media/MediaConnectionAwaiter.ts +174 -0
  272. package/src/media/index.ts +3 -1
  273. package/src/media/properties.ts +6 -31
  274. package/src/meeting/index.ts +526 -227
  275. package/src/meeting/request.ts +18 -2
  276. package/src/meeting/util.ts +6 -1
  277. package/src/meeting/voicea-meeting.ts +122 -0
  278. package/src/meeting-info/meeting-info-v2.ts +5 -11
  279. package/src/meeting-info/util.ts +12 -9
  280. package/src/meeting-info/utilv2.ts +26 -15
  281. package/src/meetings/index.ts +18 -0
  282. package/src/member/index.ts +0 -1
  283. package/src/multistream/mediaRequestManager.ts +1 -1
  284. package/src/multistream/remoteMediaGroup.ts +1 -1
  285. package/src/multistream/remoteMediaManager.ts +1 -2
  286. package/src/multistream/sendSlotManager.ts +1 -2
  287. package/src/reachability/clusterReachability.ts +20 -5
  288. package/src/reachability/index.ts +24 -1
  289. package/src/reachability/request.ts +15 -11
  290. package/src/reachability/util.ts +21 -0
  291. package/src/reconnection-manager/index.ts +1 -1
  292. package/src/roap/index.ts +25 -3
  293. package/src/roap/request.ts +2 -2
  294. package/src/roap/turnDiscovery.ts +244 -78
  295. package/src/statsAnalyzer/index.ts +63 -27
  296. package/test/integration/spec/journey.js +2 -2
  297. package/test/unit/spec/breakouts/breakout.ts +2 -1
  298. package/test/unit/spec/breakouts/index.ts +7 -4
  299. package/test/unit/spec/interpretation/index.ts +4 -1
  300. package/test/unit/spec/locus-info/index.js +27 -18
  301. package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
  302. package/test/unit/spec/locus-info/selfUtils.js +41 -11
  303. package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
  304. package/test/unit/spec/media/index.ts +94 -78
  305. package/test/unit/spec/media/properties.ts +16 -70
  306. package/test/unit/spec/meeting/index.js +757 -141
  307. package/test/unit/spec/meeting/request.js +21 -0
  308. package/test/unit/spec/meeting/utils.js +58 -11
  309. package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
  310. package/test/unit/spec/meeting-info/meetinginfov2.js +20 -15
  311. package/test/unit/spec/meeting-info/utilv2.js +6 -0
  312. package/test/unit/spec/meetings/index.js +101 -13
  313. package/test/unit/spec/metrics/index.js +1 -2
  314. package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
  315. package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -1
  316. package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1
  317. package/test/unit/spec/reachability/clusterReachability.ts +86 -22
  318. package/test/unit/spec/reachability/index.ts +197 -60
  319. package/test/unit/spec/reachability/request.js +15 -7
  320. package/test/unit/spec/reachability/util.ts +32 -2
  321. package/test/unit/spec/reconnection-manager/index.js +28 -0
  322. package/test/unit/spec/recording-controller/index.js +0 -1
  323. package/test/unit/spec/roap/index.ts +61 -6
  324. package/test/unit/spec/roap/turnDiscovery.ts +299 -17
  325. package/test/unit/spec/stats-analyzer/index.js +179 -0
  326. /package/dist/{types/annotation → annotation}/annotation.types.d.ts +0 -0
  327. /package/dist/{types/annotation → annotation}/constants.d.ts +0 -0
  328. /package/dist/{types/annotation → annotation}/index.d.ts +0 -0
  329. /package/dist/{types/breakouts → breakouts}/breakout.d.ts +0 -0
  330. /package/dist/{types/breakouts → breakouts}/collection.d.ts +0 -0
  331. /package/dist/{types/breakouts → breakouts}/edit-lock-error.d.ts +0 -0
  332. /package/dist/{types/breakouts → breakouts}/events.d.ts +0 -0
  333. /package/dist/{types/breakouts → breakouts}/index.d.ts +0 -0
  334. /package/dist/{types/breakouts → breakouts}/request.d.ts +0 -0
  335. /package/dist/{types/breakouts → breakouts}/utils.d.ts +0 -0
  336. /package/dist/{types/common → common}/browser-detection.d.ts +0 -0
  337. /package/dist/{types/common → common}/collection.d.ts +0 -0
  338. /package/dist/{types/common → common}/config.d.ts +0 -0
  339. /package/dist/{types/common → common}/errors/captcha-error.d.ts +0 -0
  340. /package/dist/{types/common → common}/errors/intent-to-join.d.ts +0 -0
  341. /package/dist/{types/common → common}/errors/join-meeting.d.ts +0 -0
  342. /package/dist/{types/common → common}/errors/media.d.ts +0 -0
  343. /package/dist/{types/common → common}/errors/no-meeting-info.d.ts +0 -0
  344. /package/dist/{types/common → common}/errors/parameter.d.ts +0 -0
  345. /package/dist/{types/common → common}/errors/password-error.d.ts +0 -0
  346. /package/dist/{types/common → common}/errors/permission.d.ts +0 -0
  347. /package/dist/{types/common → common}/errors/reclaim-host-role-errors.d.ts +0 -0
  348. /package/dist/{types/common → common}/errors/reconnection-in-progress.d.ts +0 -0
  349. /package/dist/{types/common → common}/errors/reconnection.d.ts +0 -0
  350. /package/dist/{types/common → common}/errors/stats.d.ts +0 -0
  351. /package/dist/{types/common → common}/errors/webex-errors.d.ts +0 -0
  352. /package/dist/{types/common → common}/errors/webex-meetings-error.d.ts +0 -0
  353. /package/dist/{types/common → common}/events/events-scope.d.ts +0 -0
  354. /package/dist/{types/common → common}/events/events.d.ts +0 -0
  355. /package/dist/{types/common → common}/events/trigger-proxy.d.ts +0 -0
  356. /package/dist/{types/common → common}/events/util.d.ts +0 -0
  357. /package/dist/{types/common → common}/logs/logger-config.d.ts +0 -0
  358. /package/dist/{types/common → common}/logs/logger-proxy.d.ts +0 -0
  359. /package/dist/{types/common → common}/queue.d.ts +0 -0
  360. /package/dist/{types/controls-options-manager → controls-options-manager}/constants.d.ts +0 -0
  361. /package/dist/{types/controls-options-manager → controls-options-manager}/enums.d.ts +0 -0
  362. /package/dist/{types/controls-options-manager → controls-options-manager}/index.d.ts +0 -0
  363. /package/dist/{types/controls-options-manager → controls-options-manager}/types.d.ts +0 -0
  364. /package/dist/{types/controls-options-manager → controls-options-manager}/util.d.ts +0 -0
  365. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  366. /package/dist/{types/interceptors → interceptors}/index.d.ts +0 -0
  367. /package/dist/{types/interceptors → interceptors}/locusRetry.d.ts +0 -0
  368. /package/dist/{types/interpretation → interpretation}/collection.d.ts +0 -0
  369. /package/dist/{types/interpretation → interpretation}/index.d.ts +0 -0
  370. /package/dist/{types/interpretation → interpretation}/siLanguage.d.ts +0 -0
  371. /package/dist/{types/locus-info → locus-info}/controlsUtils.d.ts +0 -0
  372. /package/dist/{types/locus-info → locus-info}/embeddedAppsUtils.d.ts +0 -0
  373. /package/dist/{types/locus-info → locus-info}/fullState.d.ts +0 -0
  374. /package/dist/{types/locus-info → locus-info}/hostUtils.d.ts +0 -0
  375. /package/dist/{types/locus-info → locus-info}/index.d.ts +0 -0
  376. /package/dist/{types/locus-info → locus-info}/infoUtils.d.ts +0 -0
  377. /package/dist/{types/locus-info → locus-info}/mediaSharesUtils.d.ts +0 -0
  378. /package/dist/{types/locus-info → locus-info}/parser.d.ts +0 -0
  379. /package/dist/{types/locus-info → locus-info}/selfUtils.d.ts +0 -0
  380. /package/dist/{types/media → media}/index.d.ts +0 -0
  381. /package/dist/{types/media → media}/properties.d.ts +0 -0
  382. /package/dist/{types/media → media}/util.d.ts +0 -0
  383. /package/dist/{types/mediaQualityMetrics → mediaQualityMetrics}/config.d.ts +0 -0
  384. /package/dist/{types/meeting → meeting}/in-meeting-actions.d.ts +0 -0
  385. /package/dist/{types/meeting → meeting}/locusMediaRequest.d.ts +0 -0
  386. /package/dist/{types/meeting → meeting}/muteState.d.ts +0 -0
  387. /package/dist/{types/meeting → meeting}/request.type.d.ts +0 -0
  388. /package/dist/{types/meeting → meeting}/state.d.ts +0 -0
  389. /package/dist/{types/meeting-info → meeting-info}/collection.d.ts +0 -0
  390. /package/dist/{types/meeting-info → meeting-info}/index.d.ts +0 -0
  391. /package/dist/{types/meeting-info → meeting-info}/meeting-info-v2.d.ts +0 -0
  392. /package/dist/{types/meeting-info → meeting-info}/request.d.ts +0 -0
  393. /package/dist/{types/meeting-info → meeting-info}/util.d.ts +0 -0
  394. /package/dist/{types/meeting-info → meeting-info}/utilv2.d.ts +0 -0
  395. /package/dist/{types/meetings → meetings}/collection.d.ts +0 -0
  396. /package/dist/{types/meetings → meetings}/meetings.types.d.ts +0 -0
  397. /package/dist/{types/meetings → meetings}/request.d.ts +0 -0
  398. /package/dist/{types/meetings → meetings}/util.d.ts +0 -0
  399. /package/dist/{types/member → member}/index.d.ts +0 -0
  400. /package/dist/{types/member → member}/types.d.ts +0 -0
  401. /package/dist/{types/member → member}/util.d.ts +0 -0
  402. /package/dist/{types/members → members}/collection.d.ts +0 -0
  403. /package/dist/{types/members → members}/index.d.ts +0 -0
  404. /package/dist/{types/members → members}/request.d.ts +0 -0
  405. /package/dist/{types/members → members}/types.d.ts +0 -0
  406. /package/dist/{types/metrics → metrics}/constants.d.ts +0 -0
  407. /package/dist/{types/metrics → metrics}/index.d.ts +0 -0
  408. /package/dist/{types/multistream → multistream}/receiveSlot.d.ts +0 -0
  409. /package/dist/{types/multistream → multistream}/receiveSlotManager.d.ts +0 -0
  410. /package/dist/{types/multistream → multistream}/remoteMedia.d.ts +0 -0
  411. /package/dist/{types/networkQualityMonitor → networkQualityMonitor}/index.d.ts +0 -0
  412. /package/dist/{types/personal-meeting-room → personal-meeting-room}/index.d.ts +0 -0
  413. /package/dist/{types/personal-meeting-room → personal-meeting-room}/request.d.ts +0 -0
  414. /package/dist/{types/personal-meeting-room → personal-meeting-room}/util.d.ts +0 -0
  415. /package/dist/{types/reachability → reachability}/request.d.ts +0 -0
  416. /package/dist/{types/reactions → reactions}/constants.d.ts +0 -0
  417. /package/dist/{types/reactions → reactions}/reactions.d.ts +0 -0
  418. /package/dist/{types/reactions → reactions}/reactions.type.d.ts +0 -0
  419. /package/dist/{types/reconnection-manager → reconnection-manager}/index.d.ts +0 -0
  420. /package/dist/{types/recording-controller → recording-controller}/enums.d.ts +0 -0
  421. /package/dist/{types/recording-controller → recording-controller}/index.d.ts +0 -0
  422. /package/dist/{types/recording-controller → recording-controller}/util.d.ts +0 -0
  423. /package/dist/{types/roap → roap}/request.d.ts +0 -0
  424. /package/dist/{types/rtcMetrics → rtcMetrics}/constants.d.ts +0 -0
  425. /package/dist/{types/rtcMetrics → rtcMetrics}/index.d.ts +0 -0
  426. /package/dist/{types/statsAnalyzer → statsAnalyzer}/global.d.ts +0 -0
  427. /package/dist/{types/statsAnalyzer → statsAnalyzer}/index.d.ts +0 -0
  428. /package/dist/{types/statsAnalyzer → statsAnalyzer}/mqaUtil.d.ts +0 -0
  429. /package/dist/{types/transcription → transcription}/index.d.ts +0 -0
  430. /package/dist/{types/webinar → webinar}/collection.d.ts +0 -0
  431. /package/dist/{types/webinar → webinar}/index.d.ts +0 -0
@@ -253,6 +253,19 @@ describe('plugin-meetings', () => {
253
253
  });
254
254
  });
255
255
 
256
+ describe('#_toggleTlsReachability', () => {
257
+ it('should have _toggleTlsReachability', () => {
258
+ assert.equal(typeof webex.meetings._toggleTlsReachability, 'function');
259
+ });
260
+
261
+ describe('success', () => {
262
+ it('should update meetings to do TLS reachability', () => {
263
+ webex.meetings._toggleTlsReachability(true);
264
+ assert.equal(webex.meetings.config.experimental.enableTlsReachability, true);
265
+ });
266
+ });
267
+ });
268
+
256
269
  describe('Public API Contracts', () => {
257
270
  describe('#register', () => {
258
271
  it('emits an event and resolves when register succeeds', async () => {
@@ -412,9 +425,13 @@ describe('plugin-meetings', () => {
412
425
  assert.exists(result);
413
426
  assert.instanceOf(result, NoiseReductionEffect);
414
427
  assert.containsAllKeys(result, ['audioContext', 'isEnabled', 'isReady', 'options']);
428
+ assert.equal(result.options.authToken, 'fake_token');
415
429
  assert.deepEqual(result.options, {
416
- authToken: 'fake_token',
417
430
  audioContext: {},
431
+ authToken: 'fake_token',
432
+ mode: 'WORKLET',
433
+ env: 'prod',
434
+ avoidSimd: false,
418
435
  });
419
436
  assert.exists(result.enable);
420
437
  assert.exists(result.disable);
@@ -424,8 +441,9 @@ describe('plugin-meetings', () => {
424
441
  it('creates noise reduction effect with custom options passed', async () => {
425
442
  const effectOptions = {
426
443
  audioContext: {},
427
- mode: 'WORKLET',
428
- env: 'prod',
444
+ mode: 'LEGACY',
445
+ env: 'int',
446
+ avoidSimd: true,
429
447
  };
430
448
 
431
449
  const result = await webex.meetings.createNoiseReductionEffect(effectOptions);
@@ -595,6 +613,7 @@ describe('plugin-meetings', () => {
595
613
  });
596
614
  describe('when destroying meeting is needed', () => {
597
615
  let destroySpy;
616
+ let cleanUpSpy;
598
617
 
599
618
  const meetingCollectionMeetings = {
600
619
  stillValidLocusMeeting: {
@@ -625,7 +644,11 @@ describe('plugin-meetings', () => {
625
644
  loci: [{url: 'still-valid-locus-url'}],
626
645
  })
627
646
  );
628
- MeetingUtil.cleanUp = sinon.stub().returns(Promise.resolve());
647
+ cleanUpSpy = sinon.stub(MeetingUtil, 'cleanUp').returns(Promise.resolve());
648
+ });
649
+
650
+ afterEach(() => {
651
+ cleanUpSpy.restore();
629
652
  });
630
653
 
631
654
  it('destroy any meeting that has no active locus url if keepOnlyLocusMeetings is not defined', async () => {
@@ -1205,7 +1228,8 @@ describe('plugin-meetings', () => {
1205
1228
  webex.meetings.meetingInfo.fetchMeetingInfo = sinon.stub().returns(
1206
1229
  Promise.resolve({
1207
1230
  body: {
1208
- permissionToken: 'PT',
1231
+ permissionToken:
1232
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1209
1233
  meetingJoinUrl: 'meetingJoinUrl',
1210
1234
  },
1211
1235
  })
@@ -1308,7 +1332,8 @@ describe('plugin-meetings', () => {
1308
1332
  const meeting = await webex.meetings.createMeeting('test destination', 'test type');
1309
1333
 
1310
1334
  const expectedMeetingData = {
1311
- permissionToken: 'PT',
1335
+ permissionToken:
1336
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1312
1337
  meetingJoinUrl: 'meetingJoinUrl',
1313
1338
  correlationId: meeting.id,
1314
1339
  };
@@ -1324,7 +1349,8 @@ describe('plugin-meetings', () => {
1324
1349
 
1325
1350
  it('accepts injected meeting info', async () => {
1326
1351
  const meetingInfo = {
1327
- permissionToken: 'PT',
1352
+ permissionToken:
1353
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1328
1354
  meetingJoinUrl: 'meetingJoinUrl',
1329
1355
  };
1330
1356
 
@@ -1356,7 +1382,8 @@ describe('plugin-meetings', () => {
1356
1382
 
1357
1383
  it('accepts injected meeting info with meeting lookup url', async () => {
1358
1384
  const meetingInfo = {
1359
- permissionToken: 'PT',
1385
+ permissionToken:
1386
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1360
1387
  meetingJoinUrl: 'meetingJoinUrl',
1361
1388
  };
1362
1389
 
@@ -1401,7 +1428,8 @@ describe('plugin-meetings', () => {
1401
1428
  infoExtraParams
1402
1429
  );
1403
1430
  const expectedMeetingData = {
1404
- permissionToken: 'PT',
1431
+ permissionToken:
1432
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1405
1433
  meetingJoinUrl: 'meetingJoinUrl',
1406
1434
  };
1407
1435
 
@@ -1502,8 +1530,10 @@ describe('plugin-meetings', () => {
1502
1530
  assert.equal(meeting.meetingNumber, 'locusMeetingId');
1503
1531
  assert.equal(meeting.meetingJoinUrl, 'meetingJoinUrl');
1504
1532
  assert.equal(meeting.owner, 'locusOwner');
1505
- assert.equal(meeting.permissionToken, 'PT');
1506
-
1533
+ assert.equal(
1534
+ meeting.permissionToken,
1535
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0'
1536
+ );
1507
1537
  assert.calledWith(
1508
1538
  TriggerProxy.trigger,
1509
1539
  meeting,
@@ -1802,9 +1832,13 @@ describe('plugin-meetings', () => {
1802
1832
  });
1803
1833
  });
1804
1834
  describe('Public Event Triggers', () => {
1835
+ let cleanUpSpy;
1805
1836
  describe('#destroy', () => {
1806
1837
  beforeEach(() => {
1807
- MeetingUtil.cleanUp = sinon.stub();
1838
+ cleanUpSpy = sinon.stub(MeetingUtil, 'cleanUp');
1839
+ });
1840
+ afterEach(() => {
1841
+ cleanUpSpy.restore();
1808
1842
  });
1809
1843
  it('should have #destroy', () => {
1810
1844
  assert.exists(webex.meetings.destroy);
@@ -1969,6 +2003,59 @@ describe('plugin-meetings', () => {
1969
2003
  'Failed to fetch preferred site from user - no site will be set'
1970
2004
  );
1971
2005
  });
2006
+
2007
+ it('should fall back to fetching the site from the user', async () => {
2008
+ setup({
2009
+ user: {
2010
+ userPreferences: {
2011
+ userPreferencesItems: {
2012
+ preferredWebExSite: 'site.webex.com',
2013
+ },
2014
+ },
2015
+ },
2016
+ });
2017
+
2018
+ await webex.meetings.fetchUserPreferredWebexSite();
2019
+
2020
+ assert.equal(webex.meetings.preferredWebexSite, 'site.webex.com');
2021
+ assert.notCalled(loggerProxySpy);
2022
+ });
2023
+
2024
+ forEach(
2025
+ [
2026
+ {user: undefined},
2027
+ {user: {userPreferences: {}}},
2028
+ {user: {userPreferences: {userPreferencesItems: {}}}},
2029
+ {user: {userPreferences: {userPreferencesItems: {preferredWebExSite: undefined}}}},
2030
+ ],
2031
+ ({user}) => {
2032
+ it(`should handle invalid user data ${user}`, async () => {
2033
+ setup({user});
2034
+
2035
+ await webex.meetings.fetchUserPreferredWebexSite();
2036
+
2037
+ assert.equal(webex.meetings.preferredWebexSite, '');
2038
+ assert.calledOnceWithExactly(
2039
+ loggerProxySpy,
2040
+ 'Failed to fetch preferred site from user - no site will be set'
2041
+ );
2042
+ });
2043
+ }
2044
+ );
2045
+
2046
+ it('should handle a get user failure', async () => {
2047
+ setup();
2048
+
2049
+ webex.internal.user.get.rejects(new Error());
2050
+
2051
+ await webex.meetings.fetchUserPreferredWebexSite();
2052
+
2053
+ assert.equal(webex.meetings.preferredWebexSite, '');
2054
+ assert.calledOnceWithExactly(
2055
+ loggerProxySpy,
2056
+ 'Failed to fetch preferred site from user - no site will be set'
2057
+ );
2058
+ });
1972
2059
  });
1973
2060
  });
1974
2061
 
@@ -1986,7 +2073,8 @@ describe('plugin-meetings', () => {
1986
2073
  webex.meetings.meetingInfo.fetchMeetingInfo = sinon.stub().returns(
1987
2074
  Promise.resolve({
1988
2075
  body: {
1989
- permissionToken: 'PT',
2076
+ permissionToken:
2077
+ 'eyJhbGciOiJIUzI1NiJ9.eyJleHAiOiIxMjM0NTYiLCJwZXJtaXNzaW9uIjp7InVzZXJQb2xpY2llcyI6eyJhIjp0cnVlfX19.wkTk0Hp8sUlq2wi2nP4-Ym4Xb7aEUHzyXA1kzk6f0V0',
1990
2078
  meetingJoinUrl: 'meetingJoinUrl',
1991
2079
  },
1992
2080
  })
@@ -5,7 +5,6 @@ import 'jsdom-global/register';
5
5
  import sinon from 'sinon';
6
6
  import Metrics from '@webex/internal-plugin-metrics';
7
7
  import MockWebex from '@webex/test-helper-mock-webex';
8
- import {browserOnly} from '@webex/test-helper-mocha';
9
8
  import {assert} from '@webex/test-helper-chai';
10
9
 
11
10
  import metrics from '@webex/plugin-meetings/src/metrics';
@@ -14,7 +13,7 @@ import metrics from '@webex/plugin-meetings/src/metrics';
14
13
  * Meeting can only run in a browser, so we can only send metrics for
15
14
  * browser usage.
16
15
  */
17
- browserOnly(describe)('Meeting metrics', () => {
16
+ describe('Meeting metrics', () => {
18
17
  let webex, mockSubmitMetric, sandbox;
19
18
 
20
19
  beforeEach(() => {
@@ -969,6 +969,7 @@ describe('MediaRequestManager', () => {
969
969
  maxMbps: 3000,
970
970
  },
971
971
  ]);
972
+ clock.uninstall()
972
973
  });
973
974
 
974
975
  describe('maxPayloadBitsPerSecond', () => {
@@ -6,7 +6,6 @@ import {RemoteMedia} from '@webex/plugin-meetings/src/multistream/remoteMedia';
6
6
  import {ReceiveSlot} from '@webex/plugin-meetings/src/multistream/receiveSlot';
7
7
  import sinon from 'sinon';
8
8
  import {assert} from '@webex/test-helper-chai';
9
- import { NamedMediaGroup } from "@webex/json-multistream";
10
9
 
11
10
  class FakeSlot extends EventEmitter {
12
11
  public mediaType: MediaType;
@@ -18,7 +18,6 @@ import testUtils from '../../../utils/testUtils';
18
18
  import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
19
19
  import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
20
20
  import { expect } from 'chai';
21
- import { NamedMediaGroup } from "@webex/json-multistream";
22
21
 
23
22
  class FakeSlot extends EventEmitter {
24
23
  public mediaType: MediaType;
@@ -4,7 +4,7 @@ import sinon from 'sinon';
4
4
  import testUtils from '../../../utils/testUtils';
5
5
 
6
6
  // packages/@webex/plugin-meetings/test/unit/spec/reachability/clusterReachability.ts
7
- import { ClusterReachability } from '@webex/plugin-meetings/src/reachability/clusterReachability'; // replace with actual path
7
+ import {ClusterReachability} from '@webex/plugin-meetings/src/reachability/clusterReachability'; // replace with actual path
8
8
 
9
9
  describe('ClusterReachability', () => {
10
10
  let previousRTCPeerConnection;
@@ -28,9 +28,8 @@ describe('ClusterReachability', () => {
28
28
  isVideoMesh: false,
29
29
  udp: ['stun:udp1', 'stun:udp2'],
30
30
  tcp: ['stun:tcp1.webex.com', 'stun:tcp2.webex.com:5004'],
31
- xtls: ['xtls1', 'xtls2'],
31
+ xtls: ['stun:xtls1.webex.com', 'stun:xtls2.webex.com:443'],
32
32
  });
33
-
34
33
  });
35
34
 
36
35
  afterEach(() => {
@@ -50,8 +49,26 @@ describe('ClusterReachability', () => {
50
49
  iceServers: [
51
50
  {username: '', credential: '', urls: ['stun:udp1']},
52
51
  {username: '', credential: '', urls: ['stun:udp2']},
53
- {username: 'webexturnreachuser', credential: 'webexturnreachpwd', urls: ['turn:tcp1.webex.com?transport=tcp']},
54
- {username: 'webexturnreachuser', credential: 'webexturnreachpwd', urls: ['turn:tcp2.webex.com:5004?transport=tcp']}
52
+ {
53
+ username: 'webexturnreachuser',
54
+ credential: 'webexturnreachpwd',
55
+ urls: ['turn:tcp1.webex.com?transport=tcp'],
56
+ },
57
+ {
58
+ username: 'webexturnreachuser',
59
+ credential: 'webexturnreachpwd',
60
+ urls: ['turn:tcp2.webex.com:5004?transport=tcp'],
61
+ },
62
+ {
63
+ username: 'webexturnreachuser',
64
+ credential: 'webexturnreachpwd',
65
+ urls: ['turns:xtls1.webex.com?transport=tcp'],
66
+ },
67
+ {
68
+ username: 'webexturnreachuser',
69
+ credential: 'webexturnreachpwd',
70
+ urls: ['turns:xtls2.webex.com:443?transport=tcp'],
71
+ },
55
72
  ],
56
73
  iceCandidatePoolSize: 0,
57
74
  iceTransportPolicy: 'all',
@@ -79,7 +96,7 @@ describe('ClusterReachability', () => {
79
96
  assert.deepEqual(clusterReachability.getResult(), {
80
97
  udp: {result: 'untested'},
81
98
  tcp: {result: 'untested'},
82
- xtls: {result: 'untested'}
99
+ xtls: {result: 'untested'},
83
100
  });
84
101
  });
85
102
 
@@ -92,7 +109,7 @@ describe('ClusterReachability', () => {
92
109
 
93
110
  afterEach(() => {
94
111
  clock.restore();
95
- })
112
+ });
96
113
 
97
114
  it('should initiate the ICE gathering process', async () => {
98
115
  const promise = clusterReachability.start();
@@ -107,11 +124,11 @@ describe('ClusterReachability', () => {
107
124
  assert.calledOnceWithExactly(fakePeerConnection.createOffer, {offerToReceiveAudio: true});
108
125
  assert.calledOnce(fakePeerConnection.setLocalDescription);
109
126
 
110
- await clock.tickAsync(3000);// move the clock so that reachability times out
127
+ await clock.tickAsync(3000); // move the clock so that reachability times out
111
128
  await promise;
112
129
  });
113
130
 
114
- it('resolves and has correct result as soon as it finds that both udp and tcp is reachable', async () => {
131
+ it('resolves and has correct result as soon as it finds that all udp, tcp and tls are reachable', async () => {
115
132
  const promise = clusterReachability.start();
116
133
 
117
134
  await clock.tickAsync(100);
@@ -120,12 +137,17 @@ describe('ClusterReachability', () => {
120
137
  await clock.tickAsync(100);
121
138
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
122
139
 
140
+ await clock.tickAsync(100);
141
+ fakePeerConnection.onicecandidate({
142
+ candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
143
+ });
144
+
123
145
  await promise;
124
146
 
125
147
  assert.deepEqual(clusterReachability.getResult(), {
126
148
  udp: {result: 'reachable', latencyInMilliseconds: 100, clientMediaIPs: ['somePublicIp']},
127
149
  tcp: {result: 'reachable', latencyInMilliseconds: 200},
128
- xtls: {result: 'untested'}
150
+ xtls: {result: 'reachable', latencyInMilliseconds: 300},
129
151
  });
130
152
  });
131
153
 
@@ -139,7 +161,7 @@ describe('ClusterReachability', () => {
139
161
  assert.deepEqual(clusterReachability.getResult(), {
140
162
  udp: {result: 'unreachable'},
141
163
  tcp: {result: 'unreachable'},
142
- xtls: {result: 'untested'}
164
+ xtls: {result: 'unreachable'},
143
165
  });
144
166
  });
145
167
 
@@ -148,7 +170,7 @@ describe('ClusterReachability', () => {
148
170
  isVideoMesh: true,
149
171
  udp: ['stun:udp1', 'stun:udp2'],
150
172
  tcp: ['stun:tcp1.webex.com', 'stun:tcp2.webex.com:5004'],
151
- xtls: ['xtls1', 'xtls2'],
173
+ xtls: ['stun:xtls1.webex.com', 'stun:xtls1.webex.com:443'],
152
174
  });
153
175
 
154
176
  const promise = clusterReachability.start();
@@ -160,7 +182,7 @@ describe('ClusterReachability', () => {
160
182
  assert.deepEqual(clusterReachability.getResult(), {
161
183
  udp: {result: 'unreachable'},
162
184
  tcp: {result: 'unreachable'},
163
- xtls: {result: 'untested'}
185
+ xtls: {result: 'unreachable'},
164
186
  });
165
187
  });
166
188
 
@@ -176,7 +198,7 @@ describe('ClusterReachability', () => {
176
198
  assert.deepEqual(clusterReachability.getResult(), {
177
199
  udp: {result: 'unreachable'},
178
200
  tcp: {result: 'unreachable'},
179
- xtls: {result: 'untested'}
201
+ xtls: {result: 'unreachable'},
180
202
  });
181
203
  });
182
204
 
@@ -194,7 +216,7 @@ describe('ClusterReachability', () => {
194
216
  assert.deepEqual(clusterReachability.getResult(), {
195
217
  udp: {result: 'reachable', latencyInMilliseconds: 30, clientMediaIPs: ['somePublicIp1']},
196
218
  tcp: {result: 'unreachable'},
197
- xtls: {result: 'untested'}
219
+ xtls: {result: 'unreachable'},
198
220
  });
199
221
  });
200
222
 
@@ -211,15 +233,19 @@ describe('ClusterReachability', () => {
211
233
  await clock.tickAsync(10);
212
234
  fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp3'}});
213
235
 
214
- await clock.tickAsync(3000);// move the clock so that reachability times out
236
+ await clock.tickAsync(3000); // move the clock so that reachability times out
215
237
 
216
238
  await promise;
217
239
 
218
240
  // latency should be from only the first candidates, but the clientMediaIps should be from all UDP candidates (not TCP)
219
241
  assert.deepEqual(clusterReachability.getResult(), {
220
- udp: {result: 'reachable', latencyInMilliseconds: 10, clientMediaIPs: ['somePublicIp1', 'somePublicIp2', 'somePublicIp3']},
242
+ udp: {
243
+ result: 'reachable',
244
+ latencyInMilliseconds: 10,
245
+ clientMediaIPs: ['somePublicIp1', 'somePublicIp2', 'somePublicIp3'],
246
+ },
221
247
  tcp: {result: 'unreachable'},
222
- xtls: {result: 'untested'}
248
+ xtls: {result: 'unreachable'},
223
249
  });
224
250
  });
225
251
 
@@ -236,7 +262,7 @@ describe('ClusterReachability', () => {
236
262
  await clock.tickAsync(10);
237
263
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp3'}});
238
264
 
239
- await clock.tickAsync(3000);// move the clock so that reachability times out
265
+ await clock.tickAsync(3000); // move the clock so that reachability times out
240
266
 
241
267
  await promise;
242
268
 
@@ -244,7 +270,38 @@ describe('ClusterReachability', () => {
244
270
  assert.deepEqual(clusterReachability.getResult(), {
245
271
  udp: {result: 'unreachable'},
246
272
  tcp: {result: 'reachable', latencyInMilliseconds: 10},
247
- xtls: {result: 'untested'}
273
+ xtls: {result: 'unreachable'},
274
+ });
275
+ });
276
+
277
+ it('should store latency only for the first tls relay candidate', async () => {
278
+ const promise = clusterReachability.start();
279
+
280
+ await clock.tickAsync(10);
281
+ fakePeerConnection.onicecandidate({
282
+ candidate: {type: 'relay', address: 'someTurnRelayIp1', port: 443},
283
+ });
284
+
285
+ // generate more candidates
286
+ await clock.tickAsync(10);
287
+ fakePeerConnection.onicecandidate({
288
+ candidate: {type: 'relay', address: 'someTurnRelayIp2', port: 443},
289
+ });
290
+
291
+ await clock.tickAsync(10);
292
+ fakePeerConnection.onicecandidate({
293
+ candidate: {type: 'relay', address: 'someTurnRelayIp3', port: 443},
294
+ });
295
+
296
+ await clock.tickAsync(3000); // move the clock so that reachability times out
297
+
298
+ await promise;
299
+
300
+ // latency should be from only the first candidates, but the clientMediaIps should be from only from UDP candidates
301
+ assert.deepEqual(clusterReachability.getResult(), {
302
+ udp: {result: 'unreachable'},
303
+ tcp: {result: 'unreachable'},
304
+ xtls: {result: 'reachable', latencyInMilliseconds: 10},
248
305
  });
249
306
  });
250
307
 
@@ -266,13 +323,20 @@ describe('ClusterReachability', () => {
266
323
 
267
324
  // send also a relay candidate so that the reachability check finishes
268
325
  fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
326
+ fakePeerConnection.onicecandidate({
327
+ candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
328
+ });
269
329
 
270
330
  await promise;
271
331
 
272
332
  assert.deepEqual(clusterReachability.getResult(), {
273
- udp: {result: 'reachable', latencyInMilliseconds: 10, clientMediaIPs: ['somePublicIp1', 'somePublicIp2']},
333
+ udp: {
334
+ result: 'reachable',
335
+ latencyInMilliseconds: 10,
336
+ clientMediaIPs: ['somePublicIp1', 'somePublicIp2'],
337
+ },
274
338
  tcp: {result: 'reachable', latencyInMilliseconds: 40},
275
- xtls: {result: 'untested'}
339
+ xtls: {result: 'reachable', latencyInMilliseconds: 40},
276
340
  });
277
341
  });
278
342
  });