@webex/plugin-meetings 3.0.0-beta.5 → 3.0.0-beta.50

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 (498) hide show
  1. package/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/breakouts/breakout.js +137 -0
  4. package/dist/breakouts/breakout.js.map +1 -0
  5. package/dist/breakouts/collection.js +23 -0
  6. package/dist/breakouts/collection.js.map +1 -0
  7. package/dist/breakouts/edit-lock-error.js +52 -0
  8. package/dist/breakouts/edit-lock-error.js.map +1 -0
  9. package/dist/breakouts/index.js +555 -0
  10. package/dist/breakouts/index.js.map +1 -0
  11. package/dist/breakouts/request.js +78 -0
  12. package/dist/breakouts/request.js.map +1 -0
  13. package/dist/breakouts/utils.js +48 -0
  14. package/dist/breakouts/utils.js.map +1 -0
  15. package/dist/common/browser-detection.js +1 -20
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +5 -20
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js +0 -7
  20. package/dist/common/config.js.map +1 -1
  21. package/dist/common/errors/captcha-error.js +10 -24
  22. package/dist/common/errors/captcha-error.js.map +1 -1
  23. package/dist/common/errors/intent-to-join.js +11 -24
  24. package/dist/common/errors/intent-to-join.js.map +1 -1
  25. package/dist/common/errors/join-meeting.js +12 -25
  26. package/dist/common/errors/join-meeting.js.map +1 -1
  27. package/dist/common/errors/media.js +10 -24
  28. package/dist/common/errors/media.js.map +1 -1
  29. package/dist/common/errors/parameter.js +5 -33
  30. package/dist/common/errors/parameter.js.map +1 -1
  31. package/dist/common/errors/password-error.js +10 -24
  32. package/dist/common/errors/password-error.js.map +1 -1
  33. package/dist/common/errors/permission.js +9 -23
  34. package/dist/common/errors/permission.js.map +1 -1
  35. package/dist/common/errors/reconnection-in-progress.js +0 -17
  36. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  37. package/dist/common/errors/reconnection.js +10 -24
  38. package/dist/common/errors/reconnection.js.map +1 -1
  39. package/dist/common/errors/stats.js +10 -24
  40. package/dist/common/errors/stats.js.map +1 -1
  41. package/dist/common/errors/webex-errors.js +6 -41
  42. package/dist/common/errors/webex-errors.js.map +1 -1
  43. package/dist/common/errors/webex-meetings-error.js +5 -25
  44. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  45. package/dist/common/events/events-scope.js +0 -22
  46. package/dist/common/events/events-scope.js.map +1 -1
  47. package/dist/common/events/events.js +0 -23
  48. package/dist/common/events/events.js.map +1 -1
  49. package/dist/common/events/trigger-proxy.js +0 -12
  50. package/dist/common/events/trigger-proxy.js.map +1 -1
  51. package/dist/common/events/util.js +0 -15
  52. package/dist/common/events/util.js.map +1 -1
  53. package/dist/common/logs/logger-config.js +0 -4
  54. package/dist/common/logs/logger-config.js.map +1 -1
  55. package/dist/common/logs/logger-proxy.js +1 -8
  56. package/dist/common/logs/logger-proxy.js.map +1 -1
  57. package/dist/common/logs/request.js +37 -60
  58. package/dist/common/logs/request.js.map +1 -1
  59. package/dist/common/queue.js +4 -14
  60. package/dist/common/queue.js.map +1 -1
  61. package/dist/config.js +6 -6
  62. package/dist/config.js.map +1 -1
  63. package/dist/constants.js +122 -49
  64. package/dist/constants.js.map +1 -1
  65. package/dist/controls-options-manager/constants.js +14 -0
  66. package/dist/controls-options-manager/constants.js.map +1 -0
  67. package/dist/controls-options-manager/enums.js +16 -0
  68. package/dist/controls-options-manager/enums.js.map +1 -0
  69. package/dist/controls-options-manager/index.js +240 -0
  70. package/dist/controls-options-manager/index.js.map +1 -0
  71. package/dist/controls-options-manager/util.js +39 -0
  72. package/dist/controls-options-manager/util.js.map +1 -0
  73. package/dist/index.js +11 -18
  74. package/dist/index.js.map +1 -1
  75. package/dist/locus-info/controlsUtils.js +17 -30
  76. package/dist/locus-info/controlsUtils.js.map +1 -1
  77. package/dist/locus-info/embeddedAppsUtils.js +3 -26
  78. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  79. package/dist/locus-info/fullState.js +0 -15
  80. package/dist/locus-info/fullState.js.map +1 -1
  81. package/dist/locus-info/hostUtils.js +4 -12
  82. package/dist/locus-info/hostUtils.js.map +1 -1
  83. package/dist/locus-info/index.js +220 -192
  84. package/dist/locus-info/index.js.map +1 -1
  85. package/dist/locus-info/infoUtils.js +3 -37
  86. package/dist/locus-info/infoUtils.js.map +1 -1
  87. package/dist/locus-info/mediaSharesUtils.js +12 -38
  88. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  89. package/dist/locus-info/parser.js +92 -118
  90. package/dist/locus-info/parser.js.map +1 -1
  91. package/dist/locus-info/selfUtils.js +61 -90
  92. package/dist/locus-info/selfUtils.js.map +1 -1
  93. package/dist/media/index.js +56 -146
  94. package/dist/media/index.js.map +1 -1
  95. package/dist/media/properties.js +83 -117
  96. package/dist/media/properties.js.map +1 -1
  97. package/dist/media/util.js +2 -9
  98. package/dist/media/util.js.map +1 -1
  99. package/dist/mediaQualityMetrics/config.js +505 -495
  100. package/dist/mediaQualityMetrics/config.js.map +1 -1
  101. package/dist/meeting/in-meeting-actions.js +25 -14
  102. package/dist/meeting/in-meeting-actions.js.map +1 -1
  103. package/dist/meeting/index.js +2205 -2211
  104. package/dist/meeting/index.js.map +1 -1
  105. package/dist/meeting/muteState.js +102 -100
  106. package/dist/meeting/muteState.js.map +1 -1
  107. package/dist/meeting/request.js +308 -264
  108. package/dist/meeting/request.js.map +1 -1
  109. package/dist/meeting/request.type.js +7 -0
  110. package/dist/meeting/request.type.js.map +1 -0
  111. package/dist/meeting/state.js +21 -31
  112. package/dist/meeting/state.js.map +1 -1
  113. package/dist/meeting/util.js +60 -217
  114. package/dist/meeting/util.js.map +1 -1
  115. package/dist/meeting-info/collection.js +6 -25
  116. package/dist/meeting-info/collection.js.map +1 -1
  117. package/dist/meeting-info/index.js +14 -32
  118. package/dist/meeting-info/index.js.map +1 -1
  119. package/dist/meeting-info/meeting-info-v2.js +193 -268
  120. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  121. package/dist/meeting-info/request.js +3 -15
  122. package/dist/meeting-info/request.js.map +1 -1
  123. package/dist/meeting-info/util.js +98 -183
  124. package/dist/meeting-info/util.js.map +1 -1
  125. package/dist/meeting-info/utilv2.js +137 -228
  126. package/dist/meeting-info/utilv2.js.map +1 -1
  127. package/dist/meetings/collection.js +5 -20
  128. package/dist/meetings/collection.js.map +1 -1
  129. package/dist/meetings/index.js +490 -560
  130. package/dist/meetings/index.js.map +1 -1
  131. package/dist/meetings/request.js +24 -41
  132. package/dist/meetings/request.js.map +1 -1
  133. package/dist/meetings/util.js +116 -155
  134. package/dist/meetings/util.js.map +1 -1
  135. package/dist/member/index.js +78 -86
  136. package/dist/member/index.js.map +1 -1
  137. package/dist/member/util.js +31 -68
  138. package/dist/member/util.js.map +1 -1
  139. package/dist/members/collection.js +3 -12
  140. package/dist/members/collection.js.map +1 -1
  141. package/dist/members/index.js +110 -203
  142. package/dist/members/index.js.map +1 -1
  143. package/dist/members/request.js +16 -39
  144. package/dist/members/request.js.map +1 -1
  145. package/dist/members/util.js +42 -50
  146. package/dist/members/util.js.map +1 -1
  147. package/dist/metrics/config.js +1 -13
  148. package/dist/metrics/config.js.map +1 -1
  149. package/dist/metrics/constants.js +1 -6
  150. package/dist/metrics/constants.js.map +1 -1
  151. package/dist/metrics/index.js +54 -156
  152. package/dist/metrics/index.js.map +1 -1
  153. package/dist/multistream/mediaRequestManager.js +74 -52
  154. package/dist/multistream/mediaRequestManager.js.map +1 -1
  155. package/dist/multistream/receiveSlot.js +48 -65
  156. package/dist/multistream/receiveSlot.js.map +1 -1
  157. package/dist/multistream/receiveSlotManager.js +58 -93
  158. package/dist/multistream/receiveSlotManager.js.map +1 -1
  159. package/dist/multistream/remoteMedia.js +60 -76
  160. package/dist/multistream/remoteMedia.js.map +1 -1
  161. package/dist/multistream/remoteMediaGroup.js +6 -40
  162. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  163. package/dist/multistream/remoteMediaManager.js +446 -442
  164. package/dist/multistream/remoteMediaManager.js.map +1 -1
  165. package/dist/networkQualityMonitor/index.js +40 -59
  166. package/dist/networkQualityMonitor/index.js.map +1 -1
  167. package/dist/personal-meeting-room/index.js +21 -45
  168. package/dist/personal-meeting-room/index.js.map +1 -1
  169. package/dist/personal-meeting-room/request.js +1 -31
  170. package/dist/personal-meeting-room/request.js.map +1 -1
  171. package/dist/personal-meeting-room/util.js +0 -13
  172. package/dist/personal-meeting-room/util.js.map +1 -1
  173. package/dist/reachability/index.js +192 -191
  174. package/dist/reachability/index.js.map +1 -1
  175. package/dist/reachability/request.js +15 -23
  176. package/dist/reachability/request.js.map +1 -1
  177. package/dist/reactions/constants.js +13 -0
  178. package/dist/reactions/constants.js.map +1 -0
  179. package/dist/reactions/reactions.js +109 -0
  180. package/dist/reactions/reactions.js.map +1 -0
  181. package/dist/reactions/reactions.type.js +36 -0
  182. package/dist/reactions/reactions.type.js.map +1 -0
  183. package/dist/reconnection-manager/index.js +322 -456
  184. package/dist/reconnection-manager/index.js.map +1 -1
  185. package/dist/recording-controller/enums.js +17 -0
  186. package/dist/recording-controller/enums.js.map +1 -0
  187. package/dist/recording-controller/index.js +343 -0
  188. package/dist/recording-controller/index.js.map +1 -0
  189. package/dist/recording-controller/util.js +63 -0
  190. package/dist/recording-controller/util.js.map +1 -0
  191. package/dist/roap/index.js +48 -70
  192. package/dist/roap/index.js.map +1 -1
  193. package/dist/roap/request.js +143 -131
  194. package/dist/roap/request.js.map +1 -1
  195. package/dist/roap/turnDiscovery.js +91 -98
  196. package/dist/roap/turnDiscovery.js.map +1 -1
  197. package/dist/statsAnalyzer/global.js +1 -95
  198. package/dist/statsAnalyzer/global.js.map +1 -1
  199. package/dist/statsAnalyzer/index.js +372 -455
  200. package/dist/statsAnalyzer/index.js.map +1 -1
  201. package/dist/statsAnalyzer/mqaUtil.js +143 -87
  202. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  203. package/dist/transcription/index.js +22 -47
  204. package/dist/transcription/index.js.map +1 -1
  205. package/dist/types/breakouts/breakout.d.ts +8 -0
  206. package/dist/types/breakouts/collection.d.ts +5 -0
  207. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  208. package/dist/types/breakouts/index.d.ts +5 -0
  209. package/dist/types/breakouts/request.d.ts +22 -0
  210. package/dist/types/breakouts/utils.d.ts +8 -0
  211. package/dist/types/common/browser-detection.d.ts +9 -0
  212. package/dist/types/common/collection.d.ts +48 -0
  213. package/dist/types/common/config.d.ts +2 -0
  214. package/dist/types/common/errors/captcha-error.d.ts +15 -0
  215. package/dist/types/common/errors/intent-to-join.d.ts +16 -0
  216. package/dist/types/common/errors/join-meeting.d.ts +17 -0
  217. package/dist/types/common/errors/media.d.ts +15 -0
  218. package/dist/types/common/errors/parameter.d.ts +15 -0
  219. package/dist/types/common/errors/password-error.d.ts +15 -0
  220. package/dist/types/common/errors/permission.d.ts +14 -0
  221. package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
  222. package/dist/types/common/errors/reconnection.d.ts +15 -0
  223. package/dist/types/common/errors/stats.d.ts +15 -0
  224. package/dist/types/common/errors/webex-errors.d.ts +69 -0
  225. package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
  226. package/dist/types/common/events/events-scope.d.ts +17 -0
  227. package/dist/types/common/events/events.d.ts +12 -0
  228. package/dist/types/common/events/trigger-proxy.d.ts +2 -0
  229. package/dist/types/common/events/util.d.ts +2 -0
  230. package/dist/types/common/logs/logger-config.d.ts +2 -0
  231. package/dist/types/common/logs/logger-proxy.d.ts +2 -0
  232. package/dist/types/common/logs/request.d.ts +34 -0
  233. package/dist/types/common/queue.d.ts +32 -0
  234. package/dist/types/config.d.ts +77 -0
  235. package/dist/types/constants.d.ts +928 -0
  236. package/dist/types/controls-options-manager/constants.d.ts +4 -0
  237. package/dist/types/controls-options-manager/enums.d.ts +6 -0
  238. package/dist/types/controls-options-manager/index.d.ts +128 -0
  239. package/dist/types/controls-options-manager/util.d.ts +9 -0
  240. package/dist/types/index.d.ts +6 -0
  241. package/dist/types/locus-info/controlsUtils.d.ts +2 -0
  242. package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
  243. package/dist/types/locus-info/fullState.d.ts +2 -0
  244. package/dist/types/locus-info/hostUtils.d.ts +2 -0
  245. package/dist/types/locus-info/index.d.ts +276 -0
  246. package/dist/types/locus-info/infoUtils.d.ts +2 -0
  247. package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
  248. package/dist/types/locus-info/parser.d.ts +212 -0
  249. package/dist/types/locus-info/selfUtils.d.ts +2 -0
  250. package/dist/types/media/index.d.ts +32 -0
  251. package/dist/types/media/properties.d.ts +108 -0
  252. package/dist/types/media/util.d.ts +2 -0
  253. package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
  254. package/dist/types/meeting/in-meeting-actions.d.ts +95 -0
  255. package/dist/types/meeting/index.d.ts +1719 -0
  256. package/dist/types/meeting/muteState.d.ts +132 -0
  257. package/dist/types/meeting/request.d.ts +271 -0
  258. package/dist/types/meeting/request.type.d.ts +11 -0
  259. package/dist/types/meeting/state.d.ts +9 -0
  260. package/dist/types/meeting/util.d.ts +2 -0
  261. package/dist/types/meeting-info/collection.d.ts +20 -0
  262. package/dist/types/meeting-info/index.d.ts +57 -0
  263. package/dist/types/meeting-info/meeting-info-v2.d.ts +93 -0
  264. package/dist/types/meeting-info/request.d.ts +22 -0
  265. package/dist/types/meeting-info/util.d.ts +2 -0
  266. package/dist/types/meeting-info/utilv2.d.ts +2 -0
  267. package/dist/types/meetings/collection.d.ts +23 -0
  268. package/dist/types/meetings/index.d.ts +297 -0
  269. package/dist/types/meetings/request.d.ts +27 -0
  270. package/dist/types/meetings/util.d.ts +18 -0
  271. package/dist/types/member/index.d.ts +146 -0
  272. package/dist/types/member/util.d.ts +2 -0
  273. package/dist/types/members/collection.d.ts +24 -0
  274. package/dist/types/members/index.d.ts +325 -0
  275. package/dist/types/members/request.d.ts +50 -0
  276. package/dist/types/members/util.d.ts +2 -0
  277. package/dist/types/metrics/config.d.ts +169 -0
  278. package/dist/types/metrics/constants.d.ts +53 -0
  279. package/dist/types/metrics/index.d.ts +152 -0
  280. package/dist/types/multistream/mediaRequestManager.d.ts +51 -0
  281. package/dist/types/multistream/receiveSlot.d.ts +64 -0
  282. package/dist/types/multistream/receiveSlotManager.d.ts +49 -0
  283. package/dist/types/multistream/remoteMedia.d.ts +100 -0
  284. package/dist/types/multistream/remoteMediaGroup.d.ts +56 -0
  285. package/dist/types/multistream/remoteMediaManager.d.ts +259 -0
  286. package/dist/types/networkQualityMonitor/index.d.ts +70 -0
  287. package/dist/types/personal-meeting-room/index.d.ts +47 -0
  288. package/dist/types/personal-meeting-room/request.d.ts +14 -0
  289. package/dist/types/personal-meeting-room/util.d.ts +2 -0
  290. package/dist/types/reachability/index.d.ts +152 -0
  291. package/dist/types/reachability/request.d.ts +37 -0
  292. package/dist/types/reactions/constants.d.ts +3 -0
  293. package/dist/types/reactions/reactions.d.ts +4 -0
  294. package/dist/types/reactions/reactions.type.d.ts +52 -0
  295. package/dist/types/reconnection-manager/index.d.ts +117 -0
  296. package/dist/types/recording-controller/enums.d.ts +7 -0
  297. package/dist/types/recording-controller/index.d.ts +193 -0
  298. package/dist/types/recording-controller/util.d.ts +13 -0
  299. package/dist/types/roap/index.d.ts +77 -0
  300. package/dist/types/roap/request.d.ts +38 -0
  301. package/dist/types/roap/turnDiscovery.d.ts +74 -0
  302. package/dist/types/statsAnalyzer/global.d.ts +36 -0
  303. package/dist/types/statsAnalyzer/index.d.ts +195 -0
  304. package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
  305. package/dist/types/transcription/index.d.ts +64 -0
  306. package/internal-README.md +7 -6
  307. package/package.json +27 -21
  308. package/src/breakouts/README.md +199 -0
  309. package/src/breakouts/breakout.ts +130 -0
  310. package/src/breakouts/collection.ts +19 -0
  311. package/src/breakouts/edit-lock-error.ts +25 -0
  312. package/src/breakouts/index.ts +511 -0
  313. package/src/breakouts/request.ts +55 -0
  314. package/src/breakouts/utils.ts +39 -0
  315. package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
  316. package/src/common/collection.ts +9 -7
  317. package/src/common/{config.js → config.ts} +1 -1
  318. package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
  319. package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
  320. package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
  321. package/src/common/errors/{media.js → media.ts} +11 -7
  322. package/src/common/errors/parameter.ts +11 -7
  323. package/src/common/errors/{password-error.js → password-error.ts} +11 -7
  324. package/src/common/errors/{permission.js → permission.ts} +10 -6
  325. package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
  326. package/src/common/errors/{stats.js → stats.ts} +11 -7
  327. package/src/common/errors/{webex-errors.js → webex-errors.ts} +8 -7
  328. package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
  329. package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
  330. package/src/common/events/{events.js → events.ts} +5 -1
  331. package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
  332. package/src/common/events/{util.js → util.ts} +2 -3
  333. package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
  334. package/src/common/logs/logger-proxy.ts +44 -0
  335. package/src/common/logs/{request.js → request.ts} +22 -9
  336. package/src/common/queue.ts +1 -2
  337. package/src/{config.js → config.ts} +17 -12
  338. package/src/constants.ts +76 -5
  339. package/src/controls-options-manager/constants.ts +5 -0
  340. package/src/controls-options-manager/enums.ts +7 -0
  341. package/src/controls-options-manager/index.ts +218 -0
  342. package/src/controls-options-manager/util.ts +30 -0
  343. package/src/index.js +4 -1
  344. package/src/locus-info/controlsUtils.ts +122 -0
  345. package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
  346. package/src/locus-info/{fullState.js → fullState.ts} +16 -12
  347. package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
  348. package/src/locus-info/{index.js → index.ts} +192 -67
  349. package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
  350. package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +17 -17
  351. package/src/locus-info/{parser.js → parser.ts} +67 -79
  352. package/src/locus-info/{selfUtils.js → selfUtils.ts} +157 -68
  353. package/src/media/{index.js → index.ts} +179 -176
  354. package/src/media/{properties.js → properties.ts} +60 -37
  355. package/src/media/{util.js → util.ts} +2 -2
  356. package/src/mediaQualityMetrics/config.ts +384 -0
  357. package/src/meeting/in-meeting-actions.ts +55 -3
  358. package/src/meeting/{index.js → index.ts} +2590 -1576
  359. package/src/meeting/{muteState.js → muteState.ts} +138 -73
  360. package/src/meeting/{request.js → request.ts} +326 -142
  361. package/src/meeting/request.type.ts +13 -0
  362. package/src/meeting/{state.js → state.ts} +50 -35
  363. package/src/meeting/{util.js → util.ts} +128 -115
  364. package/src/meeting-info/{collection.js → collection.ts} +6 -2
  365. package/src/meeting-info/{index.js → index.ts} +42 -36
  366. package/src/meeting-info/meeting-info-v2.ts +273 -0
  367. package/src/meeting-info/{request.js → request.ts} +14 -4
  368. package/src/meeting-info/{util.js → util.ts} +60 -51
  369. package/src/meeting-info/{utilv2.js → utilv2.ts} +65 -58
  370. package/src/meetings/{collection.js → collection.ts} +6 -3
  371. package/src/meetings/index.ts +1159 -0
  372. package/src/meetings/{request.js → request.ts} +32 -25
  373. package/src/meetings/{util.js → util.ts} +58 -32
  374. package/src/member/{index.js → index.ts} +102 -56
  375. package/src/member/{util.js → util.ts} +52 -25
  376. package/src/members/{collection.js → collection.ts} +2 -2
  377. package/src/members/{index.js → index.ts} +231 -144
  378. package/src/members/{request.js → request.ts} +60 -16
  379. package/src/members/{util.js → util.ts} +69 -54
  380. package/src/metrics/{config.js → config.ts} +253 -92
  381. package/src/metrics/{constants.js → constants.ts} +0 -6
  382. package/src/metrics/{index.js → index.ts} +105 -94
  383. package/src/multistream/mediaRequestManager.ts +101 -39
  384. package/src/multistream/receiveSlot.ts +62 -26
  385. package/src/multistream/receiveSlotManager.ts +50 -38
  386. package/src/multistream/remoteMedia.ts +38 -5
  387. package/src/multistream/remoteMediaGroup.ts +4 -3
  388. package/src/multistream/remoteMediaManager.ts +209 -62
  389. package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
  390. package/src/personal-meeting-room/{index.js → index.ts} +28 -19
  391. package/src/personal-meeting-room/{request.js → request.ts} +13 -4
  392. package/src/personal-meeting-room/{util.js → util.ts} +4 -4
  393. package/src/reachability/{index.js → index.ts} +157 -94
  394. package/src/reachability/request.ts +46 -35
  395. package/src/reactions/constants.ts +4 -0
  396. package/src/reactions/reactions.ts +104 -0
  397. package/src/reactions/reactions.type.ts +62 -0
  398. package/src/reconnection-manager/{index.js → index.ts} +196 -103
  399. package/src/recording-controller/enums.ts +8 -0
  400. package/src/recording-controller/index.ts +315 -0
  401. package/src/recording-controller/util.ts +58 -0
  402. package/src/roap/{index.js → index.ts} +77 -60
  403. package/src/roap/request.ts +172 -0
  404. package/src/roap/turnDiscovery.ts +81 -41
  405. package/src/statsAnalyzer/global.ts +37 -0
  406. package/src/statsAnalyzer/index.ts +1242 -0
  407. package/src/statsAnalyzer/mqaUtil.ts +291 -0
  408. package/src/transcription/{index.js → index.ts} +46 -39
  409. package/test/integration/spec/converged-space-meetings.js +176 -0
  410. package/test/integration/spec/journey.js +665 -464
  411. package/test/integration/spec/space-meeting.js +320 -206
  412. package/test/integration/spec/transcription.js +7 -8
  413. package/test/unit/spec/breakouts/breakout.ts +147 -0
  414. package/test/unit/spec/breakouts/collection.ts +15 -0
  415. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  416. package/test/unit/spec/breakouts/index.ts +707 -0
  417. package/test/unit/spec/breakouts/request.ts +104 -0
  418. package/test/unit/spec/breakouts/utils.js +47 -0
  419. package/test/unit/spec/common/browser-detection.js +9 -28
  420. package/test/unit/spec/controls-options-manager/index.js +180 -0
  421. package/test/unit/spec/controls-options-manager/util.js +86 -0
  422. package/test/unit/spec/fixture/locus.js +92 -90
  423. package/test/unit/spec/locus-info/controlsUtils.js +112 -34
  424. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  425. package/test/unit/spec/locus-info/index.js +219 -2
  426. package/test/unit/spec/locus-info/infoUtils.js +41 -32
  427. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  428. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  429. package/test/unit/spec/locus-info/parser.js +3 -9
  430. package/test/unit/spec/locus-info/selfConstant.js +101 -103
  431. package/test/unit/spec/locus-info/selfUtils.js +128 -12
  432. package/test/unit/spec/media/index.ts +72 -8
  433. package/test/unit/spec/media/properties.ts +9 -9
  434. package/test/unit/spec/meeting/in-meeting-actions.ts +23 -2
  435. package/test/unit/spec/meeting/index.js +2490 -802
  436. package/test/unit/spec/meeting/muteState.js +146 -61
  437. package/test/unit/spec/meeting/request.js +141 -43
  438. package/test/unit/spec/meeting/utils.js +134 -164
  439. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  440. package/test/unit/spec/meeting-info/request.js +7 -9
  441. package/test/unit/spec/meeting-info/util.js +11 -12
  442. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  443. package/test/unit/spec/meetings/collection.js +1 -1
  444. package/test/unit/spec/meetings/index.js +439 -257
  445. package/test/unit/spec/meetings/utils.js +14 -12
  446. package/test/unit/spec/member/index.js +0 -1
  447. package/test/unit/spec/member/util.js +31 -7
  448. package/test/unit/spec/members/index.js +179 -54
  449. package/test/unit/spec/members/request.js +29 -20
  450. package/test/unit/spec/members/utils.js +119 -4
  451. package/test/unit/spec/metrics/index.js +16 -21
  452. package/test/unit/spec/multistream/mediaRequestManager.ts +318 -64
  453. package/test/unit/spec/multistream/receiveSlot.ts +68 -17
  454. package/test/unit/spec/multistream/receiveSlotManager.ts +60 -38
  455. package/test/unit/spec/multistream/remoteMedia.ts +38 -2
  456. package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
  457. package/test/unit/spec/multistream/remoteMediaManager.ts +539 -65
  458. package/test/unit/spec/networkQualityMonitor/index.js +24 -18
  459. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  460. package/test/unit/spec/reachability/index.ts +176 -27
  461. package/test/unit/spec/reachability/request.js +66 -0
  462. package/test/unit/spec/reconnection-manager/index.js +58 -30
  463. package/test/unit/spec/recording-controller/index.js +231 -0
  464. package/test/unit/spec/recording-controller/util.js +102 -0
  465. package/test/unit/spec/roap/index.ts +12 -8
  466. package/test/unit/spec/roap/request.ts +217 -0
  467. package/test/unit/spec/roap/turnDiscovery.ts +72 -49
  468. package/test/unit/spec/stats-analyzer/index.js +108 -57
  469. package/test/utils/cmr.js +44 -42
  470. package/test/utils/constants.js +9 -0
  471. package/test/utils/testUtils.js +98 -77
  472. package/test/utils/webex-config.js +22 -18
  473. package/test/utils/webex-test-users.js +57 -50
  474. package/tsconfig.json +6 -0
  475. package/dist/media/internal-media-core-wrapper.js +0 -22
  476. package/dist/media/internal-media-core-wrapper.js.map +0 -1
  477. package/dist/meeting/effectsState.js +0 -327
  478. package/dist/meeting/effectsState.js.map +0 -1
  479. package/dist/multistream/multistreamMedia.js +0 -116
  480. package/dist/multistream/multistreamMedia.js.map +0 -1
  481. package/dist/peer-connection-manager/util.js +0 -124
  482. package/dist/peer-connection-manager/util.js.map +0 -1
  483. package/src/common/logs/logger-proxy.js +0 -33
  484. package/src/locus-info/controlsUtils.js +0 -102
  485. package/src/media/internal-media-core-wrapper.ts +0 -9
  486. package/src/mediaQualityMetrics/config.js +0 -382
  487. package/src/meeting/effectsState.js +0 -205
  488. package/src/meeting-info/meeting-info-v2.js +0 -255
  489. package/src/meetings/index.js +0 -1015
  490. package/src/multistream/multistreamMedia.ts +0 -92
  491. package/src/peer-connection-manager/util.ts +0 -117
  492. package/src/roap/request.js +0 -127
  493. package/src/statsAnalyzer/global.js +0 -133
  494. package/src/statsAnalyzer/index.js +0 -1006
  495. package/src/statsAnalyzer/mqaUtil.js +0 -173
  496. package/test/unit/spec/meeting/effectsState.js +0 -291
  497. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
  498. /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
