@webex/plugin-meetings 3.8.0 → 3.8.1-next.10

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 +26 -13
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +70 -6
  4. package/dist/breakouts/index.js.map +1 -1
  5. package/dist/common/errors/webex-errors.js +12 -2
  6. package/dist/common/errors/webex-errors.js.map +1 -1
  7. package/dist/config.js +5 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/constants.js +28 -123
  10. package/dist/constants.js.map +1 -1
  11. package/dist/controls-options-manager/enums.js +3 -0
  12. package/dist/controls-options-manager/enums.js.map +1 -1
  13. package/dist/controls-options-manager/types.js.map +1 -1
  14. package/dist/controls-options-manager/util.js +78 -0
  15. package/dist/controls-options-manager/util.js.map +1 -1
  16. package/dist/interpretation/index.js +4 -4
  17. package/dist/interpretation/index.js.map +1 -1
  18. package/dist/interpretation/siLanguage.js +1 -1
  19. package/dist/locus-info/controlsUtils.js +37 -11
  20. package/dist/locus-info/controlsUtils.js.map +1 -1
  21. package/dist/locus-info/index.js +92 -12
  22. package/dist/locus-info/index.js.map +1 -1
  23. package/dist/locus-info/selfUtils.js +432 -418
  24. package/dist/locus-info/selfUtils.js.map +1 -1
  25. package/dist/media/index.js +17 -17
  26. package/dist/media/index.js.map +1 -1
  27. package/dist/media/properties.js +94 -6
  28. package/dist/media/properties.js.map +1 -1
  29. package/dist/meeting/brbState.js +9 -2
  30. package/dist/meeting/brbState.js.map +1 -1
  31. package/dist/meeting/in-meeting-actions.js +21 -1
  32. package/dist/meeting/in-meeting-actions.js.map +1 -1
  33. package/dist/meeting/index.js +678 -344
  34. package/dist/meeting/index.js.map +1 -1
  35. package/dist/meeting/locusMediaRequest.js +21 -22
  36. package/dist/meeting/locusMediaRequest.js.map +1 -1
  37. package/dist/meeting/muteState.js +4 -4
  38. package/dist/meeting/muteState.js.map +1 -1
  39. package/dist/meeting/request.js +30 -0
  40. package/dist/meeting/request.js.map +1 -1
  41. package/dist/meeting/request.type.js.map +1 -1
  42. package/dist/meeting/util.js +13 -2
  43. package/dist/meeting/util.js.map +1 -1
  44. package/dist/meeting-info/meeting-info-v2.js +373 -68
  45. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  46. package/dist/meeting-info/utilv2.js +5 -1
  47. package/dist/meeting-info/utilv2.js.map +1 -1
  48. package/dist/meetings/index.js +136 -1
  49. package/dist/meetings/index.js.map +1 -1
  50. package/dist/meetings/util.js +14 -0
  51. package/dist/meetings/util.js.map +1 -1
  52. package/dist/member/index.js +55 -9
  53. package/dist/member/index.js.map +1 -1
  54. package/dist/member/types.js +3 -0
  55. package/dist/member/types.js.map +1 -1
  56. package/dist/member/util.js +335 -353
  57. package/dist/member/util.js.map +1 -1
  58. package/dist/members/collection.js.map +1 -1
  59. package/dist/members/index.js +137 -29
  60. package/dist/members/index.js.map +1 -1
  61. package/dist/members/request.js +38 -0
  62. package/dist/members/request.js.map +1 -1
  63. package/dist/members/util.js +36 -1
  64. package/dist/members/util.js.map +1 -1
  65. package/dist/metrics/constants.js +10 -0
  66. package/dist/metrics/constants.js.map +1 -1
  67. package/dist/multistream/remoteMediaManager.js +40 -8
  68. package/dist/multistream/remoteMediaManager.js.map +1 -1
  69. package/dist/reachability/clusterReachability.js +63 -27
  70. package/dist/reachability/clusterReachability.js.map +1 -1
  71. package/dist/reachability/index.js +107 -47
  72. package/dist/reachability/index.js.map +1 -1
  73. package/dist/reachability/reachability.types.js +14 -0
  74. package/dist/reachability/reachability.types.js.map +1 -1
  75. package/dist/reachability/request.js +19 -3
  76. package/dist/reachability/request.js.map +1 -1
  77. package/dist/reconnection-manager/index.js +2 -2
  78. package/dist/reconnection-manager/index.js.map +1 -1
  79. package/dist/recording-controller/util.js +5 -5
  80. package/dist/recording-controller/util.js.map +1 -1
  81. package/dist/roap/index.js.map +1 -1
  82. package/dist/roap/turnDiscovery.js +45 -27
  83. package/dist/roap/turnDiscovery.js.map +1 -1
  84. package/dist/roap/types.js +17 -0
  85. package/dist/roap/types.js.map +1 -0
  86. package/dist/types/common/errors/webex-errors.d.ts +7 -1
  87. package/dist/types/config.d.ts +3 -0
  88. package/dist/types/constants.d.ts +20 -85
  89. package/dist/types/controls-options-manager/enums.d.ts +4 -1
  90. package/dist/types/controls-options-manager/types.d.ts +10 -1
  91. package/dist/types/locus-info/index.d.ts +3 -3
  92. package/dist/types/locus-info/selfUtils.d.ts +216 -1
  93. package/dist/types/media/properties.d.ts +15 -0
  94. package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
  95. package/dist/types/meeting/index.d.ts +65 -1
  96. package/dist/types/meeting/muteState.d.ts +0 -1
  97. package/dist/types/meeting/request.d.ts +12 -1
  98. package/dist/types/meeting/request.type.d.ts +6 -0
  99. package/dist/types/meeting/util.d.ts +3 -1
  100. package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
  101. package/dist/types/meetings/index.d.ts +57 -0
  102. package/dist/types/member/index.d.ts +21 -6
  103. package/dist/types/member/types.d.ts +73 -14
  104. package/dist/types/member/util.d.ts +156 -1
  105. package/dist/types/members/collection.d.ts +6 -5
  106. package/dist/types/members/index.d.ts +32 -43
  107. package/dist/types/members/request.d.ts +26 -0
  108. package/dist/types/members/util.d.ts +27 -0
  109. package/dist/types/metrics/constants.d.ts +10 -0
  110. package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
  111. package/dist/types/reachability/clusterReachability.d.ts +15 -7
  112. package/dist/types/reachability/index.d.ts +10 -1
  113. package/dist/types/reachability/reachability.types.d.ts +5 -0
  114. package/dist/types/roap/index.d.ts +3 -2
  115. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  116. package/dist/types/roap/types.d.ts +16 -0
  117. package/dist/webinar/index.js +2 -2
  118. package/dist/webinar/index.js.map +1 -1
  119. package/package.json +24 -23
  120. package/src/breakouts/index.ts +69 -0
  121. package/src/common/errors/webex-errors.ts +8 -1
  122. package/src/config.ts +3 -0
  123. package/src/constants.ts +30 -90
  124. package/src/controls-options-manager/enums.ts +3 -0
  125. package/src/controls-options-manager/types.ts +16 -1
  126. package/src/controls-options-manager/util.ts +93 -0
  127. package/src/interpretation/index.ts +3 -3
  128. package/src/locus-info/controlsUtils.ts +59 -14
  129. package/src/locus-info/index.ts +97 -13
  130. package/src/locus-info/selfUtils.ts +496 -442
  131. package/src/media/index.ts +23 -21
  132. package/src/media/properties.ts +96 -0
  133. package/src/meeting/brbState.ts +11 -2
  134. package/src/meeting/in-meeting-actions.ts +40 -0
  135. package/src/meeting/index.ts +470 -105
  136. package/src/meeting/locusMediaRequest.ts +27 -22
  137. package/src/meeting/muteState.ts +4 -4
  138. package/src/meeting/request.ts +36 -1
  139. package/src/meeting/request.type.ts +7 -0
  140. package/src/meeting/util.ts +11 -2
  141. package/src/meeting-info/meeting-info-v2.ts +254 -8
  142. package/src/meeting-info/utilv2.ts +5 -0
  143. package/src/meetings/index.ts +148 -1
  144. package/src/meetings/util.ts +18 -0
  145. package/src/member/index.ts +68 -22
  146. package/src/member/types.ts +82 -16
  147. package/src/member/util.ts +357 -350
  148. package/src/members/collection.ts +4 -3
  149. package/src/members/index.ts +137 -18
  150. package/src/members/request.ts +44 -0
  151. package/src/members/util.ts +43 -1
  152. package/src/metrics/constants.ts +10 -0
  153. package/src/multistream/remoteMediaManager.ts +32 -10
  154. package/src/reachability/clusterReachability.ts +73 -26
  155. package/src/reachability/index.ts +62 -1
  156. package/src/reachability/reachability.types.ts +6 -0
  157. package/src/reachability/request.ts +7 -0
  158. package/src/reconnection-manager/index.ts +2 -2
  159. package/src/recording-controller/util.ts +17 -13
  160. package/src/roap/index.ts +3 -7
  161. package/src/roap/turnDiscovery.ts +34 -39
  162. package/src/roap/types.ts +23 -0
  163. package/src/webinar/index.ts +1 -1
  164. package/test/unit/spec/breakouts/index.ts +167 -95
  165. package/test/unit/spec/controls-options-manager/util.js +178 -0
  166. package/test/unit/spec/interpretation/index.ts +39 -1
  167. package/test/unit/spec/locus-info/controlsUtils.js +155 -9
  168. package/test/unit/spec/locus-info/index.js +209 -73
  169. package/test/unit/spec/locus-info/selfUtils.js +98 -24
  170. package/test/unit/spec/media/index.ts +150 -18
  171. package/test/unit/spec/media/properties.ts +130 -0
  172. package/test/unit/spec/meeting/brbState.ts +40 -2
  173. package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
  174. package/test/unit/spec/meeting/index.js +804 -139
  175. package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
  176. package/test/unit/spec/meeting/muteState.js +73 -2
  177. package/test/unit/spec/meeting/request.js +32 -1
  178. package/test/unit/spec/meeting/utils.js +119 -18
  179. package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
  180. package/test/unit/spec/meeting-info/utilv2.js +19 -0
  181. package/test/unit/spec/meetings/index.js +146 -2
  182. package/test/unit/spec/member/index.js +7 -0
  183. package/test/unit/spec/member/util.js +24 -0
  184. package/test/unit/spec/members/index.js +304 -78
  185. package/test/unit/spec/members/request.js +68 -22
  186. package/test/unit/spec/members/utils.js +75 -0
  187. package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
  188. package/test/unit/spec/reachability/clusterReachability.ts +88 -56
  189. package/test/unit/spec/reachability/index.ts +97 -0
  190. package/test/unit/spec/reachability/request.js +47 -2
  191. package/test/unit/spec/reconnection-manager/index.js +4 -4
  192. package/test/unit/spec/roap/turnDiscovery.ts +110 -28
  193. package/test/unit/spec/webinar/index.ts +5 -0
  194. package/dist/annotation/annotation.types.d.ts +0 -42
  195. package/dist/annotation/constants.d.ts +0 -31
  196. package/dist/annotation/index.d.ts +0 -117
  197. package/dist/breakouts/breakout.d.ts +0 -8
  198. package/dist/breakouts/collection.d.ts +0 -5
  199. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  200. package/dist/breakouts/events.d.ts +0 -8
  201. package/dist/breakouts/index.d.ts +0 -5
  202. package/dist/breakouts/request.d.ts +0 -22
  203. package/dist/breakouts/utils.d.ts +0 -15
  204. package/dist/common/browser-detection.d.ts +0 -9
  205. package/dist/common/collection.d.ts +0 -48
  206. package/dist/common/config.d.ts +0 -2
  207. package/dist/common/errors/captcha-error.d.ts +0 -15
  208. package/dist/common/errors/intent-to-join.d.ts +0 -16
  209. package/dist/common/errors/join-meeting.d.ts +0 -17
  210. package/dist/common/errors/media.d.ts +0 -15
  211. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  212. package/dist/common/errors/parameter.d.ts +0 -15
  213. package/dist/common/errors/password-error.d.ts +0 -15
  214. package/dist/common/errors/permission.d.ts +0 -14
  215. package/dist/common/errors/reclaim-host-role-error.js +0 -149
  216. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  217. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  218. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  219. package/dist/common/errors/reconnection-in-progress.js +0 -33
  220. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  221. package/dist/common/errors/reconnection.d.ts +0 -15
  222. package/dist/common/errors/stats.d.ts +0 -15
  223. package/dist/common/errors/webex-errors.d.ts +0 -93
  224. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  225. package/dist/common/events/events-scope.d.ts +0 -17
  226. package/dist/common/events/events.d.ts +0 -12
  227. package/dist/common/events/trigger-proxy.d.ts +0 -2
  228. package/dist/common/events/util.d.ts +0 -2
  229. package/dist/common/logs/logger-config.d.ts +0 -2
  230. package/dist/common/logs/logger-proxy.d.ts +0 -2
  231. package/dist/common/logs/request.d.ts +0 -36
  232. package/dist/common/queue.d.ts +0 -34
  233. package/dist/config.d.ts +0 -72
  234. package/dist/constants.d.ts +0 -1088
  235. package/dist/controls-options-manager/constants.d.ts +0 -4
  236. package/dist/controls-options-manager/enums.d.ts +0 -15
  237. package/dist/controls-options-manager/index.d.ts +0 -136
  238. package/dist/controls-options-manager/types.d.ts +0 -43
  239. package/dist/controls-options-manager/util.d.ts +0 -1
  240. package/dist/index.d.ts +0 -7
  241. package/dist/interceptors/index.d.ts +0 -2
  242. package/dist/interceptors/locusRetry.d.ts +0 -27
  243. package/dist/interpretation/collection.d.ts +0 -5
  244. package/dist/interpretation/index.d.ts +0 -5
  245. package/dist/interpretation/siLanguage.d.ts +0 -5
  246. package/dist/locus-info/controlsUtils.d.ts +0 -2
  247. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  248. package/dist/locus-info/fullState.d.ts +0 -2
  249. package/dist/locus-info/hostUtils.d.ts +0 -2
  250. package/dist/locus-info/index.d.ts +0 -322
  251. package/dist/locus-info/infoUtils.d.ts +0 -2
  252. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  253. package/dist/locus-info/parser.d.ts +0 -272
  254. package/dist/locus-info/selfUtils.d.ts +0 -2
  255. package/dist/media/index.d.ts +0 -34
  256. package/dist/media/properties.d.ts +0 -93
  257. package/dist/media/util.d.ts +0 -2
  258. package/dist/mediaQualityMetrics/config.d.ts +0 -241
  259. package/dist/mediaQualityMetrics/config.js +0 -502
  260. package/dist/mediaQualityMetrics/config.js.map +0 -1
  261. package/dist/meeting/effectsState.js +0 -260
  262. package/dist/meeting/effectsState.js.map +0 -1
  263. package/dist/meeting/in-meeting-actions.d.ts +0 -167
  264. package/dist/meeting/index.d.ts +0 -1825
  265. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  266. package/dist/meeting/muteState.d.ts +0 -178
  267. package/dist/meeting/request.d.ts +0 -295
  268. package/dist/meeting/request.type.d.ts +0 -11
  269. package/dist/meeting/state.d.ts +0 -9
  270. package/dist/meeting/util.d.ts +0 -119
  271. package/dist/meeting/voicea-meeting.d.ts +0 -16
  272. package/dist/meeting-info/collection.d.ts +0 -20
  273. package/dist/meeting-info/index.d.ts +0 -69
  274. package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
  275. package/dist/meeting-info/request.d.ts +0 -22
  276. package/dist/meeting-info/util.d.ts +0 -2
  277. package/dist/meeting-info/utilv2.d.ts +0 -2
  278. package/dist/meetings/collection.d.ts +0 -40
  279. package/dist/meetings/index.d.ts +0 -390
  280. package/dist/meetings/meetings.types.d.ts +0 -4
  281. package/dist/meetings/request.d.ts +0 -27
  282. package/dist/meetings/util.d.ts +0 -18
  283. package/dist/member/index.d.ts +0 -160
  284. package/dist/member/member.types.js +0 -17
  285. package/dist/member/member.types.js.map +0 -1
  286. package/dist/member/types.d.ts +0 -32
  287. package/dist/member/util.d.ts +0 -2
  288. package/dist/members/collection.d.ts +0 -29
  289. package/dist/members/index.d.ts +0 -353
  290. package/dist/members/request.d.ts +0 -114
  291. package/dist/members/types.d.ts +0 -25
  292. package/dist/members/util.d.ts +0 -215
  293. package/dist/metrics/config.js +0 -276
  294. package/dist/metrics/config.js.map +0 -1
  295. package/dist/metrics/constants.d.ts +0 -70
  296. package/dist/metrics/index.d.ts +0 -45
  297. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  298. package/dist/multistream/receiveSlot.d.ts +0 -68
  299. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  300. package/dist/multistream/remoteMedia.d.ts +0 -72
  301. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  302. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  303. package/dist/multistream/sendSlotManager.d.ts +0 -69
  304. package/dist/networkQualityMonitor/index.d.ts +0 -70
  305. package/dist/networkQualityMonitor/index.js +0 -221
  306. package/dist/networkQualityMonitor/index.js.map +0 -1
  307. package/dist/peer-connection-manager/index.js +0 -671
  308. package/dist/peer-connection-manager/index.js.map +0 -1
  309. package/dist/peer-connection-manager/util.js +0 -109
  310. package/dist/peer-connection-manager/util.js.map +0 -1
  311. package/dist/personal-meeting-room/index.d.ts +0 -47
  312. package/dist/personal-meeting-room/request.d.ts +0 -14
  313. package/dist/personal-meeting-room/util.d.ts +0 -2
  314. package/dist/reachability/clusterReachability.d.ts +0 -109
  315. package/dist/reachability/index.d.ts +0 -105
  316. package/dist/reachability/request.d.ts +0 -39
  317. package/dist/reachability/util.d.ts +0 -8
  318. package/dist/reactions/constants.d.ts +0 -3
  319. package/dist/reactions/reactions.d.ts +0 -4
  320. package/dist/reactions/reactions.type.d.ts +0 -52
  321. package/dist/reconnection-manager/index.d.ts +0 -136
  322. package/dist/recording-controller/enums.d.ts +0 -7
  323. package/dist/recording-controller/index.d.ts +0 -207
  324. package/dist/recording-controller/util.d.ts +0 -14
  325. package/dist/roap/collection.js +0 -62
  326. package/dist/roap/collection.js.map +0 -1
  327. package/dist/roap/handler.js +0 -275
  328. package/dist/roap/handler.js.map +0 -1
  329. package/dist/roap/index.d.ts +0 -86
  330. package/dist/roap/request.d.ts +0 -39
  331. package/dist/roap/state.js +0 -126
  332. package/dist/roap/state.js.map +0 -1
  333. package/dist/roap/turnDiscovery.d.ts +0 -155
  334. package/dist/roap/util.js +0 -75
  335. package/dist/roap/util.js.map +0 -1
  336. package/dist/rtcMetrics/constants.d.ts +0 -4
  337. package/dist/rtcMetrics/constants.js +0 -11
  338. package/dist/rtcMetrics/constants.js.map +0 -1
  339. package/dist/rtcMetrics/index.d.ts +0 -61
  340. package/dist/rtcMetrics/index.js +0 -197
  341. package/dist/rtcMetrics/index.js.map +0 -1
  342. package/dist/statsAnalyzer/global.d.ts +0 -36
  343. package/dist/statsAnalyzer/global.js +0 -126
  344. package/dist/statsAnalyzer/global.js.map +0 -1
  345. package/dist/statsAnalyzer/index.d.ts +0 -217
  346. package/dist/statsAnalyzer/index.js +0 -1013
  347. package/dist/statsAnalyzer/index.js.map +0 -1
  348. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
  349. package/dist/statsAnalyzer/mqaUtil.js +0 -179
  350. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  351. package/dist/transcription/index.d.ts +0 -64
  352. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  353. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  354. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  355. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  356. package/dist/types/rtcMetrics/index.d.ts +0 -71
  357. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  358. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  359. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  360. package/dist/webinar/collection.d.ts +0 -16
  361. package/dist/webinar/index.d.ts +0 -5
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable valid-jsdoc */
2
2
  import {defer} from 'lodash';
