@webex/plugin-meetings 3.0.0-beta.40 → 3.0.0-beta.400

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 (398) 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 +625 -123
  13. package/dist/breakouts/index.js.map +1 -1
  14. package/dist/breakouts/utils.js +27 -8
  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 +6 -10
  29. package/dist/config.js.map +1 -1
  30. package/dist/constants.js +247 -34
  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 +116 -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 +4509 -3000
  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 +236 -136
  77. package/dist/meeting/muteState.js.map +1 -1
  78. package/dist/meeting/request.js +185 -155
  79. package/dist/meeting/request.js.map +1 -1
  80. package/dist/meeting/util.js +676 -417
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting/voicea-meeting.js +172 -0
  83. package/dist/meeting/voicea-meeting.js.map +1 -0
  84. package/dist/meeting-info/index.js +73 -7
  85. package/dist/meeting-info/index.js.map +1 -1
  86. package/dist/meeting-info/meeting-info-v2.js +201 -57
  87. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  88. package/dist/meeting-info/util.js +8 -7
  89. package/dist/meeting-info/util.js.map +1 -1
  90. package/dist/meeting-info/utilv2.js +44 -40
  91. package/dist/meeting-info/utilv2.js.map +1 -1
  92. package/dist/meetings/collection.js +39 -0
  93. package/dist/meetings/collection.js.map +1 -1
  94. package/dist/meetings/index.js +484 -119
  95. package/dist/meetings/index.js.map +1 -1
  96. package/dist/meetings/meetings.types.js +7 -0
  97. package/dist/meetings/meetings.types.js.map +1 -0
  98. package/dist/meetings/request.js +2 -0
  99. package/dist/meetings/request.js.map +1 -1
  100. package/dist/meetings/util.js +73 -7
  101. package/dist/meetings/util.js.map +1 -1
  102. package/dist/member/index.js +57 -0
  103. package/dist/member/index.js.map +1 -1
  104. package/dist/member/types.js +25 -0
  105. package/dist/member/types.js.map +1 -0
  106. package/dist/member/util.js +132 -25
  107. package/dist/member/util.js.map +1 -1
  108. package/dist/members/collection.js +10 -0
  109. package/dist/members/collection.js.map +1 -1
  110. package/dist/members/index.js +100 -5
  111. package/dist/members/index.js.map +1 -1
  112. package/dist/members/request.js +106 -38
  113. package/dist/members/request.js.map +1 -1
  114. package/dist/members/types.js +15 -0
  115. package/dist/members/types.js.map +1 -0
  116. package/dist/members/util.js +326 -232
  117. package/dist/members/util.js.map +1 -1
  118. package/dist/metrics/constants.js +18 -1
  119. package/dist/metrics/constants.js.map +1 -1
  120. package/dist/metrics/index.js +1 -446
  121. package/dist/metrics/index.js.map +1 -1
  122. package/dist/multistream/mediaRequestManager.js +223 -32
  123. package/dist/multistream/mediaRequestManager.js.map +1 -1
  124. package/dist/multistream/receiveSlot.js +10 -0
  125. package/dist/multistream/receiveSlot.js.map +1 -1
  126. package/dist/multistream/receiveSlotManager.js +39 -36
  127. package/dist/multistream/receiveSlotManager.js.map +1 -1
  128. package/dist/multistream/remoteMedia.js +3 -1
  129. package/dist/multistream/remoteMedia.js.map +1 -1
  130. package/dist/multistream/remoteMediaGroup.js +76 -5
  131. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  132. package/dist/multistream/remoteMediaManager.js +366 -104
  133. package/dist/multistream/remoteMediaManager.js.map +1 -1
  134. package/dist/multistream/sendSlotManager.js +255 -0
  135. package/dist/multistream/sendSlotManager.js.map +1 -0
  136. package/dist/reachability/clusterReachability.js +356 -0
  137. package/dist/reachability/clusterReachability.js.map +1 -0
  138. package/dist/reachability/index.js +263 -390
  139. package/dist/reachability/index.js.map +1 -1
  140. package/dist/reachability/request.js +6 -4
  141. package/dist/reachability/request.js.map +1 -1
  142. package/dist/reachability/util.js +29 -0
  143. package/dist/reachability/util.js.map +1 -0
  144. package/dist/reconnection-manager/index.js +266 -202
  145. package/dist/reconnection-manager/index.js.map +1 -1
  146. package/dist/recording-controller/index.js +21 -2
  147. package/dist/recording-controller/index.js.map +1 -1
  148. package/dist/recording-controller/util.js +9 -8
  149. package/dist/recording-controller/util.js.map +1 -1
  150. package/dist/roap/index.js +66 -28
  151. package/dist/roap/index.js.map +1 -1
  152. package/dist/roap/request.js +48 -64
  153. package/dist/roap/request.js.map +1 -1
  154. package/dist/roap/turnDiscovery.js +407 -79
  155. package/dist/roap/turnDiscovery.js.map +1 -1
  156. package/dist/rtcMetrics/constants.js +12 -0
  157. package/dist/rtcMetrics/constants.js.map +1 -0
  158. package/dist/rtcMetrics/index.js +179 -0
  159. package/dist/rtcMetrics/index.js.map +1 -0
  160. package/dist/statsAnalyzer/index.js +357 -295
  161. package/dist/statsAnalyzer/index.js.map +1 -1
  162. package/dist/statsAnalyzer/mqaUtil.js +296 -156
  163. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  164. package/dist/types/annotation/annotation.types.d.ts +42 -0
  165. package/dist/types/annotation/constants.d.ts +31 -0
  166. package/dist/types/annotation/index.d.ts +117 -0
  167. package/dist/types/breakouts/events.d.ts +8 -0
  168. package/dist/types/breakouts/utils.d.ts +9 -2
  169. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  170. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  171. package/dist/types/common/errors/webex-errors.d.ts +25 -1
  172. package/dist/types/common/logs/request.d.ts +2 -0
  173. package/dist/types/common/queue.d.ts +9 -7
  174. package/dist/types/config.d.ts +2 -7
  175. package/dist/types/constants.d.ts +204 -32
  176. package/dist/types/controls-options-manager/enums.d.ts +11 -1
  177. package/dist/types/controls-options-manager/index.d.ts +17 -1
  178. package/dist/types/controls-options-manager/types.d.ts +43 -0
  179. package/dist/types/controls-options-manager/util.d.ts +1 -7
  180. package/dist/types/index.d.ts +6 -5
  181. package/dist/types/interceptors/index.d.ts +2 -0
  182. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  183. package/dist/types/interpretation/collection.d.ts +5 -0
  184. package/dist/types/interpretation/index.d.ts +5 -0
  185. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  186. package/dist/types/locus-info/index.d.ts +57 -4
  187. package/dist/types/locus-info/parser.d.ts +66 -6
  188. package/dist/types/media/index.d.ts +2 -0
  189. package/dist/types/media/properties.d.ts +34 -49
  190. package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
  191. package/dist/types/meeting/in-meeting-actions.d.ts +86 -2
  192. package/dist/types/meeting/index.d.ts +630 -505
  193. package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
  194. package/dist/types/meeting/muteState.d.ts +88 -26
  195. package/dist/types/meeting/request.d.ts +65 -43
  196. package/dist/types/meeting/util.d.ts +117 -1
  197. package/dist/types/meeting/voicea-meeting.d.ts +16 -0
  198. package/dist/types/meeting-info/index.d.ts +13 -1
  199. package/dist/types/meeting-info/meeting-info-v2.d.ts +31 -1
  200. package/dist/types/meetings/collection.d.ts +17 -0
  201. package/dist/types/meetings/index.d.ts +113 -21
  202. package/dist/types/meetings/meetings.types.d.ts +4 -0
  203. package/dist/types/member/index.d.ts +14 -0
  204. package/dist/types/member/types.d.ts +32 -0
  205. package/dist/types/members/collection.d.ts +5 -0
  206. package/dist/types/members/index.d.ts +35 -2
  207. package/dist/types/members/request.d.ts +73 -9
  208. package/dist/types/members/types.d.ts +25 -0
  209. package/dist/types/members/util.d.ts +214 -1
  210. package/dist/types/metrics/constants.d.ts +17 -0
  211. package/dist/types/metrics/index.d.ts +4 -111
  212. package/dist/types/multistream/mediaRequestManager.d.ts +72 -3
  213. package/dist/types/multistream/receiveSlot.d.ts +7 -3
  214. package/dist/types/multistream/receiveSlotManager.d.ts +14 -4
  215. package/dist/types/multistream/remoteMedia.d.ts +3 -31
  216. package/dist/types/multistream/remoteMediaGroup.d.ts +2 -9
  217. package/dist/types/multistream/remoteMediaManager.d.ts +62 -2
  218. package/dist/types/multistream/sendSlotManager.d.ts +70 -0
  219. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  220. package/dist/types/reachability/index.d.ts +60 -95
  221. package/dist/types/reachability/request.d.ts +3 -1
  222. package/dist/types/reachability/util.d.ts +8 -0
  223. package/dist/types/reconnection-manager/index.d.ts +19 -0
  224. package/dist/types/recording-controller/index.d.ts +15 -1
  225. package/dist/types/recording-controller/util.d.ts +5 -4
  226. package/dist/types/roap/index.d.ts +11 -2
  227. package/dist/types/roap/request.d.ts +9 -8
  228. package/dist/types/roap/turnDiscovery.d.ts +90 -9
  229. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  230. package/dist/types/rtcMetrics/index.d.ts +61 -0
  231. package/dist/types/statsAnalyzer/index.d.ts +34 -12
  232. package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
  233. package/dist/types/webinar/collection.d.ts +16 -0
  234. package/dist/types/webinar/index.d.ts +5 -0
  235. package/dist/webinar/collection.js +44 -0
  236. package/dist/webinar/collection.js.map +1 -0
  237. package/dist/webinar/index.js +69 -0
  238. package/dist/webinar/index.js.map +1 -0
  239. package/package.json +22 -19
  240. package/src/annotation/annotation.types.ts +50 -0
  241. package/src/annotation/constants.ts +36 -0
  242. package/src/annotation/index.ts +328 -0
  243. package/src/breakouts/README.md +27 -6
  244. package/src/breakouts/breakout.ts +67 -9
  245. package/src/breakouts/events.ts +56 -0
  246. package/src/breakouts/index.ts +494 -73
  247. package/src/breakouts/utils.ts +26 -8
  248. package/src/common/errors/no-meeting-info.ts +24 -0
  249. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  250. package/src/common/errors/webex-errors.ts +44 -2
  251. package/src/common/logs/logger-proxy.ts +1 -1
  252. package/src/common/logs/request.ts +5 -1
  253. package/src/common/queue.ts +22 -8
  254. package/src/config.ts +6 -13
  255. package/src/constants.ts +234 -22
  256. package/src/controls-options-manager/enums.ts +12 -0
  257. package/src/controls-options-manager/index.ts +116 -21
  258. package/src/controls-options-manager/types.ts +59 -0
  259. package/src/controls-options-manager/util.ts +294 -14
  260. package/src/index.ts +45 -0
  261. package/src/interceptors/index.ts +3 -0
  262. package/src/interceptors/locusRetry.ts +67 -0
  263. package/src/interpretation/README.md +60 -0
  264. package/src/interpretation/collection.ts +19 -0
  265. package/src/interpretation/index.ts +349 -0
  266. package/src/interpretation/siLanguage.ts +18 -0
  267. package/src/locus-info/controlsUtils.ts +108 -0
  268. package/src/locus-info/index.ts +417 -59
  269. package/src/locus-info/infoUtils.ts +10 -2
  270. package/src/locus-info/mediaSharesUtils.ts +80 -0
  271. package/src/locus-info/parser.ts +258 -47
  272. package/src/locus-info/selfUtils.ts +81 -5
  273. package/src/media/index.ts +100 -108
  274. package/src/media/properties.ts +88 -117
  275. package/src/mediaQualityMetrics/config.ts +103 -238
  276. package/src/meeting/in-meeting-actions.ts +171 -3
  277. package/src/meeting/index.ts +3899 -2622
  278. package/src/meeting/locusMediaRequest.ts +313 -0
  279. package/src/meeting/muteState.ts +237 -136
  280. package/src/meeting/request.ts +166 -122
  281. package/src/meeting/util.ts +690 -395
  282. package/src/meeting/voicea-meeting.ts +122 -0
  283. package/src/meeting-info/index.ts +81 -8
  284. package/src/meeting-info/meeting-info-v2.ts +166 -16
  285. package/src/meeting-info/util.ts +13 -10
  286. package/src/meeting-info/utilv2.ts +47 -37
  287. package/src/meetings/collection.ts +33 -0
  288. package/src/meetings/index.ts +507 -127
  289. package/src/meetings/meetings.types.ts +12 -0
  290. package/src/meetings/request.ts +2 -0
  291. package/src/meetings/util.ts +81 -12
  292. package/src/member/index.ts +57 -0
  293. package/src/member/types.ts +38 -0
  294. package/src/member/util.ts +141 -25
  295. package/src/members/collection.ts +8 -0
  296. package/src/members/index.ts +133 -7
  297. package/src/members/request.ts +97 -17
  298. package/src/members/types.ts +29 -0
  299. package/src/members/util.ts +333 -240
  300. package/src/metrics/constants.ts +17 -0
  301. package/src/metrics/index.ts +1 -469
  302. package/src/multistream/mediaRequestManager.ts +271 -56
  303. package/src/multistream/receiveSlot.ts +11 -4
  304. package/src/multistream/receiveSlotManager.ts +34 -24
  305. package/src/multistream/remoteMedia.ts +5 -3
  306. package/src/multistream/remoteMediaGroup.ts +78 -0
  307. package/src/multistream/remoteMediaManager.ts +248 -44
  308. package/src/multistream/sendSlotManager.ts +199 -0
  309. package/src/reachability/clusterReachability.ts +320 -0
  310. package/src/reachability/index.ts +229 -346
  311. package/src/reachability/request.ts +8 -4
  312. package/src/reachability/util.ts +24 -0
  313. package/src/reconnection-manager/index.ts +128 -97
  314. package/src/recording-controller/index.ts +20 -3
  315. package/src/recording-controller/util.ts +26 -9
  316. package/src/roap/index.ts +76 -25
  317. package/src/roap/request.ts +48 -67
  318. package/src/roap/turnDiscovery.ts +331 -67
  319. package/src/rtcMetrics/constants.ts +3 -0
  320. package/src/rtcMetrics/index.ts +166 -0
  321. package/src/statsAnalyzer/index.ts +457 -416
  322. package/src/statsAnalyzer/mqaUtil.ts +317 -170
  323. package/src/webinar/collection.ts +31 -0
  324. package/src/webinar/index.ts +62 -0
  325. package/test/integration/spec/converged-space-meetings.js +60 -3
  326. package/test/integration/spec/journey.js +321 -262
  327. package/test/integration/spec/space-meeting.js +76 -3
  328. package/test/unit/spec/annotation/index.ts +418 -0
  329. package/test/unit/spec/breakouts/breakout.ts +119 -28
  330. package/test/unit/spec/breakouts/events.ts +89 -0
  331. package/test/unit/spec/breakouts/index.ts +1204 -118
  332. package/test/unit/spec/breakouts/utils.js +27 -2
  333. package/test/unit/spec/common/queue.js +31 -2
  334. package/test/unit/spec/controls-options-manager/index.js +163 -0
  335. package/test/unit/spec/controls-options-manager/util.js +576 -60
  336. package/test/unit/spec/fixture/locus.js +1 -0
  337. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  338. package/test/unit/spec/interpretation/collection.ts +15 -0
  339. package/test/unit/spec/interpretation/index.ts +625 -0
  340. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  341. package/test/unit/spec/locus-info/controlsUtils.js +316 -43
  342. package/test/unit/spec/locus-info/index.js +1372 -37
  343. package/test/unit/spec/locus-info/infoUtils.js +37 -15
  344. package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
  345. package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
  346. package/test/unit/spec/locus-info/parser.js +116 -35
  347. package/test/unit/spec/locus-info/selfConstant.js +27 -4
  348. package/test/unit/spec/locus-info/selfUtils.js +203 -17
  349. package/test/unit/spec/media/index.ts +178 -81
  350. package/test/unit/spec/media/properties.ts +2 -2
  351. package/test/unit/spec/meeting/in-meeting-actions.ts +85 -3
  352. package/test/unit/spec/meeting/index.js +7520 -2267
  353. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  354. package/test/unit/spec/meeting/muteState.js +549 -207
  355. package/test/unit/spec/meeting/request.js +476 -54
  356. package/test/unit/spec/meeting/utils.js +827 -74
  357. package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
  358. package/test/unit/spec/meeting-info/index.js +300 -0
  359. package/test/unit/spec/meeting-info/meetinginfov2.js +535 -9
  360. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  361. package/test/unit/spec/meetings/collection.js +26 -0
  362. package/test/unit/spec/meetings/index.js +1489 -219
  363. package/test/unit/spec/meetings/utils.js +229 -2
  364. package/test/unit/spec/member/index.js +61 -6
  365. package/test/unit/spec/member/util.js +510 -34
  366. package/test/unit/spec/members/index.js +432 -1
  367. package/test/unit/spec/members/request.js +206 -27
  368. package/test/unit/spec/members/utils.js +210 -0
  369. package/test/unit/spec/metrics/index.js +2 -52
  370. package/test/unit/spec/multistream/mediaRequestManager.ts +782 -114
  371. package/test/unit/spec/multistream/receiveSlot.ts +9 -1
  372. package/test/unit/spec/multistream/receiveSlotManager.ts +32 -30
  373. package/test/unit/spec/multistream/remoteMedia.ts +2 -0
  374. package/test/unit/spec/multistream/remoteMediaGroup.ts +345 -0
  375. package/test/unit/spec/multistream/remoteMediaManager.ts +525 -0
  376. package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
  377. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  378. package/test/unit/spec/reachability/index.ts +551 -14
  379. package/test/unit/spec/reachability/request.js +3 -1
  380. package/test/unit/spec/reachability/util.ts +40 -0
  381. package/test/unit/spec/reconnection-manager/index.js +171 -11
  382. package/test/unit/spec/recording-controller/index.js +293 -218
  383. package/test/unit/spec/recording-controller/util.js +223 -96
  384. package/test/unit/spec/roap/index.ts +233 -81
  385. package/test/unit/spec/roap/request.ts +100 -62
  386. package/test/unit/spec/roap/turnDiscovery.ts +682 -108
  387. package/test/unit/spec/rtcMetrics/index.ts +122 -0
  388. package/test/unit/spec/stats-analyzer/index.js +1252 -12
  389. package/test/unit/spec/webinar/collection.ts +13 -0
  390. package/test/unit/spec/webinar/index.ts +60 -0
  391. package/test/utils/integrationTestUtils.js +46 -0
  392. package/test/utils/testUtils.js +0 -57
  393. package/test/utils/webex-test-users.js +12 -4
  394. package/dist/metrics/config.js +0 -289
  395. package/dist/metrics/config.js.map +0 -1
  396. package/dist/types/metrics/config.d.ts +0 -169
  397. package/src/index.js +0 -18
  398. package/src/metrics/config.ts +0 -485
