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

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 (535) hide show
  1. package/README.md +46 -8
  2. package/dist/annotation/annotation.types.d.ts +42 -0
  3. package/dist/annotation/annotation.types.js +7 -0
  4. package/dist/annotation/annotation.types.js.map +1 -0
  5. package/dist/annotation/constants.d.ts +31 -0
  6. package/dist/annotation/constants.js +41 -0
  7. package/dist/annotation/constants.js.map +1 -0
  8. package/dist/annotation/index.d.ts +117 -0
  9. package/dist/annotation/index.js +357 -0
  10. package/dist/annotation/index.js.map +1 -0
  11. package/dist/breakouts/breakout.d.ts +8 -0
  12. package/dist/breakouts/breakout.js +215 -0
  13. package/dist/breakouts/breakout.js.map +1 -0
  14. package/dist/breakouts/collection.d.ts +5 -0
  15. package/dist/breakouts/collection.js +22 -0
  16. package/dist/breakouts/collection.js.map +1 -0
  17. package/dist/breakouts/edit-lock-error.d.ts +15 -0
  18. package/dist/breakouts/edit-lock-error.js +51 -0
  19. package/dist/breakouts/edit-lock-error.js.map +1 -0
  20. package/dist/breakouts/events.d.ts +8 -0
  21. package/dist/breakouts/events.js +44 -0
  22. package/dist/breakouts/events.js.map +1 -0
  23. package/dist/breakouts/index.d.ts +5 -0
  24. package/dist/breakouts/index.js +1047 -0
  25. package/dist/breakouts/index.js.map +1 -0
  26. package/dist/breakouts/request.d.ts +22 -0
  27. package/dist/breakouts/request.js +77 -0
  28. package/dist/breakouts/request.js.map +1 -0
  29. package/dist/breakouts/utils.d.ts +15 -0
  30. package/dist/breakouts/utils.js +64 -0
  31. package/dist/breakouts/utils.js.map +1 -0
  32. package/dist/common/browser-detection.js +2 -3
  33. package/dist/common/browser-detection.js.map +1 -1
  34. package/dist/common/collection.js +3 -4
  35. package/dist/common/collection.js.map +1 -1
  36. package/dist/common/config.js +1 -2
  37. package/dist/common/config.js.map +1 -1
  38. package/dist/common/errors/captcha-error.js +1 -2
  39. package/dist/common/errors/captcha-error.js.map +1 -1
  40. package/dist/common/errors/intent-to-join.js +1 -2
  41. package/dist/common/errors/intent-to-join.js.map +1 -1
  42. package/dist/common/errors/join-meeting.js +1 -2
  43. package/dist/common/errors/join-meeting.js.map +1 -1
  44. package/dist/common/errors/media.js +1 -2
  45. package/dist/common/errors/media.js.map +1 -1
  46. package/dist/common/errors/no-meeting-info.d.ts +14 -0
  47. package/dist/common/errors/no-meeting-info.js +50 -0
  48. package/dist/common/errors/no-meeting-info.js.map +1 -0
  49. package/dist/common/errors/parameter.js +3 -4
  50. package/dist/common/errors/parameter.js.map +1 -1
  51. package/dist/common/errors/password-error.js +1 -2
  52. package/dist/common/errors/password-error.js.map +1 -1
  53. package/dist/common/errors/permission.js +1 -2
  54. package/dist/common/errors/permission.js.map +1 -1
  55. package/dist/common/errors/{reclaim-host-role-error.js → reclaim-host-role-errors.js} +7 -11
  56. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  57. package/dist/common/errors/reconnection-in-progress.js +1 -2
  58. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  59. package/dist/common/errors/reconnection.js +1 -2
  60. package/dist/common/errors/reconnection.js.map +1 -1
  61. package/dist/common/errors/stats.js +1 -2
  62. package/dist/common/errors/stats.js.map +1 -1
  63. package/dist/common/errors/webex-errors.d.ts +20 -8
  64. package/dist/common/errors/webex-errors.js +48 -28
  65. package/dist/common/errors/webex-errors.js.map +1 -1
  66. package/dist/common/errors/webex-meetings-error.js +1 -2
  67. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  68. package/dist/common/events/events-scope.js +1 -2
  69. package/dist/common/events/events-scope.js.map +1 -1
  70. package/dist/common/events/events.js +1 -2
  71. package/dist/common/events/events.js.map +1 -1
  72. package/dist/common/events/trigger-proxy.js +1 -2
  73. package/dist/common/events/trigger-proxy.js.map +1 -1
  74. package/dist/common/events/util.js +1 -2
  75. package/dist/common/events/util.js.map +1 -1
  76. package/dist/common/logs/logger-config.js +1 -2
  77. package/dist/common/logs/logger-config.js.map +1 -1
  78. package/dist/common/logs/logger-proxy.js +2 -3
  79. package/dist/common/logs/logger-proxy.js.map +1 -1
  80. package/dist/common/logs/request.d.ts +3 -1
  81. package/dist/common/logs/request.js +8 -5
  82. package/dist/common/logs/request.js.map +1 -1
  83. package/dist/common/queue.d.ts +9 -7
  84. package/dist/common/queue.js +22 -9
  85. package/dist/common/queue.js.map +1 -1
  86. package/dist/config.d.ts +6 -7
  87. package/dist/config.js +8 -10
  88. package/dist/config.js.map +1 -1
  89. package/dist/constants.d.ts +217 -97
  90. package/dist/constants.js +416 -441
  91. package/dist/constants.js.map +1 -1
  92. package/dist/controls-options-manager/constants.js +3 -6
  93. package/dist/controls-options-manager/constants.js.map +1 -1
  94. package/dist/controls-options-manager/enums.d.ts +11 -1
  95. package/dist/controls-options-manager/enums.js +15 -6
  96. package/dist/controls-options-manager/enums.js.map +1 -1
  97. package/dist/controls-options-manager/index.d.ts +17 -1
  98. package/dist/controls-options-manager/index.js +127 -38
  99. package/dist/controls-options-manager/index.js.map +1 -1
  100. package/dist/controls-options-manager/types.d.ts +43 -0
  101. package/dist/controls-options-manager/types.js +7 -0
  102. package/dist/controls-options-manager/types.js.map +1 -0
  103. package/dist/controls-options-manager/util.d.ts +1 -7
  104. package/dist/controls-options-manager/util.js +309 -19
  105. package/dist/controls-options-manager/util.js.map +1 -1
  106. package/dist/index.d.ts +6 -3
  107. package/dist/index.js +121 -5
  108. package/dist/index.js.map +1 -1
  109. package/dist/interceptors/index.d.ts +2 -0
  110. package/dist/interceptors/index.js +15 -0
  111. package/dist/interceptors/index.js.map +1 -0
  112. package/dist/interceptors/locusRetry.d.ts +27 -0
  113. package/dist/interceptors/locusRetry.js +94 -0
  114. package/dist/interceptors/locusRetry.js.map +1 -0
  115. package/dist/interpretation/collection.d.ts +5 -0
  116. package/dist/interpretation/collection.js +22 -0
  117. package/dist/interpretation/collection.js.map +1 -0
  118. package/dist/interpretation/index.d.ts +5 -0
  119. package/dist/interpretation/index.js +365 -0
  120. package/dist/interpretation/index.js.map +1 -0
  121. package/dist/interpretation/siLanguage.d.ts +5 -0
  122. package/dist/interpretation/siLanguage.js +24 -0
  123. package/dist/interpretation/siLanguage.js.map +1 -0
  124. package/dist/locus-info/controlsUtils.js +100 -11
  125. package/dist/locus-info/controlsUtils.js.map +1 -1
  126. package/dist/locus-info/embeddedAppsUtils.js +3 -4
  127. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  128. package/dist/locus-info/fullState.js +1 -2
  129. package/dist/locus-info/fullState.js.map +1 -1
  130. package/dist/locus-info/hostUtils.js +1 -2
  131. package/dist/locus-info/hostUtils.js.map +1 -1
  132. package/dist/locus-info/index.d.ts +57 -4
  133. package/dist/locus-info/index.js +425 -84
  134. package/dist/locus-info/index.js.map +1 -1
  135. package/dist/locus-info/infoUtils.js +13 -5
  136. package/dist/locus-info/infoUtils.js.map +1 -1
  137. package/dist/locus-info/mediaSharesUtils.js +58 -3
  138. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  139. package/dist/locus-info/parser.d.ts +66 -6
  140. package/dist/locus-info/parser.js +253 -80
  141. package/dist/locus-info/parser.js.map +1 -1
  142. package/dist/locus-info/selfUtils.js +97 -13
  143. package/dist/locus-info/selfUtils.js.map +1 -1
  144. package/dist/media/index.d.ts +2 -0
  145. package/dist/media/index.js +107 -319
  146. package/dist/media/index.js.map +1 -1
  147. package/dist/media/properties.d.ts +38 -53
  148. package/dist/media/properties.js +96 -153
  149. package/dist/media/properties.js.map +1 -1
  150. package/dist/media/util.js +1 -22
  151. package/dist/media/util.js.map +1 -1
  152. package/dist/mediaQualityMetrics/config.d.ts +234 -230
  153. package/dist/mediaQualityMetrics/config.js +302 -498
  154. package/dist/mediaQualityMetrics/config.js.map +1 -1
  155. package/dist/meeting/in-meeting-actions.d.ts +88 -0
  156. package/dist/meeting/in-meeting-actions.js +94 -3
  157. package/dist/meeting/in-meeting-actions.js.map +1 -1
  158. package/dist/meeting/index.d.ts +591 -494
  159. package/dist/meeting/index.js +4732 -2990
  160. package/dist/meeting/index.js.map +1 -1
  161. package/dist/meeting/locusMediaRequest.d.ts +74 -0
  162. package/dist/meeting/locusMediaRequest.js +291 -0
  163. package/dist/meeting/locusMediaRequest.js.map +1 -0
  164. package/dist/meeting/muteState.d.ts +93 -25
  165. package/dist/meeting/muteState.js +224 -133
  166. package/dist/meeting/muteState.js.map +1 -1
  167. package/dist/meeting/request.d.ts +82 -47
  168. package/dist/meeting/request.js +297 -199
  169. package/dist/meeting/request.js.map +1 -1
  170. package/dist/meeting/request.type.d.ts +11 -0
  171. package/dist/meeting/request.type.js +7 -0
  172. package/dist/meeting/request.type.js.map +1 -0
  173. package/dist/meeting/state.js +1 -2
  174. package/dist/meeting/state.js.map +1 -1
  175. package/dist/meeting/util.d.ts +102 -1
  176. package/dist/meeting/util.js +605 -435
  177. package/dist/meeting/util.js.map +1 -1
  178. package/dist/meeting-info/collection.js +3 -4
  179. package/dist/meeting-info/collection.js.map +1 -1
  180. package/dist/meeting-info/index.d.ts +13 -1
  181. package/dist/meeting-info/index.js +74 -7
  182. package/dist/meeting-info/index.js.map +1 -1
  183. package/dist/meeting-info/meeting-info-v2.d.ts +31 -1
  184. package/dist/meeting-info/meeting-info-v2.js +200 -63
  185. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  186. package/dist/meeting-info/request.js +1 -2
  187. package/dist/meeting-info/request.js.map +1 -1
  188. package/dist/meeting-info/util.js +2 -3
  189. package/dist/meeting-info/util.js.map +1 -1
  190. package/dist/meeting-info/utilv2.js +39 -41
  191. package/dist/meeting-info/utilv2.js.map +1 -1
  192. package/dist/meetings/collection.d.ts +17 -0
  193. package/dist/meetings/collection.js +42 -4
  194. package/dist/meetings/collection.js.map +1 -1
  195. package/dist/meetings/index.d.ts +93 -21
  196. package/dist/meetings/index.js +490 -127
  197. package/dist/meetings/index.js.map +1 -1
  198. package/dist/meetings/meetings.types.d.ts +4 -0
  199. package/dist/meetings/meetings.types.js +7 -0
  200. package/dist/meetings/meetings.types.js.map +1 -0
  201. package/dist/meetings/request.js +4 -3
  202. package/dist/meetings/request.js.map +1 -1
  203. package/dist/meetings/util.js +107 -6
  204. package/dist/meetings/util.js.map +1 -1
  205. package/dist/member/index.d.ts +13 -1
  206. package/dist/member/index.js +45 -2
  207. package/dist/member/index.js.map +1 -1
  208. package/dist/member/member.types.js +3 -4
  209. package/dist/member/member.types.js.map +1 -1
  210. package/dist/member/types.d.ts +32 -0
  211. package/dist/member/types.js +23 -0
  212. package/dist/member/types.js.map +1 -0
  213. package/dist/member/util.js +120 -29
  214. package/dist/member/util.js.map +1 -1
  215. package/dist/members/collection.d.ts +5 -0
  216. package/dist/members/collection.js +11 -2
  217. package/dist/members/collection.js.map +1 -1
  218. package/dist/members/index.d.ts +56 -11
  219. package/dist/members/index.js +174 -47
  220. package/dist/members/index.js.map +1 -1
  221. package/dist/members/request.d.ts +67 -11
  222. package/dist/members/request.js +102 -54
  223. package/dist/members/request.js.map +1 -1
  224. package/dist/members/types.js +3 -4
  225. package/dist/members/types.js.map +1 -1
  226. package/dist/members/util.d.ts +214 -1
  227. package/dist/members/util.js +327 -284
  228. package/dist/members/util.js.map +1 -1
  229. package/dist/metrics/constants.d.ts +15 -6
  230. package/dist/metrics/constants.js +17 -9
  231. package/dist/metrics/constants.js.map +1 -1
  232. package/dist/metrics/index.d.ts +4 -111
  233. package/dist/metrics/index.js +4 -452
  234. package/dist/metrics/index.js.map +1 -1
  235. package/dist/multistream/mediaRequestManager.d.ts +118 -0
  236. package/dist/multistream/mediaRequestManager.js +344 -0
  237. package/dist/multistream/mediaRequestManager.js.map +1 -0
  238. package/dist/multistream/receiveSlot.d.ts +68 -0
  239. package/dist/multistream/receiveSlot.js +200 -0
  240. package/dist/multistream/receiveSlot.js.map +1 -0
  241. package/dist/multistream/receiveSlotManager.d.ts +56 -0
  242. package/dist/multistream/receiveSlotManager.js +174 -0
  243. package/dist/multistream/receiveSlotManager.js.map +1 -0
  244. package/dist/multistream/remoteMedia.d.ts +72 -0
  245. package/dist/multistream/remoteMedia.js +268 -0
  246. package/dist/multistream/remoteMedia.js.map +1 -0
  247. package/dist/multistream/remoteMediaGroup.d.ts +47 -0
  248. package/dist/multistream/remoteMediaGroup.js +267 -0
  249. package/dist/multistream/remoteMediaGroup.js.map +1 -0
  250. package/dist/multistream/remoteMediaManager.d.ts +285 -0
  251. package/dist/multistream/remoteMediaManager.js +1211 -0
  252. package/dist/multistream/remoteMediaManager.js.map +1 -0
  253. package/dist/multistream/sendSlotManager.d.ts +61 -0
  254. package/dist/multistream/sendSlotManager.js +236 -0
  255. package/dist/multistream/sendSlotManager.js.map +1 -0
  256. package/dist/networkQualityMonitor/index.js +5 -4
  257. package/dist/networkQualityMonitor/index.js.map +1 -1
  258. package/dist/personal-meeting-room/index.js +2 -3
  259. package/dist/personal-meeting-room/index.js.map +1 -1
  260. package/dist/personal-meeting-room/request.js +2 -3
  261. package/dist/personal-meeting-room/request.js.map +1 -1
  262. package/dist/personal-meeting-room/util.js +1 -2
  263. package/dist/personal-meeting-room/util.js.map +1 -1
  264. package/dist/reachability/clusterReachability.d.ts +109 -0
  265. package/dist/reachability/clusterReachability.js +357 -0
  266. package/dist/reachability/clusterReachability.js.map +1 -0
  267. package/dist/reachability/index.d.ts +61 -95
  268. package/dist/reachability/index.js +300 -393
  269. package/dist/reachability/index.js.map +1 -1
  270. package/dist/reachability/request.d.ts +7 -3
  271. package/dist/reachability/request.js +18 -10
  272. package/dist/reachability/request.js.map +1 -1
  273. package/dist/reachability/util.d.ts +8 -0
  274. package/dist/reachability/util.js +29 -0
  275. package/dist/reachability/util.js.map +1 -0
  276. package/dist/reactions/constants.d.ts +3 -0
  277. package/dist/reactions/constants.js +12 -0
  278. package/dist/reactions/constants.js.map +1 -0
  279. package/dist/reactions/reactions.d.ts +2 -2
  280. package/dist/reactions/reactions.js +4 -6
  281. package/dist/reactions/reactions.js.map +1 -1
  282. package/dist/reactions/reactions.type.d.ts +23 -3
  283. package/dist/reactions/reactions.type.js +21 -23
  284. package/dist/reactions/reactions.type.js.map +1 -1
  285. package/dist/reconnection-manager/index.d.ts +32 -8
  286. package/dist/reconnection-manager/index.js +282 -231
  287. package/dist/reconnection-manager/index.js.map +1 -1
  288. package/dist/recording-controller/enums.js +4 -5
  289. package/dist/recording-controller/enums.js.map +1 -1
  290. package/dist/recording-controller/index.d.ts +15 -1
  291. package/dist/recording-controller/index.js +57 -46
  292. package/dist/recording-controller/index.js.map +1 -1
  293. package/dist/recording-controller/util.d.ts +5 -4
  294. package/dist/recording-controller/util.js +10 -10
  295. package/dist/recording-controller/util.js.map +1 -1
  296. package/dist/roap/index.d.ts +9 -47
  297. package/dist/roap/index.js +101 -235
  298. package/dist/roap/index.js.map +1 -1
  299. package/dist/roap/request.d.ts +18 -12
  300. package/dist/roap/request.js +126 -180
  301. package/dist/roap/request.js.map +1 -1
  302. package/dist/roap/turnDiscovery.d.ts +27 -16
  303. package/dist/roap/turnDiscovery.js +115 -105
  304. package/dist/roap/turnDiscovery.js.map +1 -1
  305. package/dist/rtcMetrics/constants.d.ts +4 -0
  306. package/dist/rtcMetrics/constants.js +11 -0
  307. package/dist/rtcMetrics/constants.js.map +1 -0
  308. package/dist/rtcMetrics/index.d.ts +54 -0
  309. package/dist/rtcMetrics/index.js +140 -0
  310. package/dist/rtcMetrics/index.js.map +1 -0
  311. package/dist/statsAnalyzer/global.d.ts +1 -83
  312. package/dist/statsAnalyzer/global.js +2 -85
  313. package/dist/statsAnalyzer/global.js.map +1 -1
  314. package/dist/statsAnalyzer/index.d.ts +50 -30
  315. package/dist/statsAnalyzer/index.js +435 -510
  316. package/dist/statsAnalyzer/index.js.map +1 -1
  317. package/dist/statsAnalyzer/mqaUtil.d.ts +8 -6
  318. package/dist/statsAnalyzer/mqaUtil.js +120 -83
  319. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  320. package/dist/transcription/index.js +1 -2
  321. package/dist/transcription/index.js.map +1 -1
  322. package/dist/webinar/collection.d.ts +16 -0
  323. package/dist/webinar/collection.js +43 -0
  324. package/dist/webinar/collection.js.map +1 -0
  325. package/dist/webinar/index.d.ts +5 -0
  326. package/dist/webinar/index.js +68 -0
  327. package/dist/webinar/index.js.map +1 -0
  328. package/package.json +38 -26
  329. package/src/annotation/annotation.types.ts +50 -0
  330. package/src/annotation/constants.ts +36 -0
  331. package/src/annotation/index.ts +328 -0
  332. package/src/breakouts/README.md +220 -0
  333. package/src/breakouts/breakout.ts +188 -0
  334. package/src/breakouts/collection.ts +19 -0
  335. package/src/breakouts/edit-lock-error.ts +25 -0
  336. package/src/breakouts/events.ts +56 -0
  337. package/src/breakouts/index.ts +925 -0
  338. package/src/breakouts/request.ts +55 -0
  339. package/src/breakouts/utils.ts +57 -0
  340. package/src/common/errors/no-meeting-info.ts +24 -0
  341. package/src/common/errors/webex-errors.ts +36 -12
  342. package/src/common/logs/logger-proxy.ts +1 -1
  343. package/src/common/logs/request.ts +5 -1
  344. package/src/common/queue.ts +22 -8
  345. package/src/config.ts +6 -7
  346. package/src/constants.ts +244 -97
  347. package/src/controls-options-manager/enums.ts +12 -0
  348. package/src/controls-options-manager/index.ts +116 -21
  349. package/src/controls-options-manager/types.ts +59 -0
  350. package/src/controls-options-manager/util.ts +294 -14
  351. package/src/index.ts +44 -0
  352. package/src/interceptors/index.ts +3 -0
  353. package/src/interceptors/locusRetry.ts +67 -0
  354. package/src/interpretation/README.md +60 -0
  355. package/src/interpretation/collection.ts +19 -0
  356. package/src/interpretation/index.ts +332 -0
  357. package/src/interpretation/siLanguage.ts +18 -0
  358. package/src/locus-info/controlsUtils.ts +110 -0
  359. package/src/locus-info/index.ts +449 -61
  360. package/src/locus-info/infoUtils.ts +14 -2
  361. package/src/locus-info/mediaSharesUtils.ts +64 -0
  362. package/src/locus-info/parser.ts +258 -47
  363. package/src/locus-info/selfUtils.ts +85 -2
  364. package/src/media/index.ts +153 -370
  365. package/src/media/properties.ts +106 -136
  366. package/src/media/util.ts +0 -21
  367. package/src/mediaQualityMetrics/config.ts +244 -377
  368. package/src/meeting/in-meeting-actions.ts +176 -0
  369. package/src/meeting/index.ts +3944 -2489
  370. package/src/meeting/locusMediaRequest.ts +313 -0
  371. package/src/meeting/muteState.ts +224 -138
  372. package/src/meeting/request.ts +207 -127
  373. package/src/meeting/request.type.ts +13 -0
  374. package/src/meeting/util.ts +590 -423
  375. package/src/meeting-info/index.ts +81 -8
  376. package/src/meeting-info/meeting-info-v2.ts +163 -13
  377. package/src/meeting-info/util.ts +1 -1
  378. package/src/meeting-info/utilv2.ts +28 -28
  379. package/src/meetings/collection.ts +33 -0
  380. package/src/meetings/index.ts +487 -126
  381. package/src/meetings/meetings.types.ts +12 -0
  382. package/src/meetings/request.ts +2 -0
  383. package/src/meetings/util.ts +116 -5
  384. package/src/member/index.ts +43 -1
  385. package/src/member/types.ts +38 -0
  386. package/src/member/util.ts +125 -28
  387. package/src/members/collection.ts +8 -0
  388. package/src/members/index.ts +187 -52
  389. package/src/members/request.ts +87 -27
  390. package/src/members/util.ts +332 -291
  391. package/src/metrics/constants.ts +15 -6
  392. package/src/metrics/index.ts +1 -471
  393. package/src/multistream/mediaRequestManager.ts +440 -0
  394. package/src/multistream/receiveSlot.ts +184 -0
  395. package/src/multistream/receiveSlotManager.ts +166 -0
  396. package/src/multistream/remoteMedia.ts +254 -0
  397. package/src/multistream/remoteMediaGroup.ts +284 -0
  398. package/src/multistream/remoteMediaManager.ts +1145 -0
  399. package/src/multistream/sendSlotManager.ts +170 -0
  400. package/src/networkQualityMonitor/index.ts +6 -6
  401. package/src/reachability/clusterReachability.ts +320 -0
  402. package/src/reachability/index.ts +243 -347
  403. package/src/reachability/request.ts +17 -8
  404. package/src/reachability/util.ts +24 -0
  405. package/src/reactions/constants.ts +4 -0
  406. package/src/reactions/reactions.ts +4 -4
  407. package/src/reactions/reactions.type.ts +30 -4
  408. package/src/reconnection-manager/index.ts +168 -156
  409. package/src/recording-controller/index.ts +20 -3
  410. package/src/recording-controller/util.ts +26 -9
  411. package/src/roap/index.ts +98 -241
  412. package/src/roap/request.ts +74 -148
  413. package/src/roap/turnDiscovery.ts +62 -56
  414. package/src/rtcMetrics/constants.ts +3 -0
  415. package/src/rtcMetrics/index.ts +124 -0
  416. package/src/statsAnalyzer/global.ts +1 -84
  417. package/src/statsAnalyzer/index.ts +477 -643
  418. package/src/statsAnalyzer/mqaUtil.ts +115 -114
  419. package/src/webinar/collection.ts +31 -0
  420. package/src/webinar/index.ts +62 -0
  421. package/test/integration/spec/converged-space-meetings.js +233 -0
  422. package/test/integration/spec/journey.js +320 -264
  423. package/test/integration/spec/space-meeting.js +77 -4
  424. package/test/unit/spec/annotation/index.ts +418 -0
  425. package/test/unit/spec/breakouts/breakout.ts +237 -0
  426. package/test/unit/spec/breakouts/collection.ts +15 -0
  427. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  428. package/test/unit/spec/breakouts/events.ts +89 -0
  429. package/test/unit/spec/breakouts/index.ts +1790 -0
  430. package/test/unit/spec/breakouts/request.ts +104 -0
  431. package/test/unit/spec/breakouts/utils.js +72 -0
  432. package/test/unit/spec/common/queue.js +31 -2
  433. package/test/unit/spec/controls-options-manager/index.js +163 -0
  434. package/test/unit/spec/controls-options-manager/util.js +576 -60
  435. package/test/unit/spec/fixture/locus.js +1 -0
  436. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  437. package/test/unit/spec/interpretation/collection.ts +15 -0
  438. package/test/unit/spec/interpretation/index.ts +589 -0
  439. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  440. package/test/unit/spec/locus-info/controlsUtils.js +323 -30
  441. package/test/unit/spec/locus-info/index.js +1390 -16
  442. package/test/unit/spec/locus-info/infoUtils.js +54 -16
  443. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  444. package/test/unit/spec/locus-info/lib/selfConstant.js +48 -0
  445. package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
  446. package/test/unit/spec/locus-info/parser.js +116 -35
  447. package/test/unit/spec/locus-info/selfUtils.js +275 -0
  448. package/test/unit/spec/media/index.ts +290 -0
  449. package/test/unit/spec/media/properties.ts +75 -84
  450. package/test/unit/spec/meeting/in-meeting-actions.ts +86 -0
  451. package/test/unit/spec/meeting/index.js +8187 -2769
  452. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  453. package/test/unit/spec/meeting/muteState.js +409 -213
  454. package/test/unit/spec/meeting/request.js +512 -42
  455. package/test/unit/spec/meeting/utils.js +741 -24
  456. package/test/unit/spec/meeting-info/index.js +300 -0
  457. package/test/unit/spec/meeting-info/meetinginfov2.js +527 -5
  458. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  459. package/test/unit/spec/meetings/collection.js +26 -0
  460. package/test/unit/spec/meetings/index.js +1313 -243
  461. package/test/unit/spec/meetings/utils.js +202 -2
  462. package/test/unit/spec/member/index.js +32 -9
  463. package/test/unit/spec/member/util.js +499 -61
  464. package/test/unit/spec/members/index.js +394 -5
  465. package/test/unit/spec/members/request.js +206 -27
  466. package/test/unit/spec/members/utils.js +173 -38
  467. package/test/unit/spec/metrics/index.js +1 -50
  468. package/test/unit/spec/multistream/mediaRequestManager.ts +1418 -0
  469. package/test/unit/spec/multistream/receiveSlot.ts +163 -0
  470. package/test/unit/spec/multistream/receiveSlotManager.ts +203 -0
  471. package/test/unit/spec/multistream/remoteMedia.ts +255 -0
  472. package/test/unit/spec/multistream/remoteMediaGroup.ts +662 -0
  473. package/test/unit/spec/multistream/remoteMediaManager.ts +1924 -0
  474. package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
  475. package/test/unit/spec/networkQualityMonitor/index.js +4 -4
  476. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  477. package/test/unit/spec/reachability/index.ts +531 -24
  478. package/test/unit/spec/reachability/request.js +68 -0
  479. package/test/unit/spec/reachability/util.ts +40 -0
  480. package/test/unit/spec/reconnection-manager/index.js +162 -24
  481. package/test/unit/spec/recording-controller/index.js +293 -218
  482. package/test/unit/spec/recording-controller/util.js +223 -96
  483. package/test/unit/spec/roap/index.ts +200 -76
  484. package/test/unit/spec/roap/request.ts +255 -0
  485. package/test/unit/spec/roap/turnDiscovery.ts +86 -48
  486. package/test/unit/spec/rtcMetrics/index.ts +93 -0
  487. package/test/unit/spec/stats-analyzer/index.js +261 -167
  488. package/test/unit/spec/webinar/collection.ts +13 -0
  489. package/test/unit/spec/webinar/index.ts +60 -0
  490. package/test/utils/constants.js +9 -0
  491. package/test/utils/integrationTestUtils.js +46 -0
  492. package/test/utils/testUtils.js +0 -45
  493. package/test/utils/webex-config.js +4 -0
  494. package/test/utils/webex-test-users.js +7 -3
  495. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  496. package/dist/meeting/effectsState.d.ts +0 -42
  497. package/dist/meeting/effectsState.js +0 -260
  498. package/dist/meeting/effectsState.js.map +0 -1
  499. package/dist/metrics/config.d.ts +0 -169
  500. package/dist/metrics/config.js +0 -289
  501. package/dist/metrics/config.js.map +0 -1
  502. package/dist/peer-connection-manager/index.d.ts +0 -6
  503. package/dist/peer-connection-manager/index.js +0 -671
  504. package/dist/peer-connection-manager/index.js.map +0 -1
  505. package/dist/peer-connection-manager/util.d.ts +0 -6
  506. package/dist/peer-connection-manager/util.js +0 -110
  507. package/dist/peer-connection-manager/util.js.map +0 -1
  508. package/dist/roap/collection.d.ts +0 -10
  509. package/dist/roap/collection.js +0 -63
  510. package/dist/roap/collection.js.map +0 -1
  511. package/dist/roap/handler.d.ts +0 -47
  512. package/dist/roap/handler.js +0 -279
  513. package/dist/roap/handler.js.map +0 -1
  514. package/dist/roap/state.d.ts +0 -9
  515. package/dist/roap/state.js +0 -127
  516. package/dist/roap/state.js.map +0 -1
  517. package/dist/roap/util.d.ts +0 -2
  518. package/dist/roap/util.js +0 -76
  519. package/dist/roap/util.js.map +0 -1
  520. package/src/index.js +0 -15
  521. package/src/meeting/effectsState.ts +0 -209
  522. package/src/metrics/config.ts +0 -485
  523. package/src/peer-connection-manager/index.ts +0 -847
  524. package/src/peer-connection-manager/util.ts +0 -119
  525. package/src/roap/collection.ts +0 -62
  526. package/src/roap/handler.ts +0 -294
  527. package/src/roap/state.ts +0 -156
  528. package/src/roap/util.ts +0 -100
  529. package/test/unit/spec/meeting/effectsState.js +0 -281
  530. package/test/unit/spec/peerconnection-manager/index.js +0 -218
  531. package/test/unit/spec/peerconnection-manager/utils.js +0 -49
  532. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -388
  533. package/test/unit/spec/roap/util.js +0 -30
  534. /package/dist/common/errors/{reclaim-host-role-error.d.ts → reclaim-host-role-errors.d.ts} +0 -0
  535. /package/src/common/errors/{reclaim-host-role-error.ts → reclaim-host-role-errors.ts} +0 -0