3
- import {Defer} from '@webex/common';
3
+ import {Defer, transferEvents} from '@webex/common';
4
+ import {EventEmitter} from 'events';
4
5
  import {WebexPlugin} from '@webex/webex-core';
5
6
  import {MEDIA, HTTP_VERBS, ROAP} from '../constants';
6
7
  import LoggerProxy from '../common/logs/logger-proxy';
@@ -220,14 +221,6 @@ export class LocusMediaRequest extends WebexPlugin {
220
221
  localMedias.roapMessage = request.roapMessage;
221
222
  localMedias.reachability = request.reachability;
222
223
  body.clientMediaPreferences = request.clientMediaPreferences;
223
-
224
- // @ts-ignore
225
- this.webex.internal.newMetrics.submitClientEvent({
226
- name: 'client.locus.media.request',
227
- options: {
228
- meetingId: this.config.meetingId,
229
- },
230
- });
231
224
  break;
232
225
  }
233
226
 
@@ -250,27 +243,24 @@ export class LocusMediaRequest extends WebexPlugin {
250
243
  this.confluenceState = 'creation in progress';
251
244
  }
252
245
 
253
- // @ts-ignore
254
- return this.request({
246
+ const upload = new EventEmitter();
247
+ const download = new EventEmitter();
248
+
249
+ const options = {
255
250
  method: HTTP_VERBS.PUT,
256
251
  uri,
257
252
  body,
258
- })
253
+ upload,
254
+ download,
255
+ };
256
+
257
+ // @ts-ignore
258
+ const promise = this.request(options)
259
259
  .then((result) => {
260
260
  if (isRequestAffectingConfluenceState(request)) {
261
261
  this.confluenceState = 'created';
262
262
  }
263
263
 
264
- if (request.type === 'RoapMessage') {
265
- // @ts-ignore
266
- this.webex.internal.newMetrics.submitClientEvent({
267
- name: 'client.locus.media.response',
268
- options: {
269
- meetingId: this.config.meetingId,
270
- },
271
- });
272
- }
273
-
274
264
  return result;
275
265
  })