@@ -1,26 +1,91 @@
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
- import Roap from '../roap/index';
8
+ import Roap, { type TurnServerInfo, type TurnDiscoverySkipReason } 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
- 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 CaptionData = {
24
+ id: string;
25
+ isFinal: boolean;
26
+ translations: Array<string>;
27
+ text: string;
28
+ currentCaptionLanguage: string;
29
+ timestamp: string;
30
+ speaker: string;
31
+ };
32
+ export type Transcription = {
33
+ languageOptions: {
34
+ captionLanguages?: string;
35
+ maxLanguages?: number;
36
+ spokenLanguages?: Array<string>;
37
+ currentCaptionLanguage?: string;
38
+ requestedCaptionLanguage?: string;
39
+ currentSpokenLanguage?: string;
40
+ };
41
+ status: string;
42
+ isListening: boolean;
43
+ commandText: string;
44
+ captions: Array<CaptionData>;
45
+ showCaptionBox: boolean;
46
+ transcribingRequestStatus: string;
47
+ isCaptioning: boolean;
48
+ speakerProxy: Map<string, any>;
49
+ interimCaptions: Map<string, CaptionData>;
50
+ };
51
+ export type LocalStreams = {
52
+ microphone?: LocalMicrophoneStream;
53
+ camera?: LocalCameraStream;
54
+ screenShare?: {
55
+ audio?: LocalSystemAudioStream;
56
+ video?: LocalDisplayStream;
57
+ };
58
+ };
59
+ export type AddMediaOptions = {
60
+ localStreams?: LocalStreams;
61
+ audioEnabled?: boolean;
62
+ videoEnabled?: boolean;
63
+ shareAudioEnabled?: boolean;
64
+ shareVideoEnabled?: boolean;
65
+ remoteMediaManagerConfig?: RemoteMediaManagerConfiguration;
66
+ bundlePolicy?: BundlePolicy;
67
+ allowMediaInLobby?: boolean;
68
+ };
69
+ export type CallStateForMetrics = {
70
+ correlationId?: string;
71
+ joinTrigger?: string;
72
+ loginType?: string;
73
+ };
18
74
  export declare const MEDIA_UPDATE_TYPE: {
19
- ALL: string;
20
- AUDIO: string;
21
- VIDEO: string;
22
- SHARE: string;
23
- LAMBDA: string;
75
+ TRANSCODED_MEDIA_CONNECTION: string;
76
+ SHARE_FLOOR_REQUEST: string;
77
+ UPDATE_MEDIA: string;
78
+ };
79
+ export declare enum ScreenShareFloorStatus {
80
+ PENDING = "floor_request_pending",
81
+ GRANTED = "floor_request_granted",
82
+ RELEASED = "floor_released"
83
+ }
84
+ type FetchMeetingInfoParams = {
85
+ password?: string;
86
+ captchaCode?: string;
87
+ extraParams?: Record<string, any>;
88
+ sendCAevents?: boolean;
24
89
  };
