@webex/plugin-meetings 3.0.0-beta.26 → 3.0.0-beta.261

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 (361) 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 +114 -14
  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 +841 -19
  15. package/dist/breakouts/index.js.map +1 -1
  16. package/dist/breakouts/request.js +78 -0
  17. package/dist/breakouts/request.js.map +1 -0
  18. package/dist/breakouts/utils.js +67 -0
  19. package/dist/breakouts/utils.js.map +1 -0
  20. package/dist/common/errors/webex-errors.js +28 -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/queue.js +24 -9
  25. package/dist/common/queue.js.map +1 -1
  26. package/dist/config.js +5 -10
  27. package/dist/config.js.map +1 -1
  28. package/dist/constants.js +196 -28
  29. package/dist/constants.js.map +1 -1
  30. package/dist/controls-options-manager/enums.js +14 -2
  31. package/dist/controls-options-manager/enums.js.map +1 -1
  32. package/dist/controls-options-manager/index.js +109 -15
  33. package/dist/controls-options-manager/index.js.map +1 -1
  34. package/dist/controls-options-manager/types.js +7 -0
  35. package/dist/controls-options-manager/types.js.map +1 -0
  36. package/dist/controls-options-manager/util.js +309 -18
  37. package/dist/controls-options-manager/util.js.map +1 -1
  38. package/dist/index.js +112 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/interpretation/collection.js +23 -0
  41. package/dist/interpretation/collection.js.map +1 -0
  42. package/dist/interpretation/index.js +366 -0
  43. package/dist/interpretation/index.js.map +1 -0
  44. package/dist/interpretation/siLanguage.js +25 -0
  45. package/dist/interpretation/siLanguage.js.map +1 -0
  46. package/dist/locus-info/controlsUtils.js +91 -2
  47. package/dist/locus-info/controlsUtils.js.map +1 -1
  48. package/dist/locus-info/index.js +381 -62
  49. package/dist/locus-info/index.js.map +1 -1
  50. package/dist/locus-info/infoUtils.js +7 -1
  51. package/dist/locus-info/infoUtils.js.map +1 -1
  52. package/dist/locus-info/mediaSharesUtils.js +43 -1
  53. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  54. package/dist/locus-info/parser.js +224 -63
  55. package/dist/locus-info/parser.js.map +1 -1
  56. package/dist/locus-info/selfUtils.js +89 -14
  57. package/dist/locus-info/selfUtils.js.map +1 -1
  58. package/dist/media/index.js +58 -116
  59. package/dist/media/index.js.map +1 -1
  60. package/dist/media/properties.js +60 -121
  61. package/dist/media/properties.js.map +1 -1
  62. package/dist/meeting/in-meeting-actions.js +82 -2
  63. package/dist/meeting/in-meeting-actions.js.map +1 -1
  64. package/dist/meeting/index.js +3022 -2795
  65. package/dist/meeting/index.js.map +1 -1
  66. package/dist/meeting/locusMediaRequest.js +292 -0
  67. package/dist/meeting/locusMediaRequest.js.map +1 -0
  68. package/dist/meeting/muteState.js +230 -124
  69. package/dist/meeting/muteState.js.map +1 -1
  70. package/dist/meeting/request.js +256 -196
  71. package/dist/meeting/request.js.map +1 -1
  72. package/dist/meeting/util.js +601 -417
  73. package/dist/meeting/util.js.map +1 -1
  74. package/dist/meeting-info/index.js +70 -7
  75. package/dist/meeting-info/index.js.map +1 -1
  76. package/dist/meeting-info/meeting-info-v2.js +189 -51
  77. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  78. package/dist/meeting-info/util.js +1 -1
  79. package/dist/meeting-info/util.js.map +1 -1
  80. package/dist/meeting-info/utilv2.js +36 -36
  81. package/dist/meeting-info/utilv2.js.map +1 -1
  82. package/dist/meetings/collection.js +22 -0
  83. package/dist/meetings/collection.js.map +1 -1
  84. package/dist/meetings/index.js +372 -90
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +7 -0
  87. package/dist/meetings/meetings.types.js.map +1 -0
  88. package/dist/meetings/request.js +2 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +88 -1
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +49 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js +25 -0
  95. package/dist/member/types.js.map +1 -0
  96. package/dist/member/util.js +121 -25
  97. package/dist/member/util.js.map +1 -1
  98. package/dist/members/collection.js +10 -0
  99. package/dist/members/collection.js.map +1 -1
  100. package/dist/members/index.js +86 -5
  101. package/dist/members/index.js.map +1 -1
  102. package/dist/members/request.js +106 -38
  103. package/dist/members/request.js.map +1 -1
  104. package/dist/members/types.js +15 -0
  105. package/dist/members/types.js.map +1 -0
  106. package/dist/members/util.js +316 -233
  107. package/dist/members/util.js.map +1 -1
  108. package/dist/metrics/constants.js +10 -5
  109. package/dist/metrics/constants.js.map +1 -1
  110. package/dist/metrics/index.js +1 -468
  111. package/dist/metrics/index.js.map +1 -1
  112. package/dist/multistream/mediaRequestManager.js +238 -49
  113. package/dist/multistream/mediaRequestManager.js.map +1 -1
  114. package/dist/multistream/receiveSlot.js +49 -16
  115. package/dist/multistream/receiveSlot.js.map +1 -1
  116. package/dist/multistream/receiveSlotManager.js +52 -34
  117. package/dist/multistream/receiveSlotManager.js.map +1 -1
  118. package/dist/multistream/remoteMedia.js +44 -18
  119. package/dist/multistream/remoteMedia.js.map +1 -1
  120. package/dist/multistream/remoteMediaGroup.js +60 -3
  121. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  122. package/dist/multistream/remoteMediaManager.js +209 -59
  123. package/dist/multistream/remoteMediaManager.js.map +1 -1
  124. package/dist/multistream/sendSlotManager.js +233 -0
  125. package/dist/multistream/sendSlotManager.js.map +1 -0
  126. package/dist/reachability/index.js +161 -57
  127. package/dist/reachability/index.js.map +1 -1
  128. package/dist/reachability/request.js +17 -8
  129. package/dist/reachability/request.js.map +1 -1
  130. package/dist/reconnection-manager/index.js +199 -154
  131. package/dist/reconnection-manager/index.js.map +1 -1
  132. package/dist/recording-controller/index.js +21 -2
  133. package/dist/recording-controller/index.js.map +1 -1
  134. package/dist/recording-controller/util.js +9 -8
  135. package/dist/recording-controller/util.js.map +1 -1
  136. package/dist/roap/index.js +23 -29
  137. package/dist/roap/index.js.map +1 -1
  138. package/dist/roap/request.js +112 -97
  139. package/dist/roap/request.js.map +1 -1
  140. package/dist/roap/turnDiscovery.js +96 -36
  141. package/dist/roap/turnDiscovery.js.map +1 -1
  142. package/dist/rtcMetrics/constants.js +12 -0
  143. package/dist/rtcMetrics/constants.js.map +1 -0
  144. package/dist/rtcMetrics/index.js +117 -0
  145. package/dist/rtcMetrics/index.js.map +1 -0
  146. package/dist/statsAnalyzer/index.js +51 -34
  147. package/dist/statsAnalyzer/index.js.map +1 -1
  148. package/dist/statsAnalyzer/mqaUtil.js +6 -6
  149. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  150. package/dist/types/annotation/annotation.types.d.ts +42 -0
  151. package/dist/types/annotation/constants.d.ts +31 -0
  152. package/dist/types/annotation/index.d.ts +117 -0
  153. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  154. package/dist/types/breakouts/events.d.ts +8 -0
  155. package/dist/types/breakouts/request.d.ts +22 -0
  156. package/dist/types/breakouts/utils.d.ts +15 -0
  157. package/dist/types/common/errors/webex-errors.d.ts +13 -1
  158. package/dist/types/common/queue.d.ts +9 -7
  159. package/dist/types/config.d.ts +1 -6
  160. package/dist/types/constants.d.ts +155 -21
  161. package/dist/types/controls-options-manager/enums.d.ts +11 -1
  162. package/dist/types/controls-options-manager/index.d.ts +17 -1
  163. package/dist/types/controls-options-manager/types.d.ts +43 -0
  164. package/dist/types/controls-options-manager/util.d.ts +1 -7
  165. package/dist/types/index.d.ts +6 -4
  166. package/dist/types/interpretation/collection.d.ts +5 -0
  167. package/dist/types/interpretation/index.d.ts +5 -0
  168. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  169. package/dist/types/locus-info/index.d.ts +57 -4
  170. package/dist/types/locus-info/parser.d.ts +65 -6
  171. package/dist/types/media/index.d.ts +2 -0
  172. package/dist/types/media/properties.d.ts +34 -48
  173. package/dist/types/meeting/in-meeting-actions.d.ts +82 -2
  174. package/dist/types/meeting/index.d.ts +344 -506
  175. package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
  176. package/dist/types/meeting/muteState.d.ts +99 -23
  177. package/dist/types/meeting/request.d.ts +72 -43
  178. package/dist/types/meeting/util.d.ts +101 -1
  179. package/dist/types/meeting-info/index.d.ts +13 -1
  180. package/dist/types/meeting-info/meeting-info-v2.d.ts +31 -1
  181. package/dist/types/meetings/collection.d.ts +8 -0
  182. package/dist/types/meetings/index.d.ts +86 -12
  183. package/dist/types/meetings/meetings.types.d.ts +4 -0
  184. package/dist/types/member/index.d.ts +13 -0
  185. package/dist/types/member/types.d.ts +32 -0
  186. package/dist/types/members/collection.d.ts +5 -0
  187. package/dist/types/members/index.d.ts +35 -2
  188. package/dist/types/members/request.d.ts +73 -9
  189. package/dist/types/members/types.d.ts +24 -0
  190. package/dist/types/members/util.d.ts +209 -1
  191. package/dist/types/metrics/constants.d.ts +9 -4
  192. package/dist/types/metrics/index.d.ts +4 -119
  193. package/dist/types/multistream/mediaRequestManager.d.ts +73 -5
  194. package/dist/types/multistream/receiveSlot.d.ts +16 -12
  195. package/dist/types/multistream/receiveSlotManager.d.ts +19 -4
  196. package/dist/types/multistream/remoteMedia.d.ts +8 -29
  197. package/dist/types/multistream/remoteMediaGroup.d.ts +0 -9
  198. package/dist/types/multistream/remoteMediaManager.d.ts +46 -2
  199. package/dist/types/multistream/sendSlotManager.d.ts +61 -0
  200. package/dist/types/reachability/index.d.ts +44 -7
  201. package/dist/types/reachability/request.d.ts +7 -3
  202. package/dist/types/reconnection-manager/index.d.ts +9 -0
  203. package/dist/types/recording-controller/index.d.ts +15 -1
  204. package/dist/types/recording-controller/util.d.ts +5 -4
  205. package/dist/types/roap/request.d.ts +15 -11
  206. package/dist/types/roap/turnDiscovery.d.ts +18 -1
  207. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  208. package/dist/types/rtcMetrics/index.d.ts +47 -0
  209. package/dist/types/statsAnalyzer/index.d.ts +6 -1
  210. package/package.json +23 -20
  211. package/src/annotation/annotation.types.ts +50 -0
  212. package/src/annotation/constants.ts +36 -0
  213. package/src/annotation/index.ts +328 -0
  214. package/src/breakouts/README.md +44 -14
  215. package/src/breakouts/breakout.ts +87 -9
  216. package/src/breakouts/edit-lock-error.ts +25 -0
  217. package/src/breakouts/events.ts +56 -0
  218. package/src/breakouts/index.ts +710 -10
  219. package/src/breakouts/request.ts +55 -0
  220. package/src/breakouts/utils.ts +57 -0
  221. package/src/common/errors/webex-errors.ts +27 -2
  222. package/src/common/logs/logger-proxy.ts +1 -1
  223. package/src/common/queue.ts +22 -8
  224. package/src/config.ts +4 -9
  225. package/src/constants.ts +178 -18
  226. package/src/controls-options-manager/enums.ts +12 -0
  227. package/src/controls-options-manager/index.ts +116 -21
  228. package/src/controls-options-manager/types.ts +59 -0
  229. package/src/controls-options-manager/util.ts +294 -14
  230. package/src/index.ts +40 -0
  231. package/src/interpretation/README.md +60 -0
  232. package/src/interpretation/collection.ts +19 -0
  233. package/src/interpretation/index.ts +332 -0
  234. package/src/interpretation/siLanguage.ts +18 -0
  235. package/src/locus-info/controlsUtils.ts +108 -0
  236. package/src/locus-info/index.ts +412 -59
  237. package/src/locus-info/infoUtils.ts +10 -2
  238. package/src/locus-info/mediaSharesUtils.ts +48 -0
  239. package/src/locus-info/parser.ts +231 -39
  240. package/src/locus-info/selfUtils.ts +81 -5
  241. package/src/media/index.ts +100 -122
  242. package/src/media/properties.ts +70 -108
  243. package/src/meeting/in-meeting-actions.ts +163 -3
  244. package/src/meeting/index.ts +2471 -2306
  245. package/src/meeting/locusMediaRequest.ts +313 -0
  246. package/src/meeting/muteState.ts +229 -131
  247. package/src/meeting/request.ts +172 -121
  248. package/src/meeting/util.ts +588 -394
  249. package/src/meeting-info/index.ts +79 -8
  250. package/src/meeting-info/meeting-info-v2.ts +168 -14
  251. package/src/meeting-info/util.ts +1 -1
  252. package/src/meeting-info/utilv2.ts +23 -23
  253. package/src/meetings/collection.ts +20 -0
  254. package/src/meetings/index.ts +414 -108
  255. package/src/meetings/meetings.types.ts +12 -0
  256. package/src/meetings/request.ts +2 -0
  257. package/src/meetings/util.ts +103 -4
  258. package/src/member/index.ts +49 -0
  259. package/src/member/types.ts +38 -0
  260. package/src/member/util.ts +127 -25
  261. package/src/members/collection.ts +8 -0
  262. package/src/members/index.ts +107 -6
  263. package/src/members/request.ts +97 -17
  264. package/src/members/types.ts +28 -0
  265. package/src/members/util.ts +319 -240
  266. package/src/metrics/constants.ts +9 -4
  267. package/src/metrics/index.ts +1 -490
  268. package/src/multistream/mediaRequestManager.ts +289 -79
  269. package/src/multistream/receiveSlot.ts +55 -18
  270. package/src/multistream/receiveSlotManager.ts +46 -24
  271. package/src/multistream/remoteMedia.ts +27 -2
  272. package/src/multistream/remoteMediaGroup.ts +59 -0
  273. package/src/multistream/remoteMediaManager.ts +148 -30
  274. package/src/multistream/sendSlotManager.ts +170 -0
  275. package/src/reachability/index.ts +165 -37
  276. package/src/reachability/request.ts +17 -8
  277. package/src/reconnection-manager/index.ts +81 -54
  278. package/src/recording-controller/index.ts +20 -3
  279. package/src/recording-controller/util.ts +26 -9
  280. package/src/roap/index.ts +23 -30
  281. package/src/roap/request.ts +100 -104
  282. package/src/roap/turnDiscovery.ts +51 -25
  283. package/src/rtcMetrics/constants.ts +3 -0
  284. package/src/rtcMetrics/index.ts +100 -0
  285. package/src/statsAnalyzer/index.ts +73 -35
  286. package/src/statsAnalyzer/mqaUtil.ts +8 -10
  287. package/test/integration/spec/converged-space-meetings.js +233 -0
  288. package/test/integration/spec/journey.js +320 -261
  289. package/test/integration/spec/space-meeting.js +76 -3
  290. package/test/unit/spec/annotation/index.ts +418 -0
  291. package/test/unit/spec/breakouts/breakout.ts +142 -24
  292. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  293. package/test/unit/spec/breakouts/events.ts +89 -0
  294. package/test/unit/spec/breakouts/index.ts +1545 -48
  295. package/test/unit/spec/breakouts/request.ts +104 -0
  296. package/test/unit/spec/breakouts/utils.js +72 -0
  297. package/test/unit/spec/common/queue.js +31 -2
  298. package/test/unit/spec/controls-options-manager/index.js +163 -0
  299. package/test/unit/spec/controls-options-manager/util.js +576 -60
  300. package/test/unit/spec/fixture/locus.js +1 -0
  301. package/test/unit/spec/interpretation/collection.ts +15 -0
  302. package/test/unit/spec/interpretation/index.ts +589 -0
  303. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  304. package/test/unit/spec/locus-info/controlsUtils.js +316 -43
  305. package/test/unit/spec/locus-info/index.js +1283 -33
  306. package/test/unit/spec/locus-info/infoUtils.js +37 -15
  307. package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
  308. package/test/unit/spec/locus-info/parser.js +62 -22
  309. package/test/unit/spec/locus-info/selfConstant.js +27 -4
  310. package/test/unit/spec/locus-info/selfUtils.js +208 -17
  311. package/test/unit/spec/media/index.ts +104 -37
  312. package/test/unit/spec/meeting/in-meeting-actions.ts +81 -3
  313. package/test/unit/spec/meeting/index.js +4095 -1913
  314. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  315. package/test/unit/spec/meeting/muteState.js +408 -208
  316. package/test/unit/spec/meeting/request.js +440 -45
  317. package/test/unit/spec/meeting/utils.js +679 -64
  318. package/test/unit/spec/meeting-info/index.js +293 -0
  319. package/test/unit/spec/meeting-info/meetinginfov2.js +517 -5
  320. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  321. package/test/unit/spec/meetings/collection.js +14 -0
  322. package/test/unit/spec/meetings/index.js +941 -151
  323. package/test/unit/spec/meetings/utils.js +206 -2
  324. package/test/unit/spec/member/index.js +58 -4
  325. package/test/unit/spec/member/util.js +479 -35
  326. package/test/unit/spec/members/index.js +319 -1
  327. package/test/unit/spec/members/request.js +206 -27
  328. package/test/unit/spec/members/utils.js +184 -0
  329. package/test/unit/spec/metrics/index.js +1 -50
  330. package/test/unit/spec/multistream/mediaRequestManager.ts +803 -162
  331. package/test/unit/spec/multistream/receiveSlot.ts +72 -13
  332. package/test/unit/spec/multistream/receiveSlotManager.ts +58 -28
  333. package/test/unit/spec/multistream/remoteMedia.ts +30 -0
  334. package/test/unit/spec/multistream/remoteMediaGroup.ts +266 -0
  335. package/test/unit/spec/multistream/remoteMediaManager.ts +326 -0
  336. package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
  337. package/test/unit/spec/reachability/index.ts +343 -9
  338. package/test/unit/spec/reachability/request.js +68 -0
  339. package/test/unit/spec/reconnection-manager/index.js +84 -9
  340. package/test/unit/spec/recording-controller/index.js +294 -218
  341. package/test/unit/spec/recording-controller/util.js +223 -96
  342. package/test/unit/spec/roap/index.ts +31 -51
  343. package/test/unit/spec/roap/request.ts +203 -85
  344. package/test/unit/spec/roap/turnDiscovery.ts +48 -13
  345. package/test/unit/spec/rtcMetrics/index.ts +68 -0
  346. package/test/unit/spec/stats-analyzer/index.js +29 -2
  347. package/test/utils/constants.js +9 -0
  348. package/test/utils/integrationTestUtils.js +46 -0
  349. package/test/utils/testUtils.js +0 -45
  350. package/test/utils/webex-config.js +4 -0
  351. package/test/utils/webex-test-users.js +6 -3
  352. package/dist/meeting/effectsState.js +0 -262
  353. package/dist/meeting/effectsState.js.map +0 -1
  354. package/dist/metrics/config.js +0 -299
  355. package/dist/metrics/config.js.map +0 -1
  356. package/dist/types/meeting/effectsState.d.ts +0 -42
  357. package/dist/types/metrics/config.d.ts +0 -178
  358. package/src/index.js +0 -16
  359. package/src/meeting/effectsState.ts +0 -211
  360. package/src/metrics/config.ts +0 -495
  361. package/test/unit/spec/meeting/effectsState.js +0 -285