276
266
  .catch((e) => {
@@ -294,6 +284,21 @@ export class LocusMediaRequest extends WebexPlugin {
294
284
 
295
285
  throw e;
296
286
  });
287
+
288
+ if (request.type === 'RoapMessage') {
289
+ const setupProgressListener = (direction: string, eventEmitter: EventEmitter) => {
290
+ eventEmitter.on('progress', (progressEvent: ProgressEvent) => {
291
+ LoggerProxy.logger.info(
292
+ `${request.type}: ${direction} Progress, Timestamp: ${progressEvent.timeStamp}, Progress: ${progressEvent.loaded}/${progressEvent.total}`
293
+ );
294
+ });
295
+ };
296
+
297
+ setupProgressListener('Upload', options.upload);
298
+ setupProgressListener('Download', options.download);
299
+ }
300
+
301
+ return promise;
297
302
  }
298
303
 
299
304
  /**
@@ -119,9 +119,11 @@ export class MuteState {
119
119
  * @returns {void}
120
120
  */
121
121
  public enable(meeting: any, enable: boolean) {
122
- this.state.client.enabled = enable;
122
+ if (enable !== this.state.client.enabled) {
123
+ this.state.client.enabled = enable;
123
124
 
124
- this.applyClientStateToServer(meeting);
125
+ this.applyClientStateToServer(meeting);
126
+ }
125
127
  }