25
90
  /**
26
91
  * MediaDirection
@@ -33,15 +98,6 @@ export declare const MEDIA_UPDATE_TYPE: {
33
98
  * @property {boolean} receiveShare
34
99
  * @property {boolean} isSharing
35
100
  */
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
101
  /**
46
102
  * SharePreferences
47
103
  * @typedef {Object} SharePreferences
@@ -55,18 +111,10 @@ export declare const MEDIA_UPDATE_TYPE: {
55
111
  * @property {String} [pin]
56
112
  * @property {Boolean} [moderator]
57
113
  * @property {String|Object} [meetingQuality]
58
- * @property {String} [meetingQuality.local]
59
114
  * @property {String} [meetingQuality.remote]
60
115
  * @property {Boolean} [rejoin]
61
116
  * @property {Boolean} [enableMultistream]
62
117
  */
63
- /**
64
- * SendOptions
65
- * @typedef {Object} SendOptions
66
- * @property {Boolean} sendAudio
67
- * @property {Boolean} sendVideo
68
- * @property {Boolean} sendShare
69
- */
70
118
  /**
71
119
  * Recording
72
120
  * @typedef {Object} Recording
@@ -148,7 +196,11 @@ export declare const MEDIA_UPDATE_TYPE: {
148
196
  * @instance
149
197
  * @type {Object}
150
198
  * @property {Boolean} memberId id of the meeting member that started screen share
199
+ * @property {String} url of this content share
200
+ * @property {String} shareInstanceId of this content share
201
+ * @property {Object} annotation Info of this content share
151
202
  * @memberof Meeting
203
+ *
152
204
  */