@@ -1,8 +1,11 @@
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';
@@ -10,18 +13,40 @@ import Members from '../members/index';
10
13
  import Transcription from '../transcription';
11
14
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
12
15
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
13
- import { RemoteMediaManager } from '../multistream/remoteMediaManager';
16
+ import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager';
14
17
  import { ReactionServerType, SkinToneType } from '../reactions/reactions.type';
15
18
  import InMeetingActions from './in-meeting-actions';
16
19
  import RecordingController from '../recording-controller';
17
20
  import ControlsOptionsManager from '../controls-options-manager';
21
+ import { LocusMediaRequest } from './locusMediaRequest';
22
+ export type LocalStreams = {
23
+ microphone?: LocalMicrophoneStream;
24
+ camera?: LocalCameraStream;
25
+ screenShare?: {
26
+ audio?: LocalSystemAudioStream;
27
+ video?: LocalDisplayStream;
28
+ };
29
+ };
30
+ export type AddMediaOptions = {
31
+ localStreams?: LocalStreams;
32
+ audioEnabled?: boolean;
33
+ videoEnabled?: boolean;
34
+ shareAudioEnabled?: boolean;
35
+ shareVideoEnabled?: boolean;
36
+ remoteMediaManagerConfig?: RemoteMediaManagerConfiguration;
37
+ bundlePolicy?: BundlePolicy;
38
+ allowMediaInLobby?: boolean;
39
+ };
18
40
  export declare const MEDIA_UPDATE_TYPE: {
19
- ALL: string;
20
- AUDIO: string;
21
- VIDEO: string;
22
- SHARE: string;
23
- LAMBDA: string;
41
+ TRANSCODED_MEDIA_CONNECTION: string;
42
+ SHARE_FLOOR_REQUEST: string;
43
+ UPDATE_MEDIA: string;
24
44
  };