@@ -6,9 +6,11 @@ import {skipInNode} from '@webex/test-helper-mocha';
6
6
  import sinon from 'sinon';
7
7
 
8
8
  import BrowserDetection from '@webex/plugin-meetings/dist/common/browser-detection';
9
+ import {createCameraStream, createDisplayStream, createMicrophoneStream, LocalTrackEvents, LocalStreamEventNames} from '@webex/plugin-meetings';
9
10
 
10
- import DEFAULT_RESOLUTIONS from '../../../src/config';
11
11
  import testUtils from '../../utils/testUtils';
12
+ import integrationTestUtils from '../../utils/integrationTestUtils';
13
+ import {EVENT_TRIGGERS} from '../../../src/constants';
12
14
 
13
15
  require('dotenv').config();
14
16
 
@@ -18,6 +20,42 @@ const {isBrowser} = BrowserDetection();
18
20
 
19
21
  let userSet, alice, bob, chris, enumerateSpy, channelUrlA, channelUrlB;
20
22
 
23
+ const localStreams = {
24
+ alice: {
25
+ microphone: undefined,
26
+ camera: undefined,
27
+ screenShare: {
28
+ video: undefined,
29
+ }
30
+ },
31
+ bob: {
32
+ microphone: undefined,
33
+ camera: undefined,
34
+ screenShare: {
35
+ video: undefined,
36
+ }
37
+ },
38
+ chris: {
39
+ microphone: undefined,
40
+ camera: undefined,
41
+ screenShare: {
42
+ video: undefined,
43
+ }
44
+ },
45
+ };
46
+
47
+ // Updated expectedPublished from a boolean value to an object containing the stream and status properties
48
+ const waitForPublished = (meeting, expectedPublished, description) => {
49
+ return testUtils.waitForEvents([{
50
+ scope: meeting,
51
+ event: EVENT_TRIGGERS.MEETING_STREAM_PUBLISH_STATE_CHANGED,
52
+ match: (event) => {
53
+ console.log(`${description} is now ${event.isPublished ? 'published': 'not published'}`);
54
+ return (event.isPublished === expectedPublished.status && event.stream.id === expectedPublished.stream.id) ;
55
+ }
56
+ }]);
57
+ };
58
+
21
59
  skipInNode(describe)('plugin-meetings', () => {
22
60
  describe('journey', () => {
23
61
  before(() =>
@@ -274,6 +312,11 @@ skipInNode(describe)('plugin-meetings', () => {
274
312
  );
275
313
  });
276
314
 
315
+ it('alice creates local microphone and camera tracks', async () => {
316
+ localStreams.alice.microphone = await createMicrophoneStream();
317
+ localStreams.alice.camera = await createCameraStream();
318
+ });
319
+
277
320
  it('alice dials bob and adds media', () =>
278
321
  Promise.all([
279
322
  testUtils.delayedPromise(alice.webex.meetings.create(bob.emailAddress)),
@@ -301,7 +344,7 @@ skipInNode(describe)('plugin-meetings', () => {
301
344
  })
302
345
  .then(() =>
303
346
  Promise.all([
304
- testUtils.addMedia(alice),
347
+ integrationTestUtils.addMedia(alice, {microphone: localStreams.alice.microphone, camera: localStreams.alice.camera}),
305
348
  testUtils.waitForEvents([
306
349
  {scope: alice.meeting, event: 'meeting:media:local:start', user: alice},
307
350
  ]),
@@ -328,9 +371,14 @@ skipInNode(describe)('plugin-meetings', () => {
328
371
  ]);
329
372
  });
330
373
 
374
+ it('bob creates local microphone and camera tracks', async () => {
375
+ localStreams.bob.microphone = await createMicrophoneStream();
376
+ localStreams.bob.camera = await createCameraStream();
377
+ });
378
+
331
379
  it('bob adds media to the meeting', () =>
332
380
  Promise.all([
333
- testUtils.addMedia(bob),
381
+ integrationTestUtils.addMedia(bob, {microphone: localStreams.bob.microphone, camera: localStreams.bob.camera}),
334
382
  testUtils
335
383
  .waitForEvents([
336
384
  {scope: bob.meeting, event: 'meeting:media:local:start', user: bob},
@@ -372,136 +420,126 @@ skipInNode(describe)('plugin-meetings', () => {
372
420
  assert.exists(alice.meeting.members.selfId, 'selfId not present');
373
421
  });
374
422
 
375
- it('alice Audio Mute ', () => {
423
+ it('alice Audio Mute ', async () => {
376
424
  const checkEvent = (event) =>
377
425
  !!event.delta.updated.find(
378
426
  (member) => alice.meeting.members.selfId === member.id && member.isAudioMuted === true
379
427
  );
380
428
 
381
- return Promise.all([
382
- testUtils.delayedPromise(alice.meeting.muteAudio()),
383
- testUtils.waitForEvents([
384
- {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
385
- ]),
386
- ]).then(() => {
387
- assert.equal(alice.meeting.audio.muted, true);
388
- assert.equal(alice.meeting.isAudioMuted(), true);
389
- });
429
+ await testUtils.waitUntil(2000);
430
+
431
+ const membersUpdate = testUtils.waitForEvents([
432
+ {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
433
+ ]);
434
+
435
+ localStreams.alice.microphone.setMuted(true);
436
+
437
+ await membersUpdate;
438
+
439
+ assert.equal(localStreams.alice.microphone.muted, true);
390
440
  });
391
441
 
392
- it('alice Audio unMute ', () => {
442
+ it('alice Audio unMute ', async () => {
393
443
  const checkEvent = (event) =>
394
444
  !!event.delta.updated.find(
395
445
  (member) => alice.meeting.members.selfId === member.id && member.isAudioMuted === false
396
446
  );
397
447
 
398
- return Promise.all([
399
- testUtils.delayedPromise(alice.meeting.unmuteAudio()),
400
- testUtils.waitForEvents([
401
- {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
402
- ]),
403
- ]).then(() => {
404
- assert.equal(alice.meeting.audio.muted, false);
405
- assert.equal(alice.meeting.isAudioMuted(), false);
406
- });
448
+ await testUtils.waitUntil(2000);
449
+
450
+ const membersUpdate = testUtils.waitForEvents([
451
+ {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
452
+ ]);
453
+
454
+ localStreams.alice.microphone.setMuted(false);
455
+
456
+ await membersUpdate;
457
+
458
+ assert.equal(localStreams.alice.microphone.muted, false);
407
459
  });
408
460
 
409
- it('alice Video Mute', () => {
461
+ it('alice video mute', async () => {
410
462
  const checkEvent = (event) =>
411
463
  !!event.delta.updated.find(
412
464
  (member) => alice.meeting.members.selfId === member.id && member.isVideoMuted === true
413
465
  );
414
466
 
415
- return Promise.all([
416
- testUtils.delayedPromise(alice.meeting.muteVideo()),
417
- testUtils.waitForEvents([
418
- {scope: alice.meeting.members, event: 'members:update', match: checkEvent},
419
- ]),
420
- ]).then(() => {
421
- assert.equal(alice.meeting.video.muted, true);
422
- assert.equal(alice.meeting.isVideoMuted(), true);
423
- });
467
+ await testUtils.waitUntil(2000);
468
+
469
+ const membersUpdate = testUtils.waitForEvents([
470
+ {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
471
+ ]);
472
+
473
+ localStreams.alice.camera.setMuted(true);
474
+
475
+ await membersUpdate;
476
+
477
+ assert.equal(localStreams.alice.camera.muted, true);
424
478
  });
425
479
 
426
- it('alice video unMute', () => {
480
+ it('alice video unmute', async () => {
427
481
  const checkEvent = (event) =>
428
482
  !!event.delta.updated.find(
429
483
  (member) => alice.meeting.members.selfId === member.id && member.isVideoMuted === false
430
484
  );
431
485
 
432
- return Promise.all([
433
- testUtils.delayedPromise(alice.meeting.unmuteVideo()),
434
- testUtils.waitForEvents([
435
- {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
436
- ]),
437
- ]).then(() => {
438
- assert.equal(alice.meeting.video.muted, false);
439
- assert.equal(alice.meeting.isVideoMuted(), false);
440
- });
486
+ await testUtils.waitUntil(2000);
487
+
488
+ const membersUpdate = testUtils.waitForEvents([
489
+ {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
490
+ ]);
491
+
492
+ localStreams.alice.camera.setMuted(false);
493
+
494
+ await membersUpdate;
495
+
496
+ assert.equal(localStreams.alice.camera.muted, false);
441
497
  });
442
498
 
443
- it('alice update Audio', () => {
444
- const oldVideoTrackId = alice.meeting.mediaProperties.videoTrack.id;
499
+ it('alice update Audio', async () => {
500
+ const newMicrophoneStream = await createMicrophoneStream();
501
+ const newStreamPublished = waitForPublished(alice.meeting, {stream: newMicrophoneStream, status: true}, "Alice AUDIO: new microphone stream");
445
502
 
446
- return alice.meeting.getMediaStreams({sendAudio: true}).then((response) =>
447
- Promise.all([
448
- testUtils.delayedPromise(
449
- alice.meeting
450
- .updateAudio({
451
- sendAudio: true,
452
- receiveAudio: true,
453
- stream: response[0],
454
- })
455
- .then(() => {
456
- console.log(
457
- 'AUDIO ',
458
- alice.meeting.mediaProperties.peerConnection.audioTransceiver.sender.track
459
- );
460
- assert.equal(
461
- alice.meeting.mediaProperties.audioTrack.id,
462
- response[0].getAudioTracks()[0].id
463
- );
464
- assert.equal(alice.meeting.mediaProperties.videoTrack.id, oldVideoTrackId);
465
- })
466
- ),
467
- testUtils
468
- .waitForEvents([{scope: alice.meeting, event: 'media:ready'}])
469
- .then((response) => {
470
- console.log('MEDIA:READY event ', response[0].result);
471
- assert.equal(response[0].result.type === 'local', true);
472
- }),
473
- ])
474
- );
503
+ await testUtils.delayedPromise(
504
+ alice.meeting
505
+ .publishStreams({
506
+ microphone: newMicrophoneStream,
507
+ })
508
+ .then(() => {
509
+ console.log('Alice AUDIO: new stream on meeting object:', alice.meeting.mediaProperties.audioStream);
510
+ assert.equal(
511
+ alice.meeting.mediaProperties.audioStream.id,
512
+ newMicrophoneStream.id
513
+ );
514
+ })
515
+ );
516
+
517
+ await newStreamPublished;
518
+
519
+ localStreams.alice.microphone = newMicrophoneStream;
475
520
  });
476
521
 
477
- it('alice update video', () => {
478
- const oldAudioTrackId = alice.meeting.mediaProperties.audioTrack.id;
522
+ it('alice update video', async () => {
523
+ const newCameraStream = await createCameraStream();
524
+ const newStreamPublished = waitForPublished(alice.meeting, {stream: newCameraStream, status: true}, "Alice VIDEO: new camera stream");
479
525
 
480
- return alice.meeting.getMediaStreams({sendVideo: true}).then((response) =>
481
- Promise.all([
482
- testUtils.delayedPromise(
483
- alice.meeting
484
- .updateVideo({
485
- sendVideo: true,
486
- receiveVideo: true,
487
- stream: response[0],
488
- })
489
- .then(() => {
490
- assert.equal(
491
- alice.meeting.mediaProperties.videoTrack.id,
492
- response[0].getVideoTracks()[0].id
493
- );
494
- assert.equal(alice.meeting.mediaProperties.audioTrack.id, oldAudioTrackId);
495
- })
496
- ),
497
- testUtils
498
- .waitForEvents([{scope: alice.meeting, event: 'media:ready'}])
499
- .then((response) => {
500
- console.log('MEDIA:READY event ', response[0].result);
501
- assert.equal(response[0].result.type === 'local', true);
502
- }),
503
- ])
504
- );
526
+ await testUtils.delayedPromise(
527
+ alice.meeting
528
+ .publishStreams({
529
+ camera: newCameraStream,
530
+ })
531
+ .then(() => {
532
+ console.log('Alice VIDEO: new stream on meeting:', alice.meeting.mediaProperties.videoStream);
533
+ assert.equal(
534
+ alice.meeting.mediaProperties.videoStream.id,
535
+ newCameraStream.id
536
+ );
537
+ })
538
+ );
539
+
540
+ await newStreamPublished;
541
+
542
+ localStreams.alice.camera = newCameraStream;
505
543
  });
506
544
 
507
545
  it('alice mutes bob', () =>
@@ -525,27 +563,25 @@ skipInNode(describe)('plugin-meetings', () => {
525
563
  }),
526
564
  ]));
527
565
 
528
- it('bob audio mute, so alice cannot unmute bob', (done) => {
566
+ it('bob audio mute, so alice cannot unmute bob', async () => {
529
567
  const checkEvent = (event) =>
530
568
  !!event.delta.updated.find(
531
569
  (member) => bob.meeting.members.selfId === member.id && member.isAudioMuted === true
532
570
  );
533
571
 
572
+ const membersUpdate = testUtils.waitForEvents([
573
+ {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
574
+ ]);
575
+
534
576
  // first bob mutes himself
535
- Promise.all([
536
- testUtils.delayedPromise(bob.meeting.muteAudio()),
537
- testUtils.waitForEvents([
538
- {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
539
- ]),
540
- ])
541
- .then(() => {
542
- assert.equal(bob.meeting.audio.muted, true);
543
- assert.equal(bob.meeting.isAudioMuted(), true);
544
- })
545
- // now alice tries to unmmut bob
546
- .then(() =>
547
- testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false))
548
- )
577
+ localStreams.bob.microphone.setMuted(true);
578
+
579
+ await membersUpdate;
580
+
581
+ assert.equal(localStreams.bob.microphone.muted, true);
582
+
583
+ // now alice tries to unmmute bob
584
+ await testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false))
549
585
  // expect the waitForEvents to timeout
550
586
  .then(() =>
551
587
  testUtils.waitForEvents(
@@ -557,126 +593,121 @@ skipInNode(describe)('plugin-meetings', () => {
557
593
  assert.fail('bob received unexpected meeting:self:unmutedByOthers event');
558
594
  })
559
595
  .catch(() => {
560
- assert.equal(bob.meeting.audio.muted, true);
561
- assert.equal(bob.meeting.isAudioMuted(), true);
562
- done();
596
+ assert.equal(localStreams.bob.microphone.muted, true);
563
597
  });
564
598
  });
565
599
 
566
- it('bob audio unmute ', () => {
600
+ it('bob audio unmute ', async () => {
567
601
  const checkEvent = (event) =>
568
602
  !!event.delta.updated.find(
569
603
  (member) => bob.meeting.members.selfId === member.id && member.isAudioMuted === false
570
604
  );
571
605
 
572
- return Promise.all([
573
- testUtils.delayedPromise(bob.meeting.unmuteAudio()),
574
- testUtils.waitForEvents([
575
- {scope: alice.meeting.members, event: 'members:update', match: checkEvent},
576
- ]),
577
- ]).then(() => {
578
- assert.equal(bob.meeting.audio.muted, false);
579
- assert.equal(bob.meeting.isAudioMuted(), false);
580
- });
606
+ const membersUpdate = testUtils.waitForEvents([
607
+ {scope: alice.meeting.members, event: 'members:update', match: checkEvent},
608
+ ]);
609
+
610
+ localStreams.bob.microphone.setMuted(false);
611
+
612
+ await membersUpdate;
613
+
614
+ assert.equal(localStreams.bob.microphone.muted, false);
581
615
  });
582
616
 
583
- it('alice shares the screen with highFrameRate', () =>
584
- Promise.all([
585
- testUtils.delayedPromise(
586
- alice.meeting.shareScreen({sharePreferences: {highFrameRate: true}})
587
- ),
588
- testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingLocal'}]),
589
- testUtils
590
- .waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingRemote'}])
591
- .then((response) => {
592
- assert.equal(response[0].result.memberId, alice.meeting.selfId);
593
- }),
594
- testUtils
595
- .waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
596
- .then((response) => {
597
- console.log(
598
- 'SCREEN SHARE RESPONSE ',
599
- JSON.stringify(response, testUtils.getCircularReplacer())
600
- );
601
- }),
602
- testUtils
603
- .waitForEvents([{scope: alice.meeting, event: 'media:ready'}])
604
- .then((response) => {
605
- console.log('MEDIA:READY event ', response[0].result);
606
- assert.equal(response[0].result.type === 'localShare', true);
607
- }),
608
- ]).then(() => {
609
- // TODO: Re-eanable Safari when screensharing issues have been resolved
610
- if (!isBrowser('safari')) {
611
- assert.equal(alice.meeting.mediaProperties.shareTrack.getConstraints().height, 720);
612
- }
613
- assert.equal(alice.meeting.isSharing, true);
614
- assert.equal(alice.meeting.shareStatus, 'local_share_active');
615
- assert.equal(bob.meeting.shareStatus, 'remote_share_active');
616
- console.log(
617
- 'SCREEN SHARE PARTICIPANTS ',
618
- JSON.stringify(alice.meeting.locusInfo.participants)
619
- );
617
+ it('alice shares the screen with highFrameRate', async () => {
618
+ localStreams.alice.screenShare.video = await createDisplayStream();
620
619
 
621
- return testUtils.waitUntil(10000);
622
- }));
620
+ const startedSharingLocal = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingLocal'}]);
621
+ const startedSharingRemote = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingRemote'}])
622
+ .then((response) => {
623
+ assert.equal(response[0].result.memberId, alice.meeting.selfId);
624
+ });
625
+ const bobReceivesMembersUpdate = testUtils.waitForEvents([{scope: bob.meeting.members, event: 'members:update'}])
626
+ .then((response) => {
627
+ console.log(
628
+ 'SCREEN SHARE RESPONSE ',
629
+ JSON.stringify(response, testUtils.getCircularReplacer())
630
+ );
631
+ });
623
632
 
624
- it('bob steals the screen share from alice', () =>
625
- Promise.all([
626
- testUtils.delayedPromise(bob.meeting.shareScreen()),
627
- testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingLocal'}]),
628
- testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]),
629
- testUtils
630
- .waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
631
- .then((response) => {
632
- assert.equal(response[0].result.memberId, bob.meeting.selfId);
633
- }),
634
- testUtils
635
- .waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
636
- .then((response) => {
637
- console.log(
638
- 'SCREEN SHARE RESPONSE ',
639
- JSON.stringify(response, testUtils.getCircularReplacer())
640
- );
641
- }),
642
- testUtils.waitForEvents([{scope: bob.meeting, event: 'media:ready'}]).then((response) => {
643
- console.log('MEDIA:READY event ', response[0].result);
644
- assert.equal(response[0].result.type === 'localShare', true);
645
- }),
646
- ]).then(() => {
647
- const heightResolution = DEFAULT_RESOLUTIONS.meetings.screenResolution.idealHeight;
633
+ const screenShareVideoPublished = waitForPublished(alice.meeting, {stream: localStreams.alice.screenShare.video, status: true}, "alice's screen share video stream");
634
+
635
+ await testUtils.delayedPromise(alice.meeting.publishStreams({screenShare: {video: localStreams.alice.screenShare.video}}));
636
+
637
+ await screenShareVideoPublished;
638
+ await startedSharingLocal;
639
+ await startedSharingRemote;
640
+ await bobReceivesMembersUpdate;
641
+
642
+ assert.equal(alice.meeting.screenShareFloorState, 'floor_request_granted');
643
+ assert.equal(alice.meeting.shareStatus, 'local_share_active');
644
+ assert.equal(bob.meeting.shareStatus, 'remote_share_active');
645
+ console.log(
646
+ 'SCREEN SHARE PARTICIPANTS ',
647
+ JSON.stringify(alice.meeting.locusInfo.participants)
648
+ );
649
+
650
+ await testUtils.waitUntil(10000);
651
+ });
648
652
 
649
- // TODO: Re-eanable Safari when screensharing issues have been resolved
650
- if (!isBrowser('safari')) {
651
- assert.equal(
652
- bob.meeting.mediaProperties.shareTrack.getConstraints().height,
653
- heightResolution
653
+ it('bob steals the screen share from alice', async () => {
654
+ localStreams.bob.screenShare.video = await createDisplayStream();
655
+
656
+ const stoppedSharingLocal = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingLocal'}]);
657
+ const startedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]);
658
+ const startedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
659
+ .then((response) => {
660
+ assert.equal(response[0].result.memberId, bob.meeting.selfId);
661
+ });
662
+ const aliceReceivesMembersUpdate = testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
663
+ .then((response) => {
664
+ console.log(
665
+ 'SCREEN SHARE RESPONSE ',
666
+ JSON.stringify(response, testUtils.getCircularReplacer())
654
667
  );
655
- }
656
- assert.equal(bob.meeting.isSharing, true);
657
- assert.equal(bob.meeting.shareStatus, 'local_share_active');
658
- assert.equal(alice.meeting.shareStatus, 'remote_share_active');
668
+ });
669
+ const aliceScreenShareVideoUnpublished = waitForPublished(alice.meeting, {stream: localStreams.alice.screenShare.video, status: false}, "alice's screen share video stream");
670
+ const bobScreenShareVideoPublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: true}, "bob's screen share video stream");
659
671
 
660
- return testUtils.waitUntil(10000);
661
- }));
672
+ await testUtils.delayedPromise(bob.meeting.publishStreams({screenShare: {video: localStreams.bob.screenShare.video}}));
662
673
 
663
- it('bob stops sharing ', () =>
664
- Promise.all([
665
- // Wait for peerConnection to stabalize
666
- testUtils.waitUntil(20000),
667
- testUtils.delayedPromise(
668
- bob.meeting.updateShare({
669
- sendShare: false,
670
- receiveShare: true,
671
- })
672
- ),
673
- testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:stoppedSharingLocal'}]),
674
- testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingRemote'}]),
675
- ]).then(() => {
676
- assert.equal(bob.meeting.isSharing, false);
677
- assert.equal(bob.meeting.shareStatus, 'no_share');
678
- assert.equal(alice.meeting.shareStatus, 'no_share');
679
- }));
674
+ await bobScreenShareVideoPublished;
675
+ await aliceScreenShareVideoUnpublished;
676
+ await stoppedSharingLocal;
677
+ await startedSharingLocal;
678
+ await startedSharingRemote;
679
+ await aliceReceivesMembersUpdate;
680
+
681
+ localStreams.alice.screenShare.video.stop();
682
+ localStreams.alice.screenShare.video = undefined;
683
+
684
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_request_granted');
685
+ assert.equal(bob.meeting.shareStatus, 'local_share_active');
686
+ assert.equal(alice.meeting.shareStatus, 'remote_share_active');
687
+
688
+ await testUtils.waitUntil(10000);
689
+ });
690
+
691
+ it('bob stops sharing', async () => {
692
+ const screenShareVideoUnpublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: false}, "bob's screen share video stream");
693
+ const stoppedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:stoppedSharingLocal'}]);
694
+ const stoppedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingRemote'}]);
695
+
696
+ await testUtils.delayedPromise(bob.meeting.unpublishStreams([localStreams.bob.screenShare.video]));
697
+
698
+ await screenShareVideoUnpublished;
699
+ await stoppedSharingLocal;
700
+ await stoppedSharingRemote;
701
+
702
+ localStreams.bob.screenShare.video.stop();
703
+ localStreams.bob.screenShare.video = undefined;
704
+
705
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
706
+ assert.equal(bob.meeting.shareStatus, 'no_share');
707
+ assert.equal(alice.meeting.shareStatus, 'no_share');
708
+
709
+ await testUtils.waitUntil(10000);
710
+ });
680
711
 
681
712
  it('alice shares whiteboard A', () =>
682
713
  Promise.all([
@@ -701,7 +732,7 @@ skipInNode(describe)('plugin-meetings', () => {
701
732
  );
702
733
  }),
703
734
  ]).then(() => {
704
- assert.equal(alice.meeting.isSharing, false);
735
+ assert.equal(alice.meeting.screenShareFloorState, 'floor_released');
705
736
  assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
706
737
  assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
707
738
  }));
@@ -729,12 +760,12 @@ skipInNode(describe)('plugin-meetings', () => {
729
760
  );
730
761
  }),
731
762
  ]).then(() => {
732
- assert.equal(bob.meeting.isSharing, false);
763
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
733
764
  assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
734
765
  assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
735
766
  }));
736
767
 
737
- it('bob stops sharing ', () =>
768
+ it('bob stops sharing again', () =>
738
769
  Promise.all([
739
770
  // Wait for peerConnection to stabalize
740
771
  testUtils.waitUntil(20000),
@@ -746,7 +777,7 @@ skipInNode(describe)('plugin-meetings', () => {
746
777
  {scope: alice.meeting, event: 'meeting:stoppedSharingWhiteboard'},
747
778
  ]),
748
779
  ]).then(() => {
749
- assert.equal(bob.meeting.isSharing, false);
780
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
750
781
  assert.equal(bob.meeting.shareStatus, 'no_share');
751
782
  assert.equal(alice.meeting.shareStatus, 'no_share');
752
783
  }));
@@ -774,51 +805,43 @@ skipInNode(describe)('plugin-meetings', () => {
774
805
  );
775
806
  }),
776
807
  ]).then(() => {
777
- assert.equal(alice.meeting.isSharing, false);
808
+ assert.equal(alice.meeting.screenShareFloorState, 'floor_released');
778
809
  assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
779
810
  assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
780
811
  }));
781
812
 
782
- it('bob steals the share from alice with desktop share', () =>
783
- Promise.all([
784
- testUtils.delayedPromise(bob.meeting.shareScreen()),
785
- testUtils.waitForEvents([
786
- {scope: alice.meeting, event: 'meeting:stoppedSharingWhiteboard'},
787
- ]),
788
- testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]),
789
- testUtils
790
- .waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
791
- .then((response) => {
792
- assert.equal(response[0].result.memberId, bob.meeting.selfId);
793
- }),
794
- testUtils
795
- .waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
796
- .then((response) => {
797
- console.log(
798
- 'SCREEN SHARE RESPONSE ',
799
- JSON.stringify(response, testUtils.getCircularReplacer())
800
- );
801
- }),
802
- testUtils.waitForEvents([{scope: bob.meeting, event: 'media:ready'}]).then((response) => {
803
- console.log('MEDIA:READY event ', response[0].result);
804
- assert.equal(response[0].result.type === 'localShare', true);
805
- }),
806
- ]).then(() => {
807
- const heightResolution = DEFAULT_RESOLUTIONS.meetings.screenResolution.idealHeight;
813
+ it('bob steals the share from alice with desktop share', async () => {
814
+ localStreams.bob.screenShare.video = await createDisplayStream();
808
815
 
809
- // TODO: Re-eanable Safari when screensharing issues have been resolved
810
- if (!isBrowser('safari')) {
811
- assert.equal(
812
- bob.meeting.mediaProperties.shareTrack.getConstraints().height,
813
- heightResolution
816
+ const stoppedSharingWhiteboard = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:stoppedSharingWhiteboard'}]);
817
+ const startedSharingLocal = testUtils.waitForEvents([{scope: bob.meeting, event: 'meeting:startedSharingLocal'}]);
818
+ const startedSharingRemote = testUtils.waitForEvents([{scope: alice.meeting, event: 'meeting:startedSharingRemote'}])
819
+ .then((response) => {
820
+ assert.equal(response[0].result.memberId, bob.meeting.selfId);
821
+ });
822
+ const aliceReceivesMembersUpdate = testUtils.waitForEvents([{scope: alice.meeting.members, event: 'members:update'}])
823
+ .then((response) => {
824
+ console.log(
825
+ 'SCREEN SHARE RESPONSE ',
826
+ JSON.stringify(response, testUtils.getCircularReplacer())
814
827
  );
815
- }
816
- assert.equal(bob.meeting.isSharing, true);
817
- assert.equal(bob.meeting.shareStatus, 'local_share_active');
818
- assert.equal(alice.meeting.shareStatus, 'remote_share_active');
828
+ });
829
+ const bobScreenShareVideoPublished = waitForPublished(bob.meeting, {stream: localStreams.bob.screenShare.video, status: true}, "bob's screen share video stream");
819
830
 
820
- return testUtils.waitUntil(10000);
821
- }));
831
+ await testUtils.delayedPromise(bob.meeting.publishStreams({screenShare: {video: localStreams.bob.screenShare.video}}));
832
+
833
+ await bobScreenShareVideoPublished;
834
+ await stoppedSharingWhiteboard;
835
+ await startedSharingLocal;
836
+ await startedSharingRemote;
837
+ await aliceReceivesMembersUpdate;
838
+
839
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_request_granted');
840
+ assert.equal(bob.meeting.shareStatus, 'local_share_active');
841
+ assert.equal(alice.meeting.shareStatus, 'remote_share_active');
842
+
843
+ await testUtils.waitUntil(10000);
844
+ });
822
845
 
823
846
  it('bob shares whiteboard B', () =>
824
847
  Promise.all([
@@ -843,7 +866,7 @@ skipInNode(describe)('plugin-meetings', () => {
843
866
  );
844
867
  }),
845
868
  ]).then(() => {
846
- assert.equal(bob.meeting.isSharing, false);
869
+ assert.equal(bob.meeting.screenShareFloorState, 'floor_released');
847
870
  assert.equal(alice.meeting.shareStatus, 'whiteboard_share_active');
848
871
  assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
849
872
  }));
@@ -889,7 +912,11 @@ skipInNode(describe)('plugin-meetings', () => {
889
912
  );
890
913
  })
891
914
  .then(() => testUtils.waitForStateChange(chris.meeting, 'JOINED'))
892
- .then(() => testUtils.addMedia(chris))
915
+ .then(async () => {
916
+ localStreams.chris.microphone = await createMicrophoneStream();
917
+ localStreams.chris.camera = await createCameraStream();
918
+ })
919
+ .then(() => integrationTestUtils.addMedia(chris, {microphone: localStreams.chris.microphone, camera: localStreams.chris.camera}))
893
920
  .then(() => assert(enumerateSpy.called));
894
921
  })
895
922
  .then(() =>
@@ -936,6 +963,35 @@ skipInNode(describe)('plugin-meetings', () => {
936
963
  assert.equal(bob.webex.meetings.getMeetingByType('sipUri', alice.emailAddress), null);
937
964
  });
938
965
  });
966
+
967
+ it('stop all local streams', () => {
968
+ if (localStreams.alice.microphone) {
969
+ localStreams.alice.microphone.stop();
970
+ localStreams.alice.microphone = undefined;
971
+ }
972
+ if (localStreams.alice.camera) {
973
+ localStreams.alice.camera.stop();
974
+ localStreams.alice.camera = undefined;
975
+ }
976
+
977
+ if (localStreams.bob.microphone) {
978
+ localStreams.bob.microphone.stop();
979
+ localStreams.bob.microphone = undefined;
980
+ }
981
+ if (localStreams.bob.camera) {
982
+ localStreams.bob.camera.stop();
983
+ localStreams.bob.camera = undefined;
984
+ }
985
+
986
+ if (localStreams.chris.microphone) {
987
+ localStreams.chris.microphone.stop();
988
+ localStreams.chris.microphone = undefined;
989
+ }
990
+ if (localStreams.chris.camera) {
991
+ localStreams.chris.camera.stop();
992
+ localStreams.chris.camera = undefined;
993
+ }
994
+ });
939
995
  });
940
996
  });
941
997
  });