153
205
  /**
154
206
  * Meeting Stopped Sharing Remote Event
@@ -285,8 +337,11 @@ export default class Meeting extends StatelessWebexPlugin {
285
337
  attrs: any;
286
338
  audio: any;
287
339
  breakouts: any;
340
+ simultaneousInterpretation: any;
341
+ annotation: any;
342
+ webinar: any;
288
343
  conversationUrl: string;
289
- correlationId: string;
344
+ callStateForMetrics: CallStateForMetrics;
290
345
  destination: string;
291
346
  destinationType: string;
292
347
  deviceUrl: string;
@@ -297,7 +352,7 @@ export default class Meeting extends StatelessWebexPlugin {
297
352
  mediaConnections: any[];
298
353
  mediaId?: string;
299
354
  meetingFiniteStateMachine: any;
300
- meetingInfo: object;
355
+ meetingInfo: any;
301
356
  meetingRequest: MeetingRequest;
302
357
  members: Members;
303
358
  options: object;
@@ -309,11 +364,13 @@ export default class Meeting extends StatelessWebexPlugin {
309
364
  resource: string;
310
365
  roap: Roap;
311
366
  roapSeq: number;
367
+ selfUrl?: string;
312
368
  sipUri: string;
313
369
  type: string;
314
370
  userId: string;
315
371
  video: any;
316
372
  callEvents: any[];
373
+ datachannelUrl: string;
317
374
  deferJoin: Promise<any>;
318
375
  dialInDeviceStatus: string;
319
376
  dialInUrl: string;
@@ -326,10 +383,10 @@ export default class Meeting extends StatelessWebexPlugin {
326
383
  inMeetingActions: InMeetingActions;
327
384
  isLocalShareLive: boolean;
328
385
  isRoapInProgress: boolean;
329
- isSharing: boolean;
330
386
  keepAliveTimerId: NodeJS.Timeout;
331
387
  lastVideoLayoutInfo: any;
332
388
  locusInfo: any;
389
+ locusMediaRequest?: LocusMediaRequest;
333
390
  mediaProperties: MediaProperties;
334
391
  mediaRequestManagers: {
335
392
  audio: MediaRequestManager;
@@ -338,8 +395,10 @@ export default class Meeting extends StatelessWebexPlugin {
338
395
  screenShareVideo: MediaRequestManager;
339
396
  };
340
397
  meetingInfoFailureReason: string;
398
+ meetingInfoFailureCode?: number;
399
+ meetingInfoExtraParams?: Record<string, any>;
341
400
  networkQualityMonitor: NetworkQualityMonitor;
342
- networkStatus: string;
401
+ networkStatus?: NETWORK_STATUS;
343
402
  passwordStatus: string;
344
403
  queuedMediaUpdates: any[];
345
404
  recording: any;
@@ -348,16 +407,20 @@ export default class Meeting extends StatelessWebexPlugin {
348
407
  controlsOptionsManager: ControlsOptionsManager;
349
408
  requiredCaptcha: any;
350
409
  receiveSlotManager: ReceiveSlotManager;
410
+ selfUserPolicies: any;
411
+ enforceVBGImagesURL: string;
351
412
  shareStatus: string;
413
+ screenShareFloorState: ScreenShareFloorStatus;
352
414
  statsAnalyzer: StatsAnalyzer;
353
415
  transcription: Transcription;
354
416
  updateMediaConnections: (mediaConnections: any[]) => void;
355
- endCallInitiateJoinReq: any;
417
+ userDisplayHints: any;
418
+ endCallInitJoinReq: any;
356
419
  endJoinReqResp: any;
357
420
  endLocalSDPGenRemoteSDPRecvDelay: any;
358
421
  joinedWith: any;
359
422
  locusId: any;
360
- startCallInitiateJoinReq: any;
423
+ startCallInitJoinReq: any;
361
424
  startJoinReqResp: any;
362
425
  startLocalSDPGenRemoteSDPRecvDelay: any;
363
426
  wirelessShare: any;
@@ -365,12 +428,31 @@ export default class Meeting extends StatelessWebexPlugin {
365
428
  meetingJoinUrl: any;
366
429
  meetingNumber: any;
367
430
  meetingState: any;
368
- permissionToken: any;
431
+ permissionToken: string;
432
+ permissionTokenPayload: any;
433
+ permissionTokenReceivedLocalTime: number;
369
434
  resourceId: any;
370
435
  resourceUrl: string;
371
436
  selfId: string;
372
437
  state: any;
438
+ localAudioStreamMuteStateHandler: () => void;
439
+ localVideoStreamMuteStateHandler: () => void;
440
+ localOutputTrackChangeHandler: () => void;
441
+ roles: any[];
442
+ environment: string;
373
443
  namespace: string;
444
+ allowMediaInLobby: boolean;
445
+ localShareInstanceId: string;
446
+ remoteShareInstanceId: string;
447
+ turnDiscoverySkippedReason: TurnDiscoverySkipReason;
448
+ turnServerUsed: boolean;
449
+ areVoiceaEventsSetup: boolean;
450
+ voiceaListenerCallbacks: object;
451
+ private retriedWithTurnServer;
452
+ private sendSlotManager;
453
+ private deferSDPAnswer?;
454
+ private sdpResponseTimer?;
455
+ private hasMediaConnectionConnectedAtLeastOnce;
374
456
  /**
375
457
  * @param {Object} attrs
376
458
  * @param {Object} options
@@ -378,29 +460,91 @@ export default class Meeting extends StatelessWebexPlugin {
378
460
  * @memberof Meeting
379
461
  */
380
462
  constructor(attrs: any, options: object);
463
+ /**
464
+ * returns meeting is joined
465
+ * @private
466
+ * @memberof Meeting
467
+ * @returns {Boolean}
468
+ */
469
+ private isJoined;
470
+ /**
471
+ * Returns whether this meeting is a Locus CALL
472
+ * @returns {Boolean}
473
+ */
474
+ isLocusCall(): boolean;
475
+ /**
476
+ * Getter - Returns callStateForMetrics.correlationId
477
+ * @returns {string}
478
+ */
479
+ get correlationId(): string;
480
+ /**
481
+ * Setter - sets callStateForMetrics.correlationId
482
+ * @param {string} correlationId
483
+ */
484
+ set correlationId(correlationId: string);
485
+ /**
486
+ * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event
487
+ * @param {any} info
488
+ * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched
489
+ * @returns {void}
490
+ */
491
+ private setMeetingInfo;
492
+ /**
493
+ * Add pre-fetched meeting info
494
+ *
495
+ * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided
496
+ *
497
+ * @param {Object} meetingInfo - Complete meeting info
498
+ * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation
499
+ * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched
500
+ * @returns {Promise<void>}
501
+ */
502
+ injectMeetingInfo(meetingInfo: any, fetchParams: FetchMeetingInfoParams, meetingLookupUrl: string | undefined): Promise<void>;
503
+ /**
504
+ * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout
505
+ *
506
+ * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation
507
+ * @param {String} caller - Name of the caller for logging
508
+ *
509
+ * @returns {Promise<void>}
510
+ * @private
511
+ */
512
+ private prepForFetchMeetingInfo;
513
+ /**
514
+ * Internal method for fetching meeting info
515
+ *
516
+ * @returns {Promise}
517
+ */
518
+ private fetchMeetingInfoInternal;
519
+ /**
520
+ * Refreshes the meeting info permission token (it's required for joining meetings)
521
+ *
522
+ * @param {string} [reason] used for metrics and logging purposes (optional)
523
+ * @returns {Promise}
524
+ */
525
+ refreshPermissionToken(reason?: string): Promise<void>;
381
526
  /**
382
527
  * Fetches meeting information.
383
528
  * @param {Object} options
384
529
  * @param {String} [options.password] optional
385
530
  * @param {String} [options.captchaCode] optional
531
+ * @param {Boolean} [options.sendCAevents] optional - Whether to submit Call Analyzer events or not. Default: false.
386
532
  * @public
387
533
  * @memberof Meeting
388
534
  * @returns {Promise}
389
535
  */
390
- fetchMeetingInfo({ password, captchaCode, }: {
391
- password?: string;
392
- captchaCode?: string;
393
- }): Promise<void>;
536
+ fetchMeetingInfo(options: FetchMeetingInfoParams): Promise<void>;
394
537
  /**
395
538
  * Checks if the supplied password/host key is correct. It returns a promise with information whether the
396
539
  * password and captcha code were correct or not.
397
540
  * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
398
541
  * @param {String} captchaCode - can be undefined if captcha was not required by the server
542
+ * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information
399
543
  * @public
400
544
  * @memberof Meeting
401
545
  * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
402
546
  */
