@webex/plugin-meetings 3.0.0-beta.39 → 3.0.0-beta.391

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 (393) hide show
  1. package/README.md +58 -8
  2. package/dist/annotation/annotation.types.js +7 -0
  3. package/dist/annotation/annotation.types.js.map +1 -0
  4. package/dist/annotation/constants.js +49 -0
  5. package/dist/annotation/constants.js.map +1 -0
  6. package/dist/annotation/index.js +342 -0
  7. package/dist/annotation/index.js.map +1 -0
  8. package/dist/breakouts/breakout.js +94 -15
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/events.js +45 -0
  11. package/dist/breakouts/events.js.map +1 -0
  12. package/dist/breakouts/index.js +671 -81
  13. package/dist/breakouts/index.js.map +1 -1
  14. package/dist/breakouts/utils.js +45 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/errors/no-meeting-info.js +51 -0
  17. package/dist/common/errors/no-meeting-info.js.map +1 -0
  18. package/dist/common/errors/reclaim-host-role-errors.js +158 -0
  19. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  20. package/dist/common/errors/webex-errors.js +48 -7
  21. package/dist/common/errors/webex-errors.js.map +1 -1
  22. package/dist/common/logs/logger-proxy.js +1 -1
  23. package/dist/common/logs/logger-proxy.js.map +1 -1
  24. package/dist/common/logs/request.js +5 -1
  25. package/dist/common/logs/request.js.map +1 -1
  26. package/dist/common/queue.js +24 -9
  27. package/dist/common/queue.js.map +1 -1
  28. package/dist/config.js +5 -10
  29. package/dist/config.js.map +1 -1
  30. package/dist/constants.js +242 -33
  31. package/dist/constants.js.map +1 -1
  32. package/dist/controls-options-manager/enums.js +14 -2
  33. package/dist/controls-options-manager/enums.js.map +1 -1
  34. package/dist/controls-options-manager/index.js +109 -15
  35. package/dist/controls-options-manager/index.js.map +1 -1
  36. package/dist/controls-options-manager/types.js +7 -0
  37. package/dist/controls-options-manager/types.js.map +1 -0
  38. package/dist/controls-options-manager/util.js +309 -18
  39. package/dist/controls-options-manager/util.js.map +1 -1
  40. package/dist/index.js +110 -2
  41. package/dist/index.js.map +1 -1
  42. package/dist/interceptors/index.js +15 -0
  43. package/dist/interceptors/index.js.map +1 -0
  44. package/dist/interceptors/locusRetry.js +93 -0
  45. package/dist/interceptors/locusRetry.js.map +1 -0
  46. package/dist/interpretation/collection.js +23 -0
  47. package/dist/interpretation/collection.js.map +1 -0
  48. package/dist/interpretation/index.js +380 -0
  49. package/dist/interpretation/index.js.map +1 -0
  50. package/dist/interpretation/siLanguage.js +25 -0
  51. package/dist/interpretation/siLanguage.js.map +1 -0
  52. package/dist/locus-info/controlsUtils.js +91 -2
  53. package/dist/locus-info/controlsUtils.js.map +1 -1
  54. package/dist/locus-info/index.js +386 -62
  55. package/dist/locus-info/index.js.map +1 -1
  56. package/dist/locus-info/infoUtils.js +7 -1
  57. package/dist/locus-info/infoUtils.js.map +1 -1
  58. package/dist/locus-info/mediaSharesUtils.js +71 -1
  59. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  60. package/dist/locus-info/parser.js +249 -72
  61. package/dist/locus-info/parser.js.map +1 -1
  62. package/dist/locus-info/selfUtils.js +89 -14
  63. package/dist/locus-info/selfUtils.js.map +1 -1
  64. package/dist/media/index.js +65 -102
  65. package/dist/media/index.js.map +1 -1
  66. package/dist/media/properties.js +73 -124
  67. package/dist/media/properties.js.map +1 -1
  68. package/dist/mediaQualityMetrics/config.js +135 -330
  69. package/dist/mediaQualityMetrics/config.js.map +1 -1
  70. package/dist/meeting/in-meeting-actions.js +86 -2
  71. package/dist/meeting/in-meeting-actions.js.map +1 -1
  72. package/dist/meeting/index.js +4075 -2827
  73. package/dist/meeting/index.js.map +1 -1
  74. package/dist/meeting/locusMediaRequest.js +292 -0
  75. package/dist/meeting/locusMediaRequest.js.map +1 -0
  76. package/dist/meeting/muteState.js +224 -136
  77. package/dist/meeting/muteState.js.map +1 -1
  78. package/dist/meeting/request.js +177 -152
  79. package/dist/meeting/request.js.map +1 -1
  80. package/dist/meeting/util.js +672 -417
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/index.js +73 -7
  83. package/dist/meeting-info/index.js.map +1 -1
  84. package/dist/meeting-info/meeting-info-v2.js +192 -51
  85. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  86. package/dist/meeting-info/util.js +1 -1
  87. package/dist/meeting-info/util.js.map +1 -1
  88. package/dist/meeting-info/utilv2.js +36 -36
  89. package/dist/meeting-info/utilv2.js.map +1 -1
  90. package/dist/meetings/collection.js +39 -0
  91. package/dist/meetings/collection.js.map +1 -1
  92. package/dist/meetings/index.js +484 -119
  93. package/dist/meetings/index.js.map +1 -1
  94. package/dist/meetings/meetings.types.js +7 -0
  95. package/dist/meetings/meetings.types.js.map +1 -0
  96. package/dist/meetings/request.js +2 -0
  97. package/dist/meetings/request.js.map +1 -1
  98. package/dist/meetings/util.js +73 -7
  99. package/dist/meetings/util.js.map +1 -1
  100. package/dist/member/index.js +58 -0
  101. package/dist/member/index.js.map +1 -1
  102. package/dist/member/types.js +25 -0
  103. package/dist/member/types.js.map +1 -0
  104. package/dist/member/util.js +132 -25
  105. package/dist/member/util.js.map +1 -1
  106. package/dist/members/collection.js +10 -0
  107. package/dist/members/collection.js.map +1 -1
  108. package/dist/members/index.js +102 -6
  109. package/dist/members/index.js.map +1 -1
  110. package/dist/members/request.js +106 -38
  111. package/dist/members/request.js.map +1 -1
  112. package/dist/members/types.js +15 -0
  113. package/dist/members/types.js.map +1 -0
  114. package/dist/members/util.js +326 -232
  115. package/dist/members/util.js.map +1 -1
  116. package/dist/metrics/constants.js +18 -1
  117. package/dist/metrics/constants.js.map +1 -1
  118. package/dist/metrics/index.js +1 -446
  119. package/dist/metrics/index.js.map +1 -1
  120. package/dist/multistream/mediaRequestManager.js +223 -32
  121. package/dist/multistream/mediaRequestManager.js.map +1 -1
  122. package/dist/multistream/receiveSlot.js +10 -0
  123. package/dist/multistream/receiveSlot.js.map +1 -1
  124. package/dist/multistream/receiveSlotManager.js +39 -36
  125. package/dist/multistream/receiveSlotManager.js.map +1 -1
  126. package/dist/multistream/remoteMedia.js +3 -1
  127. package/dist/multistream/remoteMedia.js.map +1 -1
  128. package/dist/multistream/remoteMediaGroup.js +76 -5
  129. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  130. package/dist/multistream/remoteMediaManager.js +366 -104
  131. package/dist/multistream/remoteMediaManager.js.map +1 -1
  132. package/dist/multistream/sendSlotManager.js +255 -0
  133. package/dist/multistream/sendSlotManager.js.map +1 -0
  134. package/dist/reachability/clusterReachability.js +356 -0
  135. package/dist/reachability/clusterReachability.js.map +1 -0
  136. package/dist/reachability/index.js +263 -390
  137. package/dist/reachability/index.js.map +1 -1
  138. package/dist/reachability/request.js +6 -4
  139. package/dist/reachability/request.js.map +1 -1
  140. package/dist/reachability/util.js +29 -0
  141. package/dist/reachability/util.js.map +1 -0
  142. package/dist/reconnection-manager/index.js +266 -202
  143. package/dist/reconnection-manager/index.js.map +1 -1
  144. package/dist/recording-controller/index.js +21 -2
  145. package/dist/recording-controller/index.js.map +1 -1
  146. package/dist/recording-controller/util.js +9 -8
  147. package/dist/recording-controller/util.js.map +1 -1
  148. package/dist/roap/index.js +51 -28
  149. package/dist/roap/index.js.map +1 -1
  150. package/dist/roap/request.js +48 -64
  151. package/dist/roap/request.js.map +1 -1
  152. package/dist/roap/turnDiscovery.js +220 -70
  153. package/dist/roap/turnDiscovery.js.map +1 -1
  154. package/dist/rtcMetrics/constants.js +12 -0
  155. package/dist/rtcMetrics/constants.js.map +1 -0
  156. package/dist/rtcMetrics/index.js +179 -0
  157. package/dist/rtcMetrics/index.js.map +1 -0
  158. package/dist/statsAnalyzer/index.js +357 -295
  159. package/dist/statsAnalyzer/index.js.map +1 -1
  160. package/dist/statsAnalyzer/mqaUtil.js +296 -156
  161. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  162. package/dist/types/annotation/annotation.types.d.ts +42 -0
  163. package/dist/types/annotation/constants.d.ts +31 -0
  164. package/dist/types/annotation/index.d.ts +117 -0
  165. package/dist/types/breakouts/events.d.ts +8 -0
  166. package/dist/types/breakouts/utils.d.ts +14 -0
  167. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  168. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  169. package/dist/types/common/errors/webex-errors.d.ts +25 -1
  170. package/dist/types/common/logs/request.d.ts +2 -0
  171. package/dist/types/common/queue.d.ts +9 -7
  172. package/dist/types/config.d.ts +2 -7
  173. package/dist/types/constants.d.ts +203 -31
  174. package/dist/types/controls-options-manager/enums.d.ts +11 -1
  175. package/dist/types/controls-options-manager/index.d.ts +17 -1
  176. package/dist/types/controls-options-manager/types.d.ts +43 -0
  177. package/dist/types/controls-options-manager/util.d.ts +1 -7
  178. package/dist/types/index.d.ts +6 -5
  179. package/dist/types/interceptors/index.d.ts +2 -0
  180. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  181. package/dist/types/interpretation/collection.d.ts +5 -0
  182. package/dist/types/interpretation/index.d.ts +5 -0
  183. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  184. package/dist/types/locus-info/index.d.ts +57 -4
  185. package/dist/types/locus-info/parser.d.ts +66 -6
  186. package/dist/types/media/index.d.ts +2 -0
  187. package/dist/types/media/properties.d.ts +34 -49
  188. package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
  189. package/dist/types/meeting/in-meeting-actions.d.ts +86 -2
  190. package/dist/types/meeting/index.d.ts +567 -496
  191. package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
  192. package/dist/types/meeting/muteState.d.ts +93 -25
  193. package/dist/types/meeting/request.d.ts +64 -43
  194. package/dist/types/meeting/util.d.ts +117 -1
  195. package/dist/types/meeting-info/index.d.ts +13 -1
  196. package/dist/types/meeting-info/meeting-info-v2.d.ts +31 -1
  197. package/dist/types/meetings/collection.d.ts +17 -0
  198. package/dist/types/meetings/index.d.ts +113 -21
  199. package/dist/types/meetings/meetings.types.d.ts +4 -0
  200. package/dist/types/member/index.d.ts +14 -0
  201. package/dist/types/member/types.d.ts +32 -0
  202. package/dist/types/members/collection.d.ts +5 -0
  203. package/dist/types/members/index.d.ts +35 -2
  204. package/dist/types/members/request.d.ts +73 -9
  205. package/dist/types/members/types.d.ts +25 -0
  206. package/dist/types/members/util.d.ts +214 -1
  207. package/dist/types/metrics/constants.d.ts +17 -0
  208. package/dist/types/metrics/index.d.ts +4 -111
  209. package/dist/types/multistream/mediaRequestManager.d.ts +72 -3
  210. package/dist/types/multistream/receiveSlot.d.ts +7 -3
  211. package/dist/types/multistream/receiveSlotManager.d.ts +14 -4
  212. package/dist/types/multistream/remoteMedia.d.ts +3 -31
  213. package/dist/types/multistream/remoteMediaGroup.d.ts +2 -9
  214. package/dist/types/multistream/remoteMediaManager.d.ts +62 -2
  215. package/dist/types/multistream/sendSlotManager.d.ts +70 -0
  216. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  217. package/dist/types/reachability/index.d.ts +60 -95
  218. package/dist/types/reachability/request.d.ts +3 -1
  219. package/dist/types/reachability/util.d.ts +8 -0
  220. package/dist/types/reconnection-manager/index.d.ts +19 -0
  221. package/dist/types/recording-controller/index.d.ts +15 -1
  222. package/dist/types/recording-controller/util.d.ts +5 -4
  223. package/dist/types/roap/index.d.ts +2 -1
  224. package/dist/types/roap/request.d.ts +9 -8
  225. package/dist/types/roap/turnDiscovery.d.ts +39 -5
  226. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  227. package/dist/types/rtcMetrics/index.d.ts +61 -0
  228. package/dist/types/statsAnalyzer/index.d.ts +34 -12
  229. package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
  230. package/dist/types/webinar/collection.d.ts +16 -0
  231. package/dist/types/webinar/index.d.ts +5 -0
  232. package/dist/webinar/collection.js +44 -0
  233. package/dist/webinar/collection.js.map +1 -0
  234. package/dist/webinar/index.js +69 -0
  235. package/dist/webinar/index.js.map +1 -0
  236. package/package.json +22 -19
  237. package/src/annotation/annotation.types.ts +50 -0
  238. package/src/annotation/constants.ts +36 -0
  239. package/src/annotation/index.ts +328 -0
  240. package/src/breakouts/README.md +35 -11
  241. package/src/breakouts/breakout.ts +67 -9
  242. package/src/breakouts/events.ts +56 -0
  243. package/src/breakouts/index.ts +558 -59
  244. package/src/breakouts/utils.ts +42 -0
  245. package/src/common/errors/no-meeting-info.ts +24 -0
  246. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  247. package/src/common/errors/webex-errors.ts +44 -2
  248. package/src/common/logs/logger-proxy.ts +1 -1
  249. package/src/common/logs/request.ts +5 -1
  250. package/src/common/queue.ts +22 -8
  251. package/src/config.ts +4 -9
  252. package/src/constants.ts +229 -21
  253. package/src/controls-options-manager/enums.ts +12 -0
  254. package/src/controls-options-manager/index.ts +116 -21
  255. package/src/controls-options-manager/types.ts +59 -0
  256. package/src/controls-options-manager/util.ts +294 -14
  257. package/src/index.ts +44 -0
  258. package/src/interceptors/index.ts +3 -0
  259. package/src/interceptors/locusRetry.ts +67 -0
  260. package/src/interpretation/README.md +60 -0
  261. package/src/interpretation/collection.ts +19 -0
  262. package/src/interpretation/index.ts +349 -0
  263. package/src/interpretation/siLanguage.ts +18 -0
  264. package/src/locus-info/controlsUtils.ts +108 -0
  265. package/src/locus-info/index.ts +417 -59
  266. package/src/locus-info/infoUtils.ts +10 -2
  267. package/src/locus-info/mediaSharesUtils.ts +80 -0
  268. package/src/locus-info/parser.ts +258 -47
  269. package/src/locus-info/selfUtils.ts +81 -5
  270. package/src/media/index.ts +100 -108
  271. package/src/media/properties.ts +88 -117
  272. package/src/mediaQualityMetrics/config.ts +103 -238
  273. package/src/meeting/in-meeting-actions.ts +171 -3
  274. package/src/meeting/index.ts +3411 -2435
  275. package/src/meeting/locusMediaRequest.ts +313 -0
  276. package/src/meeting/muteState.ts +223 -136
  277. package/src/meeting/request.ts +155 -120
  278. package/src/meeting/util.ts +685 -395
  279. package/src/meeting-info/index.ts +81 -8
  280. package/src/meeting-info/meeting-info-v2.ts +170 -14
  281. package/src/meeting-info/util.ts +1 -1
  282. package/src/meeting-info/utilv2.ts +23 -23
  283. package/src/meetings/collection.ts +33 -0
  284. package/src/meetings/index.ts +507 -127
  285. package/src/meetings/meetings.types.ts +12 -0
  286. package/src/meetings/request.ts +2 -0
  287. package/src/meetings/util.ts +81 -12
  288. package/src/member/index.ts +58 -0
  289. package/src/member/types.ts +38 -0
  290. package/src/member/util.ts +141 -25
  291. package/src/members/collection.ts +8 -0
  292. package/src/members/index.ts +134 -8
  293. package/src/members/request.ts +97 -17
  294. package/src/members/types.ts +29 -0
  295. package/src/members/util.ts +333 -240
  296. package/src/metrics/constants.ts +17 -0
  297. package/src/metrics/index.ts +1 -469
  298. package/src/multistream/mediaRequestManager.ts +271 -56
  299. package/src/multistream/receiveSlot.ts +11 -4
  300. package/src/multistream/receiveSlotManager.ts +34 -24
  301. package/src/multistream/remoteMedia.ts +5 -3
  302. package/src/multistream/remoteMediaGroup.ts +78 -0
  303. package/src/multistream/remoteMediaManager.ts +248 -44
  304. package/src/multistream/sendSlotManager.ts +199 -0
  305. package/src/reachability/clusterReachability.ts +320 -0
  306. package/src/reachability/index.ts +229 -346
  307. package/src/reachability/request.ts +8 -4
  308. package/src/reachability/util.ts +24 -0
  309. package/src/reconnection-manager/index.ts +128 -97
  310. package/src/recording-controller/index.ts +20 -3
  311. package/src/recording-controller/util.ts +26 -9
  312. package/src/roap/index.ts +52 -23
  313. package/src/roap/request.ts +48 -67
  314. package/src/roap/turnDiscovery.ts +147 -49
  315. package/src/rtcMetrics/constants.ts +3 -0
  316. package/src/rtcMetrics/index.ts +166 -0
  317. package/src/statsAnalyzer/index.ts +457 -416
  318. package/src/statsAnalyzer/mqaUtil.ts +317 -170
  319. package/src/webinar/collection.ts +31 -0
  320. package/src/webinar/index.ts +62 -0
  321. package/test/integration/spec/converged-space-meetings.js +60 -3
  322. package/test/integration/spec/journey.js +320 -261
  323. package/test/integration/spec/space-meeting.js +76 -3
  324. package/test/unit/spec/annotation/index.ts +418 -0
  325. package/test/unit/spec/breakouts/breakout.ts +118 -28
  326. package/test/unit/spec/breakouts/events.ts +89 -0
  327. package/test/unit/spec/breakouts/index.ts +1349 -114
  328. package/test/unit/spec/breakouts/utils.js +52 -1
  329. package/test/unit/spec/common/queue.js +31 -2
  330. package/test/unit/spec/controls-options-manager/index.js +163 -0
  331. package/test/unit/spec/controls-options-manager/util.js +576 -60
  332. package/test/unit/spec/fixture/locus.js +1 -0
  333. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  334. package/test/unit/spec/interpretation/collection.ts +15 -0
  335. package/test/unit/spec/interpretation/index.ts +625 -0
  336. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  337. package/test/unit/spec/locus-info/controlsUtils.js +316 -43
  338. package/test/unit/spec/locus-info/index.js +1363 -37
  339. package/test/unit/spec/locus-info/infoUtils.js +37 -15
  340. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  341. package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
  342. package/test/unit/spec/locus-info/parser.js +116 -35
  343. package/test/unit/spec/locus-info/selfConstant.js +27 -4
  344. package/test/unit/spec/locus-info/selfUtils.js +208 -17
  345. package/test/unit/spec/media/index.ts +173 -81
  346. package/test/unit/spec/media/properties.ts +2 -2
  347. package/test/unit/spec/meeting/in-meeting-actions.ts +85 -3
  348. package/test/unit/spec/meeting/index.js +6821 -2172
  349. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  350. package/test/unit/spec/meeting/muteState.js +402 -212
  351. package/test/unit/spec/meeting/request.js +473 -54
  352. package/test/unit/spec/meeting/utils.js +773 -67
  353. package/test/unit/spec/meeting-info/index.js +300 -0
  354. package/test/unit/spec/meeting-info/meetinginfov2.js +526 -5
  355. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  356. package/test/unit/spec/meetings/collection.js +26 -0
  357. package/test/unit/spec/meetings/index.js +1415 -213
  358. package/test/unit/spec/meetings/utils.js +229 -2
  359. package/test/unit/spec/member/index.js +61 -6
  360. package/test/unit/spec/member/util.js +510 -34
  361. package/test/unit/spec/members/index.js +432 -1
  362. package/test/unit/spec/members/request.js +206 -27
  363. package/test/unit/spec/members/utils.js +210 -0
  364. package/test/unit/spec/metrics/index.js +1 -50
  365. package/test/unit/spec/multistream/mediaRequestManager.ts +781 -114
  366. package/test/unit/spec/multistream/receiveSlot.ts +9 -1
  367. package/test/unit/spec/multistream/receiveSlotManager.ts +32 -30
  368. package/test/unit/spec/multistream/remoteMedia.ts +2 -0
  369. package/test/unit/spec/multistream/remoteMediaGroup.ts +345 -0
  370. package/test/unit/spec/multistream/remoteMediaManager.ts +525 -0
  371. package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
  372. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  373. package/test/unit/spec/reachability/index.ts +551 -14
  374. package/test/unit/spec/reachability/request.js +3 -1
  375. package/test/unit/spec/reachability/util.ts +40 -0
  376. package/test/unit/spec/reconnection-manager/index.js +171 -11
  377. package/test/unit/spec/recording-controller/index.js +294 -218
  378. package/test/unit/spec/recording-controller/util.js +223 -96
  379. package/test/unit/spec/roap/index.ts +180 -83
  380. package/test/unit/spec/roap/request.ts +100 -62
  381. package/test/unit/spec/roap/turnDiscovery.ts +388 -96
  382. package/test/unit/spec/rtcMetrics/index.ts +122 -0
  383. package/test/unit/spec/stats-analyzer/index.js +1252 -12
  384. package/test/unit/spec/webinar/collection.ts +13 -0
  385. package/test/unit/spec/webinar/index.ts +60 -0
  386. package/test/utils/integrationTestUtils.js +46 -0
  387. package/test/utils/testUtils.js +0 -57
  388. package/test/utils/webex-test-users.js +12 -4
  389. package/dist/metrics/config.js +0 -289
  390. package/dist/metrics/config.js.map +0 -1
  391. package/dist/types/metrics/config.d.ts +0 -169
  392. package/src/index.js +0 -18
  393. package/src/metrics/config.ts +0 -485