126
128
 
127
129
  /**
@@ -147,7 +149,6 @@ export class MuteState {
147
149
  * @public
148
150
  * @memberof MuteState
149
151
  * @param {Object} [meeting] the meeting object
150
- * @param {Boolean} [mute] true for muting, false for unmuting request
151
152
  * @returns {void}
152
153
  */
153
154
  public handleLocalStreamMuteStateChange(meeting?: any) {
@@ -350,7 +351,6 @@ export class MuteState {
350
351
  * @param {Meeting} meeting
351
352
  * @returns {void}
352
353
  */
353
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
354
354
  private applyUnmuteAllowedToStream(meeting: any) {
355
355
  if (this.type === AUDIO) {
356
356
  meeting.mediaProperties.audioStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);
@@ -27,7 +27,12 @@ import {
27
27
  _SLIDES_,
28
28
  ANNOTATION,
29
29
  } from '../constants';
30
- import {SendReactionOptions, BrbOptions, ToggleReactionsOptions} from './request.type';
30
+ import {
31
+ SendReactionOptions,
32
+ BrbOptions,
33
+ ToggleReactionsOptions,
34
+ PostMeetingDataConsentOptions,
35
+ } from './request.type';
31
36
  import MeetingUtil from './util';
32
37
  import {AnnotationInfo} from '../annotation/annotation.types';
33
38
  import {ClientMediaPreferences} from '../reachability/reachability.types';
@@ -934,4 +939,34 @@ export default class MeetingRequest extends StatelessWebexPlugin {
934
939
  },
935
940
  });
936
941
  }