403
- verifyPassword(password: string, captchaCode: string): Promise<{
547
+ verifyPassword(password: string, captchaCode: string, sendCAevents?: boolean): Promise<{
404
548
  isPasswordValid: boolean;
405
549
  requiredCaptcha: any;
406
550
  failureReason: string;
@@ -417,6 +561,14 @@ export default class Meeting extends StatelessWebexPlugin {
417
561
  * @returns {Promise}
418
562
  */
419
563
  refreshCaptcha(): any;
564
+ /**
565
+ * Posts metrics event for this meeting. Allows the app to send Call Analyzer events.
566
+ * @param {String} eventName - Call Analyzer event
567
+ * @public
568
+ * @memberof Meeting
569
+ * @returns {Promise}
570
+ */
571
+ postMetrics(eventName: ClientEvent['name']): void;
420
572
  /**
421
573
  * Proxy function for all the listener set ups
422
574
  * @returns {undefined}
@@ -432,70 +584,43 @@ export default class Meeting extends StatelessWebexPlugin {
432
584
  */
433
585
  setUpBreakoutsListener(): void;
434
586
  /**
435
- * Set up the locus info listener for meetings disconnected due to inactivity
587
+ * Set up the listeners for interpretation
436
588
  * @returns {undefined}
437
589
  * @private
438
590
  * @memberof Meeting
439
591
  */
440
- private setUpLocusInfoMediaInactiveListener;
592
+ private setUpInterpretationListener;
441
593
  /**
442
- * Set up the locus info listener for assign host permissions on a meeting
594
+ * Set up the listeners for captions
443
595
  * @returns {undefined}
444
596
  * @private
445
597
  * @memberof Meeting
446
598
  */
447
- private setUpLocusInfoAssignHostListener;
599
+ private setUpVoiceaListeners;
448
600
  /**
449
- * Set up the internal locus info full state object listener
601
+ * Set up the locus info listener for meetings disconnected due to inactivity
450
602
  * @returns {undefined}
451
603
  * @private
452
604
  * @memberof Meeting
453
605
  */
454
- 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): {};
606
+ private setUpLocusInfoMediaInactiveListener;
473
607
  /**
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}
608
+ * Set up the locus info listener for assign host permissions on a meeting
609
+ * @returns {undefined}
481
610
  * @private
482
611
  * @memberof Meeting
483
612
  */
484
- private sendCallAnalyzerMetrics;
613
+ private setUpLocusInfoAssignHostListener;
485
614
  /**
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}
615
+ * Set up the internal locus info full state object listener
616
+ * @returns {undefined}
492
617
  * @private
493
618
  * @memberof Meeting
494
619
  */
495
- private sendMediaQualityAnalyzerMetrics;
620
+ private setUpLocusFullStateListener;
496
621
  /**
497
622
  * sets the network status on meeting object
498
- * @param {String} networkStatus
623
+ * @param {NETWORK_STATUS} networkStatus
499
624
  * @private
500
625
  * @returns {undefined}
501
626
  * @memberof Meeting
@@ -555,6 +680,13 @@ export default class Meeting extends StatelessWebexPlugin {
555
680
  * @memberof Meeting
556
681
  */
557
682
  private setupLocusControlsListener;
683
+ /**
684
+ * Trigger annotation info update event
685
+ @returns {undefined}
686
+ @param {object} contentShare
687
+ @param {object} previousContentShare
688
+ */
689
+ private triggerAnnotationInfoEvent;
558
690
  /**
559
691
  * Set up the locus info media shares listener
560
692
  * update content and whiteboard sharing id value for members, and updates the member
@@ -653,13 +785,23 @@ export default class Meeting extends StatelessWebexPlugin {
653
785
  phoneNumber: string;
654
786
  }): any;
655
787
  /**
656
- * Admit the guest(s) to the call once they are waiting
788
+ * Admit the guest(s) to the call once they are waiting.
789
+ * If the host/cohost is in a breakout session, the locus url
790
+ * of the session must be provided as the authorizingLocusUrl.
791
+ * Regardless of host/cohost location, the locus Id (lid) in
792
+ * the path should be the locus Id of the main, which means the
793
+ * locus url of the api call must be from the main session.
794
+ * If these loucs urls are not provided, the function will do the check.
657
795
  * @param {Array} memberIds
796
+ * @param {Object} sessionLocusUrls: {authorizingLocusUrl, mainLocusUrl}
658
797
  * @returns {Promise} see #members.admitMembers
659
798
  * @public
660
799
  * @memberof Meeting
661
800
  */
662
- admit(memberIds: Array<any>): any;
801
+ admit(memberIds: Array<any>, sessionLocusUrls?: {
802
+ authorizingLocusUrl: string;
803
+ mainLocusUrl: string;
804
+ }): any;
663
805
  /**
664
806
  * Remove the member from the meeting, boot them
665
807
  * @param {String} memberId
@@ -693,80 +835,63 @@ export default class Meeting extends StatelessWebexPlugin {
693
835
  * @memberof Meeting
694
836
  */
695
837
  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
838
  /**
739
839
  * Sets the meeting info on the class instance
740
840
  * @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
841
+ * @param {String} meetingInfo.conversationUrl
842
+ * @param {String} meetingInfo.locusUrl
843
+ * @param {String} meetingInfo.sipUri
844
+ * @param {String} [meetingInfo.sipUrl]
845
+ * @param {String} [meetingInfo.sipMeetingUri]
846
+ * @param {String} [meetingInfo.meetingNumber]
847
+ * @param {String} [meetingInfo.meetingJoinUrl]
848
+ * @param {String} [meetingInfo.hostId]
849
+ * @param {String} [meetingInfo.permissionToken]
850
+ * @param {String} [meetingInfo.channel]
851
+ * @param {Object} meetingInfo.owner
746
852
  * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc)
853
+ * @param {Object | String} errors Meeting info request error
747
854
  * @returns {undefined}
748
855
  * @private
749
856
  * @memberof Meeting
750
857
  */
751
858
  parseMeetingInfo(meetingInfo: {
752
- body: {
753
- conversationUrl: string;
754
- locusUrl: string;
755
- sipUri: string;
756
- owner: object;
757
- };
758
- } | any, destination?: object | string | null): void;
859
+ conversationUrl: string;
860
+ locusUrl: string;
861
+ sipUri: string;
862
+ owner: object;
863
+ sipUrl?: string;
864
+ sipMeetingUri?: string;
865
+ meetingNumber?: string;
866
+ meetingJoinUrl?: string;
867
+ hostId?: string;
868
+ permissionToken?: string;
869
+ channel?: string;
870
+ }, destination?: object | string | null, errors?: any): void;
871
+ /**
872
+ * Indicates whether policy can be applied
873
+ * @returns {boolean}
874
+ */
875
+ private arePolicyRestrictionsSupported;
759
876
  /**
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
877
+ * Updates the meeting actions (display hints), depends on locus display hints, user policy and app api info
765
878
  * @returns {undefined}
766
879
  * @private
767
880
  * @memberof Meeting
768
881
  */
769
- private parseLocus;
882
+ private updateMeetingActions;
883
+ /**
884
+ * Sets the self user policies based on the contents of the permission token
885
+ * @returns {void}
886
+ */
887
+ setSelfUserPolicies(): void;
888
+ /**
889
+ * Sets the permission token payload on the class instance
890
+ *
891
+ * @param {String} permissionToken
892
+ * @returns {void}
893
+ */
894
+ setPermissionTokenPayload(permissionToken: string): void;
770
895
  /**
771
896
  * Sets the sip uri on the class instance
772
897
  * uses meeting info as precedence
@@ -789,7 +914,13 @@ export default class Meeting extends StatelessWebexPlugin {
789
914
  * @private
790
915
  * @memberof Meeting
791
916
  */
792
- private setLocus;
917
+ setLocus(locus: {
918
+ mediaConnections: Array<any>;
919
+ locusUrl: string;
920
+ locusId: string;
921
+ mediaId: string;
922
+ host: object;
923
+ } | any): void;
793
924
  /**
794
925
  * Upload logs for the current meeting
795
926
  * @param {object} options file name and function name
@@ -799,19 +930,10 @@ export default class Meeting extends StatelessWebexPlugin {
799
930
  */
800
931
  uploadLogs(options?: object): void;
801
932
  /**
802
- * Removes remote audio and video stream on the class instance and triggers an event
803
- * to developers
804
- * @returns {undefined}
805
- * @public
806
- * @memberof Meeting
807
- * @deprecated after v1.89.3
808
- */
809
- unsetRemoteStream(): void;
810
- /**
811
- * Removes remote audio, video and share tracks from class instance's mediaProperties
933
+ * Removes remote audio, video and share streams from class instance's mediaProperties
812
934
  * @returns {undefined}
813
935
  */
814
- unsetRemoteTracks(): void;
936
+ unsetRemoteStreams(): void;
815
937
  /**
816
938
  * Removes the remote stream on the class instance and triggers an event
817
939
  * to developers
@@ -822,83 +944,45 @@ export default class Meeting extends StatelessWebexPlugin {
822
944
  */
823
945
  closeRemoteStream(): void;
824
946
  /**
825
- * Removes the remote tracks on the class instance and triggers an event
947
+ * Removes the remote streams on the class instance and triggers an event
826
948
  * to developers
827
949
  * @returns {undefined}
828
950
  * @memberof Meeting
829
951
  */
830
- closeRemoteTracks(): Promise<[any, any, any]>;
952
+ closeRemoteStreams(): Promise<[any, any, any]>;
831
953
  /**
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;
838
- /**
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
954
+ * Stores the reference to a new microphone stream, sets up the required event listeners
955
+ * on it, cleans up previous stream, etc.
956
+ *
957
+ * @param {LocalMicrophoneStream | null} localStream local microphone stream
958
+ * @returns {Promise<void>}
878
959
  */
879
- closeLocalStream(): any;
960
+ private setLocalAudioStream;
880
961
  /**
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
962
+ * Stores the reference to a new camera stream, sets up the required event listeners
963
+ * on it, cleans up previous stream, etc.
964
+ *
965
+ * @param {LocalCameraStream | null} localStream local camera stream
966
+ * @returns {Promise<void>}
886
967
  */
887
- closeLocalShare(): any;
968
+ private setLocalVideoStream;
888
969
  /**
889
- * Removes the local stream from the class and emits an event to the developer
890
- * @returns {undefined}
891
- * @public
892
- * @memberof Meeting
970
+ * Stores the reference to a new screen share stream, sets up the required event listeners
971
+ * on it, cleans up previous stream, etc.
972
+ * It also sends the floor grant/release request.
973
+ *
974
+ * @param {LocalDisplayStream | undefined} localDisplayStream local display stream
975
+ * @returns {Promise<void>}
893
976
  */
894
- unsetLocalVideoTrack(): void;
977
+ private setLocalShareVideoStream;
895
978
  /**
896
- * Removes the local share from the class and emits an event to the developer
897
- * @returns {undefined}
898
- * @public
899
- * @memberof Meeting
979
+ * Stores the reference to a new screen share audio stream, sets up the required event listeners
980
+ * on it, cleans up previous stream, etc.
981
+ *
982
+ * @param {LocalSystemAudioStream | undefined} localSystemAudioStream local system audio stream
983
+ * @returns {Promise<void>}
900
984
  */
901
- unsetLocalShareTrack(): void;
985
+ private setLocalShareAudioStream;
902
986
  /**
903
987
  * sets up listner for mercury event
904
988
  * @returns {undefined}
@@ -924,13 +1008,28 @@ export default class Meeting extends StatelessWebexPlugin {
924
1008
  */
925
1009
  unsetPeerConnections(): void;