@@ -1,61 +1,36 @@
1
1
  "use strict";
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
4
-
5
4
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
6
-
7
5
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
8
-
9
6
  _Object$defineProperty(exports, "__esModule", {
10
7
  value: true
11
8
  });
12
-
13
9
  exports.default = void 0;
14
-
15
10
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
16
-
17
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
18
-
19
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
20
-
13
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
21
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
22
-
23
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
24
-
25
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
26
-
17
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
27
18
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
28
-
29
19
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
30
-
31
20
  var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
32
-
33
21
  var _constants = require("../constants");
34
-
35
22
  var _metrics = _interopRequireDefault(require("../metrics"));
36
-
37
23
  var _config = require("../metrics/config");
38
-
39
- var _infoUtils = _interopRequireDefault(require("../locus-info/infoUtils"));
40
-
41
- var _fullState = _interopRequireDefault(require("../locus-info/fullState"));
42
-
43
- var _selfUtils = _interopRequireDefault(require("../locus-info/selfUtils"));
44
-
45
- var _hostUtils = _interopRequireDefault(require("../locus-info/hostUtils"));
46
-
47
- var _controlsUtils = _interopRequireDefault(require("../locus-info/controlsUtils"));
48
-
49
- var _embeddedAppsUtils = _interopRequireDefault(require("../locus-info/embeddedAppsUtils"));
50
-
51
- var _mediaSharesUtils = _interopRequireDefault(require("../locus-info/mediaSharesUtils"));
52
-
53
- var _parser = _interopRequireDefault(require("../locus-info/parser"));
54
-
24
+ var _infoUtils = _interopRequireDefault(require("./infoUtils"));
25
+ var _fullState = _interopRequireDefault(require("./fullState"));
26
+ var _selfUtils = _interopRequireDefault(require("./selfUtils"));
27
+ var _hostUtils = _interopRequireDefault(require("./hostUtils"));
28
+ var _controlsUtils = _interopRequireDefault(require("./controlsUtils"));
29
+ var _embeddedAppsUtils = _interopRequireDefault(require("./embeddedAppsUtils"));
30
+ var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
31
+ var _parser = _interopRequireDefault(require("./parser"));
55
32
  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); }; }