@@ -1,26 +1,64 @@
1
1
  /// <reference types="node" />
2
2
  import { StatelessWebexPlugin } from '@webex/webex-core';
3
+ import { ClientEvent, ClientEventLeaveReason } from '@webex/internal-plugin-metrics';
4
+ import { MediaType } from '@webex/internal-media-core';
5
+ import { LocalStream, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream } from '@webex/media-helpers';
3
6
  import { StatsAnalyzer } from '../statsAnalyzer';
4
7
  import NetworkQualityMonitor from '../networkQualityMonitor';
5
8
  import Roap from '../roap/index';
9
+ import { type BundlePolicy } from '../media';
6
10
  import MediaProperties from '../media/properties';
7
11
  import ReconnectionManager from '../reconnection-manager';
8
12
  import MeetingRequest from './request';
9
13
  import Members from '../members/index';
10
14
  import Transcription from '../transcription';
15
+ import { NETWORK_STATUS } from '../constants';
11
16
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
12
17
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
13
- import { RemoteMediaManager } from '../multistream/remoteMediaManager';
18
+ import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager';
14
19
  import { ReactionServerType, SkinToneType } from '../reactions/reactions.type';
15
20
  import InMeetingActions from './in-meeting-actions';
16
21
  import RecordingController from '../recording-controller';