45
+ export declare enum ScreenShareFloorStatus {
46
+ PENDING = "floor_request_pending",
47
+ GRANTED = "floor_request_granted",
48
+ RELEASED = "floor_released"
49
+ }
25
50
  /**
26
51
  * MediaDirection
27
52
  * @typedef {Object} MediaDirection
@@ -33,15 +58,6 @@ export declare const MEDIA_UPDATE_TYPE: {
33
58
  * @property {boolean} receiveShare
34
59
  * @property {boolean} isSharing
35
60
  */
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
61
  /**
46
62
  * SharePreferences
47
63
  * @typedef {Object} SharePreferences
@@ -55,18 +71,10 @@ export declare const MEDIA_UPDATE_TYPE: {
55
71
  * @property {String} [pin]
56
72
  * @property {Boolean} [moderator]
57
73
  * @property {String|Object} [meetingQuality]
58
- * @property {String} [meetingQuality.local]
59
74
  * @property {String} [meetingQuality.remote]
60
75
  * @property {Boolean} [rejoin]
61
76
  * @property {Boolean} [enableMultistream]
62
77
  */
63
- /**
64
- * SendOptions
65
- * @typedef {Object} SendOptions
66
- * @property {Boolean} sendAudio
67
- * @property {Boolean} sendVideo
68
- * @property {Boolean} sendShare
69
- */
70
78
  /**
71
79
  * Recording
72
80
  * @typedef {Object} Recording
@@ -148,7 +156,11 @@ export declare const MEDIA_UPDATE_TYPE: {
148
156
  * @instance
149
157
  * @type {Object}
150
158
  * @property {Boolean} memberId id of the meeting member that started screen share
159
+ * @property {String} url of this content share
160
+ * @property {String} shareInstanceId of this content share
161
+ * @property {Object} annotation Info of this content share
151
162
  * @memberof Meeting
163
+ *
152
164
  */