56
-
57
33
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
58
-
59
34
  /**
60
35
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
61
36
  * @export
@@ -64,14 +39,46 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
64
39
  */
65
40
  var LocusInfo = /*#__PURE__*/function (_EventsScope) {
66
41
  (0, _inherits2.default)(LocusInfo, _EventsScope);
67
-
68
42
  var _super = _createSuper(LocusInfo);
69
-
43
+ /**
44
+ * Constructor
45
+ * @param {boolean} updateMeeting true if the meeting should be updated
46
+ * @param {object} webex
47
+ * @param {string} meetingId
48
+ * @returns {undefined}
49
+ */
70
50
  function LocusInfo(updateMeeting, webex, meetingId) {
71
51
  var _this;
72
-
73
52
  (0, _classCallCheck2.default)(this, LocusInfo);
74
53
  _this = _super.call(this);
54
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "compareAndUpdateFlags", void 0);
55
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "emitChange", void 0);
56
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusParser", void 0);
57
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingId", void 0);
58
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parsedLocus", void 0);
59
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMeeting", void 0);
60
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webex", void 0);
61
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aclUrl", void 0);
62
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "baseSequence", void 0);
63
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "created", void 0);
64
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deltaParticipants", void 0);
65
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "identities", void 0);
66
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "membership", void 0);
67
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participants", void 0);
68
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participantsUrl", void 0);
69
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaces", void 0);
70
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduledMeeting", void 0);
71
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sequence", void 0);
72
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", void 0);
73
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
74
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "embeddedApps", void 0);
75
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fullState", void 0);
76
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "host", void 0);
77
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "info", void 0);
78
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaShares", void 0);
79
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replace", void 0);
80
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "url", void 0);
81
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "services", void 0);
75
82
  _this.parsedLocus = {
76
83
  states: []
77
84
  };