17
22
  import ControlsOptionsManager from '../controls-options-manager';
23
+ import { LocusMediaRequest } from './locusMediaRequest';
24
+ export type LocalStreams = {
25
+ microphone?: LocalMicrophoneStream;
26
+ camera?: LocalCameraStream;
27
+ screenShare?: {
28
+ audio?: LocalSystemAudioStream;
29
+ video?: LocalDisplayStream;
30
+ };
31
+ };
32
+ export type AddMediaOptions = {
33
+ localStreams?: LocalStreams;
34
+ audioEnabled?: boolean;
35
+ videoEnabled?: boolean;
36
+ shareAudioEnabled?: boolean;
37
+ shareVideoEnabled?: boolean;
38
+ remoteMediaManagerConfig?: RemoteMediaManagerConfiguration;
39
+ bundlePolicy?: BundlePolicy;
40
+ allowMediaInLobby?: boolean;
41
+ };
42
+ export type CallStateForMetrics = {
43
+ correlationId?: string;
44
+ joinTrigger?: string;
45
+ loginType?: string;
46
+ };
18
47
  export declare const MEDIA_UPDATE_TYPE: {
19
- ALL: string;
20
- AUDIO: string;
21
- VIDEO: string;
22
- SHARE: string;
23
- LAMBDA: string;
48
+ TRANSCODED_MEDIA_CONNECTION: string;
49
+ SHARE_FLOOR_REQUEST: string;
50
+ UPDATE_MEDIA: string;
51
+ };
52
+ export declare enum ScreenShareFloorStatus {
53
+ PENDING = "floor_request_pending",
54
+ GRANTED = "floor_request_granted",
55
+ RELEASED = "floor_released"
56
+ }
57
+ type FetchMeetingInfoParams = {
58
+ password?: string;
59
+ captchaCode?: string;
60
+ extraParams?: Record<string, any>;
61
+ sendCAevents?: boolean;
24
62
  };
25
63
  /**
26
64
  * MediaDirection
@@ -33,15 +71,6 @@ export declare const MEDIA_UPDATE_TYPE: {
33
71
  * @property {boolean} receiveShare
34
72
  * @property {boolean} isSharing
35
73
  */
36
- /**
37
- * AudioVideo
38
- * @typedef {Object} AudioVideo
39
- * @property {Object} audio
40
- * @property {String} audio.deviceId
41
- * @property {Object} video
42
- * @property {String} video.deviceId
43
- * @property {String} video.localVideoQuality // [240p, 360p, 480p, 720p, 1080p]
44
- */
45
74
  /**
46
75
  * SharePreferences
47
76
  * @typedef {Object} SharePreferences
@@ -55,18 +84,10 @@ export declare const MEDIA_UPDATE_TYPE: {
55
84
  * @property {String} [pin]
56
85
  * @property {Boolean} [moderator]
57
86
  * @property {String|Object} [meetingQuality]
58
- * @property {String} [meetingQuality.local]
59
87
  * @property {String} [meetingQuality.remote]
60
88
  * @property {Boolean} [rejoin]
61
89
  * @property {Boolean} [enableMultistream]
62
90
  */
63
- /**
64
- * SendOptions
65
- * @typedef {Object} SendOptions
66
- * @property {Boolean} sendAudio
67
- * @property {Boolean} sendVideo
68
- * @property {Boolean} sendShare
69
- */
70
91
  /**
71
92
  * Recording
72
93
  * @typedef {Object} Recording
@@ -148,7 +169,11 @@ export declare const MEDIA_UPDATE_TYPE: {
148
169
  * @instance
149
170
  * @type {Object}
150
171
  * @property {Boolean} memberId id of the meeting member that started screen share
172
+ * @property {String} url of this content share
173
+ * @property {String} shareInstanceId of this content share
174
+ * @property {Object} annotation Info of this content share
151
175
  * @memberof Meeting
176
+ *
152
177
  */
153
178
  /**
154
179
  * Meeting Stopped Sharing Remote Event
@@ -285,8 +310,11 @@ export default class Meeting extends StatelessWebexPlugin {
285
310
  attrs: any;
286
311
  audio: any;
287
312
  breakouts: any;
313
+ simultaneousInterpretation: any;
314
+ annotation: any;
315
+ webinar: any;
288
316
  conversationUrl: string;
289
- correlationId: string;
317
+ callStateForMetrics: CallStateForMetrics;
290
318
  destination: string;
291
319
  destinationType: string;
292
320
  deviceUrl: string;
@@ -297,7 +325,7 @@ export default class Meeting extends StatelessWebexPlugin {
297
325
  mediaConnections: any[];
298
326
  mediaId?: string;
299
327
  meetingFiniteStateMachine: any;
300
- meetingInfo: object;
328
+ meetingInfo: any;
301
329
  meetingRequest: MeetingRequest;
302
330
  members: Members;
303
331
  options: object;
@@ -309,11 +337,13 @@ export default class Meeting extends StatelessWebexPlugin {
309
337
  resource: string;
310
338
  roap: Roap;
311
339
  roapSeq: number;
340
+ selfUrl?: string;
312
341
  sipUri: string;
313
342
  type: string;
314
343
  userId: string;
315
344
  video: any;
316
345
  callEvents: any[];
346
+ datachannelUrl: string;
317
347
  deferJoin: Promise<any>;
318
348
  dialInDeviceStatus: string;
319
349
  dialInUrl: string;
@@ -326,10 +356,10 @@ export default class Meeting extends StatelessWebexPlugin {
326
356
  inMeetingActions: InMeetingActions;
327
357
  isLocalShareLive: boolean;
328
358
  isRoapInProgress: boolean;
329
- isSharing: boolean;
330
359
  keepAliveTimerId: NodeJS.Timeout;
331
360
  lastVideoLayoutInfo: any;
332
361
  locusInfo: any;
362
+ locusMediaRequest?: LocusMediaRequest;
333
363
  mediaProperties: MediaProperties;
334
364
  mediaRequestManagers: {
335
365
  audio: MediaRequestManager;
@@ -338,8 +368,10 @@ export default class Meeting extends StatelessWebexPlugin {
338
368
  screenShareVideo: MediaRequestManager;
339
369
  };
340
370
  meetingInfoFailureReason: string;
371
+ meetingInfoFailureCode?: number;
372
+ meetingInfoExtraParams?: Record<string, any>;
341
373
  networkQualityMonitor: NetworkQualityMonitor;
342
- networkStatus: string;
374
+ networkStatus?: NETWORK_STATUS;
343
375
  passwordStatus: string;
344
376
  queuedMediaUpdates: any[];
345
377
  recording: any;
@@ -348,16 +380,20 @@ export default class Meeting extends StatelessWebexPlugin {
348
380
  controlsOptionsManager: ControlsOptionsManager;
349
381
  requiredCaptcha: any;
350
382
  receiveSlotManager: ReceiveSlotManager;
383
+ selfUserPolicies: any;
384
+ enforceVBGImagesURL: string;
351
385
  shareStatus: string;
386
+ screenShareFloorState: ScreenShareFloorStatus;
352
387
  statsAnalyzer: StatsAnalyzer;
353
388
  transcription: Transcription;
354
389
  updateMediaConnections: (mediaConnections: any[]) => void;
355
- endCallInitiateJoinReq: any;
390
+ userDisplayHints: any;
391
+ endCallInitJoinReq: any;
356
392
  endJoinReqResp: any;
357
393
  endLocalSDPGenRemoteSDPRecvDelay: any;
358
394
  joinedWith: any;
359
395
  locusId: any;
360
- startCallInitiateJoinReq: any;
396
+ startCallInitJoinReq: any;
361
397
  startJoinReqResp: any;
362
398
  startLocalSDPGenRemoteSDPRecvDelay: any;
363
399
  wirelessShare: any;
@@ -365,12 +401,29 @@ export default class Meeting extends StatelessWebexPlugin {
365
401
  meetingJoinUrl: any;
366
402
  meetingNumber: any;
367
403
  meetingState: any;
368
- permissionToken: any;
404
+ permissionToken: string;
405
+ permissionTokenPayload: any;
406
+ permissionTokenReceivedLocalTime: number;
369
407
  resourceId: any;
370
408
  resourceUrl: string;
371
409
  selfId: string;
372
410
  state: any;
411
+ localAudioStreamMuteStateHandler: (muted: boolean) => void;
412
+ localVideoStreamMuteStateHandler: (muted: boolean) => void;
413
+ localOutputTrackChangeHandler: () => void;
414
+ roles: any[];
415
+ environment: string;
373
416
  namespace: string;
417
+ allowMediaInLobby: boolean;
418
+ localShareInstanceId: string;
419
+ remoteShareInstanceId: string;
420
+ turnDiscoverySkippedReason: string;
421
+ turnServerUsed: boolean;
422
+ private retriedWithTurnServer;
423
+ private sendSlotManager;
424
+ private deferSDPAnswer?;
425
+ private sdpResponseTimer?;
426
+ private hasMediaConnectionConnectedAtLeastOnce;
374
427
  /**
375
428
  * @param {Object} attrs
376
429
  * @param {Object} options
@@ -378,29 +431,91 @@ export default class Meeting extends StatelessWebexPlugin {
378
431
  * @memberof Meeting
379
432
  */