926
1010
  /**
927
- * Convenience method to set the correlation id for the Meeting
928
- * @param {String} id correlation id to set on the class
1011
+ * Convenience method to set the correlation id for the callStateForMetrics
1012
+ * @param {String} id correlation id to set on the callStateForMetrics
929
1013
  * @returns {undefined}
1014
+ * @public
1015
+ * @memberof Meeting
1016
+ */
1017
+ setCorrelationId(id: string): void;
1018
+ /**
1019
+ * Update the callStateForMetrics
1020
+ * @param {CallStateForMetrics} callStateForMetrics updated values for callStateForMetrics
1021
+ * @returns {undefined}
1022
+ * @public
1023
+ * @memberof Meeting
1024
+ */
1025
+ updateCallStateForMetrics(callStateForMetrics: CallStateForMetrics): void;
1026
+ /**
1027
+ * Enqueue request for screenshare floor and set the status to pending
1028
+ * @returns {Promise}
930
1029
  * @private
931
1030
  * @memberof Meeting
932
1031
  */
933
- private setCorrelationId;
1032
+ private enqueueScreenShareFloorRequest;
934
1033
  /**
935
1034
  * Mute the audio for a meeting
936
1035
  * @returns {Promise} resolves the data from muting audio {mute, self} or rejects if there is no audio set
@@ -963,32 +1062,25 @@ export default class Meeting extends StatelessWebexPlugin {
963
1062
  * Shorthand function to join AND set up media
964
1063
  * @param {Object} options - options to join with media
965
1064
  * @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()}
1065
+ * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia()
1066
+ * @returns {Promise} -- {join: see join(), media: see addMedia()}
969
1067
  * @public
970
1068
  * @memberof Meeting
971
1069
  * @example
972
1070
  * joinWithMedia({
973
1071
  * 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
- * }})
1072
+ * mediaOptions: {
1073
+ * localStreams: { microphone: microphoneStream, camera: cameraStream }
1074
+ * }
1075
+ * })
986
1076
  */
987
1077
  joinWithMedia(options?: {
988
1078
  joinOptions?: any;
989
- mediaSettings: any;
990
- audioVideoOptions?: any;
991
- }): any;
1079
+ mediaOptions?: AddMediaOptions;
1080
+ }): Promise<{
1081
+ join: any;
1082
+ media: void;
1083
+ }>;
992
1084
  /**
993
1085
  * Initiates the reconnection of the media in the meeting
994
1086
  *
@@ -1010,17 +1102,26 @@ export default class Meeting extends StatelessWebexPlugin {
1010
1102
  */
1011
1103
  isReactionsSupported(): boolean;
1012
1104
  /**
1013
- * Monitor the Low-Latency Mercury (LLM) web socket connection on `onError` and `onClose` states
1014
- * @private
1015
- * @returns {void}
1105
+ * sets Caption language for the meeting
1106
+ * @param {string} language
1107
+ * @returns {Promise}
1016
1108
  */
1017
- private monitorTranscriptionSocketConnection;
1109
+ setCaptionLanguage(language: string): Promise<unknown>;
1018
1110
  /**
1019
- * Request for a WebSocket Url, open and monitor the WebSocket connection
1020
- * @private
1111
+ * sets Spoken language for the meeting
1112
+ * @param {string} language
1113
+ * @returns {Promise}
1114
+ */
1115
+ setSpokenLanguage(language: string): Promise<unknown>;
1116
+ /**
1117
+ * This method will enable the transcription for the current meeting if the meeting has enabled/supports Webex Assistant
1118
+ * @param {Object} options object with spokenlanguage setting
1119
+ * @public
1021
1120
  * @returns {Promise<void>} a promise to open the WebSocket connection
1022
1121
  */
1023
- private receiveTranscription;
1122
+ startTranscription(options?: {
1123
+ spokenLanguage?: string;
1124
+ }): Promise<void>;
1024
1125
  /**
1025
1126
  * Callback called when a relay event is received from meeting LLM Connection
1026
1127
  * @param {RelayEvent} e Event object coming from LLM Connection
@@ -1029,11 +1130,10 @@ export default class Meeting extends StatelessWebexPlugin {
1029
1130
  */
1030
1131
  private processRelayEvent;
1031
1132
  /**
1032
- * stop recieving Transcription by closing
1033
- * the web socket connection properly
1133
+ * This method stops receiving transcription for the current meeting
1034
1134
  * @returns {void}
1035
1135
  */
1036
- stopReceivingTranscription(): void;
1136
+ stopTranscription(): void;
1037
1137
  /**
1038
1138
  * triggers an event to notify that the user
1039
1139
  * will not receive any more transcription
@@ -1053,7 +1153,7 @@ export default class Meeting extends StatelessWebexPlugin {
1053
1153
  * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop
1054
1154
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
1055
1155
  */
1056
- join(options?: any): any;
1156
+ join(options?: any): Promise<any>;
1057
1157
  /**
1058
1158
  * Connects to low latency mercury and reconnects if the address has changed
1059
1159
  * It will also disconnect if called when the meeting has ended
@@ -1068,7 +1168,7 @@ export default class Meeting extends StatelessWebexPlugin {
1068
1168
  * @public
1069
1169
  * @memberof Meeting
1070
1170
  */
1071
- usePhoneAudio(phoneNumber: string): any;
1171
+ usePhoneAudio(phoneNumber: string): Promise<any>;
1072
1172
  /**
1073
1173
  * Determines if the given pstnStatus is in a state which implies the phone is provisioned
1074
1174
  * @param {String} pstnStatus
@@ -1116,38 +1216,6 @@ export default class Meeting extends StatelessWebexPlugin {
1116
1216
  * @memberof Meeting
1117
1217
  */
1118
1218
  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
1219
  /**
1152
1220
  * Handles ROAP_FAILURE event from the webrtc media connection
1153
1221
  *
@@ -1155,6 +1223,12 @@ export default class Meeting extends StatelessWebexPlugin {
1155
1223
  * @returns {void}
1156
1224
  */
1157
1225
  handleRoapFailure: (error: any) => void;
1226
+ /**
1227
+ * This function makes sure we send the right metrics when local and remote SDPs are processed/generated
1228
+ *
1229
+ * @returns {undefined}
1230
+ */
1231
+ setupSdpListeners: () => void;
1158
1232
  setupMediaConnectionListeners: () => void;
1159
1233
  /**
1160
1234
  * Registers for all required StatsAnalyzer events
@@ -1165,12 +1239,14 @@ export default class Meeting extends StatelessWebexPlugin {
1165
1239
  setupStatsAnalyzerEventHandlers: () => void;
1166
1240
  getMediaConnectionDebugId(): string;
1167
1241
  /**
1168
- * Creates a webrtc media connection
1242
+ * Creates a webrtc media connection and publishes streams to it
1169
1243
  *
1170
1244
  * @param {Object} turnServerInfo TURN server information
1245
+ * @param {BundlePolicy} [bundlePolicy] Bundle policy settings
1246
+ * @param {AddMediaOptions} [options] Options for enabling/disabling audio/video
1171
1247
  * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}
1172
1248
  */
1173
- createMediaConnection(turnServerInfo: any): any;
1249
+ private createMediaConnection;
1174
1250
  /**
1175
1251
  * Listens for an event emitted by eventEmitter and emits it from the meeting object
1176
1252
  *
@@ -1182,23 +1258,131 @@ export default class Meeting extends StatelessWebexPlugin {
1182
1258
  */
1183
1259
  forwardEvent(eventEmitter: any, eventTypeToForward: any, meetingEventType: any): void;