@@ -83,6 +90,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
83
90
  _this.locusParser = new _parser.default();
84
91
  return _this;
85
92
  }
93
+
86
94
  /**
87
95
  * Apply locus delta data to meeting
88
96
  * @param {string} action Locus delta action
@@ -90,45 +98,38 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
90
98
  * @param {Meeting} meeting
91
99
  * @returns {undefined}
92
100
  */
93
-
94
-
95
101
  (0, _createClass2.default)(LocusInfo, [{
96
102
  key: "applyLocusDeltaData",
97
103
  value: function applyLocusDeltaData(action, locus, meeting) {
98
104
  var _this2 = this;
99
-
100
105
  var _LocusDeltaParser$loc = _parser.default.loci,
101
- DESYNC = _LocusDeltaParser$loc.DESYNC,
102
- USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
103
- USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING;
104
-
106
+ DESYNC = _LocusDeltaParser$loc.DESYNC,
107
+ USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
108
+ USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING;
105
109
  switch (action) {
106
110
  case USE_INCOMING:
107
111
  meeting.locusInfo.onDeltaLocus(locus);
108
112
  break;
109
-
110
113
  case USE_CURRENT:
111
114
  meeting.locusDesync = false;
112
115
  meeting.needToGetFullLocus = false;
113
116
  break;
114
-
115
117
  case DESYNC:
116
118
  meeting.meetingRequest.getFullLocus({
117
119
  desync: true,
118
120
  locusUrl: meeting.locusUrl
119
121
  }).then(function (res) {
120
- meeting.locusInfo.onFullLocus(res.body); // Notify parser to resume processing delta events
122
+ meeting.locusInfo.onFullLocus(res.body);
123
+ // Notify parser to resume processing delta events
121
124
  // now that we have full locus from DESYNC.
122
-
123
125
  _this2.locusParser.resume();
124
126
  });
125
127
  break;
126
-
127
128
  default:
128
129
  _loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
129
-
130
130
  }
131
131
  }
132
+
132
133
  /**
133
134
  * Adds locus delta to parser's queue
134
135
  * and registers a function handler
@@ -137,12 +138,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
137
138
  * @param {Meeting} meeting
138
139
  * @returns {undefined}
139
140
  */
140
-
141
141
  }, {
142
142
  key: "handleLocusDelta",
143
143
  value: function handleLocusDelta(locus, meeting) {
144
144
  var _this3 = this;
145
-
146
145
  // register a function to process delta actions
147
146
  if (!this.locusParser.onDeltaAction) {
148
147
  // delta action, along with associated loci
@@ -150,20 +149,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
150
149
  this.locusParser.onDeltaAction = function (action, parsedLoci) {
151
150
  _this3.applyLocusDeltaData(action, parsedLoci, meeting);
152
151
  };
153
- } // queue delta event with parser
154
-
155
-
152
+ }
153
+ // queue delta event with parser
156
154
  this.locusParser.onDeltaEvent(locus);
157
155
  }
156
+
158
157
  /**
159
158
  * @param {Locus} locus
160
159
  * @returns {undefined}
161
160
  * @memberof LocusInfo
162
161
  */
163
-
164
162
  }, {
165
163
  key: "init",
166
164
  value: function init() {
165
+ var _locus$links;
167
166
  var locus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
168
167
  this.created = locus.created || null;
169
168
  this.scheduledMeeting = locus.meeting || null;
@@ -175,6 +174,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
175
174
  this.membership = locus.membership || null;
176
175
  this.identities = locus.identities || null;
177
176
  this.participants = locus.participants || null;
177
+
178
178
  /**
179
179
  * Stores the delta values for a changed participant.
180
180
  *
@@ -192,50 +192,51 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
192
192
  * @private
193
193
  * @member LocusInfo
194
194
  */
195
+ this.deltaParticipants = [];
195
196
 
196
- this.deltaParticipants = []; // above section only updates the locusInfo object
197
+ // above section only updates the locusInfo object
197
198
  // The below section makes sure it updates the locusInfo as well as updates the meeting object
198
-
199
- this.updateParticipants(locus.participants); // For 1:1 space meeting the conversation Url does not exist in locus.conversation
200
-
199
+ this.updateParticipants(locus.participants);
200
+ // For 1:1 space meeting the conversation Url does not exist in locus.conversation
201
201
  this.updateConversationUrl(locus.conversationUrl, locus.info);
202
202
  this.updateControls(locus.controls);
203
203
  this.updateLocusUrl(locus.url);
204
204
  this.updateFullState(locus.fullState);
205
205
  this.updateMeetingInfo(locus.info);
206
- this.updateEmbeddedApps(locus.embeddedApps); // self and participants generate sipUrl for 1:1 meeting
207
-
206
+ this.updateEmbeddedApps(locus.embeddedApps);
207
+ // self and participants generate sipUrl for 1:1 meeting
208
208
  this.updateSelf(locus.self, locus.participants);
209
209
  this.updateHostInfo(locus.host);
210
210
  this.updateMediaShares(locus.mediaShares);
211
+ this.updateServices((_locus$links = locus.links) === null || _locus$links === void 0 ? void 0 : _locus$links.services);
211
212
  }
213
+
212
214
  /**
213
215
  * @param {Object} locus
214
216
  * @returns {undefined}
215
217
  * @memberof LocusInfo
216
218
  */
217
-
218
219
  }, {
219
220
  key: "initialSetup",
220
221
  value: function initialSetup(locus) {
221
- this.onFullLocus(locus); // Change it to true after it receives it first locus object
222
+ this.onFullLocus(locus);
222
223
 
224
+ // Change it to true after it receives it first locus object
223
225
  this.emitChange = true;
224
226
  }
227
+
225
228
  /**
226
229
  * @param {Meeting} meeting
227
230
  * @param {Object} data
228
231
  * @returns {undefined}
229
232
  * @memberof LocusInfo
230
233
  */
231
-
232
234
  }, {
233
235
  key: "parse",
234
236
  value: function parse(meeting, data) {
237
+ // eslint-disable-next-line @typescript-eslint/no-shadow
235
238
  var eventType = data.eventType;
236
-
237
239
  _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
238
-
239
240
  switch (eventType) {
240
241
  case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
241
242
  case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
@@ -253,17 +254,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
253
254
  case _constants.LOCUSEVENT.FLOOR_RELEASED:
254
255
  this.onFullLocus(data.locus, eventType);
255
256
  break;
256
-
257
257
  case _constants.LOCUSEVENT.DIFFERENCE:
258
258
  this.handleLocusDelta(data.locus, meeting);
259
259
  break;
260
-
261
260
  default:
262
261
  // Why will there be a event with no eventType ????
263
262
  // we may not need this, we can get full locus
264
263
  this.handleLocusDelta(data.locus, meeting);
265
264
  }
266
265
  }
266
+
267
267
  /**
268
268
  * @param {String} scope
269
269
  * @param {String} eventName
@@ -271,27 +271,26 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
271
271
  * @returns {undefined}
272
272
  * @memberof LocusInfo
273
273
  */
274
-
275
274
  }, {
276
275
  key: "emitScoped",
277
276
  value: function emitScoped(scope, eventName, args) {
278
277
  return this.emit(scope, eventName, args);
279
278
  }
279
+
280
280
  /**
281
281
  * updates the locus with full locus object
282
282
  * @param {object} locus locus object
283
- * @param {sting} eventType particulat locus event
283
+ * @param {string} eventType particulat locus event
284
284
  * @returns {object} null
285
285
  * @memberof LocusInfo
286
286
  */
287
-
287
+ // eslint-disable-next-line @typescript-eslint/no-shadow
288
288
  }, {
289
289
  key: "onFullLocus",
290
290
  value: function onFullLocus(locus, eventType) {
291
291
  if (!locus) {
292
292
  _loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
293
293
  }
294
-
295
294
  this.updateParticipantDeltas(locus.participants);
296
295
  this.scheduledMeeting = locus.meeting || null;
297
296
  this.participants = locus.participants;
@@ -299,17 +298,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
299
298
  this.updateParticipants(locus.participants);
300
299
  this.isMeetingActive();
301
300
  this.handleOneOnOneEvent(eventType);
302
- this.updateEmbeddedApps(locus.embeddedApps); // set current (working copy) for parser
303
-
301
+ this.updateEmbeddedApps(locus.embeddedApps);
302
+ // set current (working copy) for parser
304
303
  this.locusParser.workingCopy = locus;
305
- } // used for ringing stops on one on one
304
+ }
306
305
 
306
+ // used for ringing stops on one on one
307
307
  /**
308
308
  * @param {String} eventType
309
309
  * @returns {undefined}
310
310
  * @memberof LocusInfo
311
311
  */
312
-
312
+ // eslint-disable-next-line @typescript-eslint/no-shadow
313
313
  }, {
314
314
  key: "handleOneOnOneEvent",
315
315
  value: function handleOneOnOneEvent(eventType) {
@@ -324,9 +324,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
324
324
  remoteDeclined: true,
325
325
  remoteAnswered: false
326
326
  });