153
165
  /**
154
166
  * Meeting Stopped Sharing Remote Event
@@ -285,12 +297,13 @@ export default class Meeting extends StatelessWebexPlugin {
285
297
  attrs: any;
286
298
  audio: any;
287
299
  breakouts: any;
300
+ simultaneousInterpretation: any;
301
+ annotation: any;
288
302
  conversationUrl: string;
289
303
  correlationId: string;
290
304
  destination: string;
291
305
  destinationType: string;
292
306
  deviceUrl: string;
293
- effects: any;
294
307
  hostId: string;
295
308
  id: string;
296
309
  isMultistream: boolean;
@@ -298,7 +311,7 @@ export default class Meeting extends StatelessWebexPlugin {
298
311
  mediaConnections: any[];
299
312
  mediaId?: string;
300
313
  meetingFiniteStateMachine: any;
301
- meetingInfo: object;
314
+ meetingInfo: any;
302
315
  meetingRequest: MeetingRequest;
303
316
  members: Members;
304
317
  options: object;
@@ -310,11 +323,13 @@ export default class Meeting extends StatelessWebexPlugin {
310
323
  resource: string;
311
324
  roap: Roap;
312
325
  roapSeq: number;
326
+ selfUrl?: string;
313
327
  sipUri: string;
314
328
  type: string;
315
329
  userId: string;
316
330
  video: any;
317
331
  callEvents: any[];
332
+ datachannelUrl: string;
318
333
  deferJoin: Promise<any>;
319
334
  dialInDeviceStatus: string;
320
335
  dialInUrl: string;
@@ -327,10 +342,10 @@ export default class Meeting extends StatelessWebexPlugin {
327
342
  inMeetingActions: InMeetingActions;
328
343
  isLocalShareLive: boolean;
329
344
  isRoapInProgress: boolean;
330
- isSharing: boolean;
331
345
  keepAliveTimerId: NodeJS.Timeout;
332
346
  lastVideoLayoutInfo: any;
333
347
  locusInfo: any;
348
+ locusMediaRequest?: LocusMediaRequest;
334
349
  mediaProperties: MediaProperties;
335
350
  mediaRequestManagers: {
336
351
  audio: MediaRequestManager;
@@ -339,6 +354,8 @@ export default class Meeting extends StatelessWebexPlugin {
339
354
  screenShareVideo: MediaRequestManager;
340
355
  };
341
356
  meetingInfoFailureReason: string;
357
+ meetingInfoFailureCode?: number;
358
+ meetingInfoExtraParams?: Record<string, any>;
342
359
  networkQualityMonitor: NetworkQualityMonitor;
343
360
  networkStatus: string;
344
361
  passwordStatus: string;
@@ -349,16 +366,19 @@ export default class Meeting extends StatelessWebexPlugin {
349
366
  controlsOptionsManager: ControlsOptionsManager;
350
367
  requiredCaptcha: any;
351
368
  receiveSlotManager: ReceiveSlotManager;
369
+ selfUserPolicies: any;
352
370
  shareStatus: string;
371
+ screenShareFloorState: ScreenShareFloorStatus;
353
372
  statsAnalyzer: StatsAnalyzer;
354
373
  transcription: Transcription;
355
374
  updateMediaConnections: (mediaConnections: any[]) => void;
356
- endCallInitiateJoinReq: any;
375
+ userDisplayHints: any;
376
+ endCallInitJoinReq: any;
357
377
  endJoinReqResp: any;
358
378
  endLocalSDPGenRemoteSDPRecvDelay: any;
359
379
  joinedWith: any;
360
380
  locusId: any;
361
- startCallInitiateJoinReq: any;
381
+ startCallInitJoinReq: any;
362
382
  startJoinReqResp: any;
363
383
  startLocalSDPGenRemoteSDPRecvDelay: any;
364
384
  wirelessShare: any;
@@ -366,12 +386,20 @@ export default class Meeting extends StatelessWebexPlugin {
366
386
  meetingJoinUrl: any;
367
387
  meetingNumber: any;
368
388
  meetingState: any;
369
- permissionToken: any;
389
+ permissionToken: string;
390
+ permissionTokenPayload: any;
370
391
  resourceId: any;
371
392
  resourceUrl: string;
372
393
  selfId: string;
373
394
  state: any;
395
+ localAudioStreamMuteStateHandler: (muted: boolean) => void;
396
+ localVideoStreamMuteStateHandler: (muted: boolean) => void;
397
+ localOutputTrackChangeHandler: () => void;
398
+ roles: any[];
399
+ environment: string;
374
400
  namespace: string;
401
+ allowMediaInLobby: boolean;
402
+ private sendSlotManager;
375
403
  /**
376
404
  * @param {Object} attrs
377
405
  * @param {Object} options
@@ -379,29 +407,58 @@ export default class Meeting extends StatelessWebexPlugin {
379
407
  * @memberof Meeting
380
408
  */