380
433
  constructor(attrs: any, options: object);
434
+ /**
435
+ * returns meeting is joined
436
+ * @private
437
+ * @memberof Meeting
438
+ * @returns {Boolean}
439
+ */
440
+ private isJoined;
441
+ /**
442
+ * Returns whether this meeting is a Locus CALL
443
+ * @returns {Boolean}
444
+ */
445
+ isLocusCall(): boolean;
446
+ /**
447
+ * Getter - Returns callStateForMetrics.correlationId
448
+ * @returns {string}
449
+ */
450
+ get correlationId(): string;
451
+ /**
452
+ * Setter - sets callStateForMetrics.correlationId
453
+ * @param {string} correlationId
454
+ */
455
+ set correlationId(correlationId: string);
456
+ /**
457
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
458
+ * @param {any} info
459
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
460
+ * @returns {void}
461
+ */
462
+ private setMeetingInfo;
463
+ /**
464
+ * Add pre-fetched meeting info
465
+ *
466
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
467
+ *
468
+ * @param {Object} meetingInfo - Complete meeting info
469
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
470
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
471
+ * @returns {Promise<void>}
472
+ */
473
+ injectMeetingInfo(meetingInfo: any, fetchParams: FetchMeetingInfoParams, meetingLookupUrl: string | undefined): Promise<void>;
474
+ /**
475
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
476
+ *
477
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
478
+ * @param {String} caller - Name of the caller for logging
479
+ *
480
+ * @returns {Promise<void>}
481
+ * @private
482
+ */
483
+ private prepForFetchMeetingInfo;
484
+ /**
485
+ * Internal method for fetching meeting info
486
+ *
487
+ * @returns {Promise}
488
+ */
489
+ private fetchMeetingInfoInternal;
490
+ /**
491
+ * Refreshes the meeting info permission token (it's required for joining meetings)
492
+ *
493
+ * @param {string} [reason] used for metrics and logging purposes (optional)
494
+ * @returns {Promise}
495
+ */
496
+ refreshPermissionToken(reason?: string): Promise<void>;
381
497
  /**
382
498
  * Fetches meeting information.
383
499
  * @param {Object} options
384
500
  * @param {String} [options.password] optional
385
501
  * @param {String} [options.captchaCode] optional
502
+ * @param {Boolean} [options.sendCAevents] optional - Whether to submit Call Analyzer events or not. Default: false.
386
503
  * @public
387
504
  * @memberof Meeting
388
505
  * @returns {Promise}
389
506
  */
390
- fetchMeetingInfo({ password, captchaCode, }: {
391
- password?: string;
392
- captchaCode?: string;
393
- }): Promise<void>;
507
+ fetchMeetingInfo(options: FetchMeetingInfoParams): Promise<void>;
394
508
  /**
395
509
  * Checks if the supplied password/host key is correct. It returns a promise with information whether the
396
510
  * password and captcha code were correct or not.
397
511
  * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
398
512
  * @param {String} captchaCode - can be undefined if captcha was not required by the server
513
+ * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information
399
514
  * @public
400
515
  * @memberof Meeting
401
516
  * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
402
517
  */