327
- } // for 1:1 bob calls alice and alice answers, notify the meeting state
328
-
329
-
327
+ }
328
+ // for 1:1 bob calls alice and alice answers, notify the meeting state
330
329
  if (eventType === _constants.LOCUSEVENT.PARTICIPANT_JOIN) {
331
330
  // trigger the event for stop ringing
332
331
  this.emitScoped({
@@ -339,12 +338,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
339
338
  }
340
339
  }
341
340
  }
341
+
342
342
  /**
343
343
  * @param {Object} locus
344
344
  * @returns {undefined}
345
345
  * @memberof LocusInfo
346
346
  */
347
-
348
347
  }, {
349
348
  key: "onDeltaLocus",
350
349
  value: function onDeltaLocus(locus) {
@@ -352,15 +351,22 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
352
351
  this.updateParticipants(locus.participants);
353
352
  this.isMeetingActive();
354
353
  }
354
+
355
355
  /**
356
356
  * @param {Object} locus
357
357
  * @returns {undefined}
358
358
  * @memberof LocusInfo
359
359
  */
360
-
361
360
  }, {
362
361
  key: "updateLocusInfo",
363
362
  value: function updateLocusInfo(locus) {
363
+ var _locus$self, _locus$self2, _locus$links2;
364
+ if (((_locus$self = locus.self) === null || _locus$self === void 0 ? void 0 : _locus$self.reason) === 'MOVED' && ((_locus$self2 = locus.self) === null || _locus$self2 === void 0 ? void 0 : _locus$self2.state) === 'LEFT') {
365
+ // When moved to a breakout session locus sends a message for the previous locus
366
+ // indicating that we have been moved. It isn't helpful to continue parsing this
367
+ // as it gets interpreted as if we have left the call
368
+ return;
369
+ }
364
370
  this.updateControls(locus.controls);
365
371
  this.updateConversationUrl(locus.conversationUrl, locus.info);
366
372
  this.updateCreated(locus.created);
@@ -378,53 +384,59 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
378
384
  this.updateMemberShip(locus.membership);
379
385
  this.updateIdentifiers(locus.identities);
380
386
  this.updateEmbeddedApps(locus.embeddedApps);
381
- this.compareAndUpdate(); // update which required to compare different objects from locus
387
+ this.updateServices((_locus$links2 = locus.links) === null || _locus$links2 === void 0 ? void 0 : _locus$links2.services);
388
+ this.compareAndUpdate();
389
+ // update which required to compare different objects from locus
382
390
  }
391
+
383
392
  /**
384
393
  * @param {Array} participants
385
394
  * @param {Object} self
386
395
  * @returns {Array}
387
396
  * @memberof LocusInfo
388
397
  */
389
-
390
398
  }, {
391
399
  key: "getLocusPartner",
392
400
  value: function getLocusPartner(participants, self) {
393
401
  if (!participants || participants.length === 0) {
394
402
  return null;
395
403
  }
396
-
397
404
  return participants.find(function (participant) {
398
405
  return self && participant.identity !== self.identity && (participants.length <= 2 || participant.type === _constants._USER_ && !participant.removed);
399
- }) || this.partner;
400
- } // TODO: all the leave states need to be checked
406
+ }
407
+ // @ts-ignore
408
+ ) || this.partner;
409
+ }
401
410
 
411
+ // TODO: all the leave states need to be checked
402
412
  /**
403
413
  * @returns {undefined}
404
414
  * @memberof LocusInfo
405
415
  */