1184
1260
  /**
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
1261
+ * Sets up all the references to local streams in this.mediaProperties before creating media connection
1262
+ * and before TURN discovery, so that the correct mute state is sent with TURN discovery roap messages.
1263
+ *
1264
+ * @private
1265
+ * @param {LocalStreams} localStreams
1266
+ * @returns {Promise<void>}
1267
+ */
1268
+ private setUpLocalStreamReferences;
1269
+ /**
1270
+ * Calls mediaProperties.waitForMediaConnectionConnected() and sends CA client.ice.end metric on failure
1271
+ *
1272
+ * @private
1273
+ * @returns {Promise<void>}
1274
+ */
1275
+ private waitForMediaConnectionConnected;
1276
+ /**
1277
+ * Enables statsAnalyser if config allows it
1278
+ *
1279
+ * @private
1280
+ * @returns {void}
1281
+ */
1282
+ private createStatsAnalyzer;
1283
+ /**
1284
+ * Handles device logging
1285
+ *
1286
+ * @private
1287
+ * @static
1288
+ * @returns {Promise<void>}
1289
+ */
1290
+ private static handleDeviceLogging;
1291
+ /**
1292
+ * Returns a promise. This promise is created once the local sdp offer has been successfully created and is resolved
1293
+ * once the remote sdp answer has been received.
1294
+ *
1295
+ * @private
1296
+ * @returns {Promise<void>}
1297
+ */
1298
+ private waitForRemoteSDPAnswer;
1299
+ /**
1300
+ * Calls establishMediaConnection with isForced = true to force turn discovery to happen
1301
+ *
1302
+ * @private
1303
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1304
+ * @param {BundlePolicy} [bundlePolicy]
1305
+ * @returns {Promise<void>}
1306
+ */
1307
+ private retryEstablishMediaConnectionWithForcedTurnDiscovery;
1308
+ /**
1309
+ * Does relevant clean up before retrying to establish media connection
1310
+ * and performs the retry with forced turn discovery
1311
+ *
1312
+ * @private
1313
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1314
+ * @param {BundlePolicy} [bundlePolicy]
1315
+ * @returns {Promise<void>}
1316
+ */
1317
+ private retryWithForcedTurnDiscovery;
1318
+ /**
1319
+ * If waitForMediaConnectionConnected() fails when we haven't done turn discovery then we
1320
+ * attempt to establish a media connection again, but this time using turn discovery. If we
1321
+ * used turn discovery on the first pass we do not attempt connection again.
1322
+ *
1323
+ * @private
1324
+ * @param {Error} error
1325
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1326
+ * @param {BundlePolicy} [bundlePolicy]
1327
+ * @returns {Promise<void>}
1328
+ */
1329
+ private handleWaitForMediaConnectionConnectedError;
1330
+ /**
1331
+ * Performs TURN discovery as a separate call to the Locus /media API
1332
+ *
1333
+ * @param {boolean} isRetry
1334
+ * @param {boolean} isForced
1192
1335
  * @returns {Promise}
1336
+ */
1337
+ private doTurnDiscovery;
1338
+ /**
1339
+ * Does TURN discovery, SDP offer/answer exhange, establishes ICE connection and DTLS handshake.
1340
+ *
1341
+ * @private
1342
+ * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig]
1343
+ * @param {BundlePolicy} [bundlePolicy]
1344
+ * @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results
1345
+ * @param {TurnServerInfo} [turnServerInfo]
1346
+ * @returns {Promise<void>}
1347
+ */
1348
+ private establishMediaConnection;
1349
+ /**
1350
+ * Cleans up stats analyzer, peer connection, and turns off listeners
1351
+ *
1352
+ * @private
1353
+ * @returns {Promise<void>}
1354
+ */
1355
+ private cleanUpOnAddMediaFailure;
1356
+ /**
1357
+ * Sends stats report, closes peer connection and cleans up any media connection
1358
+ * related things before trying to establish media connection again with turn server
1359
+ *
1360
+ * @private
1361
+ * @returns {Promise<void>}
1362
+ */
1363
+ private cleanUpBeforeRetryWithTurnServer;
1364
+ /**
1365
+ * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
1366
+ *
1367
+ * @param {AddMediaOptions} options
1368
+ * @param {TurnServerInfo} turnServerInfo - TURN server information (used only internally by the SDK)
1369
+ * @returns {Promise<void>}
1193
1370
  * @public
1194
1371
  * @memberof Meeting
1195
1372
  */
1196
- addMedia(options?: any): any;
1373
+ addMedia(options?: AddMediaOptions, turnServerInfo?: TurnServerInfo): Promise<void>;
1197
1374
  /**
1198
1375
  * Informs if the peer connection is in a state that can be updated with updateMedia (audio/video/share)
1199
1376
  * @returns {Boolean}
1200
1377
  */
1201
1378
  canUpdateMedia(): boolean;
1379
+ /**
1380
+ * media failed, so collect a stats report from webrtc using the wcme connection to grab the rtc stats report
1381
+ * send a webrtc telemetry dump to the configured server using the internal media core check metrics configured callback
1382
+ * @param {String} callFrom - the function calling this function, optional.
1383
+ * @returns {Promise<void>}
1384
+ */
1385
+ private forceSendStatsReport;
1202
1386
  /**
1203
1387
  * Enqueues a media update operation.
1204
1388
  * @param {String} mediaUpdateType one of MEDIA_UPDATE_TYPE values
@@ -1224,94 +1408,26 @@ export default class Meeting extends StatelessWebexPlugin {
1224
1408
  */
1225
1409
  processNextQueuedMediaUpdate: () => void;
1226
1410
  /**
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()
1246
- *
1247
- * @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
1251
- * @returns {Promise}
1252
- * @public
1253
- * @memberof Meeting
1254
- */
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()
1411
+ * Updates the media connection - it allows to enable/disable all audio/video/share in the meeting.
1412
+ * This does not affect the published tracks, so for example if a microphone track is published and
1413
+ * updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore,
1414
+ * but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called,
1415
+ * the sending of the audio from the same track will resume.
1291
1416
  *
1292
1417
  * @param {Object} options
1293
- * @param {boolean} options.sendShare
1294
- * @param {boolean} options.receiveShare
1418
+ * @param {boolean} options.audioEnabled [optional] enables/disables receiving and sending of main audio in the meeting
1419
+ * @param {boolean} options.videoEnabled [optional] enables/disables receiving and sending of main video in the meeting
1420
+ * @param {boolean} options.shareEnabled [optional] enables/disables receiving and sending of screen share in the meeting
1295
1421
  * @returns {Promise}
1296
1422
  * @public
1297
1423
  * @memberof Meeting
1298
1424
  */
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;
1425
+ updateMedia(options: {
1426
+ audioEnabled?: boolean;
1427
+ videoEnabled?: boolean;
1428
+ shareAudioEnabled?: boolean;
1429
+ shareVideoEnabled?: boolean;
1430
+ }): Promise<void>;
1315
1431
  /**
1316
1432
  * Acknowledge the meeting, outgoing or incoming
1317
1433
  * @param {String} type
@@ -1319,7 +1435,11 @@ export default class Meeting extends StatelessWebexPlugin {
1319
1435
  * @public
1320
1436
  * @memberof Meeting
1321
1437
  */
1322
- acknowledge(type: string): any;
1438
+ acknowledge(type: string): Promise<{
1439
+ response: any;
1440
+ }> | Promise<{
1441
+ message: string;
1442
+ }>;
1323
1443
  /**
1324
1444
  * Decline this meeting
1325
1445
  * @param {String} reason
@@ -1329,15 +1449,45 @@ export default class Meeting extends StatelessWebexPlugin {
1329
1449
  */
1330
1450
  decline(reason: string): any;
1331
1451
  /**
1332
- * Leave the current meeting
1452
+ * Returns a promise that will resolve to fetch options for leaving a meeting.
1453
+ *
1454
+ * This is to support quickly submitting a leave request when the browser/tab is closing.
1455
+ * Calling meeting.leave will not work because there are some async steps that will
1456
+ * not complete before the browser is closed. Instead, we pre-gather all the
1457
+ * information/options needed for the request(s), and then simply and quickly
1458
+ * fire the fetch(es) when pagehide is triggered.
1459
+ *
1460
+ * We must use fetch instead of request because fetch has a keepalive option that
1461
+ * allows the request it to outlive the page.
1462
+ *
1463
+ * Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will
1464
+ * properly adjust them before submitting.
1465
+ *
1466
+ * @public
1333
1467
  * @param {Object} options leave options
1334
1468
  * @param {String} options.resourceId the device with which to leave from, empty if just the computer
1469
+ * @param {any} options.reason the reason for leaving
1470
+ * @returns {Promise} resolves to options to be used with fetch
1471
+ */
1472
+ buildLeaveFetchRequestOptions(options?: {
1473
+ resourceId?: string;
1474
+ reason?: any;
1475
+ }): any;
1476
+ /**
1477
+ * Leave the current meeting
1478
+ * @param {Object} options - leave options
1479
+ * @param {String} [options.resourceId] - the device with which to leave from, empty if just the computer
1480
+ * @param {String} [options.clientEventLeaveReason] - the leaveReason to include in the Call Analyzer event.
1481
+ * Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason)
1482
+ * https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796
1483
+ * @param {String} [options.reason] - only used for logging
1335
1484
  * @returns {Promise}
1336
1485
  * @public
1337
1486
  * @memberof Meeting
1338
1487
  */
1339
1488
  leave(options?: {
1340
1489
  resourceId?: string;
1490
+ clientEventLeaveReason?: ClientEventLeaveReason;
1341
1491
  reason?: any;
1342
1492
  }): any;
1343
1493
  /**
@@ -1365,12 +1515,12 @@ export default class Meeting extends StatelessWebexPlugin {
1365
1515
  */
1366
1516
  private requestScreenShareFloor;
1367
1517
  /**
1368
- * Stops the screen share
1369
- * @returns {Promise} see #updateShare
1370
- * @public
1371
- * @memberof Meeting
1518
+ * Requests screen share floor if such request is pending.
1519
+ * It should be called whenever meeting state changes to JOINED
1520
+ *
1521
+ * @returns {void}
1372
1522
  */