403
- verifyPassword(password: string, captchaCode: string): Promise<{
518
+ verifyPassword(password: string, captchaCode: string, sendCAevents?: boolean): Promise<{
404
519
  isPasswordValid: boolean;
405
520
  requiredCaptcha: any;
406
521
  failureReason: string;
@@ -417,6 +532,14 @@ export default class Meeting extends StatelessWebexPlugin {
417
532
  * @returns {Promise}
418
533
  */
419
534
  refreshCaptcha(): any;
535
+ /**
536
+ * Posts metrics event for this meeting. Allows the app to send Call Analyzer events.
537
+ * @param {String} eventName - Call Analyzer event
538
+ * @public
539
+ * @memberof Meeting
540
+ * @returns {Promise}
541
+ */
542
+ postMetrics(eventName: ClientEvent['name']): void;
420
543
  /**
421
544
  * Proxy function for all the listener set ups
422
545
  * @returns {undefined}
@@ -431,6 +554,13 @@ export default class Meeting extends StatelessWebexPlugin {
431
554
  * @memberof Meeting
432
555
  */
433
556
  setUpBreakoutsListener(): void;
557
+ /**
558
+ * Set up the listeners for interpretation
559
+ * @returns {undefined}
560
+ * @private
561
+ * @memberof Meeting
562
+ */
563
+ private setUpInterpretationListener;
434
564
  /**
435
565
  * Set up the locus info listener for meetings disconnected due to inactivity
436
566
  * @returns {undefined}
@@ -452,50 +582,9 @@ export default class Meeting extends StatelessWebexPlugin {
452
582
  * @memberof Meeting
453
583
  */
454
584
  private setUpLocusFullStateListener;
455
- /**
456
- * get the metrics payload pre
457
- * @param {Object} options
458
- * @param {String} options.event
459
- * @param {String} options.trackingId
460
- * @param {Object} options.locus
461
- * @param {Array} options.mediaConnections
462
- * @param {Object} options.errors
463
- * @returns {Object}
464
- * @memberof Meeting
465
- */
466
- getAnalyzerMetricsPrePayload(options: {
467
- event: string;
468
- trackingId: string;
469
- locus: object;
470
- mediaConnections: Array<any>;
471
- errors: object;
472
- } | any): {};
473
- /**
474
- * Send the metrics to call-analyzer dashboard
475
- * @param {Object} options
476
- * @param {String} options.event
477
- * @param {String} options.trackingId
478
- * @param {Object} options.locus
479
- * @param {Object} options.errors
480
- * @returns {Promise}
481
- * @private
482
- * @memberof Meeting
483
- */
484
- private sendCallAnalyzerMetrics;
485
- /**
486
- * Send the metrics to Media Quality Analyzer dashboard
487
- * @param {Object} options
488
- * @param {String} options.event
489
- * @param {String} options.trackingId
490
- * @param {Object} options.locus
491
- * @returns {Promise}
492
- * @private
493
- * @memberof Meeting
494
- */
495
- private sendMediaQualityAnalyzerMetrics;
496
585
  /**
497
586
  * sets the network status on meeting object
498
- * @param {String} networkStatus
587
+ * @param {NETWORK_STATUS} networkStatus
499
588
  * @private
500
589
  * @returns {undefined}
501
590
  * @memberof Meeting
@@ -555,6 +644,13 @@ export default class Meeting extends StatelessWebexPlugin {
555
644
  * @memberof Meeting
556
645
  */
557
646
  private setupLocusControlsListener;
647
+ /**
648
+ * Trigger annotation info update event
649
+ @returns {undefined}
650
+ @param {object} contentShare
651
+ @param {object} previousContentShare
652
+ */
653
+ private triggerAnnotationInfoEvent;
558
654
  /**
559
655
  * Set up the locus info media shares listener
560
656
  * update content and whiteboard sharing id value for members, and updates the member
@@ -653,13 +749,23 @@ export default class Meeting extends StatelessWebexPlugin {
653
749
  phoneNumber: string;
654
750
  }): any;
655
751
  /**
656
- * Admit the guest(s) to the call once they are waiting
752
+ * Admit the guest(s) to the call once they are waiting.
753
+ * If the host/cohost is in a breakout session, the locus url
754
+ * of the session must be provided as the authorizingLocusUrl.
755
+ * Regardless of host/cohost location, the locus Id (lid) in
756
+ * the path should be the locus Id of the main, which means the
757
+ * locus url of the api call must be from the main session.
758
+ * If these loucs urls are not provided, the function will do the check.
657
759
  * @param {Array} memberIds
760
+ * @param {Object} sessionLocusUrls: {authorizingLocusUrl, mainLocusUrl}
658
761
  * @returns {Promise} see #members.admitMembers
659
762
  * @public
660
763
  * @memberof Meeting
661
764
  */
662
- admit(memberIds: Array<any>): any;
765
+ admit(memberIds: Array<any>, sessionLocusUrls?: {
766
+ authorizingLocusUrl: string;
767
+ mainLocusUrl: string;
768
+ }): any;
663
769
  /**
664
770
  * Remove the member from the meeting, boot them
665
771
  * @param {String} memberId
@@ -693,80 +799,63 @@ export default class Meeting extends StatelessWebexPlugin {
693
799
  * @memberof Meeting
694
800
  */
695
801
  getMembers(): Members;
696
- /**
697
- * Truthy when a meeting has an audio connection established
698
- * @returns {Boolean} true if meeting audio is connected otherwise false
699
- * @public
700
- * @memberof Meeting
701
- */
702
- isAudioConnected(): boolean;
703
- /**
704
- * Convenience function to tell whether a meeting is muted
705
- * @returns {Boolean} if meeting audio muted or not
706
- * @public
707
- * @memberof Meeting
708
- */
709
- isAudioMuted(): any;
710
- /**
711
- * Convenience function to tell if the end user last changed the audio state
712
- * @returns {Boolean} if audio was manipulated by the end user
713
- * @public
714
- * @memberof Meeting
715
- */
716
- isAudioSelf(): any;
717
- /**
718
- * Truthy when a meeting has a video connection established
719
- * @returns {Boolean} true if meeting video connected otherwise false
720
- * @public
721
- * @memberof Meeting
722
- */
723
- isVideoConnected(): boolean;
724
- /**
725
- * Convenience function to tell whether video is muted
726
- * @returns {Boolean} if meeting video is muted or not
727
- * @public
728
- * @memberof Meeting
729
- */
730
- isVideoMuted(): any;
731
- /**
732
- * Convenience function to tell whether the end user changed the video state
733
- * @returns {Boolean} if meeting video is muted or not
734
- * @public
735
- * @memberof Meeting
736
- */
737
- isVideoSelf(): any;
738
802
  /**
739
803
  * Sets the meeting info on the class instance
740
804
  * @param {Object} meetingInfo
741
- * @param {Object} meetingInfo.body
742
- * @param {String} meetingInfo.body.conversationUrl
743
- * @param {String} meetingInfo.body.locusUrl
744
- * @param {String} meetingInfo.body.sipUri
745
- * @param {Object} meetingInfo.body.owner
805
+ * @param {String} meetingInfo.conversationUrl
806
+ * @param {String} meetingInfo.locusUrl
807
+ * @param {String} meetingInfo.sipUri
808
+ * @param {String} [meetingInfo.sipUrl]
809
+ * @param {String} [meetingInfo.sipMeetingUri]
810
+ * @param {String} [meetingInfo.meetingNumber]
811
+ * @param {String} [meetingInfo.meetingJoinUrl]
812
+ * @param {String} [meetingInfo.hostId]
813
+ * @param {String} [meetingInfo.permissionToken]
814
+ * @param {String} [meetingInfo.channel]
815
+ * @param {Object} meetingInfo.owner
746
816
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
817
+ * @param {Object | String} errors Meeting info request error
747
818
  * @returns {undefined}
748
819
  * @private
749
820
  * @memberof Meeting
750
821
  */
751
822
  parseMeetingInfo(meetingInfo: {
752
- body: {
753
- conversationUrl: string;
754
- locusUrl: string;
755
- sipUri: string;
756
- owner: object;
757
- };
758
- } | any, destination?: object | string | null): void;
823
+ conversationUrl: string;
824
+ locusUrl: string;
825
+ sipUri: string;
826
+ owner: object;
827
+ sipUrl?: string;
828
+ sipMeetingUri?: string;
829
+ meetingNumber?: string;
830
+ meetingJoinUrl?: string;
831
+ hostId?: string;
832
+ permissionToken?: string;
833
+ channel?: string;
834
+ }, destination?: object | string | null, errors?: any): void;
835
+ /**
836
+ * Indicates whether policy can be applied
837
+ * @returns {boolean}
838
+ */
839
+ private arePolicyRestrictionsSupported;
759
840
  /**
760
- * Sets the first locus info on the class instance
761
- * @param {Object} locus
762
- * @param {String} locus.url
763
- * @param {Array} locus.participants
764
- * @param {Object} locus.self
841
+ * Updates the meeting actions (display hints), depends on locus display hints, user policy and app api info
765
842
  * @returns {undefined}
766
843
  * @private
767
844
  * @memberof Meeting
768
845
  */
769
- private parseLocus;
846
+ private updateMeetingActions;
847
+ /**
848
+ * Sets the self user policies based on the contents of the permission token
849
+ * @returns {void}
850
+ */
851
+ setSelfUserPolicies(): void;
852
+ /**
853
+ * Sets the permission token payload on the class instance
854
+ *
855
+ * @param {String} permissionToken
856
+ * @returns {void}
857
+ */
858
+ setPermissionTokenPayload(permissionToken: string): void;
770
859
  /**
771
860
  * Sets the sip uri on the class instance
772
861
  * uses meeting info as precedence
@@ -789,7 +878,13 @@ export default class Meeting extends StatelessWebexPlugin {
789
878
  * @private
790
879
  * @memberof Meeting
791
880
  */
792
- private setLocus;
881
+ setLocus(locus: {
882
+ mediaConnections: Array<any>;
883
+ locusUrl: string;
884
+ locusId: string;
885
+ mediaId: string;
886
+ host: object;
887
+ } | any): void;
793
888
  /**
794
889
  * Upload logs for the current meeting
795
890
  * @param {object} options file name and function name
@@ -799,19 +894,10 @@ export default class Meeting extends StatelessWebexPlugin {
799
894
  */
800
895
  uploadLogs(options?: object): void;
801
896
  /**
802
- * Removes remote audio and video stream on the class instance and triggers an event
803
- * to developers
897
+ * Removes remote audio, video and share streams from class instance's mediaProperties
804
898
  * @returns {undefined}
805
- * @public
806
- * @memberof Meeting
807
- * @deprecated after v1.89.3
808
899
  */
809
- unsetRemoteStream(): void;
810
- /**
811
- * Removes remote audio, video and share tracks from class instance's mediaProperties
812
- * @returns {undefined}
813
- */
814
- unsetRemoteTracks(): void;
900
+ unsetRemoteStreams(): void;
815
901
  /**
816
902
  * Removes the remote stream on the class instance and triggers an event
817
903
  * to developers
@@ -822,83 +908,45 @@ export default class Meeting extends StatelessWebexPlugin {
822
908
  */
823
909
  closeRemoteStream(): void;
824
910
  /**
825
- * Removes the remote tracks on the class instance and triggers an event
911
+ * Removes the remote streams on the class instance and triggers an event
826
912
  * to developers
827
913
  * @returns {undefined}
828
914
  * @memberof Meeting
829
915
  */
830
- closeRemoteTracks(): Promise<[any, any, any]>;
831
- /**
832
- * Emits the 'media:ready' event with a local stream that consists of 1 local audio and 1 local video track
833
- * @returns {undefined}
834
- * @private
835
- * @memberof Meeting
836
- */
837
- private sendLocalMediaReadyEvent;
916
+ closeRemoteStreams(): Promise<[any, any, any]>;
838
917
  /**
839
- * Sets the local audio track on the class and emits an event to the developer
840
- * @param {MediaStreamTrack} rawAudioTrack
841
- * @param {Boolean} emitEvent if true, a media ready event is emitted to the developer
842
- * @returns {undefined}
843
- * @private
844
- * @memberof Meeting
845
- */
846
- private setLocalAudioTrack;
847
- /**
848
- * Sets the local video track on the class and emits an event to the developer
849
- * @param {MediaStreamTrack} rawVideoTrack
850
- * @param {Boolean} emitEvent if true, a media ready event is emitted to the developer
851
- * @returns {undefined}
852
- * @private
853
- * @memberof Meeting
854
- */
855
- private setLocalVideoTrack;
856
- /**
857
- * Sets the local media stream on the class and emits an event to the developer
858
- * @param {Stream} localStream the local media stream
859
- * @returns {undefined}
860
- * @public
861
- * @memberof Meeting
862
- */
863
- setLocalTracks(localStream: any): void;
864
- /**
865
- * Sets the local media stream on the class and emits an event to the developer
866
- * @param {MediaStreamTrack} rawLocalShareTrack the local share media track
867
- * @returns {undefined}
868
- * @public
869
- * @memberof Meeting
870
- */
871
- setLocalShareTrack(rawLocalShareTrack: MediaStreamTrack | null): void;
872
- /**
873
- * Closes the local stream from the class and emits an event to the developer
874
- * @returns {undefined}
875
- * @event media:stopped
876
- * @public
877
- * @memberof Meeting
918
+ * Stores the reference to a new microphone stream, sets up the required event listeners
919
+ * on it, cleans up previous stream, etc.
920
+ *
921
+ * @param {LocalMicrophoneStream | null} localStream local microphone stream
922
+ * @returns {Promise<void>}
878
923
  */
879
- closeLocalStream(): any;
924
+ private setLocalAudioStream;
880
925
  /**
881
- * Closes the local stream from the class and emits an event to the developer
882
- * @returns {undefined}
883
- * @event media:stopped
884
- * @public
885
- * @memberof Meeting
926
+ * Stores the reference to a new camera stream, sets up the required event listeners
927
+ * on it, cleans up previous stream, etc.
928
+ *
929
+ * @param {LocalCameraStream | null} localStream local camera stream
930
+ * @returns {Promise<void>}
886
931
  */
887
- closeLocalShare(): any;
932
+ private setLocalVideoStream;
888
933
  /**
889
- * Removes the local stream from the class and emits an event to the developer
890
- * @returns {undefined}
891
- * @public
892
- * @memberof Meeting
934
+ * Stores the reference to a new screen share stream, sets up the required event listeners
935
+ * on it, cleans up previous stream, etc.
936
+ * It also sends the floor grant/release request.
937
+ *
938
+ * @param {LocalDisplayStream | undefined} localDisplayStream local display stream
939
+ * @returns {Promise<void>}
893
940
  */
894
- unsetLocalVideoTrack(): void;
941
+ private setLocalShareVideoStream;
895
942
  /**
896
- * Removes the local share from the class and emits an event to the developer
897
- * @returns {undefined}
898
- * @public
899
- * @memberof Meeting
943
+ * Stores the reference to a new screen share audio stream, sets up the required event listeners
944
+ * on it, cleans up previous stream, etc.
945
+ *
946
+ * @param {LocalSystemAudioStream | undefined} localSystemAudioStream local system audio stream
947
+ * @returns {Promise<void>}
900
948
  */
901
- unsetLocalShareTrack(): void;
949
+ private setLocalShareAudioStream;
902
950
  /**
903
951
  * sets up listner for mercury event
904
952
  * @returns {undefined}
@@ -924,13 +972,28 @@ export default class Meeting extends StatelessWebexPlugin {
924
972
  */
925
973
  unsetPeerConnections(): void;
926
974
  /**
927
- * Convenience method to set the correlation id for the Meeting
928
- * @param {String} id correlation id to set on the class
975
+ * Convenience method to set the correlation id for the callStateForMetrics
976
+ * @param {String} id correlation id to set on the callStateForMetrics
977
+ * @returns {undefined}
978
+ * @public
979
+ * @memberof Meeting
980
+ */
981
+ setCorrelationId(id: string): void;
982
+ /**
983
+ * Update the callStateForMetrics
984
+ * @param {CallStateForMetrics} callStateForMetrics updated values for callStateForMetrics
929
985
  * @returns {undefined}
986
+ * @public
987
+ * @memberof Meeting
988
+ */
989
+ updateCallStateForMetrics(callStateForMetrics: CallStateForMetrics): void;
990
+ /**
991
+ * Enqueue request for screenshare floor and set the status to pending
992
+ * @returns {Promise}
930
993
  * @private
931
994
  * @memberof Meeting
932
995
  */
933
- private setCorrelationId;
996
+ private enqueueScreenShareFloorRequest;
934
997
  /**
935
998
  * Mute the audio for a meeting
936
999
  * @returns {Promise} resolves the data from muting audio {mute, self} or rejects if there is no audio set
@@ -963,32 +1026,25 @@ export default class Meeting extends StatelessWebexPlugin {
963
1026
  * Shorthand function to join AND set up media
964
1027
  * @param {Object} options - options to join with media
965
1028
  * @param {JoinOptions} [options.joinOptions] - see #join()
966
- * @param {MediaDirection} options.mediaSettings - see #addMedia()
967
- * @param {AudioVideo} [options.audioVideoOptions] - see #getMediaStreams()
968
- * @returns {Promise} -- {join: see join(), media: see addMedia(), local: see getMediaStreams()}
1029
+ * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia()
1030
+ * @returns {Promise} -- {join: see join(), media: see addMedia()}
969
1031
  * @public
970
1032
  * @memberof Meeting
971
1033
  * @example
972
1034
  * joinWithMedia({
973
1035
  * joinOptions: {resourceId: 'resourceId' },
974
- * mediaSettings: {
975
- * sendAudio: true,
976
- * sendVideo: true,
977
- * sendShare: false,
978
- * receiveVideo:true,
979
- * receiveAudio: true,
980
- * receiveShare: true
981
- * }
982
- * audioVideoOptions: {
983
- * audio: 'audioDeviceId',
984
- * video: 'videoDeviceId'
985
- * }})
1036
+ * mediaOptions: {
1037
+ * localStreams: { microphone: microphoneStream, camera: cameraStream }
1038
+ * }
1039
+ * })
986
1040
  */
987
1041
  joinWithMedia(options?: {
988
1042
  joinOptions?: any;
989
- mediaSettings: any;
990
- audioVideoOptions?: any;
991
- }): any;
1043
+ mediaOptions?: AddMediaOptions;
1044
+ }): Promise<{
1045
+ join: any;
1046
+ media: void;
1047
+ }>;
992
1048
  /**
993
1049
  * Initiates the reconnection of the media in the meeting
994
1050
  *
@@ -1053,7 +1109,7 @@ export default class Meeting extends StatelessWebexPlugin {
1053
1109
  * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop
1054
1110
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
1055
1111
  */
