@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
@@ -16,6 +16,7 @@ var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/pr
16
16
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
17
17
  var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
18
18
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
19
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/objectWithoutProperties"));
19
20
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
20
21
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
21
22
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
@@ -29,6 +30,8 @@ var _webexCore = require("@webex/webex-core");
29
30
  var _common = require("@webex/common");
30
31
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
31
32
  var _constants = require("../constants");
33
+ var _util = _interopRequireDefault(require("./util"));
34
+ var _excluded = ["meeting"];
32
35
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
33
36
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
34
37
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -39,11 +42,58 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
39
42
  var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
40
43
  (0, _inherits2.default)(MeetingRequest, _StatelessWebexPlugin);
41
44
  var _super = _createSuper(MeetingRequest);
45
+ /**
46
+ * Constructor
47
+ * @param {Object} attrs
48
+ * @param {Object} options
49
+ */
42
50
  function MeetingRequest(attrs, options) {
43
51
  var _this;
44
52
  (0, _classCallCheck2.default)(this, MeetingRequest);
45
- _this = _super.call(this, attrs, options);
53
+ var meeting = attrs.meeting,
54
+ otherAttrs = (0, _objectWithoutProperties2.default)(attrs, _excluded);
55
+ _this = _super.call(this, otherAttrs, options);
46
56
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "changeVideoLayoutDebounced", void 0);
57
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingRef", void 0);
58
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusDeltaRequest", void 0);
59
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "buildLocusDeltaRequestOptions", void 0);
60
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getJoinCookie", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
61
+ var joinCookieRaw, joinCookie;
62
+ return _regenerator.default.wrap(function _callee$(_context) {
63
+ while (1) switch (_context.prev = _context.next) {
64
+ case 0:
65
+ _context.next = 2;
66
+ return _this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageJoinCookie).catch(function () {});
67
+ case 2:
68
+ joinCookieRaw = _context.sent;
69
+ if (!joinCookieRaw) {
70
+ _context.next = 13;
71
+ break;
72
+ }
73
+ _context.prev = 4;
74
+ joinCookie = JSON.parse(joinCookieRaw);
75
+ if (!joinCookie) {
76
+ _context.next = 8;
77
+ break;
78
+ }
79
+ return _context.abrupt("return", joinCookie);
80
+ case 8:
81
+ _context.next = 13;
82
+ break;
83
+ case 10:
84
+ _context.prev = 10;
85
+ _context.t0 = _context["catch"](4);
86
+ _loggerProxy.default.logger.error("MeetingRequest#constructor --> Error in parsing join cookie data: ".concat(_context.t0));
87
+ case 13:
88
+ return _context.abrupt("return", null);
89
+ case 14:
90
+ case "end":
91
+ return _context.stop();
92
+ }
93
+ }, _callee, null, [[4, 10]]);
94
+ })));
95
+ _this.locusDeltaRequest = _util.default.generateLocusDeltaRequest(meeting);
96
+ _this.buildLocusDeltaRequestOptions = _util.default.generateBuildLocusDeltaRequestOptions(meeting);
47
97
  _this.changeVideoLayoutDebounced = (0, _debounce2.default)(_this.changeVideoLayout, 2000, {
48
98
  leading: true,
49
99
  trailing: true
@@ -52,32 +102,44 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
52
102
  }
53
103
 
54
104
  /**
55
- * Make a network request to join a meeting
56
- * @param {Object} options
57
- * @param {String} options.sipUri
58
- * @param {String} options.deviceUrl
59
- * @param {String} options.locusUrl
60
- * @param {String} options.resourceId,
61
- * @param {String} options.correlationId
62
- * @param {boolean} options.ensureConversation
63
- * @param {boolean} options.moderator
64
- * @param {boolean} options.pin
65
- * @param {boolean} options.moveToResource
66
- * @param {Object} options.roapMessage
67
- * @param {boolean} options.breakoutsSupported
68
- * @returns {Promise}
105
+ * Returns joinCookie from boundedStorage if present.
106
+ * @returns {Object} joinCookie
69
107
  */
70
108
  (0, _createClass2.default)(MeetingRequest, [{
71
109
  key: "joinMeeting",
72
- value: function () {
73
- var _joinMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {
74
- var asResourceOccupant, inviteeAddress, meetingNumber, permissionToken, deviceUrl, locusUrl, resourceId, correlationId, ensureConversation, moderator, pin, moveToResource, roapMessage, preferTranscoding, breakoutsSupported, url, body;
75
- return _regenerator.default.wrap(function _callee$(_context) {
76
- while (1) switch (_context.prev = _context.next) {
110
+ value:
111
+ /**
112
+ * Make a network request to join a meeting
113
+ * @param {Object} options
114
+ * @param {String} options.sipUri
115
+ * @param {String} options.deviceUrl
116
+ * @param {String} options.locusUrl
117
+ * @param {String} options.resourceId,
118
+ * @param {String} options.correlationId
119
+ * @param {boolean} options.ensureConversation
120
+ * @param {boolean} options.moderator
121
+ * @param {boolean} options.pin
122
+ * @param {boolean} options.moveToResource
123
+ * @param {Object} options.roapMessage
124
+ * @param {boolean} options.breakoutsSupported
125
+ * @param {String} options.locale,
126
+ * @param {Array} options.deviceCapabilities
127
+ * @param {boolean} options.liveAnnotationSupported
128
+ * @returns {Promise}
129
+ */
130
+ function () {
131
+ var _joinMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
132
+ var asResourceOccupant, inviteeAddress, meetingNumber, permissionToken, deviceUrl, locusUrl, locusClusterUrl, resourceId, correlationId, ensureConversation, moderator, pin, moveToResource, roapMessage, preferTranscoding, breakoutsSupported, locale, _options$deviceCapabi, deviceCapabilities, liveAnnotationSupported, ipVersion, url, joinCookie, body, clusterUrl;
133
+ return _regenerator.default.wrap(function _callee2$(_context2) {
134
+ while (1) switch (_context2.prev = _context2.next) {
77
135
  case 0:
78
- asResourceOccupant = options.asResourceOccupant, inviteeAddress = options.inviteeAddress, meetingNumber = options.meetingNumber, permissionToken = options.permissionToken, deviceUrl = options.deviceUrl, locusUrl = options.locusUrl, resourceId = options.resourceId, correlationId = options.correlationId, ensureConversation = options.ensureConversation, moderator = options.moderator, pin = options.pin, moveToResource = options.moveToResource, roapMessage = options.roapMessage, preferTranscoding = options.preferTranscoding, breakoutsSupported = options.breakoutsSupported;
136
+ asResourceOccupant = options.asResourceOccupant, inviteeAddress = options.inviteeAddress, meetingNumber = options.meetingNumber, permissionToken = options.permissionToken, deviceUrl = options.deviceUrl, locusUrl = options.locusUrl, locusClusterUrl = options.locusClusterUrl, resourceId = options.resourceId, correlationId = options.correlationId, ensureConversation = options.ensureConversation, moderator = options.moderator, pin = options.pin, moveToResource = options.moveToResource, roapMessage = options.roapMessage, preferTranscoding = options.preferTranscoding, breakoutsSupported = options.breakoutsSupported, locale = options.locale, _options$deviceCapabi = options.deviceCapabilities, deviceCapabilities = _options$deviceCapabi === void 0 ? [] : _options$deviceCapabi, liveAnnotationSupported = options.liveAnnotationSupported, ipVersion = options.ipVersion;
79
137
  _loggerProxy.default.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
80
138
  url = '';
139
+ _context2.next = 5;
140
+ return this.getJoinCookie();
141
+ case 5:
142
+ joinCookie = _context2.sent;
81
143
  body = {
82
144
  asResourceOccupant: asResourceOccupant,
83
145
  device: {
@@ -93,19 +155,31 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
93
155
  ensureConversation: ensureConversation || false,
94
156
  supportsNativeLobby: 1,
95
157
  clientMediaPreferences: {
96
- preferTranscoding: preferTranscoding !== null && preferTranscoding !== void 0 ? preferTranscoding : true
158
+ preferTranscoding: preferTranscoding !== null && preferTranscoding !== void 0 ? preferTranscoding : true,
159
+ joinCookie: joinCookie,
160
+ ipver: ipVersion
97
161
  }
98
162
  };
99
163
  if (breakoutsSupported) {
100
- body.deviceCapabilities = [_constants.BREAKOUTS.BREAKOUTS_SUPPORTED];
164
+ deviceCapabilities.push(_constants.BREAKOUTS.BREAKOUTS_SUPPORTED);
165
+ }
166
+ if (liveAnnotationSupported) {
167
+ deviceCapabilities.push(_constants.ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
168
+ }
169
+ if (locale) {
170
+ body.locale = locale;
101
171
  }
102
172
 
173
+ // add deviceCapabilities prop
174
+ if (deviceCapabilities.length) {
175
+ body.deviceCapabilities = deviceCapabilities;
176
+ }
103
177
  // @ts-ignore
104
- if (this.webex.meetings.clientRegion) {
178
+ if (this.webex.meetings.geoHintInfo) {
105
179
  // @ts-ignore
106
- body.device.countryCode = this.webex.meetings.clientRegion.countryCode;
180
+ body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;
107
181
  // @ts-ignore
108
- body.device.regionCode = this.webex.meetings.clientRegion.regionCode;
182
+ body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;
109
183
  }
110
184
  if (moderator !== undefined) {
111
185
  body.moderator = moderator;
@@ -117,34 +191,44 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
117
191
  body.pin = pin;
118
192
  }
119
193
  if (!locusUrl) {
120
- _context.next = 13;
194
+ _context2.next = 19;
121
195
  break;
122
196
  }
123
197
  url = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
124
- _context.next = 25;
198
+ _context2.next = 36;
125
199
  break;
126
- case 13:
200
+ case 19:
127
201
  if (!(inviteeAddress || meetingNumber)) {
128
- _context.next = 25;
202
+ _context2.next = 36;
203
+ break;
204
+ }
205
+ _context2.prev = 20;
206
+ if (!locusClusterUrl) {
207
+ _context2.next = 25;
129
208
  break;
130
209
  }
131
- _context.prev = 14;
132
- _context.next = 17;
210
+ clusterUrl = "https://".concat(locusClusterUrl, "/locus/api/v1");
211
+ _context2.next = 28;
212
+ break;
213
+ case 25:
214
+ _context2.next = 27;
133
215
  return this.webex.internal.services.waitForCatalog('postauth');
134
- case 17:
216
+ case 27:
135
217
  // @ts-ignore
136
- url = "".concat(this.webex.internal.services.get('locus'), "/").concat(_constants.LOCI, "/").concat(_constants.CALL);
218
+ clusterUrl = this.webex.internal.services.get('locus');
219
+ case 28:
220
+ url = "".concat(clusterUrl, "/").concat(_constants.LOCI, "/").concat(_constants.CALL);
137
221
  body.invitee = {
138
222
  address: inviteeAddress || "wbxmn:".concat(meetingNumber)
139
223
  };
140
- _context.next = 25;
224
+ _context2.next = 36;
141
225
  break;
142
- case 21:
143
- _context.prev = 21;
144
- _context.t0 = _context["catch"](14);
145
- _loggerProxy.default.logger.error("Meeting:request#joinMeeting Error Joining ".concat(inviteeAddress || meetingNumber, " --> ").concat(_context.t0));
146
- throw _context.t0;
147
- case 25:
226
+ case 32:
227
+ _context2.prev = 32;
228
+ _context2.t0 = _context2["catch"](20);
229
+ _loggerProxy.default.logger.error("Meeting:request#joinMeeting Error Joining ".concat(inviteeAddress || meetingNumber, " --> ").concat(_context2.t0));
230
+ throw _context2.t0;
231
+ case 36:
148
232
  // TODO: -- this will be resolved in SDK request
149
233
  url = url.concat("?".concat(_constants.ALTERNATE_REDIRECT_TRUE));
150
234
  if (resourceId === inviteeAddress) {
@@ -157,16 +241,16 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
157
241
  }
158
242
 
159
243
  /// @ts-ignore
160
- return _context.abrupt("return", this.request({
244
+ return _context2.abrupt("return", this.request({
161
245
  method: _constants.HTTP_VERBS.POST,
162
246
  uri: url,
163
247
  body: body
164
248
  }));
165
- case 29:
249
+ case 40:
166
250
  case "end":
167
- return _context.stop();
251
+ return _context2.stop();
168
252
  }
169
- }, _callee, this, [[14, 21]]);
253
+ }, _callee2, this, [[20, 32]]);
170
254
  }));
171
255
  function joinMeeting(_x) {
172
256
  return _joinMeeting.apply(this, arguments);
@@ -183,9 +267,9 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
183
267
  */
184
268
  }, {
185
269
  key: "refreshCaptcha",
186
- value: function refreshCaptcha(_ref) {
187
- var captchaRefreshUrl = _ref.captchaRefreshUrl,
188
- captchaId = _ref.captchaId;
270
+ value: function refreshCaptcha(_ref2) {
271
+ var captchaRefreshUrl = _ref2.captchaRefreshUrl,
272
+ captchaId = _ref2.captchaId;
189
273
  var body = {
190
274
  captchaId: captchaId
191
275
  };
@@ -213,11 +297,11 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
213
297
  */
214
298
  }, {
215
299
  key: "dialIn",
216
- value: function dialIn(_ref2) {
217
- var locusUrl = _ref2.locusUrl,
218
- dialInUrl = _ref2.dialInUrl,
219
- clientUrl = _ref2.clientUrl,
220
- correlationId = _ref2.correlationId;
300
+ value: function dialIn(_ref3) {
301
+ var locusUrl = _ref3.locusUrl,
302
+ dialInUrl = _ref3.dialInUrl,
303
+ clientUrl = _ref3.clientUrl,
304
+ correlationId = _ref3.correlationId;
221
305
  _loggerProxy.default.logger.info('Meeting:request#dialIn --> Provisioning a dial in device', correlationId);
222
306
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
223
307
  var body = {
@@ -231,7 +315,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
231
315
  };
232
316
 
233
317
  // @ts-ignore
234
- return this.request({
318
+ return this.locusDeltaRequest({
235
319
  method: _constants.HTTP_VERBS.POST,
236
320
  uri: uri,
237
321
  body: body
@@ -254,12 +338,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
254
338
  */
255
339
  }, {
256
340
  key: "dialOut",
257
- value: function dialOut(_ref3) {
258
- var locusUrl = _ref3.locusUrl,
259
- dialOutUrl = _ref3.dialOutUrl,
260
- phoneNumber = _ref3.phoneNumber,
261
- clientUrl = _ref3.clientUrl,
262
- correlationId = _ref3.correlationId;
341
+ value: function dialOut(_ref4) {
342
+ var locusUrl = _ref4.locusUrl,
343
+ dialOutUrl = _ref4.dialOutUrl,
344
+ phoneNumber = _ref4.phoneNumber,
345
+ clientUrl = _ref4.clientUrl,
346
+ correlationId = _ref4.correlationId;
263
347
  _loggerProxy.default.logger.info('Meeting:request#dialOut --> Provisioning a dial out device', correlationId);
264
348
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
265
349
  var body = {
@@ -274,7 +358,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
274
358
  };
275
359
 
276
360
  // @ts-ignore
277
- return this.request({
361
+ return this.locusDeltaRequest({
278
362
  method: _constants.HTTP_VERBS.POST,
279
363
  uri: uri,
280
364
  body: body
@@ -285,60 +369,23 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
285
369
  }
286
370
 
287
371
  /**
288
- * Syns the missed delta event
289
- * @param {Object} options
290
- * @param {boolean} options.desync flag to get partial or whole locus object
291
- * @param {String} options.syncUrl sync url to get ht elatest locus delta
292
- * @returns {Promise}
293
- */
294
- }, {
295
- key: "syncMeeting",
296
- value: function syncMeeting(options) {
297
- /* eslint-disable no-else-return */
298
- var desync = options.desync;
299
- var syncUrl = options.syncUrl;
300
-
301
- /* istanbul ignore else */
302
- if (desync) {
303
- // check for existing URL parameters
304
- syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat("".concat(_constants.LOCUS.SYNCDEBUG, "=").concat(desync));
305
- }
306
-
307
- // @ts-ignore
308
- return this.request({
309
- method: _constants.HTTP_VERBS.GET,
310
- uri: syncUrl
311
- }) // TODO: Handle if delta sync failed . Get the full locus object
312
- .catch(function (err) {
313
- _loggerProxy.default.logger.error("Meeting:request#syncMeeting --> Error syncing meeting, error ".concat(err));
314
- return err;
315
- });
316
- }
317
-
318
- /**
319
- * Request to get the complete locus object
372
+ * Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
320
373
  * @param {Object} options
321
- * @param {boolean} options.desync flag to get partial or whole locus object
322
374
  * @param {String} options.locusUrl sync url to get ht elatest locus delta
323
375
  * @returns {Promise}
324
376
  */
325
377
  }, {
326
- key: "getFullLocus",
327
- value: function getFullLocus(options) {
328
- var locusUrl = options.locusUrl;
329
- var desync = options.desync;
330
- if (locusUrl) {
331
- if (desync) {
332
- locusUrl += "?".concat(_constants.LOCUS.SYNCDEBUG, "=").concat(desync);
333
- }
334
-
378
+ key: "getLocusDTO",
379
+ value: function getLocusDTO(options) {
380
+ var url = options.url;
381
+ if (url) {
335
382
  // @ts-ignore
336
383
  return this.request({
337
384
  method: _constants.HTTP_VERBS.GET,
338
- uri: locusUrl
385
+ uri: url
339
386
  }).catch(function (err) {
340
- _loggerProxy.default.logger.error("Meeting:request#getFullLocus --> Error getting full locus, error ".concat(err));
341
- return err;
387
+ _loggerProxy.default.logger.error("Meeting:request#getLocusDTO --> Error getting latest locus, error ".concat(err));
388
+ throw err;
342
389
  });
343
390
  }
344
391
  return _promise.default.reject();
@@ -356,11 +403,11 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
356
403
  */
357
404
  }, {
358
405
  key: "disconnectPhoneAudio",
359
- value: function disconnectPhoneAudio(_ref4) {
360
- var locusUrl = _ref4.locusUrl,
361
- phoneUrl = _ref4.phoneUrl,
362
- correlationId = _ref4.correlationId,
363
- selfId = _ref4.selfId;
406
+ value: function disconnectPhoneAudio(_ref5) {
407
+ var locusUrl = _ref5.locusUrl,
408
+ phoneUrl = _ref5.phoneUrl,
409
+ correlationId = _ref5.correlationId,
410
+ selfId = _ref5.selfId;
364
411
  _loggerProxy.default.logger.info("Meeting:request#disconnectPhoneAudio --> request phone ".concat(phoneUrl, " to leave"), correlationId);
365
412
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(selfId, "/").concat(_constants.LEAVE);
366
413
  var body = {
@@ -372,7 +419,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
372
419
  };
373
420
 
374
421
  // @ts-ignore
375
- return this.request({
422
+ return this.locusDeltaRequest({
376
423
  method: _constants.HTTP_VERBS.PUT,
377
424
  uri: uri,
378
425
  body: body
@@ -383,23 +430,53 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
383
430
  }
384
431
 
385
432
  /**
386
- * Make a network request to leave a meeting
433
+ * Prepares request options to to leave a meeting
387
434
  * @param {Object} options
388
435
  * @param {Url} options.locusUrl
389
436
  * @param {String} options.selfId
390
437
  * @param {Url} options.deviceUrl
391
438
  * @param {String} options.resourceId,
392
439
  * @param {String} options.correlationId
440
+ * @returns {Object} request options
441
+ */
442
+ }, {
443
+ key: "prepareLeaveMeetingRequestOptions",
444
+ value: function prepareLeaveMeetingRequestOptions(_ref6) {
445
+ var locusUrl = _ref6.locusUrl,
446
+ selfId = _ref6.selfId,
447
+ url = _ref6.deviceUrl,
448
+ resourceId = _ref6.resourceId,
449
+ correlationId = _ref6.correlationId;
450
+ var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(selfId, "/").concat(_constants.LEAVE);
451
+ var body = {
452
+ device: {
453
+ // @ts-ignore
454
+ deviceType: this.config.meetings.deviceType,
455
+ url: url
456
+ },
457
+ usingResource: resourceId || null,
458
+ correlationId: correlationId
459
+ };
460
+ return {
461
+ method: _constants.HTTP_VERBS.PUT,
462
+ uri: uri,
463
+ body: body
464
+ };
465
+ }
466
+
467
+ /**
468
+ * Make a network request to leave a meeting
469
+ * @param {Object} options
393
470
  * @returns {Promise}
394
471
  */
395
472
  }, {
396
473
  key: "leaveMeeting",
397
- value: function leaveMeeting(_ref5) {
398
- var locusUrl = _ref5.locusUrl,
399
- selfId = _ref5.selfId,
400
- url = _ref5.deviceUrl,
401
- resourceId = _ref5.resourceId,
402
- correlationId = _ref5.correlationId;
474
+ value: function leaveMeeting(_ref7) {
475
+ var locusUrl = _ref7.locusUrl,
476
+ selfId = _ref7.selfId,
477
+ url = _ref7.deviceUrl,
478
+ resourceId = _ref7.resourceId,
479
+ correlationId = _ref7.correlationId;
403
480
  _loggerProxy.default.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
404
481
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(selfId, "/").concat(_constants.LEAVE);
405
482
  var body = {
@@ -411,15 +488,24 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
411
488
  usingResource: resourceId || null,
412
489
  correlationId: correlationId
413
490
  };
414
-
415
- // @ts-ignore
416
- return this.request({
491
+ return this.locusDeltaRequest({
417
492
  method: _constants.HTTP_VERBS.PUT,
418
493
  uri: uri,
419
494
  body: body
420
495
  });
421
496
  }
422
497
 
498
+ /**
499
+ * Builds request options to leave a meeting
500
+ * @param {Object} options
501
+ * @returns {Object} request options
502
+ */
503
+ }, {
504
+ key: "buildLeaveMeetingRequestOptions",
505
+ value: function buildLeaveMeetingRequestOptions(options) {
506
+ return this.buildLocusDeltaRequestOptions(this.prepareLeaveMeetingRequestOptions(options));
507
+ }
508
+
423
509
  /**
424
510
  * Make a network request to acknowledge a meeting
425
511
  * @param {Object} options
@@ -440,14 +526,19 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
440
526
  },
441
527
  correlationId: options.correlationId
442
528
  };
443
-
444
- // @ts-ignore
445
- return this.request({
529
+ return this.locusDeltaRequest({
446
530
  method: _constants.HTTP_VERBS.PUT,
447
531
  uri: uri,
448
532
  body: body
449
533
  });
450
534
  }
535
+
536
+ /**
537
+ * Makes a network request to lock the meeting
538
+ * @param {Object} options
539
+ * @param {Boolean} options.lock Whether it is locked or not
540
+ * @returns {Promise}
541
+ */
451
542
  }, {
452
543
  key: "lockMeeting",
453
544
  value: function lockMeeting(options) {
@@ -457,9 +548,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
457
548
  locked: options.lock
458
549
  }
459
550
  };
460
-
461
- // @ts-ignore
462
- return this.request({
551
+ return this.locusDeltaRequest({
463
552
  method: _constants.HTTP_VERBS.PATCH,
464
553
  uri: uri,
465
554
  body: body
@@ -487,48 +576,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
487
576
  }, options.reason && {
488
577
  reason: options.reason
489
578
  });
490
-
491
- // @ts-ignore
492
- return this.request({
493
- method: _constants.HTTP_VERBS.PUT,
494
- uri: uri,
495
- body: body
496
- });
497
- }
498
-
499
- /**
500
- * Toggle remote audio and/or video
501
- * @param {Object} options options for toggling
502
- * @param {String} options.selfId Locus self id??
503
- * @param {String} options.locusUrl Locus url
504
- * @param {String} options.deviceUrl Url of a device
505
- * @param {String} options.resourceId Populated if you are paired to a device
506
- * @param {String} options.localMedias local sdps
507
- * @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
508
- * @returns {Promise}
509
- */
510
- }, {
511
- key: "remoteAudioVideoToggle",
512
- value: function remoteAudioVideoToggle(options) {
513
- var _options$preferTransc;
514
- var uri = "".concat(options.locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(options.selfId, "/").concat(_constants.MEDIA);
515
- var body = {
516
- device: {
517
- // @ts-ignore
518
- deviceType: this.config.meetings.deviceType,
519
- url: options.deviceUrl
520
- },
521
- usingResource: options.resourceId || null,
522
- correlationId: options.correlationId,
523
- respOnlySdp: true,
524
- localMedias: options.localMedias,
525
- clientMediaPreferences: {
526
- preferTranscoding: (_options$preferTransc = options.preferTranscoding) !== null && _options$preferTransc !== void 0 ? _options$preferTransc : true
527
- }
528
- };
529
-
530
- // @ts-ignore
531
- return this.request({
579
+ return this.locusDeltaRequest({
532
580
  method: _constants.HTTP_VERBS.PUT,
533
581
  uri: uri,
534
582
  body: body
@@ -576,6 +624,9 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
576
624
  if (options !== null && options !== void 0 && options.resourceToken) {
577
625
  body.resourceToken = options === null || options === void 0 ? void 0 : options.resourceToken;
578
626
  }
627
+ if (options !== null && options !== void 0 && options.annotationInfo) {
628
+ body.annotation = options === null || options === void 0 ? void 0 : options.annotationInfo;
629
+ }
579
630
 
580
631
  // @ts-ignore
581
632
  return this.request({
@@ -595,12 +646,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
595
646
  */
596
647
  }, {
597
648
  key: "sendDTMF",
598
- value: function sendDTMF(_ref6) {
599
- var locusUrl = _ref6.locusUrl,
600
- deviceUrl = _ref6.deviceUrl,
601
- tones = _ref6.tones;
649
+ value: function sendDTMF(_ref8) {
650
+ var locusUrl = _ref8.locusUrl,
651
+ deviceUrl = _ref8.deviceUrl,
652
+ tones = _ref8.tones;
602
653
  // @ts-ignore
603
- return this.request({
654
+ return this.locusDeltaRequest({
604
655
  method: _constants.HTTP_VERBS.POST,
605
656
  uri: "".concat(locusUrl, "/").concat(_constants.SEND_DTMF_ENDPOINT),
606
657
  body: {
@@ -629,12 +680,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
629
680
  */
630
681
  }, {
631
682
  key: "changeVideoLayout",
632
- value: function changeVideoLayout(_ref7) {
633
- var locusUrl = _ref7.locusUrl,
634
- deviceUrl = _ref7.deviceUrl,
635
- layoutType = _ref7.layoutType,
636
- main = _ref7.main,
637
- content = _ref7.content;
683
+ value: function changeVideoLayout(_ref9) {
684
+ var locusUrl = _ref9.locusUrl,
685
+ deviceUrl = _ref9.deviceUrl,
686
+ layoutType = _ref9.layoutType,
687
+ main = _ref9.main,
688
+ content = _ref9.content;
638
689
  // send main/content renderInfo only if both width and height are specified
639
690
  if (main && (!main.width || !main.height)) {
640
691
  return _promise.default.reject(new Error("Both width and height must be specified. One of them is missing for main: ".concat((0, _stringify.default)(main))));
@@ -658,7 +709,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
658
709
  } : undefined;
659
710
 
660
711
  // @ts-ignore
661
- return this.request({
712
+ return this.locusDeltaRequest({
662
713
  method: _constants.HTTP_VERBS.PUT,
663
714
  uri: "".concat(locusUrl, "/").concat(_constants.CONTROLS),
664
715
  body: {
@@ -679,12 +730,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
679
730
  */
680
731
  }, {
681
732
  key: "endMeetingForAll",
682
- value: function endMeetingForAll(_ref8) {
683
- var locusUrl = _ref8.locusUrl;
733
+ value: function endMeetingForAll(_ref10) {
734
+ var locusUrl = _ref10.locusUrl;
684
735
  var uri = "".concat(locusUrl, "/").concat(_constants.END);
685
736
 
686
737
  // @ts-ignore
687
- return this.request({
738
+ return this.locusDeltaRequest({
688
739
  method: _constants.HTTP_VERBS.POST,
689
740
  uri: uri
690
741
  });
@@ -698,8 +749,8 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
698
749
  */
699
750
  }, {
700
751
  key: "keepAlive",
701
- value: function keepAlive(_ref9) {
702
- var keepAliveUrl = _ref9.keepAliveUrl;
752
+ value: function keepAlive(_ref11) {
753
+ var keepAliveUrl = _ref11.keepAliveUrl;
703
754
  // @ts-ignore
704
755
  return this.request({
705
756
  method: _constants.HTTP_VERBS.GET,
@@ -717,10 +768,10 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
717
768
  */
718
769
  }, {
719
770
  key: "sendReaction",
720
- value: function sendReaction(_ref10) {
721
- var reactionChannelUrl = _ref10.reactionChannelUrl,
722
- reaction = _ref10.reaction,
723
- participantId = _ref10.participantId;
771
+ value: function sendReaction(_ref12) {
772
+ var reactionChannelUrl = _ref12.reactionChannelUrl,
773
+ reaction = _ref12.reaction,
774
+ participantId = _ref12.participantId;
724
775
  var uri = reactionChannelUrl;
725
776
 
726
777
  // @ts-ignore
@@ -744,14 +795,14 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
744
795
  */
745
796
  }, {
746
797
  key: "toggleReactions",
747
- value: function toggleReactions(_ref11) {
748
- var enable = _ref11.enable,
749
- locusUrl = _ref11.locusUrl,
750
- requestingParticipantId = _ref11.requestingParticipantId;
798
+ value: function toggleReactions(_ref13) {
799
+ var enable = _ref13.enable,
800
+ locusUrl = _ref13.locusUrl,
801
+ requestingParticipantId = _ref13.requestingParticipantId;
751
802
  var uri = "".concat(locusUrl, "/").concat(_constants.CONTROLS);
752
803
 
753
804
  // @ts-ignore
754
- return this.request({
805
+ return this.locusDeltaRequest({
755
806
  method: _constants.HTTP_VERBS.PUT,
756
807
  uri: uri,
757
808
  body: {
@@ -762,6 +813,15 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
762
813
  }
763
814
  });
764
815
  }
816
+ }, {
817
+ key: "getLocusStatusByUrl",
818
+ value: function getLocusStatusByUrl(locusUrl) {
819
+ // @ts-ignore
820
+ return this.request({
821
+ method: _constants.HTTP_VERBS.GET,
822
+ uri: locusUrl
823
+ });
824
+ }
765
825
  }]);
766
826
  return MeetingRequest;
767
827
  }(_webexCore.StatelessWebexPlugin);