942
+
943
+ /**
944
+ * Sends a request to set post meeting data consent.
945
+ *
946
+ * @param {Object} options - The options for post meeting data consent request.
947
+ * @param {boolean} options.consent - Whether accepted or declined.
948
+ * @param {string} options.locusUrl - The URL of the locus.
949
+ * @param {string} options.deviceUrl - The URL of the device.
950
+ * @param {string} options.selfId - The ID of the participant.
951
+ * @returns {Promise}
952
+ */
953
+ setPostMeetingDataConsent({
954
+ postMeetingDataConsent,
955
+ locusUrl,
956
+ deviceUrl,
957
+ selfId,
958
+ }: PostMeetingDataConsentOptions) {
959
+ const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${CONTROLS}`;
960
+
961
+ return this.locusDeltaRequest({
962
+ method: HTTP_VERBS.PATCH,
963
+ uri,
964
+ body: {
965
+ consent: {
966
+ postMeetingDataConsent,
967
+ deviceUrl,
968
+ },
969
+ },
970
+ });
971
+ }
937
972
  }
@@ -18,3 +18,10 @@ export type BrbOptions = {
18
18
  deviceUrl: string;
19
19
  selfId: string;
20
20
  };
21
+
22
+ export type PostMeetingDataConsentOptions = {
23
+ postMeetingDataConsent: boolean;
24
+ locusUrl: string;
25
+ deviceUrl: string;
26
+ selfId: string;
27
+ };
@@ -176,11 +176,12 @@ const MeetingUtil = {
176
176
  deviceCapabilities: options.deviceCapabilities,
177
177
  liveAnnotationSupported: options.liveAnnotationSupported,
178
178
  clientMediaPreferences,
179
+ alias: options.alias,
179
180
  })
180
181
  .then((res) => {
181
182
  const parsed = MeetingUtil.parseLocusJoin(res);
182
183
  meeting.setLocus(parsed);
183
-
184
+ meeting.isoLocalClientMeetingJoinTime = res?.headers?.date; // read from header if exist, else fall back to system clock : https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-555657
184
185
  webex.internal.newMetrics.submitClientEvent({
185
186
  name: 'client.locus.join.response',
186
187
  payload: {
@@ -572,9 +573,17 @@ const MeetingUtil = {
572
573
  canUserRenameSelfAndObserved: (displayHints) =>
573
574
  displayHints.includes(DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED),
574
575
 
576
+ requiresPostMeetingDataConsentPrompt: (displayHints) =>
577
+ displayHints.includes(DISPLAY_HINTS.SHOW_POST_MEETING_DATA_CONSENT_PROMPT),
578
+
575
579
  canUserRenameOthers: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAN_RENAME_OTHERS),
576
580
 
577
- canShareWhiteBoard: (displayHints) => displayHints.includes(DISPLAY_HINTS.SHARE_WHITEBOARD),
581
+ // Default empty value for policies if we get an undefined value (ie permissionToken is not available)
582
+ canShareWhiteBoard: (displayHints, policies = {}) =>
583
+ displayHints.includes(DISPLAY_HINTS.SHARE_WHITEBOARD) &&
584
+ !!policies[SELF_POLICY.SUPPORT_WHITEBOARD],
585
+
586
+ canMoveToLobby: (displayHints) => displayHints.includes(DISPLAY_HINTS.MOVE_TO_LOBBY),
578
587
 
579
588
  /**
580
589
  * Adds the current locus sequence information to a request body
@@ -16,6 +16,9 @@ const CAPTCHA_ERROR_DEFAULT_MESSAGE =
16
16
  'Captcha required. Call fetchMeetingInfo() with captchaInfo argument';
17
17
  const ADHOC_MEETING_DEFAULT_ERROR =
18
18
  'Failed starting the adhoc meeting, Please contact support team ';
19
+ const MEETING_IS_IN_PROGRESS_MESSAGE = 'Meeting is in progress';
20
+ const STATIC_MEETING_LINK_ALREADY_EXISTS_MESSAGE = 'Static meeting link already exists';
21
+ const FETCH_STATIC_MEETING_LINK = 'Meeting link does not exists for conversation';
19
22
  const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
20
23
  const CAPTCHA_ERROR_REQUIRES_REGISTRATION_ID_CODES = [423007];
21
24
 
@@ -193,6 +196,77 @@ export class MeetingInfoV2JoinForbiddenError extends Error {
193
196
  }
194
197
  }
195
198
 
199
+ /**
200
+ * Error fetching static link for a conversation when it does not exist
201
+ */
202
+ export class MeetingInfoV2StaticLinkDoesNotExistError extends Error {
203
+ sdkMessage: any;
204
+ wbxAppApiCode: any;
205
+ body: any;
206
+ /**
207
+ *
208
+ * @constructor
209
+ * @param {Number} [wbxAppApiErrorCode]
210
+ * @param {String} [message]
211
+ */
212
+ constructor(wbxAppApiErrorCode?: number, message: string = FETCH_STATIC_MEETING_LINK) {
213
+ super(`${message}, code=${wbxAppApiErrorCode}`);
214
+ this.name = 'MeetingInfoV2StaticLinkDoesNotExistError';
215
+ this.sdkMessage = message;
216
+ this.stack = new Error().stack;
217
+ this.wbxAppApiCode = wbxAppApiErrorCode;
218
+ }
219
+ }
220
+
221
+ /**
222
+ * Error enabling/disabling static meeting link
223
+ */
224
+ export class MeetingInfoV2MeetingIsInProgressError extends Error {
225
+ sdkMessage: any;
226
+ wbxAppApiCode: any;
227
+ body: any;
228
+ /**
229
+ *
230
+ * @constructor
231
+ * @param {Number} [wbxAppApiErrorCode]
232
+ * @param {String} [message]
233
+ * @param {Boolean} [enable]
234
+ */
235
+ constructor(
236
+ wbxAppApiErrorCode?: number,
237
+ message = MEETING_IS_IN_PROGRESS_MESSAGE,
238
+ enable = false
239
+ ) {
240
+ super(`${message}, code=${wbxAppApiErrorCode}, enable=${enable}`);
241
+ this.name = 'MeetingInfoV2MeetingIsInProgressError';
242
+ this.sdkMessage = message;
243
+ this.stack = new Error().stack;
244
+ this.wbxAppApiCode = wbxAppApiErrorCode;
245
+ }
246
+ }
247
+
248
+ /**
249
+ * Error enabling/disabling static meeting link
250
+ */
251
+ export class MeetingInfoV2StaticMeetingLinkAlreadyExists extends Error {
252
+ sdkMessage: any;
253
+ wbxAppApiCode: any;
254
+ body: any;
255
+ /**
256
+ *
257
+ * @constructor
258
+ * @param {Number} [wbxAppApiErrorCode]
259
+ * @param {String} [message]
260
+ */
261
+ constructor(wbxAppApiErrorCode?: number, message = STATIC_MEETING_LINK_ALREADY_EXISTS_MESSAGE) {
262
+ super(`${message}, code=${wbxAppApiErrorCode}`);
263
+ this.name = 'MeetingInfoV2StaticMeetingLinkAlreadyExists';
264
+ this.sdkMessage = message;
265
+ this.stack = new Error().stack;
266
+ this.wbxAppApiCode = wbxAppApiErrorCode;
267
+ }
268
+ }
269
+
196
270
  /**
197
271
  * @class MeetingInfo
198
272
  */
@@ -293,17 +367,20 @@ export default class MeetingInfoV2 {
293
367
  };
294
368
 
295
369
  /**
296
- * Creates adhoc space meetings for a space by fetching the conversation infomation
370
+ * helper function to either create an adhoc space meeting or enable static meeting link
297
371
  * @param {String} conversationUrl conversationUrl to start adhoc meeting on
298
372
  * @param {String} installedOrgID org ID of user's machine
373
+ * @param {Boolean} enableStaticMeetingLink whether or not to enable static meeting link
299
374
  * @returns {Promise} returns a meeting info object
300
375
  * @public
301
376
  * @memberof MeetingInfo
302
377
  */
303
- async createAdhocSpaceMeeting(conversationUrl: string, installedOrgID?: string) {
304
- if (!this.webex.meetings.preferredWebexSite) {
305
- throw Error('No preferred webex site found');
306
- }
378
+ async createAdhocSpaceMeetingOrEnableStaticMeetingLink(
379
+ conversationUrl: string,
380
+ installedOrgID?: string,
381
+ // setting this to true enables static meeting link
382
+ enableStaticMeetingLink = false
383
+ ) {
307
384
  const getInvitees = (particpants = []) => {
308
385
  const invitees = [];
309
386
 
@@ -329,6 +406,7 @@ export default class MeetingInfoV2 {
329
406
  kroUrl: conversation.kmsResourceObjectUrl,
330
407
  invitees: getInvitees(conversation.participants?.items),
331
408
  installedOrgID,
409
+ schedule: enableStaticMeetingLink,
332
410
  };
333
411
 
334
412
  if (installedOrgID) {
@@ -344,7 +422,23 @@ export default class MeetingInfoV2 {
344
422
  uri,
345
423
  body,
346
424
  });
347
- })
425
+ });
426
+ }
427
+
428
+ /**
429
+ * Creates adhoc space meetings for a space by fetching the conversation infomation
430
+ * @param {String} conversationUrl conversationUrl to start adhoc meeting on
431
+ * @param {String} installedOrgID org ID of user's machine
432
+ * @returns {Promise} returns a meeting info object
433
+ * @public
434
+ * @memberof MeetingInfo
435
+ */
436
+ async createAdhocSpaceMeeting(conversationUrl: string, installedOrgID?: string) {
437
+ if (!this.webex.meetings.preferredWebexSite) {
438
+ throw Error('No preferred webex site found');
439
+ }
440
+
441
+ return this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl, installedOrgID)
348
442
  .then((requestResult) => {
349
443
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_SUCCESS);
350
444
 
@@ -363,6 +457,153 @@ export default class MeetingInfoV2 {
363
457
  });
364
458
  }
365
459
 
460
+ /**
461
+ * Fetches details for static meeting link
462
+ * @param {String} conversationUrl conversationUrl that's required to find static meeting link if it exists
463
+ * @returns {Promise} returns a Promise
464
+ * @public
465
+ * @memberof MeetingInfo
466
+ */
467
+ async fetchStaticMeetingLink(conversationUrl: string) {
468
+ if (!this.webex.meetings.preferredWebexSite) {
469
+ throw Error('No preferred webex site found');
470
+ }
471
+
472
+ const body = {
473
+ spaceUrl: conversationUrl,
474
+ };
475
+
476
+ const uri = this.webex.meetings.preferredWebexSite
477
+ ? `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant/query`
478
+ : '';
479
+
480
+ return this.webex
481
+ .request({
482
+ method: HTTP_VERBS.POST,
483
+ uri,
484
+ body,
485
+ })
486
+ .then((requestResult) => {
487
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_STATIC_MEETING_LINK_SUCCESS);
488
+
489
+ return requestResult;
490
+ })
491
+ .catch((err) => {
492
+ if (err?.statusCode === 403) {
493
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETING_LINK_DOES_NOT_EXIST_ERROR, {
494
+ reason: err.message,
495
+ stack: err.stack,
496
+ });
497
+
498
+ throw new MeetingInfoV2StaticLinkDoesNotExistError(err.body?.code, err.body?.message);
499
+ }
500
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.FETCH_STATIC_MEETING_LINK_FAILURE, {
501
+ reason: err.message,
502
+ stack: err.stack,
503
+ });
504
+
505
+ throw err;
506
+ });
507
+ }
508
+
509
+ /**
510
+ * Enables static meeting link
511
+ * @param {String} conversationUrl conversationUrl that's required to enable static meeting link
512
+ * @returns {Promise} returns a Promise
513
+ * @public
514
+ * @memberof MeetingInfo
515
+ */
516
+ async enableStaticMeetingLink(conversationUrl: string) {
517
+ if (!this.webex.meetings.preferredWebexSite) {
518
+ throw Error('No preferred webex site found');
519
+ }
520
+
521
+ return this.createAdhocSpaceMeetingOrEnableStaticMeetingLink(conversationUrl, undefined, true)
522
+ .then((requestResult) => {
523
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ENABLE_STATIC_METTING_LINK_SUCCESS);
524
+
525
+ return requestResult;
526
+ })
527
+ .catch((err) => {
528
+ if (err?.statusCode === 403) {
529
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETING_IS_IN_PROGRESS_ERROR, {
530
+ reason: err.message,
531
+ stack: err.stack,
532
+ });
533
+
534
+ throw new MeetingInfoV2MeetingIsInProgressError(err.body?.code, err.body?.message, true);
535
+ }
536
+
537
+ if (err?.statusCode === 409) {
538
+ Metrics.sendBehavioralMetric(
539
+ BEHAVIORAL_METRICS.STATIC_MEETING_LINK_ALREADY_EXISTS_ERROR,
540
+ {
541
+ reason: err.message,
542
+ stack: err.stack,
543
+ }
544
+ );
545
+
546
+ throw new MeetingInfoV2StaticMeetingLinkAlreadyExists(err.body?.code, err.body?.message);
547
+ }
548
+
549
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ENABLE_STATIC_METTING_LINK_FAILURE, {
550
+ reason: err.message,
551
+ stack: err.stack,
552
+ });
553
+
554
+ throw err;
555
+ });
556
+ }
557
+
558
+ /**
559
+ * Disables static meeting link for given conversation url
560
+ * @param {String} conversationUrl conversationUrl that's required to disable static meeting link if it exists
561
+ * @returns {Promise} returns a Promise
562
+ * @public
563
+ * @memberof MeetingInfo
564
+ */
565
+ async disableStaticMeetingLink(conversationUrl: string) {
566
+ if (!this.webex.meetings.preferredWebexSite) {
567
+ throw Error('No preferred webex site found');
568
+ }
569
+
570
+ const body = {
571
+ spaceUrl: conversationUrl,
572
+ };
573
+
574
+ const uri = this.webex.meetings.preferredWebexSite
575
+ ? `https://${this.webex.meetings.preferredWebexSite}/wbxappapi/v2/meetings/spaceInstant/deletePersistentMeeting`
576
+ : '';
577
+
578
+ return this.webex
579
+ .request({
580
+ method: HTTP_VERBS.POST,
581
+ uri,
582
+ body,
583
+ })
584
+ .then((requestResult) => {
585
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DISABLE_STATIC_MEETING_LINK_SUCCESS);
586
+
587
+ return requestResult;
588
+ })
589
+ .catch((err) => {
590
+ if (err?.statusCode === 403) {
591
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETING_IS_IN_PROGRESS_ERROR, {
592
+ reason: err.message,
593
+ stack: err.stack,
594
+ });
595
+
596
+ throw new MeetingInfoV2MeetingIsInProgressError(err.body?.code, err.body?.message);
597
+ }
598
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DISABLE_STATIC_MEETING_LINK_FAILURE, {
599
+ reason: err.message,
600
+ stack: err.stack,
601
+ });
602
+
603
+ throw err;
604
+ });
605
+ }
606
+
366
607
  /**
367
608
  * Fetches meeting info from the server
368
609
  * @param {String} destination one of many different types of destinations to look up info for
@@ -376,6 +617,7 @@ export default class MeetingInfoV2 {
376
617
  * @param {Object} extraParams
377
618
  * @param {Object} options
378
619
  * @param {String} registrationId
620
+ * @param {String} fullSiteUrl
379
621
  * @returns {Promise} returns a meeting info object
380
622
  * @public
381
623
  * @memberof MeetingInfo
@@ -392,7 +634,8 @@ export default class MeetingInfoV2 {
392
634
  locusId = null,
393
635
  extraParams: object = {},
394
636
  options: {meetingId?: string; sendCAevents?: boolean} = {},
395
- registrationId: string = null
637
+ registrationId: string = null,
638
+ fullSiteUrl: string = null
396
639
  ) {
397
640
  const {meetingId, sendCAevents} = options;
398
641
 
@@ -418,6 +661,7 @@ export default class MeetingInfoV2 {
418
661
  locusId,
419
662
  extraParams,
420
663
  registrationId,
664
+ disableWebRedirect: true,
421
665
  });
422
666
 
423
667
  // If the body only contains the default properties, we don't have enough to
@@ -443,7 +687,9 @@ export default class MeetingInfoV2 {
443
687
 
444
688
  const directURI = await MeetingInfoUtil.getDirectMeetingInfoURI(destinationType);
445
689
 
446
- if (directURI) {
690
+ if (fullSiteUrl) {
691
+ requestOptions.uri = `https://${fullSiteUrl}/wbxappapi/v1/meetingInfo`;
692
+ } else if (directURI) {
447
693
  requestOptions.uri = directURI;
448
694
  } else {
449
695
  requestOptions.service = WBXAPPAPI_SERVICE;
@@ -237,6 +237,7 @@ export default class MeetingInfoUtil {
237
237
  locusId,
238
238
  extraParams,
239
239
  registrationId,
240
+ disableWebRedirect,
240
241
  } = options;
241
242
  const body: any = {
242
243
  ...DEFAULT_MEETING_INFO_REQUEST_BODY,
@@ -296,6 +297,10 @@ export default class MeetingInfoUtil {
296
297
  body.locusId = locusId;
297
298
  }
298
299
 
300
+ if (disableWebRedirect) {
301
+ body.disableWebRedirect = disableWebRedirect;
302
+ }
303
+
299
304
  return body;
300
305
  }
301
306