1056
- join(options?: any): any;
1112
+ join(options?: any): Promise<any>;
1057
1113
  /**
1058
1114
  * Connects to low latency mercury and reconnects if the address has changed
1059
1115
  * It will also disconnect if called when the meeting has ended
@@ -1068,7 +1124,7 @@ export default class Meeting extends StatelessWebexPlugin {
1068
1124
  * @public
1069
1125
  * @memberof Meeting
1070
1126
  */
1071
- usePhoneAudio(phoneNumber: string): any;
1127
+ usePhoneAudio(phoneNumber: string): Promise<any>;
1072
1128
  /**
1073
1129
  * Determines if the given pstnStatus is in a state which implies the phone is provisioned
1074
1130
  * @param {String} pstnStatus
@@ -1116,38 +1172,6 @@ export default class Meeting extends StatelessWebexPlugin {
1116
1172
  * @memberof Meeting
1117
1173
  */
1118
1174
  moveFrom(resourceId: string): any;
1119
- /**
1120
- * Get local media streams based on options passed
1121
- *
1122
- * NOTE: this method can only be used with transcoded meetings, not with multistream meetings
1123
- *
1124
- * @param {MediaDirection} mediaDirection A configurable options object for joining a meeting
1125
- * @param {AudioVideo} [audioVideo] audio/video object to set audioinput and videoinput devices, see #Media.getUserMedia
1126
- * @param {SharePreferences} [sharePreferences] audio/video object to set audioinput and videoinput devices, see #Media.getUserMedia
1127
- * @returns {Promise} see #Media.getUserMedia
1128
- * @public
1129
- * @todo should be static, or moved so can be called outside of a meeting
1130
- * @memberof Meeting
1131
- */
1132
- getMediaStreams: (mediaDirection: any, audioVideo?: any, sharePreferences?: any) => any;
1133
- /**
1134
- * Checks if the machine has at least one audio or video device
1135
- * @param {Object} options
1136
- * @param {Boolean} options.sendAudio
1137
- * @param {Boolean} options.sendVideo
1138
- * @returns {Object}
1139
- * @memberof Meetings
1140
- */
1141
- getSupportedDevices: ({ sendAudio, sendVideo, }: {
1142
- sendAudio: boolean;
1143
- sendVideo: boolean;
1144
- }) => any;
1145
- /**
1146
- * Get the devices from the Media module
1147
- * @returns {Promise} resolves to an array of DeviceInfo
1148
- * @memberof Meetings
1149
- */
1150
- getDevices: () => any;
1151
1175
  /**
1152
1176
  * Handles ROAP_FAILURE event from the webrtc media connection
1153
1177
  *
@@ -1155,6 +1179,12 @@ export default class Meeting extends StatelessWebexPlugin {
1155
1179
  * @returns {void}
1156
1180
  */
1157
1181
  handleRoapFailure: (error: any) => void;
1182
+ /**
1183
+ * This function makes sure we send the right metrics when local and remote SDPs are processed/generated
1184
+ *
1185
+ * @returns {undefined}
1186
+ */
1187
+ setupSdpListeners: () => void;
1158
1188
  setupMediaConnectionListeners: () => void;
1159
1189
  /**
1160
1190
  * Registers for all required StatsAnalyzer events
@@ -1165,12 +1195,14 @@ export default class Meeting extends StatelessWebexPlugin {
1165
1195
  setupStatsAnalyzerEventHandlers: () => void;
1166
1196
  getMediaConnectionDebugId(): string;
1167
1197
  /**
1168
- * Creates a webrtc media connection
1198
+ * Creates a webrtc media connection and publishes streams to it
1169
1199
  *
1170
1200
  * @param {Object} turnServerInfo TURN server information
1201
+ * @param {BundlePolicy} [bundlePolicy] Bundle policy settings
1202
+ * @param {AddMediaOptions} [options] Options for enabling/disabling audio/video
1171
1203
  * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}
1172
1204
  */
1173
- createMediaConnection(turnServerInfo: any): any;
1205
+ private createMediaConnection;
1174
1206
  /**
1175
1207
  * Listens for an event emitted by eventEmitter and emits it from the meeting object
1176
1208
  *
@@ -1182,23 +1214,121 @@ export default class Meeting extends StatelessWebexPlugin {
1182
1214
  */
1183
1215
  forwardEvent(eventEmitter: any, eventTypeToForward: any, meetingEventType: any): void;
1184
1216
  /**
1185
- * Specify joining via audio (option: pstn), video, screenshare
1186
- * @param {Object} options A configurable options object for joining a meeting
1187
- * @param {Object} options.resourceId pass the deviceId
1188
- * @param {MediaDirection} options.mediaSettings pass media options
1189
- * @param {MediaStream} options.localStream
1190
- * @param {MediaStream} options.localShare
1191
- * @param {RemoteMediaManagerConfig} options.remoteMediaManagerConfig only applies if multistream is enabled
1192
- * @returns {Promise}
1217
+ * Sets up all the references to local streams in this.mediaProperties before creating media connection
1218
+ * and before TURN discovery, so that the correct mute state is sent with TURN discovery roap messages.
1219
+ *
1220
+ * @private
1221
+ * @param {LocalStreams} localStreams
1222
+ * @returns {Promise<void>}
1223
+ */
1224
+ private setUpLocalStreamReferences;
1225
+ /**
1226
+ * Calls mediaProperties.waitForMediaConnectionConnected() and sends CA client.ice.end metric on failure
1227
+ *
1228
+ * @private
1229
+ * @returns {Promise<void>}
1230
+ */
1231
+ private waitForMediaConnectionConnected;
1232
+ /**
1233
+ * Enables statsAnalyser if config allows it
1234
+ *
1235
+ * @private
1236
+ * @returns {void}
1237
+ */
1238
+ private createStatsAnalyzer;
1239
+ /**
1240
+ * Handles device logging
1241
+ *
1242
+ * @private
1243
+ * @static
1244
+ * @returns {Promise<void>}
1245
+ */
1246
+ private static handleDeviceLogging;
1247
+ /**
1248
+ * Returns a promise. This promise is created once the local sdp offer has been successfully created and is resolved
1249
+ * once the remote sdp answer has been received.
1250
+ *
1251
+ * @private
1252
+ * @returns {Promise<void>}
1253
+ */
1254
+ private waitForRemoteSDPAnswer;
1255
+ /**
1256
+ * Calls establishMediaConnection with isForced = true to force turn discovery to happen
1257
+ *
1258
+ * @private
1259
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1260
+ * @param {BundlePolicy} [bundlePolicy]
1261
+ * @returns {Promise<void>}
1262
+ */
1263
+ private retryEstablishMediaConnectionWithForcedTurnDiscovery;
1264
+ /**
1265
+ * Does relevant clean up before retrying to establish media connection
1266
+ * and performs the retry with forced turn discovery
1267
+ *
1268
+ * @private
1269
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1270
+ * @param {BundlePolicy} [bundlePolicy]
1271
+ * @returns {Promise<void>}
1272
+ */
1273
+ private retryWithForcedTurnDiscovery;
1274
+ /**
1275
+ * If waitForMediaConnectionConnected() fails when we haven't done turn discovery then we
1276
+ * attempt to establish a media connection again, but this time using turn discovery. If we
1277
+ * used turn discovery on the first pass we do not attempt connection again.
1278
+ *
1279
+ * @private
1280
+ * @param {Error} error
1281
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1282
+ * @param {BundlePolicy} [bundlePolicy]
1283
+ * @returns {Promise<void>}
1284
+ */
1285
+ private handleWaitForMediaConnectionConnectedError;
1286
+ /**
1287
+ * Does TURN discovery, SDP offer/answer exhange, establishes ICE connection and DTLS handshake.
1288
+ *
1289
+ * @private
1290
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1291
+ * @param {BundlePolicy} [bundlePolicy]
1292
+ * @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results
1293
+ * @returns {Promise<void>}
1294
+ */
1295
+ private establishMediaConnection;
1296
+ /**
1297
+ * Cleans up stats analyzer, peer connection, and turns off listeners
1298
+ *
1299
+ * @private
1300
+ * @returns {Promise<void>}
1301
+ */
1302
+ private cleanUpOnAddMediaFailure;
1303
+ /**
1304
+ * Sends stats report, closes peer connection and cleans up any media connection
1305
+ * related things before trying to establish media connection again with turn server
1306
+ *
1307
+ * @private
1308
+ * @returns {Promise<void>}
1309
+ */
1310
+ private cleanUpBeforeRetryWithTurnServer;
1311
+ /**
1312
+ * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
1313
+ *
1314
+ * @param {AddMediaOptions} options
1315
+ * @returns {Promise<void>}
1193
1316
  * @public
1194
1317
  * @memberof Meeting
1195
1318
  */