1373
- stopShare(options?: {}): any;
1523
+ private requestScreenShareFloorIfPending;
1374
1524
  /**
1375
1525
  * Sends a request to Locus to release the screen share floor.
1376
1526
  * @returns {Promise} see #meetingRequest.changeMeetingFloor
@@ -1401,6 +1551,16 @@ export default class Meeting extends StatelessWebexPlugin {
1401
1551
  * @memberof Meeting
1402
1552
  */
1403
1553
  setDisallowUnmute(enabled: boolean): Promise<any>;
1554
+ /**
1555
+ * set the mute all flag for participants if you're the host
1556
+ * @returns {Promise}
1557
+ * @param {boolean} mutedEnabled
1558
+ * @param {boolean} disallowUnmuteEnabled
1559
+ * @param {boolean} muteOnEntryEnabled
1560
+ * @public
1561
+ * @memberof Meeting
1562
+ */
1563
+ setMuteAll(mutedEnabled: boolean, disallowUnmuteEnabled: boolean, muteOnEntryEnabled: boolean): Promise<any>;
1404
1564
  /**
1405
1565
  * End the recording of this meeting
1406
1566
  * @returns {Promise}
@@ -1451,7 +1611,7 @@ export default class Meeting extends StatelessWebexPlugin {
1451
1611
  * @public
1452
1612
  * @memberof Meeting
1453
1613
  */
1454
- sendDTMF(tones: string): any;
1614
+ sendDTMF(tones: string): Promise<any>;
1455
1615
  /**
1456
1616
  * Sends request to change layout type for the current meeting for the specific participant/device only
1457
1617
  * @param {String} [layoutType] a layout type that should be available in meeting constants {@link #layout_types}
@@ -1476,53 +1636,41 @@ export default class Meeting extends StatelessWebexPlugin {
1476
1636
  height: number;
1477
1637
  };
1478
1638
  }): 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
1639
  /**
1486
1640
  * Sets the quality level of the remote incoming media
1487
1641
  * @param {String} level {LOW|MEDIUM|HIGH}
1488
1642
  * @returns {Promise}
1489
1643
  */
1490
- setRemoteQualityLevel(level: string): any;
1644
+ setRemoteQualityLevel(level: string): Promise<void>;
1491
1645
  /**
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
1646
+ * Functionality for when a share audio is ended.
1647
+ * @private
1648
+ * @memberof Meeting
1649
+ * @returns {undefined}
1496
1650
  */
1497
- setMeetingQuality(level: string): any;
1651
+ private handleShareAudioStreamEnded;
1498
1652
  /**
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}
1653
+ * Functionality for when a share video is muted or unmuted.
1654
+ * @private
1655
+ * @memberof Meeting
1656
+ * @param {boolean} muted
1657
+ * @returns {undefined}
1510
1658
  */
1511
- shareScreen(options?: {
1512
- sendAudio: boolean;
1513
- sendShare: boolean;
1514
- sharePreferences: {
1515
- shareConstraints: MediaTrackConstraints;
1516
- };
1517
- }): any;
1659
+ private handleShareVideoStreamMuteStateChange;
1518
1660
  /**
1519
- * Functionality for when a share is ended.
1661
+ * Functionality for when a share video is ended.
1520
1662
  * @private
1521
1663
  * @memberof Meeting
1522
- * @param {MediaStream} localShare
1523
1664
  * @returns {undefined}
1524
1665
  */
1525
- private handleShareTrackEnded;
1666
+ private handleShareVideoStreamEnded;
1667
+ /**
1668
+ * Emits meeting:stoppedSharingLocal
1669
+ * @private
1670
+ * @returns {undefined}
1671
+ * @memberof Meeting
1672
+ */
1673
+ private triggerStoppedSharing;
1526
1674
  /**
1527
1675
  * Emits the 'network:quality' event
1528
1676
  * 1 indicates an acceptable uplink network.
@@ -1542,86 +1690,11 @@ export default class Meeting extends StatelessWebexPlugin {
1542
1690
  * @returns {undefined}
1543
1691
  */
1544
1692
  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
- /**
1581
- *
1582
- * @returns {undefined}
1583
- */
1584
- setEndLocalSDPGenRemoteSDPRecvDelay(): void;
1585
1693
  /**
1586
1694
  *
1587
- * @returns {string} duration between local SDP generation and remote SDP reception
1695
+ * @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
1588
1696
  */
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;
1697
+ getCurUserType(): "host" | "cohost" | "presenter" | "attendee";
1625
1698
  /**
1626
1699
  * End the current meeting for all
1627
1700
  * @returns {Promise}
@@ -1668,7 +1741,7 @@ export default class Meeting extends StatelessWebexPlugin {
1668
1741
  * @public
1669
1742
  * @memberof Meeting
1670
1743
  */
1671
- toggleReactions(enable: boolean): any;
1744
+ toggleReactions(enable: boolean): Promise<any>;
1672
1745
  /**
1673
1746
  * Throws if we don't have a media connection created
1674
1747
  *
@@ -1676,24 +1749,76 @@ export default class Meeting extends StatelessWebexPlugin {
1676
1749
  */
1677
1750
  private checkMediaConnection;
1678
1751
  /**
1679
- * Publishes specified local tracks in the meeting
1752
+ * Method to enable or disable the 'Music mode' effect on audio stream
1680
1753
  *
1681
- * @param {Object} tracks
1754
+ * @param {boolean} shouldEnableMusicMode
1682
1755
  * @returns {Promise}
1683
1756
  */
1684
- publishTracks(tracks: {
1685
- microphone?: MediaStreamTrack;
1686
- camera?: MediaStreamTrack;
1687
- screenShare: {
1688
- audio?: MediaStreamTrack;
1689
- video?: MediaStreamTrack;
1690
- };
1691
- }): Promise<void>;
1757
+ enableMusicMode(shouldEnableMusicMode: boolean): Promise<void>;
1758
+ /** Updates the tracks being sent on the transcoded media connection
1759
+ *
1760
+ * @returns {Promise<void>}
1761
+ */
1762
+ private updateTranscodedMediaConnection;
1763
+ /**
1764
+ * set sending named media group which the audio should send to
1765
+ * @param {MediaType} mediaType of the stream
1766
+ * @param {number} languageCode of the stream
1767
+ * @returns {void}
1768
+ */
1769
+ setSendNamedMediaGroup(mediaType: MediaType, languageCode?: number): void;
1692
1770
  /**
1693
- * Un-publishes specified local tracks in the meeting
1771
+ * Publishes a stream.
1694
1772
  *
1695
- * @param {Array<MediaStreamTrack>} tracks
1773
+ * @param {MediaType} mediaType of the stream
1774
+ * @param {LocalStream} stream to publish
1696
1775
  * @returns {Promise}
1697
1776
  */
1698
- unpublishTracks(tracks: MediaStreamTrack[]): Promise<void>;
1777
+ private publishStream;
1778
+ /**
1779
+ * Un-publishes a stream.
1780
+ *
1781
+ * @param {MediaType} mediaType of the stream
1782
+ * @param {LocalStream} stream to unpublish
1783
+ * @returns {Promise}
1784
+ */
1785
+ private unpublishStream;
1786
+ /**
1787
+ * Publishes specified local streams in the meeting
1788
+ *
1789
+ * @param {Object} streams
1790
+ * @returns {Promise}
1791
+ */
1792
+ publishStreams(streams: LocalStreams): Promise<void>;
1793
+ /**
1794
+ * Un-publishes specified local streams in the meeting
1795
+ *
1796
+ * @param {Array<LocalStream>} streams
1797
+ * @returns {Promise}
1798
+ */
1799
+ unpublishStreams(streams: LocalStream[]): Promise<void>;
1800
+ /**
1801
+ * Gets permission token expiry information including timeLeft, expiryTime, currentTime
1802
+ * (from the time the function has been fired)
1803
+ *
1804
+ * @returns {object} permissionTokenExpiryInfo
1805
+ * @returns {number} permissionTokenExpiryInfo.timeLeft The time left for token to expire
1806
+ * @returns {number} permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server
1807
+ * @returns {number} permissionTokenExpiryInfo.currentTime The current time of the local machine
1808
+ */
1809
+ getPermissionTokenExpiryInfo(): {
1810
+ timeLeft: number;
1811
+ expiryTime: number;
1812
+ currentTime: number;
1813
+ };
1814
+ /**
1815
+ * Check if there is enough time left till the permission token expires
1816
+ * If not - refresh the permission token
1817
+ *
1818
+ * @param {number} threshold - time in seconds
1819
+ * @param {string} reason - reason for refreshing the permission token
1820
+ * @returns {Promise<void>}
1821
+ */
1822
+ checkAndRefreshPermissionToken(threshold: number, reason: string): Promise<void>;
1699
1823
  }
1824
+ export {};