381
409
  constructor(attrs: any, options: object);
410
+ /**
411
+ * returns meeting is joined
412
+ * @private
413
+ * @memberof Meeting
414
+ * @returns {Boolean}
415
+ */
416
+ private isJoined;
417
+ /**
418
+ * Returns whether this meeting is a Locus CALL
419
+ * @returns {Boolean}
420
+ */
421
+ isLocusCall(): boolean;
422
+ /**
423
+ * Internal method for fetching meeting info
424
+ *
425
+ * @returns {Promise}
426
+ */
427
+ private fetchMeetingInfoInternal;
428
+ /**
429
+ * Refreshes the meeting info permission token (it's required for joining meetings)
430
+ *
431
+ * @param {string} [reason] used for metrics and logging purposes (optional)
432
+ * @returns {Promise}
433
+ */
434
+ refreshPermissionToken(reason?: string): Promise<void>;
382
435
  /**
383
436
  * Fetches meeting information.
384
437
  * @param {Object} options
385
438
  * @param {String} [options.password] optional
386
439
  * @param {String} [options.captchaCode] optional
440
+ * @param {Boolean} [options.sendCAevents] optional - Whether to submit Call Analyzer events or not. Default: false.
387
441
  * @public
388
442
  * @memberof Meeting
389
443
  * @returns {Promise}
390
444
  */