406
-
407
416
  }, {
408
417
  key: "isMeetingActive",
409
418
  value: function isMeetingActive() {
410
419
  if (this.parsedLocus.fullState.type === _constants._CALL_ || this.parsedLocus.fullState.type === _constants._SIP_BRIDGE_) {
420
+ // @ts-ignore
411
421
  var partner = this.getLocusPartner(this.participants, this.self);
412
422
  this.updateMeeting({
413
423
  partner: partner
414
- }); // Check if guest user needs to be checked here
424
+ });
425
+
426
+ // Check if guest user needs to be checked here
427
+
415
428
  // 1) when bob declines call from bob, (bob='DECLINED')
416
429
  // 2) When alice rejects call to bob , (bob='NOTIFIED')
430
+
417
431
  // When we dont add MEDIA for condition 2. The state of bob='IDLE'
418
432
 
419
433
  if (this.fullState && this.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
420
434
  // TODO: update the meeting state
421
435
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.');
422
-
423
436
  _metrics.default.postEvent({
424
437
  event: _config.eventType.REMOTE_ENDED,
425
438
  meetingId: this.meetingId
426
439
  });
427
-
428
440
  this.emitScoped({
429
441
  file: 'locus-info',
430
442
  function: 'isMeetingActive'
@@ -437,7 +449,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
437
449
  event: _config.eventType.REMOTE_ENDED,
438
450
  meetingId: this.meetingId
439
451
  });
440
-
441
452
  this.emitScoped({
442
453
  file: 'locus-info',
443
454
  function: 'isMeetingActive'
@@ -451,7 +462,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
451
462
  event: _config.eventType.REMOTE_ENDED,
452
463
  meetingId: this.meetingId
453
464
  });
454
-
455
465
  this.emitScoped({
456
466
  file: 'locus-info',
457
467
  function: 'isMeetingActive'
@@ -461,14 +471,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
461
471
  });
462
472
  }
463
473
  } else if (this.parsedLocus.fullState.type === _constants._MEETING_) {
464
- if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE || this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
474
+ if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE ||
475
+ // @ts-ignore
476
+ this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
465
477
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
466
-
467
478
  _metrics.default.postEvent({
468
479
  event: _config.eventType.REMOTE_ENDED,
469
480
  meetingId: this.meetingId
470
481
  });
471
-
472
482
  this.emitScoped({
473
483
  file: 'locus-info',
474
484
  function: 'isMeetingActive'
@@ -482,7 +492,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
482
492
  event: _config.eventType.REMOTE_ENDED,
483
493
  meetingId: this.meetingId
484
494
  });
485
-
486
495
  this.emitScoped({
487
496
  file: 'locus-info',
488
497
  function: 'isMeetingActive'
@@ -490,7 +499,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
490
499
  reason: _constants.MEETING_REMOVED_REASON.FULLSTATE_REMOVED,
491
500
  shouldLeave: false
492
501
  });
493
- } // If you are guest and you are removed from the meeting
502
+ }
503
+ // If you are guest and you are removed from the meeting
494
504
  // You wont get any further events
495
505
  else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
496
506
  // Check if we need to send an event
@@ -506,13 +516,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
506
516
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
507
517
  }
508
518
  }
519
+
509
520
  /**
510
521
  * checks if the host permissions have changed while in the meeting
511
522
  * This would be the case if your role as host or moderator has been updated
512
523
  * @returns {undefined}
513
524
  * @memberof LocusInfo
514
525
  */
515
-
516
526
  }, {
517
527
  key: "compareAndUpdate",
518
528
  value: function compareAndUpdate() {
@@ -522,17 +532,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
522
532
  this.compareSelfAndHost();
523
533
  }
524
534
  }
535
+
525
536
  /**
526
537
  * compared the self object to check if the user has host permissions
527
538
  * @returns {undefined}
528
539
  * @memberof LocusInfo
529
540
  */
530
-
531
541
  }, {
532
542
  key: "compareSelfAndHost",
533
543
  value: function compareSelfAndHost() {
534
544
  var _this$parsedLocus$hos;
535
-
536
545
  // In some cases the host info is not present but the moderator values changes from null to false so it triggers an update
537
546
  if (this.parsedLocus.self.selfIdentity === ((_this$parsedLocus$hos = this.parsedLocus.host) === null || _this$parsedLocus$hos === void 0 ? void 0 : _this$parsedLocus$hos.hostId) && this.parsedLocus.self.moderator) {
538
547
  this.emitScoped({
@@ -550,6 +559,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
550
559
  });
551
560
  }
552
561
  }
562
+
553
563
  /**
554
564
  * Update the deltaParticipants property of this object based on a list of
555
565
  * provided participants.
@@ -557,22 +567,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
557
567
  * @param {Array} [participants] - The participants to update against.
558
568
  * @returns {void}
559
569
  */
560
-
561
570
  }, {
562
571
  key: "updateParticipantDeltas",
563
572
  value: function updateParticipantDeltas() {
564
573
  var _this4 = this;
565
-
566
574
  var participants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
567
-
568
575
  // Used to find a participant within a participants collection.
569
576
  var findParticipant = function findParticipant(participant, collection) {
570
577
  return collection.find(function (item) {
571
578
  return item.person.id === participant.person.id;
572
579
  });
573
- }; // Generates an object that indicates which state properties have changed.
574
-
580
+ };
575
581
 
582
+ // Generates an object that indicates which state properties have changed.
576
583
  var generateDelta = function generateDelta() {
577
584
  var prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
578
585
  var newState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -581,8 +588,9 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
581
588
  audioStatus: prevState.audioStatus !== newState.audioStatus,
582
589
  videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
583
590
  videoStatus: prevState.videoStatus !== newState.videoStatus
584
- }; // Clean the object
591
+ };
585
592
 
593
+ // Clean the object
586
594
  (0, _keys.default)(deltas).forEach(function (key) {
587
595
  if (deltas[key] !== true) {
588
596
  delete deltas[key];
@@ -590,22 +598,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
590
598
  });
591
599
  return deltas;
592
600
  };
593
-
594
601
  this.deltaParticipants = participants.reduce(function (collection, participant) {
595
602
  var existingParticipant = findParticipant(participant, _this4.participants || []) || {};
596
603
  var delta = generateDelta(existingParticipant.status, participant.status);
597
604
  var changed = (0, _keys.default)(delta).length > 0;
598
-
599
605
  if (changed) {
600
606
  collection.push({
601
607
  person: participant.person,
602
608
  delta: delta
603
609
  });
604
610
  }
605
-
606
611
  return collection;
607
612
  }, []);
608
613
  }
614
+
609
615
  /**
610
616
  *
611
617
  * @param {Object} participants new participants object
@@ -613,12 +619,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
613
619
  * @returns {Array} updatedParticipants
614
620
  * @memberof LocusInfo
615
621
  */
616
-
617
622
  }, {
618
623
  key: "updateParticipants",
619
624
  value: function updateParticipants(participants) {
620
625
  var _this$parsedLocus$con;
621
-
622
626
  this.emitScoped({
623
627
  file: 'locus-info',
624
628
  function: 'updateParticipants'
@@ -630,30 +634,29 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
630
634
  hostId: this.parsedLocus.host && this.parsedLocus.host.hostId
631
635
  });
632
636
  }
637
+
633
638
  /**
634
639
  * @param {Object} controls
635
640
  * @returns {undefined}
636
641
  * @memberof LocusInfo
637
642
  */
638
-
639
643
  }, {
640
644
  key: "updateControls",
641
645
  value: function updateControls(controls) {
642
646
  if (controls && !(0, _isEqual2.default)(this.controls, controls)) {
643
647
  this.parsedLocus.controls = _controlsUtils.default.parse(controls);
644
-
645
648
  var _ControlsUtils$getCon = _controlsUtils.default.getControls(this.controls, controls),
646
- _ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
647
- hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
648
- hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
649
- hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
650
- hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
651
- hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
652
- current = _ControlsUtils$getCon.current;
653
-
649
+ _ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
650
+ hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
651
+ hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
652
+ hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
653
+ hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
654
+ hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
655
+ hasBreakoutChanged = _ControlsUtils$getCon2.hasBreakoutChanged,
656
+ hasVideoEnabledChanged = _ControlsUtils$getCon2.hasVideoEnabledChanged,
657
+ current = _ControlsUtils$getCon.current;
654
658
  if (hasRecordingChanged || hasRecordingPausedChanged) {
655
659
  var state = null;
656
-
657
660
  if (hasRecordingPausedChanged) {
658
661
  if (current.record.paused) {
659
662
  state = _constants.RECORDING_STATE.PAUSED;
@@ -664,7 +667,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
664
667
  } else if (hasRecordingChanged) {
665
668
  state = current.record.recording ? _constants.RECORDING_STATE.RECORDING : _constants.RECORDING_STATE.IDLE;
666
669
  }
667
-
668
670
  this.emitScoped({
669
671
  file: 'locus-info',
670
672
  function: 'updateControls'
@@ -674,7 +676,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
674
676
  lastModified: current.record.lastModified
675
677
  });
676
678
  }
677
-
678
679
  if (hasMeetingContainerChanged) {
679
680
  var meetingContainerUrl = current.meetingContainer.meetingContainerUrl;
680
681
  this.emitScoped({
@@ -684,11 +685,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
684
685
  meetingContainerUrl: meetingContainerUrl
685
686
  });
686
687
  }
687
-
688
688
  if (hasTranscribeChanged) {
689
689
  var _current$transcribe = current.transcribe,
690
- transcribing = _current$transcribe.transcribing,
691
- caption = _current$transcribe.caption;
690
+ transcribing = _current$transcribe.transcribing,
691
+ caption = _current$transcribe.caption;
692
692
  this.emitScoped({
693
693
  file: 'locus-info',
694
694
  function: 'updateControls'
@@ -697,30 +697,53 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
697
697
  caption: caption
698
698
  });
699
699
  }
700
-
700
+ if (hasBreakoutChanged) {
701
+ var breakout = current.breakout;
702
+ this.emitScoped({
703
+ file: 'locus-info',
704
+ function: 'updateControls'
705
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, {
706
+ breakout: breakout
707
+ });
708
+ }
701
709
  if (hasEntryExitToneChanged) {
702
710
  var entryExitTone = current.entryExitTone;
711
+ this.updateMeeting({
712
+ entryExitTone: entryExitTone
713
+ });
703
714
  this.emitScoped({
704
715
  file: 'locus-info',
705
716
  function: 'updateControls'
706
717
  }, _constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, {
707
718
  entryExitTone: entryExitTone
708
719
  });
720
+ }
721
+
722
+ // videoEnabled is handled differently than other controls,
723
+ // to fit with audio mute status logic
724
+ if (hasVideoEnabledChanged) {
725
+ var videoEnabled = current.videoEnabled;
709
726
  this.updateMeeting({
710
- entryExitTone: entryExitTone
727
+ unmuteVideoAllowed: videoEnabled
728
+ });
729
+ this.emitScoped({
730
+ file: 'locus-info',
731
+ function: 'updateControls'
732
+ }, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
733
+ // muted: not part of locus.controls
734
+ unmuteAllowed: videoEnabled
711
735
  });
712
736
  }
713
-
714
737
  this.controls = controls;
715
738
  }
716
739
  }
740
+
717
741
  /**
718
742
  * @param {String} conversationUrl
719
743
  * @param {Object} info
720
744
  * @returns {undefined}
721
745
  * @memberof LocusInfo
722
746
  */
723
-
724
747
  }, {
725
748
  key: "updateConversationUrl",
726
749
  value: function updateConversationUrl(conversationUrl, info) {
@@ -736,12 +759,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
736
759
  });
737
760
  }