1196
- addMedia(options?: any): any;
1319
+ addMedia(options?: AddMediaOptions): Promise<void>;
1197
1320
  /**
1198
1321
  * Informs if the peer connection is in a state that can be updated with updateMedia (audio/video/share)
1199
1322
  * @returns {Boolean}
1200
1323
  */
1201
1324
  canUpdateMedia(): boolean;
1325
+ /**
1326
+ * media failed, so collect a stats report from webrtc using the wcme connection to grab the rtc stats report
1327
+ * send a webrtc telemetry dump to the configured server using the internal media core check metrics configured callback
1328
+ * @param {String} callFrom - the function calling this function, optional.
1329
+ * @returns {Promise<void>}
1330
+ */
1331
+ private forceSendStatsReport;
1202
1332
  /**
1203
1333
  * Enqueues a media update operation.
1204
1334
  * @param {String} mediaUpdateType one of MEDIA_UPDATE_TYPE values
@@ -1224,94 +1354,26 @@ export default class Meeting extends StatelessWebexPlugin {
1224
1354
  */
1225
1355
  processNextQueuedMediaUpdate: () => void;
1226
1356
  /**
1227
- * A confluence of updateAudio, updateVideo, and updateShare
1228
- * this function re-establishes all of the media streams with new options
1229
- * @param {Object} options
1230
- * @param {MediaStream} options.localStream
1231
- * @param {MediaStream} options.localShare
1232
- * @param {MediaDirection} options.mediaSettings
1233
- * @returns {Promise}
1234
- * @public
1235
- * @memberof Meeting
1236
- */
1237
- updateMedia(options?: {
1238
- localStream?: MediaStream;
1239
- localShare?: MediaStream;
1240
- mediaSettings?: any;
1241
- }): any;
1242
- /**
1243
- * Update the main audio track with new parameters
1244
- *
1245
- * NOTE: this method can only be used with transcoded meetings, for multistream meetings use publishTrack()
1357
+ * Updates the media connection - it allows to enable/disable all audio/video/share in the meeting.
1358
+ * This does not affect the published tracks, so for example if a microphone track is published and
1359
+ * updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore,
1360
+ * but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called,
1361
+ * the sending of the audio from the same track will resume.
1246
1362
  *
1247
1363
  * @param {Object} options
1248
- * @param {boolean} options.sendAudio
1249
- * @param {boolean} options.receiveAudio
1250
- * @param {MediaStream} options.stream Stream that contains the audio track to update
1364
+ * @param {boolean} options.audioEnabled [optional] enables/disables receiving and sending of main audio in the meeting
1365
+ * @param {boolean} options.videoEnabled [optional] enables/disables receiving and sending of main video in the meeting
1366
+ * @param {boolean} options.shareEnabled [optional] enables/disables receiving and sending of screen share in the meeting
1251
1367
  * @returns {Promise}
1252
1368
  * @public
1253
1369
  * @memberof Meeting
1254
1370
  */
1255
- updateAudio(options: {
1256
- sendAudio: boolean;
1257
- receiveAudio: boolean;
1258
- stream: MediaStream;
1259
- }): Promise<any>;
1260
- /**
1261
- * Update the main video track with new parameters
1262
- *
1263
- * NOTE: this method can only be used with transcoded meetings, for multistream meetings use publishTrack()
1264
- *
1265
- * @param {Object} options
1266
- * @param {boolean} options.sendVideo
1267
- * @param {boolean} options.receiveVideo
1268
- * @param {MediaStream} options.stream Stream that contains the video track to update
1269
- * @returns {Promise}
1270
- * @public
1271
- * @memberof Meeting
1272
- */
1273
- updateVideo(options: {
1274
- sendVideo: boolean;
1275
- receiveVideo: boolean;
1276
- stream: MediaStream;
1277
- }): any;
1278
- /**
1279
- * Internal function when stopping a share stream, cleanup
1280
- * @param {boolean} sendShare
1281
- * @param {boolean} previousShareStatus
1282
- * @returns {Promise}
1283
- * @private
1284
- * @memberof Meeting
1285
- */
1286
- private checkForStopShare;
1287
- /**
1288
- * Update the share streams, can be used to start sharing
1289
- *
1290
- * NOTE: this method can only be used with transcoded meetings, for multistream meetings use publishTrack()
1291
- *
1292
- * @param {Object} options
1293
- * @param {boolean} options.sendShare
1294
- * @param {boolean} options.receiveShare
1295
- * @returns {Promise}
1296
- * @public
1297
- * @memberof Meeting
1298
- */
1299
- updateShare(options: {
1300
- sendShare?: boolean;
1301
- receiveShare?: boolean;
1302
- stream?: any;
1303
- skipSignalingCheck?: boolean;
1304
- }): any;
1305
- /**
1306
- * Do all the attach media pre set up before executing the actual attach
1307
- * @param {MediaStream} localStream
1308
- * @param {MediaStream} localShare
1309
- * @param {MediaDirection} mediaSettings
1310
- * @returns {undefined}
1311
- * @private
1312
- * @memberof Meeting
1313
- */
1314
- private preMedia;
1371
+ updateMedia(options: {
1372
+ audioEnabled?: boolean;
1373
+ videoEnabled?: boolean;
1374
+ shareAudioEnabled?: boolean;
1375
+ shareVideoEnabled?: boolean;
1376
+ }): Promise<void>;
1315
1377
  /**
1316
1378
  * Acknowledge the meeting, outgoing or incoming
1317
1379
  * @param {String} type
@@ -1319,7 +1381,11 @@ export default class Meeting extends StatelessWebexPlugin {
1319
1381
  * @public
1320
1382
  * @memberof Meeting
1321
1383
  */
1322
- acknowledge(type: string): any;
1384
+ acknowledge(type: string): Promise<{
1385
+ response: any;
1386
+ }> | Promise<{
1387
+ message: string;
1388
+ }>;
1323
1389
  /**
1324
1390
  * Decline this meeting
1325
1391
  * @param {String} reason
@@ -1329,15 +1395,45 @@ export default class Meeting extends StatelessWebexPlugin {
1329
1395
  */
1330
1396
  decline(reason: string): any;
1331
1397
  /**
1332
- * Leave the current meeting
1398
+ * Returns a promise that will resolve to fetch options for leaving a meeting.
1399
+ *
1400
+ * This is to support quickly submitting a leave request when the browser/tab is closing.
1401
+ * Calling meeting.leave will not work because there are some async steps that will
1402
+ * not complete before the browser is closed. Instead, we pre-gather all the
1403
+ * information/options needed for the request(s), and then simply and quickly
1404
+ * fire the fetch(es) when pagehide is triggered.
1405
+ *
1406
+ * We must use fetch instead of request because fetch has a keepalive option that
1407
+ * allows the request it to outlive the page.
1408
+ *
1409
+ * Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will
1410
+ * properly adjust them before submitting.
1411
+ *
1412
+ * @public
1333
1413
  * @param {Object} options leave options
1334
1414
  * @param {String} options.resourceId the device with which to leave from, empty if just the computer
1415
+ * @param {any} options.reason the reason for leaving
1416
+ * @returns {Promise} resolves to options to be used with fetch
1417
+ */
1418
+ buildLeaveFetchRequestOptions(options?: {
1419
+ resourceId?: string;
1420
+ reason?: any;
1421
+ }): any;
1422
+ /**
1423
+ * Leave the current meeting
1424
+ * @param {Object} options - leave options
1425
+ * @param {String} [options.resourceId] - the device with which to leave from, empty if just the computer
1426
+ * @param {String} [options.clientEventLeaveReason] - the leaveReason to include in the Call Analyzer event.
1427
+ * Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason)
1428
+ * https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796
1429
+ * @param {String} [options.reason] - only used for logging
1335
1430
  * @returns {Promise}
1336
1431
  * @public
1337
1432
  * @memberof Meeting
1338
1433
  */
1339
1434
  leave(options?: {
1340
1435
  resourceId?: string;
1436
+ clientEventLeaveReason?: ClientEventLeaveReason;
1341
1437
  reason?: any;
1342
1438
  }): any;
1343
1439
  /**
@@ -1365,12 +1461,12 @@ export default class Meeting extends StatelessWebexPlugin {
1365
1461
  */
1366
1462
  private requestScreenShareFloor;
1367
1463
  /**
1368
- * Stops the screen share
1369
- * @returns {Promise} see #updateShare
1370
- * @public
1371
- * @memberof Meeting
1464
+ * Requests screen share floor if such request is pending.
1465
+ * It should be called whenever meeting state changes to JOINED
1466
+ *
1467
+ * @returns {void}
1372
1468
  */
1373
- stopShare(options?: {}): any;
1469
+ private requestScreenShareFloorIfPending;
1374
1470
  /**
1375
1471
  * Sends a request to Locus to release the screen share floor.
1376
1472
  * @returns {Promise} see #meetingRequest.changeMeetingFloor
@@ -1401,6 +1497,16 @@ export default class Meeting extends StatelessWebexPlugin {
1401
1497
  * @memberof Meeting
1402
1498
  */
1403
1499
  setDisallowUnmute(enabled: boolean): Promise<any>;
1500
+ /**
1501
+ * set the mute all flag for participants if you're the host
1502
+ * @returns {Promise}
1503
+ * @param {boolean} mutedEnabled
1504
+ * @param {boolean} disallowUnmuteEnabled
1505
+ * @param {boolean} muteOnEntryEnabled
1506
+ * @public
1507
+ * @memberof Meeting
1508
+ */
1509
+ setMuteAll(mutedEnabled: boolean, disallowUnmuteEnabled: boolean, muteOnEntryEnabled: boolean): Promise<any>;
1404
1510
  /**
1405
1511
  * End the recording of this meeting
1406
1512
  * @returns {Promise}
@@ -1451,7 +1557,7 @@ export default class Meeting extends StatelessWebexPlugin {
1451
1557
  * @public
1452
1558
  * @memberof Meeting
1453
1559
  */
