@webex/plugin-meetings 3.0.0-beta.33 → 3.0.0-beta.331

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