738
761
  }
762
+
739
763
  /**
740
764
  * @param {Object} created
741
765
  * @returns {undefined}
742
766
  * @memberof LocusInfo
743
767
  */
744
-
745
768
  }, {
746
769
  key: "updateCreated",
747
770
  value: function updateCreated(created) {
@@ -749,20 +772,37 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
749
772
  this.created = created;
750
773
  }
751
774
  }
775
+
752
776
  /**
753
- * @param {Object} fullState
777
+ * @param {Object} services
754
778
  * @returns {undefined}
755
779
  * @memberof LocusInfo
756
780
  */
781
+ }, {
782
+ key: "updateServices",
783
+ value: function updateServices(services) {
784
+ if (services && !(0, _isEqual2.default)(this.services, services)) {
785
+ this.services = services;
786
+ this.emitScoped({
787
+ file: 'locus-info',
788
+ function: 'updateServices'
789
+ }, _constants.LOCUSINFO.EVENTS.LINKS_SERVICES, {
790
+ services: services
791
+ });
792
+ }
793
+ }
757
794
 
795
+ /**
796
+ * @param {Object} fullState
797
+ * @returns {undefined}
798
+ * @memberof LocusInfo
799
+ */
758
800
  }, {
759
801
  key: "updateFullState",
760
802
  value: function updateFullState(fullState) {
761
803
  if (fullState && !(0, _isEqual2.default)(this.fullState, fullState)) {
762
804
  var result = _fullState.default.getFullState(this.fullState, fullState);
763
-
764
805
  this.updateMeeting(result.current);
765
-
766
806
  if (result.updates.meetingStateChangedTo) {
767
807
  this.emitScoped({
768
808
  file: 'locus-info',
@@ -772,7 +812,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
772
812
  currentState: result.current.meetingState
773
813
  });
774
814
  }
775
-
776
815
  if (result.updates.meetingTypeChangedTo) {
777
816
  this.emitScoped({
778
817
  file: 'locus-info',
@@ -781,11 +820,11 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
781
820
  type: result.current.type
782
821
  });
783
822
  }
784
-
785
823
  this.parsedLocus.fullState = result.current;
786
824
  this.fullState = fullState;
787
825
  }
788
826
  }
827
+
789
828
  /**
790
829
  * handles when the locus.host is updated
791
830
  * @param {Object} host the locus.host property
@@ -793,16 +832,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
793
832
  * @memberof LocusInfo
794
833
  * emits internal event locus_info_update_host
795
834
  */
796
-
797
835
  }, {
798
836
  key: "updateHostInfo",
799
837
  value: function updateHostInfo(host) {
800
838
  if (host && !(0, _isEqual2.default)(this.host, host)) {
801
839
  var parsedHosts = _hostUtils.default.getHosts(this.host, host);
802
-
803
840
  this.updateMeeting(parsedHosts.current);
804
841
  this.parsedLocus.host = parsedHosts.current;
805
-
806
842
  if (parsedHosts.updates.isNewHost) {
807
843
  this.compareAndUpdateFlags.compareSelfAndHost = true;
808
844
  this.emitScoped({
@@ -813,31 +849,26 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
813
849
  oldHost: parsedHosts.previous
814
850
  });
815
851
  }
816
-
817
852
  this.host = host;
818
853
  } else {
819
854
  this.compareAndUpdateFlags.compareSelfAndHost = false;
820
855
  }
821
856
  }
857
+
822
858
  /**
823
859
  * @param {Object} info
824
860
  * @param {Object} self
825
861
  * @returns {undefined}
826
862
  * @memberof LocusInfo
827
863
  */
828
-
829
864
  }, {
830
865
  key: "updateMeetingInfo",
831
866
  value: function updateMeetingInfo(info, self) {
832
867
  if (info && !(0, _isEqual2.default)(this.info, info)) {
833
868
  var _this$parsedLocus$sel;
834
-
835
869
  var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
836
-
837
870
  var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
838
-
839
871
  var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
840
-
841
872
  this.emitScoped({
842
873
  file: 'locus-info',
843
874
  function: 'updateMeetingInfo'
@@ -845,33 +876,30 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
845
876
  info: parsedInfo.current,
846
877
  self: self
847
878
  });
848
-
849
879
  if (parsedInfo.updates.isLocked) {
850
880
  this.emitScoped({
851
881
  file: 'locus-info',
852
882
  function: 'updateMeetingInfo'
853
883
  }, _constants.LOCUSINFO.EVENTS.MEETING_LOCKED, info);
854
884
  }
855
-
856
885
  if (parsedInfo.updates.isUnlocked) {
857
886
  this.emitScoped({
858
887
  file: 'locus-info',
859
888
  function: 'updateMeetingInfo'
860
889
  }, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
861
890
  }
862
-
863
891
  this.info = info;
864
- this.parsedLocus.info = parsedInfo.current; // Parses the info and adds necessary values
865
-
892
+ this.parsedLocus.info = parsedInfo.current;
893
+ // Parses the info and adds necessary values
866
894
  this.updateMeeting(parsedInfo.current);
867
895
  }
868
896
  }
897
+
869
898
  /**
870
899
  * @param {Object} embeddedApps
871
900
  * @returns {undefined}
872
901
  * @memberof LocusInfo
873
902
  */
874
-
875
903
  }, {
876
904
  key: "updateEmbeddedApps",
877
905
  value: function updateEmbeddedApps(embeddedApps) {
@@ -879,9 +907,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
879
907
  if (_embeddedAppsUtils.default.areSimilar(this.embeddedApps, embeddedApps)) {
880
908
  return;
881
909
  }
882
-
883
910
  var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
884
-
885
911
  this.updateMeeting({
886
912
  embeddedApps: parsedEmbeddedApps
887
913
  });
@@ -891,6 +917,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
891
917
  }, _constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, parsedEmbeddedApps);
892
918
  this.embeddedApps = embeddedApps;
893
919
  }
920
+
894
921
  /**
895
922
  * handles when the locus.mediaShares is updated
896
923
  * @param {Object} mediaShares the locus.mediaShares property
@@ -898,14 +925,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
898
925
  * @memberof LocusInfo
899
926
  * emits internal event locus_info_update_media_shares
900
927
  */
901
-
902
928
  }, {
903
929
  key: "updateMediaShares",
904
930
  value: function updateMediaShares(mediaShares) {
905
931
  if (mediaShares && !(0, _isEqual2.default)(this.mediaShares, mediaShares)) {
906
932
  var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
907
-
908
933
  this.updateMeeting(parsedMediaShares.current);
934
+ this.parsedLocus.mediaShares = parsedMediaShares.current;
935
+ this.mediaShares = mediaShares;
909
936
  this.emitScoped({
910
937
  file: 'locus-info',
911
938
  function: 'updateMediaShares'
@@ -913,16 +940,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
913
940
  current: parsedMediaShares.current,
914
941
  previous: parsedMediaShares.previous
915
942
  });
916
- this.parsedLocus.mediaShares = parsedMediaShares.current;
917
- this.mediaShares = mediaShares;
918
943
  }
919
944
  }
945
+
920
946
  /**
921
947
  * @param {String} participantsUrl
922
948
  * @returns {undefined}
923
949
  * @memberof LocusInfo
924
950
  */
925
-
926
951
  }, {
927
952
  key: "updateParticipantsUrl",
928
953
  value: function updateParticipantsUrl(participantsUrl) {
@@ -930,12 +955,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
930
955
  this.participantsUrl = participantsUrl;
931
956
  }
932
957
  }
958
+
933
959
  /**
934
960
  * @param {Object} replace
935
961
  * @returns {undefined}
936
962
  * @memberof LocusInfo
937
963
  */
938
-
939
964
  }, {
940
965
  key: "updateReplace",
941
966
  value: function updateReplace(replace) {
@@ -943,6 +968,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
943
968
  this.replace = replace;
944
969
  }
945
970
  }
971
+
946
972
  /**
947
973
  * handles when the locus.self is updated
948
974
  * @param {Object} self the locus.mediaShares property
@@ -951,35 +977,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
951
977
  * @memberof LocusInfo
952
978
  * emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
953
979
  */