1454
- sendDTMF(tones: string): any;
1560
+ sendDTMF(tones: string): Promise<any>;
1455
1561
  /**
1456
1562
  * Sends request to change layout type for the current meeting for the specific participant/device only
1457
1563
  * @param {String} [layoutType] a layout type that should be available in meeting constants {@link #layout_types}
@@ -1476,53 +1582,41 @@ export default class Meeting extends StatelessWebexPlugin {
1476
1582
  height: number;
1477
1583
  };
1478
1584
  }): any;
1479
- /**
1480
- * Sets the quality of the local video stream
1481
- * @param {String} level {LOW|MEDIUM|HIGH}
1482
- * @returns {Promise<MediaStream>} localStream
1483
- */
1484
- setLocalVideoQuality(level: string): any;
1485
1585
  /**
1486
1586
  * Sets the quality level of the remote incoming media
1487
1587
  * @param {String} level {LOW|MEDIUM|HIGH}
1488
1588
  * @returns {Promise}
1489
1589
  */
1490
- setRemoteQualityLevel(level: string): any;
1590
+ setRemoteQualityLevel(level: string): Promise<void>;
1491
1591
  /**
1492
- * This is deprecated, please use setLocalVideoQuality for setting local and setRemoteQualityLevel for remote
1493
- * @param {String} level {LOW|MEDIUM|HIGH}
1494
- * @returns {Promise}
1495
- * @deprecated After FHD support
1592
+ * Functionality for when a share audio is ended.
1593
+ * @private
1594
+ * @memberof Meeting
1595
+ * @returns {undefined}
1496
1596
  */
1497
- setMeetingQuality(level: string): any;
1597
+ private handleShareAudioStreamEnded;
1498
1598
  /**
1499
- *
1500
- * NOTE: this method can only be used with transcoded meetings, for multistream use publishTrack()
1501
- *
1502
- * @param {Object} options parameter
1503
- * @param {Boolean} options.sendAudio send audio from the display share
1504
- * @param {Boolean} options.sendShare send video from the display share
1505
- * @param {Object} options.sharePreferences
1506
- * @param {MediaTrackConstraints} options.sharePreferences.shareConstraints constraints to apply to video
1507
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints}
1508
- * @param {Boolean} options.sharePreferences.highFrameRate if shareConstraints isn't provided, set default values based off of this boolean
1509
- * @returns {Promise}
1599
+ * Functionality for when a share video is muted or unmuted.
1600
+ * @private
1601
+ * @memberof Meeting
1602
+ * @param {boolean} muted
1603
+ * @returns {undefined}
1510
1604
  */
1511
- shareScreen(options?: {
1512
- sendAudio: boolean;
1513
- sendShare: boolean;
1514
- sharePreferences: {
1515
- shareConstraints: MediaTrackConstraints;
1516
- };
1517
- }): any;
1605
+ private handleShareVideoStreamMuteStateChange;
1518
1606
  /**
1519
- * Functionality for when a share is ended.
1607
+ * Functionality for when a share video is ended.
1520
1608
  * @private
1521
1609
  * @memberof Meeting
1522
- * @param {MediaStream} localShare
1523
1610
  * @returns {undefined}
1524
1611
  */
1525
- private handleShareTrackEnded;
1612
+ private handleShareVideoStreamEnded;
1613
+ /**
1614
+ * Emits meeting:stoppedSharingLocal
1615
+ * @private
1616
+ * @returns {undefined}
1617
+ * @memberof Meeting
1618
+ */
1619
+ private triggerStoppedSharing;
1526
1620
  /**
1527
1621
  * Emits the 'network:quality' event
1528
1622
  * 1 indicates an acceptable uplink network.
@@ -1542,86 +1636,11 @@ export default class Meeting extends StatelessWebexPlugin {
1542
1636
  * @returns {undefined}
1543
1637
  */
1544
1638
  private handleMediaLogging;
1545
- /**
1546
- * @param {string} typeMedia 'audio' or 'video'
1547
- * @returns {undefined}
1548
- */
1549
- setStartSetupDelay(typeMedia: string): void;
1550
- /**
1551
- * @param {string} typeMedia 'audio' or 'video'
1552
- * @returns {undefined}
1553
- */
1554
- setEndSetupDelay(typeMedia: string): void;
1555
- /**
1556
- * @param {string} typeMedia 'audio' or 'video'
1557
- * @returns {string} duration between start and end of setup
1558
- */
1559
- getSetupDelayDuration(typeMedia: string): number;
1560
- /**
1561
- * @param {string} typeMedia 'audio' or 'video'
1562
- * @returns {undefined}
1563
- */
1564
- setStartSendingMediaDelay(typeMedia: string): void;
1565
- /**
1566
- * @param {string} typeMedia 'audio' or 'video'
1567
- * @returns {undefined}
1568
- */
1569
- setEndSendingMediaDelay(typeMedia: string): void;
1570
- /**
1571
- * @param {string} typeMedia 'audio' or 'video'
1572
- * @returns {string} duration between join response and first media tx
1573
- */
1574
- getSendingMediaDelayDuration(typeMedia: string): number;
1575
- /**
1576
- *
1577
- * @returns {undefined}
1578
- */
1579
- setStartLocalSDPGenRemoteSDPRecvDelay(): void;
1580
1639
  /**
1581
1640
  *
1582
- * @returns {undefined}
1583
- */
1584
- setEndLocalSDPGenRemoteSDPRecvDelay(): void;
1585
- /**
1586
- *
1587
- * @returns {string} duration between local SDP generation and remote SDP reception
1641
+ * @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
1588
1642
  */
1589
- getLocalSDPGenRemoteSDPRecvDelay(): number;
1590
- /**
1591
- *
1592
- * @returns {undefined}
1593
- */
1594
- setStartCallInitiateJoinReq(): void;
1595
- /**
1596
- *
1597
- * @returns {undefined}
1598
- */
1599
- setEndCallInitiateJoinReq(): void;
1600
- /**
1601
- *
1602
- * @returns {string} duration between call initiate and sending join request to locus
1603
- */
1604
- getCallInitiateJoinReq(): number;
1605
- /**
1606
- *
1607
- * @returns {undefined}
1608
- */
1609
- setStartJoinReqResp(): void;
1610
- /**
1611
- *
1612
- * @returns {undefined}
1613
- */
1614
- setEndJoinReqResp(): void;
1615
- /**
1616
- *
1617
- * @returns {string} duration between sending locus join request and receiving join response
1618
- */
1619
- getJoinReqResp(): number;
1620
- /**
1621
- *
1622
- * @returns {string} duration between call initiate and successful locus join (even if it is in lobby)
1623
- */
1624
- getTotalJmt(): number;
1643
+ getCurUserType(): "host" | "cohost" | "attendee";
1625
1644
  /**
1626
1645
  * End the current meeting for all
1627
1646
  * @returns {Promise}
@@ -1668,7 +1687,7 @@ export default class Meeting extends StatelessWebexPlugin {
1668
1687
  * @public
1669
1688
  * @memberof Meeting
1670
1689
  */
1671
- toggleReactions(enable: boolean): any;
1690
+ toggleReactions(enable: boolean): Promise<any>;
1672
1691
  /**
1673
1692
  * Throws if we don't have a media connection created
1674
1693
  *
@@ -1676,24 +1695,76 @@ export default class Meeting extends StatelessWebexPlugin {
1676
1695
  */
1677
1696
  private checkMediaConnection;
1678
1697
  /**
1679
- * Publishes specified local tracks in the meeting
1698
+ * Method to enable or disable the 'Music mode' effect on audio stream
1680
1699
  *
1681
- * @param {Object} tracks
1700
+ * @param {boolean} shouldEnableMusicMode
1682
1701
  * @returns {Promise}
1683
1702
  */
1684
- publishTracks(tracks: {
1685
- microphone?: MediaStreamTrack;
1686
- camera?: MediaStreamTrack;
1687
- screenShare: {
1688
- audio?: MediaStreamTrack;
1689
- video?: MediaStreamTrack;
1690
- };
1691
- }): Promise<void>;
1703
+ enableMusicMode(shouldEnableMusicMode: boolean): Promise<void>;
1704
+ /** Updates the tracks being sent on the transcoded media connection
1705
+ *
1706
+ * @returns {Promise<void>}
1707
+ */
1708
+ private updateTranscodedMediaConnection;
1709
+ /**
1710
+ * set sending named media group which the audio should send to
1711
+ * @param {MediaType} mediaType of the stream
1712
+ * @param {number} languageCode of the stream
1713
+ * @returns {void}
1714
+ */
1715
+ setSendNamedMediaGroup(mediaType: MediaType, languageCode?: number): void;
1716
+ /**
1717
+ * Publishes a stream.
1718
+ *
1719
+ * @param {MediaType} mediaType of the stream
1720
+ * @param {LocalStream} stream to publish
1721
+ * @returns {Promise}
1722
+ */
1723
+ private publishStream;
1724
+ /**
1725
+ * Un-publishes a stream.
1726
+ *
1727
+ * @param {MediaType} mediaType of the stream
1728
+ * @param {LocalStream} stream to unpublish
1729
+ * @returns {Promise}
1730
+ */
1731
+ private unpublishStream;
1732
+ /**
1733
+ * Publishes specified local streams in the meeting
1734
+ *
1735
+ * @param {Object} streams
1736
+ * @returns {Promise}
1737
+ */
1738
+ publishStreams(streams: LocalStreams): Promise<void>;
1692
1739
  /**
1693
- * Un-publishes specified local tracks in the meeting
1740
+ * Un-publishes specified local streams in the meeting
1694
1741
  *
1695
- * @param {Array<MediaStreamTrack>} tracks
1742
+ * @param {Array<LocalStream>} streams
1696
1743
  * @returns {Promise}
1697
1744
  */
1698
- unpublishTracks(tracks: MediaStreamTrack[]): Promise<void>;
1745
+ unpublishStreams(streams: LocalStream[]): Promise<void>;
1746
+ /**
1747
+ * Gets permission token expiry information including timeLeft, expiryTime, currentTime
1748
+ * (from the time the function has been fired)
1749
+ *
1750
+ * @returns {object} permissionTokenExpiryInfo
1751
+ * @returns {number} permissionTokenExpiryInfo.timeLeft The time left for token to expire
1752
+ * @returns {number} permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server
1753
+ * @returns {number} permissionTokenExpiryInfo.currentTime The current time of the local machine
1754
+ */
1755
+ getPermissionTokenExpiryInfo(): {
1756
+ timeLeft: number;
1757
+ expiryTime: number;
1758
+ currentTime: number;
1759
+ };
1760
+ /**
1761
+ * Check if there is enough time left till the permission token expires
1762
+ * If not - refresh the permission token
1763
+ *
1764
+ * @param {number} threshold - time in seconds
1765
+ * @param {string} reason - reason for refreshing the permission token
1766
+ * @returns {Promise<void>}
1767
+ */
1768
+ checkAndRefreshPermissionToken(threshold: number, reason: string): Promise<void>;
1699
1769
  }
1770
+ export {};