391
- fetchMeetingInfo({ password, captchaCode, }: {
445
+ fetchMeetingInfo({ password, captchaCode, extraParams, sendCAevents, }: {
392
446
  password?: string;
393
447
  captchaCode?: string;
448
+ extraParams?: Record<string, any>;
449
+ sendCAevents?: boolean;
394
450
  }): Promise<void>;
395
451
  /**
396
452
  * Checks if the supplied password/host key is correct. It returns a promise with information whether the
397
453
  * password and captcha code were correct or not.
398
454
  * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required
399
455
  * @param {String} captchaCode - can be undefined if captcha was not required by the server
456
+ * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information
400
457
  * @public
401
458
  * @memberof Meeting
402
459
  * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
403
460
  */
404
- verifyPassword(password: string, captchaCode: string): Promise<{
461
+ verifyPassword(password: string, captchaCode: string, sendCAevents?: boolean): Promise<{
405
462
  isPasswordValid: boolean;
406
463
  requiredCaptcha: any;
407
464
  failureReason: string;
@@ -418,6 +475,14 @@ export default class Meeting extends StatelessWebexPlugin {
418
475
  * @returns {Promise}
419
476
  */
420
477
  refreshCaptcha(): any;
478
+ /**
479
+ * Posts metrics event for this meeting. Allows the app to send Call Analyzer events.
480
+ * @param {String} eventName - Call Analyzer event
481
+ * @public
482
+ * @memberof Meeting
483
+ * @returns {Promise}
484
+ */
485
+ postMetrics(eventName: ClientEvent['name']): void;
421
486
  /**
422
487
  * Proxy function for all the listener set ups
423
488
  * @returns {undefined}
@@ -432,6 +497,13 @@ export default class Meeting extends StatelessWebexPlugin {
432
497
  * @memberof Meeting
433
498
  */
434
499
  setUpBreakoutsListener(): void;
500
+ /**
501
+ * Set up the listeners for interpretation
502
+ * @returns {undefined}
503
+ * @private
504
+ * @memberof Meeting
505
+ */
506
+ private setUpInterpretationListener;
435
507
  /**
436
508
  * Set up the locus info listener for meetings disconnected due to inactivity
437
509
  * @returns {undefined}
@@ -453,47 +525,6 @@ export default class Meeting extends StatelessWebexPlugin {
453
525
  * @memberof Meeting
454
526
  */
455
527
  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
528
  /**
498
529
  * sets the network status on meeting object
499
530
  * @param {String} networkStatus
@@ -556,6 +587,13 @@ export default class Meeting extends StatelessWebexPlugin {
556
587
  * @memberof Meeting
557
588
  */
558
589
  private setupLocusControlsListener;
590
+ /**
591
+ * Trigger annotation info update event
592
+ @returns {undefined}
593
+ @param {object} contentShare
594
+ @param {object} previousContentShare
595
+ */
596
+ private triggerAnnotationInfoEvent;
559
597
  /**
560
598
  * Set up the locus info media shares listener
561
599
  * update content and whiteboard sharing id value for members, and updates the member
@@ -654,13 +692,23 @@ export default class Meeting extends StatelessWebexPlugin {
654
692
  phoneNumber: string;
655
693
  }): any;
656
694
  /**
657
- * Admit the guest(s) to the call once they are waiting
695
+ * Admit the guest(s) to the call once they are waiting.
696
+ * If the host/cohost is in a breakout session, the locus url
697
+ * of the session must be provided as the authorizingLocusUrl.
698
+ * Regardless of host/cohost location, the locus Id (lid) in
699
+ * the path should be the locus Id of the main, which means the
700
+ * locus url of the api call must be from the main session.
701
+ * If these loucs urls are not provided, the function will do the check.
658
702
  * @param {Array} memberIds
703
+ * @param {Object} sessionLocusUrls: {authorizingLocusUrl, mainLocusUrl}
659
704
  * @returns {Promise} see #members.admitMembers
660
705
  * @public
661
706
  * @memberof Meeting
662
707
  */
663
- admit(memberIds: Array<any>): any;
708
+ admit(memberIds: Array<any>, sessionLocusUrls?: {
709
+ authorizingLocusUrl: string;
710
+ mainLocusUrl: string;
711
+ }): any;
664
712
  /**
665
713
  * Remove the member from the meeting, boot them
666
714
  * @param {String} memberId
@@ -694,48 +742,6 @@ export default class Meeting extends StatelessWebexPlugin {
694
742
  * @memberof Meeting
695
743
  */
696
744
  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
745
  /**
740
746
  * Sets the meeting info on the class instance
741
747
  * @param {Object} meetingInfo
@@ -758,16 +764,29 @@ export default class Meeting extends StatelessWebexPlugin {
758
764
  };
759
765
  } | any, destination?: object | string | null): void;
760
766
  /**
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
767
+ * Indicates whether policy can be applied
768
+ * @returns {boolean}
769
+ */
770
+ private arePolicyRestrictionsSupported;
771
+ /**
772
+ * Updates the meeting actions (display hints), depends on locus display hints, user policy and app api info
766
773
  * @returns {undefined}
767
774
  * @private
768
775
  * @memberof Meeting
769
776
  */
770
- private parseLocus;
777
+ private updateMeetingActions;
778
+ /**
779
+ * Sets the self user policies based on the contents of the permission token
780
+ * @returns {void}
781
+ */
782
+ setSelfUserPolicies(): void;
783
+ /**
784
+ * Sets the permission token payload on the class instance
785
+ *
786
+ * @param {String} permissionToken
787
+ * @returns {void}
788
+ */
789
+ setPermissionTokenPayload(permissionToken: string): void;
771
790
  /**
772
791
  * Sets the sip uri on the class instance
773
792
  * uses meeting info as precedence
@@ -790,7 +809,13 @@ export default class Meeting extends StatelessWebexPlugin {
790
809
  * @private
791
810
  * @memberof Meeting
792
811
  */
793
- private setLocus;
812
+ setLocus(locus: {
813
+ mediaConnections: Array<any>;
814
+ locusUrl: string;
815
+ locusId: string;
816
+ mediaId: string;
817
+ host: object;
818
+ } | any): void;
794
819
  /**
795
820
  * Upload logs for the current meeting
796
821
  * @param {object} options file name and function name
@@ -800,19 +825,10 @@ export default class Meeting extends StatelessWebexPlugin {
800
825
  */
801
826
  uploadLogs(options?: object): void;
802
827
  /**
803
- * Removes remote audio and video stream on the class instance and triggers an event
804
- * to developers
828
+ * Removes remote audio, video and share streams from class instance's mediaProperties
805
829
  * @returns {undefined}
806
- * @public
807
- * @memberof Meeting
808
- * @deprecated after v1.89.3
809
830
  */
810
- unsetRemoteStream(): void;
811
- /**
812
- * Removes remote audio, video and share tracks from class instance's mediaProperties
813
- * @returns {undefined}
814
- */
815
- unsetRemoteTracks(): void;
831
+ unsetRemoteStreams(): void;
816
832
  /**
817
833
  * Removes the remote stream on the class instance and triggers an event
818
834
  * to developers
@@ -823,83 +839,45 @@ export default class Meeting extends StatelessWebexPlugin {
823
839
  */
824
840
  closeRemoteStream(): void;
825
841
  /**
826
- * Removes the remote tracks on the class instance and triggers an event
842
+ * Removes the remote streams on the class instance and triggers an event
827
843
  * to developers
828
844
  * @returns {undefined}
829
845
  * @memberof Meeting
830
846
  */
831
- closeRemoteTracks(): Promise<[any, any, any]>;
832
- /**
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;
847
+ closeRemoteStreams(): Promise<[any, any, any, any]>;
839
848
  /**
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
849
+ * Stores the reference to a new microphone stream, sets up the required event listeners
850
+ * on it, cleans up previous stream, etc.
851
+ *
852
+ * @param {LocalMicrophoneStream | null} localStream local microphone stream
853
+ * @returns {Promise<void>}
879
854
  */
880
- closeLocalStream(): any;
855
+ private setLocalAudioStream;
881
856
  /**
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
857
+ * Stores the reference to a new camera stream, sets up the required event listeners
858
+ * on it, cleans up previous stream, etc.
859
+ *
860
+ * @param {LocalCameraStream | null} localStream local camera stream
861
+ * @returns {Promise<void>}
887
862
  */
888
- closeLocalShare(): any;
863
+ private setLocalVideoStream;
889
864
  /**
890
- * Removes the local stream from the class and emits an event to the developer
891
- * @returns {undefined}
892
- * @public
893
- * @memberof Meeting
865
+ * Stores the reference to a new screen share stream, sets up the required event listeners
866
+ * on it, cleans up previous stream, etc.
867
+ * It also sends the floor grant/release request.
868
+ *
869
+ * @param {LocalDisplayStream | undefined} localDisplayStream local display stream
870
+ * @returns {Promise<void>}
894
871
  */
895
- unsetLocalVideoTrack(): void;
872
+ private setLocalShareVideoStream;
896
873
  /**
897
- * Removes the local share from the class and emits an event to the developer
898
- * @returns {undefined}
899
- * @public
900
- * @memberof Meeting
874
+ * Stores the reference to a new screen share audio stream, sets up the required event listeners
875
+ * on it, cleans up previous stream, etc.
876
+ *
877
+ * @param {LocalSystemAudioStream | undefined} localSystemAudioStream local system audio stream
878
+ * @returns {Promise<void>}
901
879
  */
902
- unsetLocalShareTrack(): void;
880
+ private setLocalShareAudioStream;
903
881
  /**
904
882
  * sets up listner for mercury event
905
883
  * @returns {undefined}
@@ -932,6 +910,13 @@ export default class Meeting extends StatelessWebexPlugin {
932
910
  * @memberof Meeting
933
911
  */
934
912
  private setCorrelationId;
913
+ /**
914
+ * Enqueue request for screenshare floor and set the status to pending
915
+ * @returns {Promise}
916
+ * @private
917
+ * @memberof Meeting
918
+ */
919
+ private enqueueScreenShareFloorRequest;
935
920
  /**
936
921
  * Mute the audio for a meeting
937
922
  * @returns {Promise} resolves the data from muting audio {mute, self} or rejects if there is no audio set
@@ -964,32 +949,25 @@ export default class Meeting extends StatelessWebexPlugin {
964
949
  * Shorthand function to join AND set up media
965
950
  * @param {Object} options - options to join with media
966
951
  * @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()}
952
+ * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia()
953
+ * @returns {Promise} -- {join: see join(), media: see addMedia()}
970
954
  * @public
971
955
  * @memberof Meeting
972
956
  * @example
973
957
  * joinWithMedia({
974
958
  * 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
- * }})
959
+ * mediaOptions: {
960
+ * localStreams: { microphone: microphoneStream, camera: cameraStream }
961
+ * }
962
+ * })
987
963
  */
988
964
  joinWithMedia(options?: {
989
965
  joinOptions?: any;
990
- mediaSettings: any;
991
- audioVideoOptions?: any;
992
- }): any;
966
+ mediaOptions?: AddMediaOptions;
967
+ }): Promise<{
968
+ join: any;
969
+ media: any;
970
+ }>;
993
971
  /**
994
972
  * Initiates the reconnection of the media in the meeting
995
973
  *
@@ -1054,7 +1032,7 @@ export default class Meeting extends StatelessWebexPlugin {
1054
1032
  * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop
1055
1033
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
1056
1034
  */
1057
- join(options?: any): any;
1035
+ join(options?: any): Promise<any>;
1058
1036
  /**
1059
1037
  * Connects to low latency mercury and reconnects if the address has changed
1060
1038
  * It will also disconnect if called when the meeting has ended
@@ -1069,7 +1047,7 @@ export default class Meeting extends StatelessWebexPlugin {
1069
1047
  * @public
1070
1048
  * @memberof Meeting
1071
1049
  */
1072
- usePhoneAudio(phoneNumber: string): any;
1050
+ usePhoneAudio(phoneNumber: string): Promise<any>;
1073
1051
  /**
1074
1052
  * Determines if the given pstnStatus is in a state which implies the phone is provisioned
1075
1053
  * @param {String} pstnStatus
@@ -1117,38 +1095,6 @@ export default class Meeting extends StatelessWebexPlugin {
1117
1095
  * @memberof Meeting
1118
1096
  */
1119
1097
  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
1098
  /**
1153
1099
  * Handles ROAP_FAILURE event from the webrtc media connection
1154
1100
  *
@@ -1165,7 +1111,15 @@ export default class Meeting extends StatelessWebexPlugin {
1165
1111
  */
1166
1112
  setupStatsAnalyzerEventHandlers: () => void;
1167
1113
  getMediaConnectionDebugId(): string;
1168
- createMediaConnection(turnServerInfo: any): any;
1114
+ /**
1115
+ * Creates a webrtc media connection and publishes streams to it
1116
+ *
1117
+ * @param {Object} turnServerInfo TURN server information
1118
+ * @param {BundlePolicy} [bundlePolicy] Bundle policy settings
1119
+ * @param {AddMediaOptions} [options] Options for enabling/disabling audio/video
1120
+ * @returns {RoapMediaConnection | MultistreamRoapMediaConnection}
1121
+ */
1122
+ private createMediaConnection;
1169
1123
  /**
1170
1124
  * Listens for an event emitted by eventEmitter and emits it from the meeting object
1171
1125
  *
@@ -1177,18 +1131,14 @@ export default class Meeting extends StatelessWebexPlugin {
1177
1131
  */
1178
1132
  forwardEvent(eventEmitter: any, eventTypeToForward: any, meetingEventType: any): void;
1179
1133
  /**
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
1134
+ * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video.
1135
+ *
1136
+ * @param {AddMediaOptions} options
1187
1137
  * @returns {Promise}
1188
1138
  * @public
1189
1139
  * @memberof Meeting
1190
1140
  */
1191
- addMedia(options?: any): any;
1141
+ addMedia(options?: AddMediaOptions): Promise<any>;
1192
1142
  /**
1193
1143
  * Informs if the peer connection is in a state that can be updated with updateMedia (audio/video/share)
1194
1144
  * @returns {Boolean}
@@ -1219,94 +1169,26 @@ export default class Meeting extends StatelessWebexPlugin {
1219
1169
  */
1220
1170
  processNextQueuedMediaUpdate: () => void;
1221
1171
  /**
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()
1172
+ * Updates the media connection - it allows to enable/disable all audio/video/share in the meeting.
1173
+ * This does not affect the published tracks, so for example if a microphone track is published and
1174
+ * updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore,
1175
+ * but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called,
1176
+ * the sending of the audio from the same track will resume.
1241
1177
  *
1242
1178
  * @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
1179
+ * @param {boolean} options.audioEnabled [optional] enables/disables receiving and sending of main audio in the meeting
1180
+ * @param {boolean} options.videoEnabled [optional] enables/disables receiving and sending of main video in the meeting
1181
+ * @param {boolean} options.shareEnabled [optional] enables/disables receiving and sending of screen share in the meeting
1246
1182
  * @returns {Promise}
1247
1183
  * @public
1248
1184
  * @memberof Meeting
1249
1185
  */
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()
1286
- *
1287
- * @param {Object} options
1288
- * @param {boolean} options.sendShare
1289
- * @param {boolean} options.receiveShare
1290
- * @returns {Promise}
1291
- * @public
1292
- * @memberof Meeting
1293
- */
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;
1186
+ updateMedia(options: {
1187
+ audioEnabled?: boolean;
1188
+ videoEnabled?: boolean;
1189
+ shareAudioEnabled?: boolean;
1190
+ shareVideoEnabled?: boolean;
1191
+ }): Promise<void>;
1310
1192
  /**
1311
1193
  * Acknowledge the meeting, outgoing or incoming
1312
1194
  * @param {String} type
@@ -1314,7 +1196,11 @@ export default class Meeting extends StatelessWebexPlugin {
1314
1196
  * @public
1315
1197
  * @memberof Meeting
1316
1198
  */
1317
- acknowledge(type: string): any;
1199
+ acknowledge(type: string): Promise<{
1200
+ response: any;
1201
+ }> | Promise<{
1202
+ message: string;
1203
+ }>;
1318
1204
  /**
1319
1205
  * Decline this meeting
1320
1206
  * @param {String} reason
@@ -1324,15 +1210,45 @@ export default class Meeting extends StatelessWebexPlugin {
1324
1210
  */
1325
1211
  decline(reason: string): any;
1326
1212
  /**
1327
- * Leave the current meeting
1213
+ * Returns a promise that will resolve to fetch options for leaving a meeting.
1214
+ *
1215
+ * This is to support quickly submitting a leave request when the browser/tab is closing.
1216
+ * Calling meeting.leave will not work because there are some async steps that will
1217
+ * not complete before the browser is closed. Instead, we pre-gather all the
1218
+ * information/options needed for the request(s), and then simply and quickly
1219
+ * fire the fetch(es) when pagehide is triggered.
1220
+ *
1221
+ * We must use fetch instead of request because fetch has a keepalive option that
1222
+ * allows the request it to outlive the page.
1223
+ *
1224
+ * Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will
1225
+ * properly adjust them before submitting.
1226
+ *
1227
+ * @public
1328
1228
  * @param {Object} options leave options
1329
1229
  * @param {String} options.resourceId the device with which to leave from, empty if just the computer
1230
+ * @param {any} options.reason the reason for leaving
1231
+ * @returns {Promise} resolves to options to be used with fetch
1232
+ */
1233
+ buildLeaveFetchRequestOptions(options?: {
1234
+ resourceId?: string;
1235
+ reason?: any;
1236
+ }): any;
1237
+ /**
1238
+ * Leave the current meeting
1239
+ * @param {Object} options - leave options
1240
+ * @param {String} [options.resourceId] - the device with which to leave from, empty if just the computer
1241
+ * @param {String} [options.clientEventLeaveReason] - the leaveReason to include in the Call Analyzer event.
1242
+ * Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason)
1243
+ * https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796
1244
+ * @param {String} [options.reason] - only used for logging
1330
1245
  * @returns {Promise}
1331
1246
  * @public
1332
1247
  * @memberof Meeting
1333
1248
  */
1334
1249
  leave(options?: {
1335
1250
  resourceId?: string;
1251
+ clientEventLeaveReason?: ClientEventLeaveReason;
1336
1252
  reason?: any;
1337
1253
  }): any;
1338
1254
  /**
@@ -1360,12 +1276,12 @@ export default class Meeting extends StatelessWebexPlugin {
1360
1276
  */
1361
1277
  private requestScreenShareFloor;
1362
1278
  /**
1363
- * Stops the screen share
1364
- * @returns {Promise} see #updateShare
1365
- * @public
1366
- * @memberof Meeting
1279
+ * Requests screen share floor if such request is pending.
1280
+ * It should be called whenever meeting state changes to JOINED
1281
+ *
1282
+ * @returns {void}
1367
1283
  */
1368
- stopShare(options?: {}): any;
1284
+ private requestScreenShareFloorIfPending;
1369
1285
  /**
1370
1286
  * Sends a request to Locus to release the screen share floor.
1371
1287
  * @returns {Promise} see #meetingRequest.changeMeetingFloor
@@ -1396,6 +1312,16 @@ export default class Meeting extends StatelessWebexPlugin {
1396
1312
  * @memberof Meeting
1397
1313
  */
1398
1314
  setDisallowUnmute(enabled: boolean): Promise<any>;
1315
+ /**
1316
+ * set the mute all flag for participants if you're the host
1317
+ * @returns {Promise}
1318
+ * @param {boolean} mutedEnabled
1319
+ * @param {boolean} disallowUnmuteEnabled
1320
+ * @param {boolean} muteOnEntryEnabled
1321
+ * @public
1322
+ * @memberof Meeting
1323
+ */
1324
+ setMuteAll(mutedEnabled: boolean, disallowUnmuteEnabled: boolean, muteOnEntryEnabled: boolean): Promise<any>;
1399
1325
  /**
1400
1326
  * End the recording of this meeting
1401
1327
  * @returns {Promise}
@@ -1446,7 +1372,7 @@ export default class Meeting extends StatelessWebexPlugin {
1446
1372
  * @public
1447
1373
  * @memberof Meeting
1448
1374
  */
1449
- sendDTMF(tones: string): any;
1375
+ sendDTMF(tones: string): Promise<any>;
1450
1376
  /**
1451
1377
  * Sends request to change layout type for the current meeting for the specific participant/device only
1452
1378
  * @param {String} [layoutType] a layout type that should be available in meeting constants {@link #layout_types}
@@ -1471,53 +1397,33 @@ export default class Meeting extends StatelessWebexPlugin {
1471
1397
  height: number;
1472
1398
  };
1473
1399
  }): 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
1400
  /**
1481
1401
  * Sets the quality level of the remote incoming media
1482
1402
  * @param {String} level {LOW|MEDIUM|HIGH}
1483
1403
  * @returns {Promise}
1484
1404
  */
1485
- setRemoteQualityLevel(level: string): any;
1405
+ setRemoteQualityLevel(level: string): Promise<void>;
1486
1406
  /**
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
1407
+ * Functionality for when a share audio is ended.
1408
+ * @private
1409
+ * @memberof Meeting
1410
+ * @returns {undefined}
1491
1411
  */
1492
- setMeetingQuality(level: string): any;
1412
+ private handleShareAudioStreamEnded;
1493
1413
  /**
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}
1414
+ * Functionality for when a share video is ended.
1415
+ * @private
1416
+ * @memberof Meeting
1417
+ * @returns {undefined}
1505
1418
  */
1506
- shareScreen(options?: {
1507
- sendAudio: boolean;
1508
- sendShare: boolean;
1509
- sharePreferences: {
1510
- shareConstraints: MediaTrackConstraints;
1511
- };
1512
- }): any;
1419
+ private handleShareVideoStreamEnded;
1513
1420
  /**
1514
- * Functionality for when a share is ended.
1421
+ * Emits meeting:stoppedSharingLocal
1515
1422
  * @private
1516
- * @memberof Meeting
1517
- * @param {MediaStream} localShare
1518
1423
  * @returns {undefined}
1424
+ * @memberof Meeting
1519
1425
  */
1520
- private handleShareTrackEnded;
1426
+ private triggerStoppedSharing;
1521
1427
  /**
1522
1428
  * Emits the 'network:quality' event
1523
1429
  * 1 indicates an acceptable uplink network.
@@ -1532,92 +1438,16 @@ export default class Meeting extends StatelessWebexPlugin {
1532
1438
  private sendNetworkQualityEvent;
1533
1439
  /**
1534
1440
  * Handle logging the media
1535
- * @param {Object} audioTrack The audio track
1536
- * @param {Object} videoTrack The video track
1441
+ * @param {Object} mediaProperties
1537
1442
  * @private
1538
1443
  * @returns {undefined}
1539
1444
  */
1540
1445
  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
1446
  /**
1572
1447
  *
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}
1448
+ * @returns {string} one of 'attendee','host','cohost', returns the user type of the current user
1589
1449
  */
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
- /**
1607
- *
1608
- * @returns {undefined}
1609
- */
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;
1450
+ getCurUserType(): "host" | "cohost" | "attendee";
1621
1451
  /**
1622
1452
  * End the current meeting for all
1623
1453
  * @returns {Promise}
@@ -1632,35 +1462,6 @@ export default class Meeting extends StatelessWebexPlugin {
1632
1462
  * @memberof Meeting
1633
1463
  */
1634
1464
  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
1465
  /**
1665
1466
  * starts keepAlives being sent
1666
1467
  * @returns {void}
@@ -1693,7 +1494,7 @@ export default class Meeting extends StatelessWebexPlugin {
1693
1494
  * @public
1694
1495
  * @memberof Meeting
1695
1496
  */
1696
- toggleReactions(enable: boolean): any;
1497
+ toggleReactions(enable: boolean): Promise<any>;
1697
1498
  /**
1698
1499
  * Throws if we don't have a media connection created
1699
1500
  *
@@ -1701,24 +1502,61 @@ export default class Meeting extends StatelessWebexPlugin {
1701
1502
  */
1702
1503
  private checkMediaConnection;
1703
1504
  /**
1704
- * Publishes specified local tracks in the meeting
1505
+ * Method to enable or disable the 'Music mode' effect on audio stream
1705
1506
  *
1706
- * @param {Object} tracks
1507
+ * @param {boolean} shouldEnableMusicMode
1707
1508
  * @returns {Promise}
1708
1509
  */
1709
- publishTracks(tracks: {
1710
- microphone?: MediaStreamTrack;
1711
- camera?: MediaStreamTrack;
1712
- screenShare: {
1713
- audio?: MediaStreamTrack;
1714
- video?: MediaStreamTrack;
1715
- };
1716
- }): Promise<void>;
1510
+ enableMusicMode(shouldEnableMusicMode: boolean): Promise<void>;
1511
+ /** Updates the tracks being sent on the transcoded media connection
1512
+ *
1513
+ * @returns {Promise<void>}
1514
+ */
1515
+ private updateTranscodedMediaConnection;
1516
+ /**
1517
+ * Publishes a stream.
1518
+ *
1519
+ * @param {MediaType} mediaType of the stream
1520
+ * @param {LocalStream} stream to publish
1521
+ * @returns {Promise}
1522
+ */
1523
+ private publishStream;
1524
+ /**
1525
+ * Un-publishes a stream.
1526
+ *
1527
+ * @param {MediaType} mediaType of the stream
1528
+ * @param {LocalStream} stream to unpublish
1529
+ * @returns {Promise}
1530
+ */
1531
+ private unpublishStream;
1717
1532
  /**
1718
- * Un-publishes specified local tracks in the meeting
1533
+ * Publishes specified local streams in the meeting
1719
1534
  *
1720
- * @param {Array<MediaStreamTrack>} tracks
1535
+ * @param {Object} streams
1721
1536
  * @returns {Promise}
1722
1537
  */
1723
- unpublishTracks(tracks: MediaStreamTrack[]): Promise<void>;
1538
+ publishStreams(streams: LocalStreams): Promise<void>;
1539
+ /**
1540
+ * Un-publishes specified local streams in the meeting
1541
+ *
1542
+ * @param {Array<LocalStream>} streams
1543
+ * @returns {Promise}
1544
+ */
1545
+ unpublishStreams(streams: LocalStream[]): Promise<void>;
1546
+ /**
1547
+ * Gets the time left in seconds till the permission token expires
1548
+ * (from the time the function has been fired)
1549
+ *
1550
+ * @returns {number} time left in seconds
1551
+ */
1552
+ getPermissionTokenTimeLeftInSec(): number | undefined;
1553
+ /**
1554
+ * Check if there is enough time left till the permission token expires
1555
+ * If not - refresh the permission token
1556
+ *
1557
+ * @param {number} threshold - time in seconds
1558
+ * @param {string} reason - reason for refreshing the permission token
1559
+ * @returns {Promise<void>}
1560
+ */
1561
+ checkAndRefreshPermissionToken(threshold: number, reason: string): Promise<void>;
1724
1562
  }