954
-
955
980
  }, {
956
981
  key: "updateSelf",
957
982
  value: function updateSelf(self, participants) {
983
+ // @ts-ignore - check where this.self come from
958
984
  if (self && !(0, _isEqual2.default)(this.self, self)) {
985
+ // @ts-ignore
959
986
  var parsedSelves = _selfUtils.default.getSelves(this.self, self, this.webex.internal.device.url);
960
-
961
987
  this.updateMeeting(parsedSelves.current);
962
988
  this.parsedLocus.self = parsedSelves.current;
963
989
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
964
-
965
990
  if (element !== parsedSelves.current.state) {
966
991
  this.parsedLocus.states.push(parsedSelves.current.state);
967
- } // TODO: check if we need to save the sipUri here as well
968
- // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
969
-
992
+ }
970
993
 
994
+ // TODO: check if we need to save the sipUri here as well
995
+ // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
971
996
  var result = _selfUtils.default.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri);
972
-
973
997
  if (result.sipUri) {
974
998
  this.updateMeeting(result);
975
999
  }
976
-
977
1000
  if (parsedSelves.updates.moderatorChanged) {
978
1001
  this.compareAndUpdateFlags.compareHostAndSelf = true;
979
1002
  } else {
980
1003
  this.compareAndUpdateFlags.compareHostAndSelf = false;
981
1004
  }
982
-
983
1005
  if (parsedSelves.updates.layoutChanged) {
984
1006
  this.emitScoped({
985
1007
  file: 'locus-info',
@@ -988,7 +1010,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
988
1010
  layout: parsedSelves.current.layout
989
1011
  });
990
1012
  }
991
-
1013
+ if (parsedSelves.updates.breakoutsChanged) {
1014
+ this.emitScoped({
1015
+ file: 'locus-info',
1016
+ function: 'updateSelf'
1017
+ }, _constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, {
1018
+ breakoutSessions: parsedSelves.current.breakoutSessions
1019
+ });
1020
+ }
992
1021
  if (parsedSelves.updates.isMediaInactiveOrReleased) {
993
1022
  this.emitScoped({
994
1023
  file: 'locus-info',
@@ -997,13 +1026,21 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
997
1026
  reason: self.reason
998
1027
  });
999
1028
  }
1000
-
1001
1029
  if (parsedSelves.updates.moderatorChanged) {
1002
1030
  this.emitScoped({
1003
1031
  file: 'locus-info',
1004
1032
  function: 'updateSelf'
1005
1033
  }, _constants.LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED, self);
1006
1034
  }
1035
+ if (parsedSelves.updates.isVideoMutedByOthersChanged) {
1036
+ this.emitScoped({
1037
+ file: 'locus-info',
1038
+ function: 'updateSelf'
1039
+ }, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
1040
+ muted: parsedSelves.current.remoteVideoMuted
1041
+ // unmuteAllowed: not part of .self
1042
+ });
1043
+ }
1007
1044
 
1008
1045
  if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
1009
1046
  this.emitScoped({
@@ -1014,7 +1051,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1014
1051
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1015
1052
  });
1016
1053
  }
1017
-
1018
1054
  if (parsedSelves.updates.isMutedByOthersChanged) {
1019
1055
  this.emitScoped({
1020
1056
  file: 'locus-info',
@@ -1024,38 +1060,34 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1024
1060
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1025
1061
  });
1026
1062
  }
1027
-
1028
1063
  if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
1029
1064
  this.emitScoped({
1030
1065
  file: 'locus-info',
1031
1066
  function: 'updateSelf'
1032
1067
  }, _constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, {});
1033
1068
  }
1034
-
1035
1069
  if (parsedSelves.updates.isUserUnadmitted) {
1036
1070
  this.emitScoped({
1037
1071
  file: 'locus-info',
1038
1072
  function: 'updateSelf'
1039
1073
  }, _constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, self);
1040
1074
  }
1041
-
1042
1075
  if (parsedSelves.updates.isUserAdmitted) {
1043
1076
  this.emitScoped({
1044
1077
  file: 'locus-info',
1045
1078
  function: 'updateSelf'
1046
1079
  }, _constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, self);
1047
1080
  }
1048
-
1049
1081
  if (parsedSelves.updates.isMediaInactive) {
1050
1082
  this.emitScoped({
1051
1083
  file: 'locus-info',
1052
1084
  function: 'updateSelf'
1053
- }, _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
1085
+ },
1086
+ // @ts-ignore
1087
+ _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
1054
1088
  }
1055
-
1056
1089
  if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
1057
1090
  var _parsedSelves$current, _parsedSelves$current2, _parsedSelves$current3;
1058
-
1059
1091
  this.emitScoped({
1060
1092
  file: 'locus-info',
1061
1093
  function: 'updateSelf'
@@ -1065,14 +1097,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1065
1097
  shareStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.share
1066
1098
  });
1067
1099
  }
1068
-
1069
1100
  if (parsedSelves.updates.isUserObserving) {
1070
1101
  this.emitScoped({
1071
1102
  file: 'locus-info',
1072
1103
  function: 'updateSelf'
1073
1104
  }, _constants.LOCUSINFO.EVENTS.SELF_OBSERVING);
1074
1105
  }
1075
-
1076
1106
  if (parsedSelves.updates.canNotViewTheParticipantListChanged) {
1077
1107
  this.emitScoped({
1078
1108
  file: 'locus-info',
@@ -1081,7 +1111,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1081
1111
  canNotViewTheParticipantList: parsedSelves.current.canNotViewTheParticipantList
1082
1112
  });
1083
1113
  }
1084
-
1085
1114
  if (parsedSelves.updates.isSharingBlockedChanged) {
1086
1115
  this.emitScoped({
1087
1116
  file: 'locus-info',
@@ -1090,7 +1119,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1090
1119
  isSharingBlocked: parsedSelves.current.isSharingBlocked
1091
1120
  });
1092
1121
  }
1093
-
1094
1122
  this.emitScoped({
1095
1123
  file: 'locus-info',
1096
1124
  function: 'updateSelf'
@@ -1099,18 +1127,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1099
1127
  newSelf: parsedSelves.current
1100
1128
  });
1101
1129
  this.parsedLocus.self = parsedSelves.current;
1130
+ // @ts-ignore
1102
1131
  this.self = self;
1103
1132
  } else {
1104
1133
  this.compareAndUpdateFlags.compareHostAndSelf = false;
1105
1134
  }
1106
1135
  }
1136
+
1107
1137
  /**
1108
1138
  * handles when the locus.url is updated
1109
1139
  * @param {String} url
1110
1140
  * @returns {undefined}
1111
1141
  * emits internal event locus_info_update_url
1112
1142
  */
1113
-
1114
1143
  }, {
1115
1144
  key: "updateLocusUrl",
1116
1145
  value: function updateLocusUrl(url) {
@@ -1125,12 +1154,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1125
1154
  }, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, url);
1126
1155
  }
1127
1156
  }
1157
+
1128
1158
  /**
1129
1159
  * @param {String} aclUrl
1130
1160
  * @returns {undefined}
1131
1161
  * @memberof LocusInfo
1132
1162
  */
1133
-
1134
1163
  }, {
1135
1164
  key: "updateAclUrl",
1136
1165
  value: function updateAclUrl(aclUrl) {
@@ -1138,12 +1167,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1138
1167
  this.aclUrl = aclUrl;
1139
1168
  }
1140
1169
  }
1170
+
1141
1171
  /**
1142
1172
  * @param {Number} baseSequence
1143
1173
  * @returns {undefined}
1144
1174
  * @memberof LocusInfo
1145
1175
  */
1146
-
1147
1176
  }, {
1148
1177
  key: "updateBasequence",
1149
1178
  value: function updateBasequence(baseSequence) {
@@ -1151,12 +1180,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1151
1180
  this.baseSequence = baseSequence;
1152
1181
  }
1153
1182
  }
1183
+
1154
1184
  /**
1155
1185
  * @param {Number} sequence
1156
1186
  * @returns {undefined}
1157
1187
  * @memberof LocusInfo
1158
1188
  */
1159
-
1160
1189
  }, {
1161
1190
  key: "updateSequence",
1162
1191
  value: function updateSequence(sequence) {
@@ -1164,12 +1193,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1164
1193
  this.sequence = sequence;
1165
1194
  }
1166
1195
  }
1196
+
1167
1197
  /**
1168
1198
  * @param {Object} membership
1169
1199
  * @returns {undefined}
1170
1200
  * @memberof LocusInfo
1171
1201
  */
1172
-
1173
1202
  }, {
1174
1203
  key: "updateMemberShip",
1175
1204
  value: function updateMemberShip(membership) {
@@ -1177,12 +1206,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1177
1206
  this.membership = membership;
1178
1207
  }
1179
1208
  }
1209
+
1180
1210
  /**
1181
1211
  * @param {Array} identities
1182
1212
  * @returns {undefined}
1183
1213
  * @memberof LocusInfo
1184
1214
  */
1185
-
1186
1215
  }, {
1187
1216
  key: "updateIdentifiers",
1188
1217
  value: function updateIdentifiers(identities) {
@@ -1193,6 +1222,5 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1193
1222
  }]);
1194
1223
  return LocusInfo;
1195
1224
  }(_eventsScope.default);
1196
-
1197
1225
  exports.default = LocusInfo;
1198
1226
  //# sourceMappingURL=index.js.map