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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/README.md +58 -8
  2. package/UPGRADING.md +9 -9
  3. package/browsers.js +19 -24
  4. package/dist/annotation/annotation.types.js +7 -0
  5. package/dist/annotation/annotation.types.js.map +1 -0
  6. package/dist/annotation/constants.js +49 -0
  7. package/dist/annotation/constants.js.map +1 -0
  8. package/dist/annotation/index.js +342 -0
  9. package/dist/annotation/index.js.map +1 -0
  10. package/dist/breakouts/breakout.js +216 -0
  11. package/dist/breakouts/breakout.js.map +1 -0
  12. package/dist/breakouts/collection.js +23 -0
  13. package/dist/breakouts/collection.js.map +1 -0
  14. package/dist/breakouts/edit-lock-error.js +52 -0
  15. package/dist/breakouts/edit-lock-error.js.map +1 -0
  16. package/dist/breakouts/events.js +45 -0
  17. package/dist/breakouts/events.js.map +1 -0
  18. package/dist/breakouts/index.js +1048 -0
  19. package/dist/breakouts/index.js.map +1 -0
  20. package/dist/breakouts/request.js +78 -0
  21. package/dist/breakouts/request.js.map +1 -0
  22. package/dist/breakouts/utils.js +67 -0
  23. package/dist/breakouts/utils.js.map +1 -0
  24. package/dist/common/browser-detection.js +1 -20
  25. package/dist/common/browser-detection.js.map +1 -1
  26. package/dist/common/collection.js +5 -20
  27. package/dist/common/collection.js.map +1 -1
  28. package/dist/common/config.js +0 -7
  29. package/dist/common/config.js.map +1 -1
  30. package/dist/common/errors/captcha-error.js +10 -24
  31. package/dist/common/errors/captcha-error.js.map +1 -1
  32. package/dist/common/errors/intent-to-join.js +11 -24
  33. package/dist/common/errors/intent-to-join.js.map +1 -1
  34. package/dist/common/errors/join-meeting.js +12 -25
  35. package/dist/common/errors/join-meeting.js.map +1 -1
  36. package/dist/common/errors/media.js +10 -24
  37. package/dist/common/errors/media.js.map +1 -1
  38. package/dist/common/errors/no-meeting-info.js +51 -0
  39. package/dist/common/errors/no-meeting-info.js.map +1 -0
  40. package/dist/common/errors/parameter.js +5 -33
  41. package/dist/common/errors/parameter.js.map +1 -1
  42. package/dist/common/errors/password-error.js +10 -24
  43. package/dist/common/errors/password-error.js.map +1 -1
  44. package/dist/common/errors/permission.js +9 -23
  45. package/dist/common/errors/permission.js.map +1 -1
  46. package/dist/common/errors/reclaim-host-role-errors.js +158 -0
  47. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
  48. package/dist/common/errors/reconnection-in-progress.js +0 -17
  49. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  50. package/dist/common/errors/reconnection.js +10 -24
  51. package/dist/common/errors/reconnection.js.map +1 -1
  52. package/dist/common/errors/stats.js +10 -24
  53. package/dist/common/errors/stats.js.map +1 -1
  54. package/dist/common/errors/webex-errors.js +54 -48
  55. package/dist/common/errors/webex-errors.js.map +1 -1
  56. package/dist/common/errors/webex-meetings-error.js +5 -25
  57. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  58. package/dist/common/events/events-scope.js +0 -22
  59. package/dist/common/events/events-scope.js.map +1 -1
  60. package/dist/common/events/events.js +0 -23
  61. package/dist/common/events/events.js.map +1 -1
  62. package/dist/common/events/trigger-proxy.js +0 -12
  63. package/dist/common/events/trigger-proxy.js.map +1 -1
  64. package/dist/common/events/util.js +0 -15
  65. package/dist/common/events/util.js.map +1 -1
  66. package/dist/common/logs/logger-config.js +0 -4
  67. package/dist/common/logs/logger-config.js.map +1 -1
  68. package/dist/common/logs/logger-proxy.js +1 -8
  69. package/dist/common/logs/logger-proxy.js.map +1 -1
  70. package/dist/common/logs/request.js +41 -60
  71. package/dist/common/logs/request.js.map +1 -1
  72. package/dist/common/queue.js +28 -23
  73. package/dist/common/queue.js.map +1 -1
  74. package/dist/config.js +11 -15
  75. package/dist/config.js.map +1 -1
  76. package/dist/constants.js +347 -74
  77. package/dist/constants.js.map +1 -1
  78. package/dist/controls-options-manager/constants.js +14 -0
  79. package/dist/controls-options-manager/constants.js.map +1 -0
  80. package/dist/controls-options-manager/enums.js +27 -0
  81. package/dist/controls-options-manager/enums.js.map +1 -0
  82. package/dist/controls-options-manager/index.js +297 -0
  83. package/dist/controls-options-manager/index.js.map +1 -0
  84. package/dist/controls-options-manager/types.js +7 -0
  85. package/dist/controls-options-manager/types.js.map +1 -0
  86. package/dist/controls-options-manager/util.js +319 -0
  87. package/dist/controls-options-manager/util.js.map +1 -0
  88. package/dist/index.js +125 -18
  89. package/dist/index.js.map +1 -1
  90. package/dist/interceptors/index.js +15 -0
  91. package/dist/interceptors/index.js.map +1 -0
  92. package/dist/interceptors/locusRetry.js +93 -0
  93. package/dist/interceptors/locusRetry.js.map +1 -0
  94. package/dist/interpretation/collection.js +23 -0
  95. package/dist/interpretation/collection.js.map +1 -0
  96. package/dist/interpretation/index.js +380 -0
  97. package/dist/interpretation/index.js.map +1 -0
  98. package/dist/interpretation/siLanguage.js +25 -0
  99. package/dist/interpretation/siLanguage.js.map +1 -0
  100. package/dist/locus-info/controlsUtils.js +101 -29
  101. package/dist/locus-info/controlsUtils.js.map +1 -1
  102. package/dist/locus-info/embeddedAppsUtils.js +3 -26
  103. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  104. package/dist/locus-info/fullState.js +0 -15
  105. package/dist/locus-info/fullState.js.map +1 -1
  106. package/dist/locus-info/hostUtils.js +4 -12
  107. package/dist/locus-info/hostUtils.js.map +1 -1
  108. package/dist/locus-info/index.js +564 -246
  109. package/dist/locus-info/index.js.map +1 -1
  110. package/dist/locus-info/infoUtils.js +10 -38
  111. package/dist/locus-info/infoUtils.js.map +1 -1
  112. package/dist/locus-info/mediaSharesUtils.js +82 -38
  113. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  114. package/dist/locus-info/parser.js +314 -163
  115. package/dist/locus-info/parser.js.map +1 -1
  116. package/dist/locus-info/selfUtils.js +110 -92
  117. package/dist/locus-info/selfUtils.js.map +1 -1
  118. package/dist/media/index.js +107 -231
  119. package/dist/media/index.js.map +1 -1
  120. package/dist/media/properties.js +137 -222
  121. package/dist/media/properties.js.map +1 -1
  122. package/dist/media/util.js +2 -9
  123. package/dist/media/util.js.map +1 -1
  124. package/dist/mediaQualityMetrics/config.js +316 -501
  125. package/dist/mediaQualityMetrics/config.js.map +1 -1
  126. package/dist/meeting/in-meeting-actions.js +97 -14
  127. package/dist/meeting/in-meeting-actions.js.map +1 -1
  128. package/dist/meeting/index.js +5311 -3871
  129. package/dist/meeting/index.js.map +1 -1
  130. package/dist/meeting/locusMediaRequest.js +292 -0
  131. package/dist/meeting/locusMediaRequest.js.map +1 -0
  132. package/dist/meeting/muteState.js +260 -183
  133. package/dist/meeting/muteState.js.map +1 -1
  134. package/dist/meeting/request.js +421 -347
  135. package/dist/meeting/request.js.map +1 -1
  136. package/dist/meeting/request.type.js +7 -0
  137. package/dist/meeting/request.type.js.map +1 -0
  138. package/dist/meeting/state.js +21 -31
  139. package/dist/meeting/state.js.map +1 -1
  140. package/dist/meeting/util.js +672 -585
  141. package/dist/meeting/util.js.map +1 -1
  142. package/dist/meeting/voicea-meeting.js +172 -0
  143. package/dist/meeting/voicea-meeting.js.map +1 -0
  144. package/dist/meeting-info/collection.js +6 -25
  145. package/dist/meeting-info/collection.js.map +1 -1
  146. package/dist/meeting-info/index.js +87 -39
  147. package/dist/meeting-info/index.js.map +1 -1
  148. package/dist/meeting-info/meeting-info-v2.js +352 -283
  149. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  150. package/dist/meeting-info/request.js +3 -15
  151. package/dist/meeting-info/request.js.map +1 -1
  152. package/dist/meeting-info/util.js +99 -183
  153. package/dist/meeting-info/util.js.map +1 -1
  154. package/dist/meeting-info/utilv2.js +147 -234
  155. package/dist/meeting-info/utilv2.js.map +1 -1
  156. package/dist/meetings/collection.js +43 -19
  157. package/dist/meetings/collection.js.map +1 -1
  158. package/dist/meetings/index.js +895 -600
  159. package/dist/meetings/index.js.map +1 -1
  160. package/dist/meetings/meetings.types.js +7 -0
  161. package/dist/meetings/meetings.types.js.map +1 -0
  162. package/dist/meetings/request.js +26 -41
  163. package/dist/meetings/request.js.map +1 -1
  164. package/dist/meetings/util.js +184 -157
  165. package/dist/meetings/util.js.map +1 -1
  166. package/dist/member/index.js +134 -85
  167. package/dist/member/index.js.map +1 -1
  168. package/dist/member/types.js +25 -0
  169. package/dist/member/types.js.map +1 -0
  170. package/dist/member/util.js +158 -88
  171. package/dist/member/util.js.map +1 -1
  172. package/dist/members/collection.js +13 -12
  173. package/dist/members/collection.js.map +1 -1
  174. package/dist/members/index.js +194 -204
  175. package/dist/members/index.js.map +1 -1
  176. package/dist/members/request.js +113 -68
  177. package/dist/members/request.js.map +1 -1
  178. package/dist/members/types.js +15 -0
  179. package/dist/members/types.js.map +1 -0
  180. package/dist/members/util.js +324 -259
  181. package/dist/members/util.js.map +1 -1
  182. package/dist/metrics/constants.js +19 -7
  183. package/dist/metrics/constants.js.map +1 -1
  184. package/dist/metrics/index.js +11 -558
  185. package/dist/metrics/index.js.map +1 -1
  186. package/dist/multistream/mediaRequestManager.js +263 -50
  187. package/dist/multistream/mediaRequestManager.js.map +1 -1
  188. package/dist/multistream/receiveSlot.js +58 -65
  189. package/dist/multistream/receiveSlot.js.map +1 -1
  190. package/dist/multistream/receiveSlotManager.js +76 -95
  191. package/dist/multistream/receiveSlotManager.js.map +1 -1
  192. package/dist/multistream/remoteMedia.js +62 -76
  193. package/dist/multistream/remoteMedia.js.map +1 -1
  194. package/dist/multistream/remoteMediaGroup.js +82 -45
  195. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  196. package/dist/multistream/remoteMediaManager.js +657 -448
  197. package/dist/multistream/remoteMediaManager.js.map +1 -1
  198. package/dist/multistream/sendSlotManager.js +255 -0
  199. package/dist/multistream/sendSlotManager.js.map +1 -0
  200. package/dist/networkQualityMonitor/index.js +40 -59
  201. package/dist/networkQualityMonitor/index.js.map +1 -1
  202. package/dist/personal-meeting-room/index.js +21 -45
  203. package/dist/personal-meeting-room/index.js.map +1 -1
  204. package/dist/personal-meeting-room/request.js +1 -31
  205. package/dist/personal-meeting-room/request.js.map +1 -1
  206. package/dist/personal-meeting-room/util.js +0 -13
  207. package/dist/personal-meeting-room/util.js.map +1 -1
  208. package/dist/reachability/clusterReachability.js +356 -0
  209. package/dist/reachability/clusterReachability.js.map +1 -0
  210. package/dist/reachability/index.js +297 -460
  211. package/dist/reachability/index.js.map +1 -1
  212. package/dist/reachability/request.js +20 -26
  213. package/dist/reachability/request.js.map +1 -1
  214. package/dist/reachability/util.js +29 -0
  215. package/dist/reachability/util.js.map +1 -0
  216. package/dist/reactions/constants.js +13 -0
  217. package/dist/reactions/constants.js.map +1 -0
  218. package/dist/reactions/reactions.js +109 -0
  219. package/dist/reactions/reactions.js.map +1 -0
  220. package/dist/reactions/reactions.type.js +36 -0
  221. package/dist/reactions/reactions.type.js.map +1 -0
  222. package/dist/reconnection-manager/index.js +413 -483
  223. package/dist/reconnection-manager/index.js.map +1 -1
  224. package/dist/recording-controller/enums.js +17 -0
  225. package/dist/recording-controller/enums.js.map +1 -0
  226. package/dist/recording-controller/index.js +362 -0
  227. package/dist/recording-controller/index.js.map +1 -0
  228. package/dist/recording-controller/util.js +64 -0
  229. package/dist/recording-controller/util.js.map +1 -0
  230. package/dist/roap/index.js +102 -86
  231. package/dist/roap/index.js.map +1 -1
  232. package/dist/roap/request.js +131 -135
  233. package/dist/roap/request.js.map +1 -1
  234. package/dist/roap/turnDiscovery.js +437 -116
  235. package/dist/roap/turnDiscovery.js.map +1 -1
  236. package/dist/rtcMetrics/constants.js +12 -0
  237. package/dist/rtcMetrics/constants.js.map +1 -0
  238. package/dist/rtcMetrics/index.js +179 -0
  239. package/dist/rtcMetrics/index.js.map +1 -0
  240. package/dist/statsAnalyzer/global.js +1 -95
  241. package/dist/statsAnalyzer/global.js.map +1 -1
  242. package/dist/statsAnalyzer/index.js +557 -583
  243. package/dist/statsAnalyzer/index.js.map +1 -1
  244. package/dist/statsAnalyzer/mqaUtil.js +326 -130
  245. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  246. package/dist/transcription/index.js +22 -47
  247. package/dist/transcription/index.js.map +1 -1
  248. package/dist/types/annotation/annotation.types.d.ts +42 -0
  249. package/dist/types/annotation/constants.d.ts +31 -0
  250. package/dist/types/annotation/index.d.ts +117 -0
  251. package/dist/types/breakouts/breakout.d.ts +8 -0
  252. package/dist/types/breakouts/collection.d.ts +5 -0
  253. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  254. package/dist/types/breakouts/events.d.ts +8 -0
  255. package/dist/types/breakouts/index.d.ts +5 -0
  256. package/dist/types/breakouts/request.d.ts +22 -0
  257. package/dist/types/breakouts/utils.d.ts +15 -0
  258. package/dist/types/common/browser-detection.d.ts +9 -0
  259. package/dist/types/common/collection.d.ts +48 -0
  260. package/dist/types/common/config.d.ts +2 -0
  261. package/dist/types/common/errors/captcha-error.d.ts +15 -0
  262. package/dist/types/common/errors/intent-to-join.d.ts +16 -0
  263. package/dist/types/common/errors/join-meeting.d.ts +17 -0
  264. package/dist/types/common/errors/media.d.ts +15 -0
  265. package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
  266. package/dist/types/common/errors/parameter.d.ts +15 -0
  267. package/dist/types/common/errors/password-error.d.ts +15 -0
  268. package/dist/types/common/errors/permission.d.ts +14 -0
  269. package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
  270. package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
  271. package/dist/types/common/errors/reconnection.d.ts +15 -0
  272. package/dist/types/common/errors/stats.d.ts +15 -0
  273. package/dist/types/common/errors/webex-errors.d.ts +93 -0
  274. package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
  275. package/dist/types/common/events/events-scope.d.ts +17 -0
  276. package/dist/types/common/events/events.d.ts +12 -0
  277. package/dist/types/common/events/trigger-proxy.d.ts +2 -0
  278. package/dist/types/common/events/util.d.ts +2 -0
  279. package/dist/types/common/logs/logger-config.d.ts +2 -0
  280. package/dist/types/common/logs/logger-proxy.d.ts +2 -0
  281. package/dist/types/common/logs/request.d.ts +36 -0
  282. package/dist/types/common/queue.d.ts +34 -0
  283. package/dist/types/config.d.ts +72 -0
  284. package/dist/types/constants.d.ts +1088 -0
  285. package/dist/types/controls-options-manager/constants.d.ts +4 -0
  286. package/dist/types/controls-options-manager/enums.d.ts +15 -0
  287. package/dist/types/controls-options-manager/index.d.ts +136 -0
  288. package/dist/types/controls-options-manager/types.d.ts +43 -0
  289. package/dist/types/controls-options-manager/util.d.ts +1 -0
  290. package/dist/types/index.d.ts +7 -0
  291. package/dist/types/interceptors/index.d.ts +2 -0
  292. package/dist/types/interceptors/locusRetry.d.ts +27 -0
  293. package/dist/types/interpretation/collection.d.ts +5 -0
  294. package/dist/types/interpretation/index.d.ts +5 -0
  295. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  296. package/dist/types/locus-info/controlsUtils.d.ts +2 -0
  297. package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
  298. package/dist/types/locus-info/fullState.d.ts +2 -0
  299. package/dist/types/locus-info/hostUtils.d.ts +2 -0
  300. package/dist/types/locus-info/index.d.ts +322 -0
  301. package/dist/types/locus-info/infoUtils.d.ts +2 -0
  302. package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
  303. package/dist/types/locus-info/parser.d.ts +272 -0
  304. package/dist/types/locus-info/selfUtils.d.ts +2 -0
  305. package/dist/types/media/index.d.ts +34 -0
  306. package/dist/types/media/properties.d.ts +93 -0
  307. package/dist/types/media/util.d.ts +2 -0
  308. package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
  309. package/dist/types/meeting/in-meeting-actions.d.ts +167 -0
  310. package/dist/types/meeting/index.d.ts +1824 -0
  311. package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
  312. package/dist/types/meeting/muteState.d.ts +178 -0
  313. package/dist/types/meeting/request.d.ts +293 -0
  314. package/dist/types/meeting/request.type.d.ts +11 -0
  315. package/dist/types/meeting/state.d.ts +9 -0
  316. package/dist/types/meeting/util.d.ts +118 -0
  317. package/dist/types/meeting/voicea-meeting.d.ts +16 -0
  318. package/dist/types/meeting-info/collection.d.ts +20 -0
  319. package/dist/types/meeting-info/index.d.ts +69 -0
  320. package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
  321. package/dist/types/meeting-info/request.d.ts +22 -0
  322. package/dist/types/meeting-info/util.d.ts +2 -0
  323. package/dist/types/meeting-info/utilv2.d.ts +2 -0
  324. package/dist/types/meetings/collection.d.ts +40 -0
  325. package/dist/types/meetings/index.d.ts +389 -0
  326. package/dist/types/meetings/meetings.types.d.ts +4 -0
  327. package/dist/types/meetings/request.d.ts +27 -0
  328. package/dist/types/meetings/util.d.ts +18 -0
  329. package/dist/types/member/index.d.ts +160 -0
  330. package/dist/types/member/types.d.ts +32 -0
  331. package/dist/types/member/util.d.ts +2 -0
  332. package/dist/types/members/collection.d.ts +29 -0
  333. package/dist/types/members/index.d.ts +353 -0
  334. package/dist/types/members/request.d.ts +114 -0
  335. package/dist/types/members/types.d.ts +25 -0
  336. package/dist/types/members/util.d.ts +215 -0
  337. package/dist/types/metrics/constants.d.ts +70 -0
  338. package/dist/types/metrics/index.d.ts +45 -0
  339. package/dist/types/multistream/mediaRequestManager.d.ts +120 -0
  340. package/dist/types/multistream/receiveSlot.d.ts +68 -0
  341. package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
  342. package/dist/types/multistream/remoteMedia.d.ts +72 -0
  343. package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
  344. package/dist/types/multistream/remoteMediaManager.d.ts +301 -0
  345. package/dist/types/multistream/sendSlotManager.d.ts +70 -0
  346. package/dist/types/networkQualityMonitor/index.d.ts +70 -0
  347. package/dist/types/personal-meeting-room/index.d.ts +47 -0
  348. package/dist/types/personal-meeting-room/request.d.ts +14 -0
  349. package/dist/types/personal-meeting-room/util.d.ts +2 -0
  350. package/dist/types/reachability/clusterReachability.d.ts +109 -0
  351. package/dist/types/reachability/index.d.ts +105 -0
  352. package/dist/types/reachability/request.d.ts +39 -0
  353. package/dist/types/reachability/util.d.ts +8 -0
  354. package/dist/types/reactions/constants.d.ts +3 -0
  355. package/dist/types/reactions/reactions.d.ts +4 -0
  356. package/dist/types/reactions/reactions.type.d.ts +52 -0
  357. package/dist/types/reconnection-manager/index.d.ts +136 -0
  358. package/dist/types/recording-controller/enums.d.ts +7 -0
  359. package/dist/types/recording-controller/index.d.ts +207 -0
  360. package/dist/types/recording-controller/util.d.ts +14 -0
  361. package/dist/types/roap/index.d.ts +86 -0
  362. package/dist/types/roap/request.d.ts +39 -0
  363. package/dist/types/roap/turnDiscovery.d.ts +155 -0
  364. package/dist/types/rtcMetrics/constants.d.ts +4 -0
  365. package/dist/types/rtcMetrics/index.d.ts +61 -0
  366. package/dist/types/statsAnalyzer/global.d.ts +36 -0
  367. package/dist/types/statsAnalyzer/index.d.ts +217 -0
  368. package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
  369. package/dist/types/transcription/index.d.ts +64 -0
  370. package/dist/types/webinar/collection.d.ts +16 -0
  371. package/dist/types/webinar/index.d.ts +5 -0
  372. package/dist/webinar/collection.js +44 -0
  373. package/dist/webinar/collection.js.map +1 -0
  374. package/dist/webinar/index.js +69 -0
  375. package/dist/webinar/index.js.map +1 -0
  376. package/internal-README.md +7 -6
  377. package/package.json +30 -21
  378. package/src/annotation/annotation.types.ts +50 -0
  379. package/src/annotation/constants.ts +36 -0
  380. package/src/annotation/index.ts +328 -0
  381. package/src/breakouts/README.md +220 -0
  382. package/src/breakouts/breakout.ts +188 -0
  383. package/src/breakouts/collection.ts +19 -0
  384. package/src/breakouts/edit-lock-error.ts +25 -0
  385. package/src/breakouts/events.ts +56 -0
  386. package/src/breakouts/index.ts +925 -0
  387. package/src/breakouts/request.ts +55 -0
  388. package/src/breakouts/utils.ts +57 -0
  389. package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
  390. package/src/common/collection.ts +9 -7
  391. package/src/common/{config.js → config.ts} +1 -1
  392. package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
  393. package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
  394. package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
  395. package/src/common/errors/{media.js → media.ts} +11 -7
  396. package/src/common/errors/no-meeting-info.ts +24 -0
  397. package/src/common/errors/parameter.ts +11 -7
  398. package/src/common/errors/{password-error.js → password-error.ts} +11 -7
  399. package/src/common/errors/{permission.js → permission.ts} +10 -6
  400. package/src/common/errors/reclaim-host-role-errors.ts +134 -0
  401. package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
  402. package/src/common/errors/{stats.js → stats.ts} +11 -7
  403. package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
  404. package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
  405. package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
  406. package/src/common/events/{events.js → events.ts} +5 -1
  407. package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
  408. package/src/common/events/{util.js → util.ts} +2 -3
  409. package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
  410. package/src/common/logs/logger-proxy.ts +44 -0
  411. package/src/common/logs/{request.js → request.ts} +26 -9
  412. package/src/common/queue.ts +22 -9
  413. package/src/{config.js → config.ts} +19 -21
  414. package/src/constants.ts +296 -27
  415. package/src/controls-options-manager/constants.ts +5 -0
  416. package/src/controls-options-manager/enums.ts +18 -0
  417. package/src/controls-options-manager/index.ts +278 -0
  418. package/src/controls-options-manager/types.ts +59 -0
  419. package/src/controls-options-manager/util.ts +300 -0
  420. package/src/index.ts +45 -0
  421. package/src/interceptors/index.ts +3 -0
  422. package/src/interceptors/locusRetry.ts +67 -0
  423. package/src/interpretation/README.md +60 -0
  424. package/src/interpretation/collection.ts +19 -0
  425. package/src/interpretation/index.ts +349 -0
  426. package/src/interpretation/siLanguage.ts +18 -0
  427. package/src/locus-info/controlsUtils.ts +222 -0
  428. package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
  429. package/src/locus-info/{fullState.js → fullState.ts} +16 -12
  430. package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
  431. package/src/locus-info/{index.js → index.ts} +561 -119
  432. package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
  433. package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +97 -17
  434. package/src/locus-info/{parser.js → parser.ts} +303 -104
  435. package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
  436. package/src/media/index.ts +460 -0
  437. package/src/media/properties.ts +283 -0
  438. package/src/media/{util.js → util.ts} +2 -2
  439. package/src/mediaQualityMetrics/config.ts +249 -0
  440. package/src/meeting/in-meeting-actions.ts +199 -3
  441. package/src/meeting/index.ts +8494 -0
  442. package/src/meeting/locusMediaRequest.ts +313 -0
  443. package/src/meeting/muteState.ts +465 -0
  444. package/src/meeting/request.ts +912 -0
  445. package/src/meeting/request.type.ts +13 -0
  446. package/src/meeting/{state.js → state.ts} +50 -35
  447. package/src/meeting/util.ts +799 -0
  448. package/src/meeting/voicea-meeting.ts +122 -0
  449. package/src/meeting-info/{collection.js → collection.ts} +6 -2
  450. package/src/meeting-info/index.ts +210 -0
  451. package/src/meeting-info/meeting-info-v2.ts +423 -0
  452. package/src/meeting-info/{request.js → request.ts} +14 -4
  453. package/src/meeting-info/{util.js → util.ts} +70 -58
  454. package/src/meeting-info/{utilv2.js → utilv2.ts} +99 -82
  455. package/src/meetings/collection.ts +76 -0
  456. package/src/meetings/index.ts +1539 -0
  457. package/src/meetings/meetings.types.ts +12 -0
  458. package/src/meetings/{request.js → request.ts} +34 -25
  459. package/src/meetings/{util.js → util.ts} +133 -38
  460. package/src/member/{index.js → index.ts} +159 -56
  461. package/src/member/types.ts +38 -0
  462. package/src/member/util.ts +397 -0
  463. package/src/members/{collection.js → collection.ts} +10 -2
  464. package/src/members/{index.js → index.ts} +351 -146
  465. package/src/members/request.ts +255 -0
  466. package/src/members/types.ts +29 -0
  467. package/src/members/util.ts +353 -0
  468. package/src/metrics/{constants.js → constants.ts} +17 -6
  469. package/src/metrics/index.ts +73 -0
  470. package/src/multistream/mediaRequestManager.ts +341 -64
  471. package/src/multistream/receiveSlot.ts +69 -26
  472. package/src/multistream/receiveSlotManager.ts +66 -42
  473. package/src/multistream/remoteMedia.ts +40 -5
  474. package/src/multistream/remoteMediaGroup.ts +82 -3
  475. package/src/multistream/remoteMediaManager.ts +401 -81
  476. package/src/multistream/sendSlotManager.ts +199 -0
  477. package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
  478. package/src/personal-meeting-room/{index.js → index.ts} +28 -19
  479. package/src/personal-meeting-room/{request.js → request.ts} +13 -4
  480. package/src/personal-meeting-room/{util.js → util.ts} +4 -4
  481. package/src/reachability/clusterReachability.ts +320 -0
  482. package/src/reachability/index.ts +371 -0
  483. package/src/reachability/request.ts +50 -35
  484. package/src/reachability/util.ts +24 -0
  485. package/src/reactions/constants.ts +4 -0
  486. package/src/reactions/reactions.ts +104 -0
  487. package/src/reactions/reactions.type.ts +62 -0
  488. package/src/reconnection-manager/index.ts +643 -0
  489. package/src/recording-controller/enums.ts +8 -0
  490. package/src/recording-controller/index.ts +332 -0
  491. package/src/recording-controller/util.ts +75 -0
  492. package/src/roap/index.ts +288 -0
  493. package/src/roap/request.ts +153 -0
  494. package/src/roap/turnDiscovery.ts +374 -70
  495. package/src/rtcMetrics/constants.ts +3 -0
  496. package/src/rtcMetrics/index.ts +166 -0
  497. package/src/statsAnalyzer/global.ts +37 -0
  498. package/src/statsAnalyzer/index.ts +1275 -0
  499. package/src/statsAnalyzer/mqaUtil.ts +440 -0
  500. package/src/transcription/{index.js → index.ts} +46 -39
  501. package/src/webinar/collection.ts +31 -0
  502. package/src/webinar/index.ts +62 -0
  503. package/test/integration/spec/converged-space-meetings.js +233 -0
  504. package/test/integration/spec/journey.js +791 -531
  505. package/test/integration/spec/space-meeting.js +391 -204
  506. package/test/integration/spec/transcription.js +7 -8
  507. package/test/unit/spec/annotation/index.ts +418 -0
  508. package/test/unit/spec/breakouts/breakout.ts +238 -0
  509. package/test/unit/spec/breakouts/collection.ts +15 -0
  510. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  511. package/test/unit/spec/breakouts/events.ts +89 -0
  512. package/test/unit/spec/breakouts/index.ts +1793 -0
  513. package/test/unit/spec/breakouts/request.ts +104 -0
  514. package/test/unit/spec/breakouts/utils.js +72 -0
  515. package/test/unit/spec/common/browser-detection.js +9 -28
  516. package/test/unit/spec/common/queue.js +31 -2
  517. package/test/unit/spec/controls-options-manager/index.js +287 -0
  518. package/test/unit/spec/controls-options-manager/util.js +582 -0
  519. package/test/unit/spec/fixture/locus.js +93 -90
  520. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  521. package/test/unit/spec/interpretation/collection.ts +15 -0
  522. package/test/unit/spec/interpretation/index.ts +625 -0
  523. package/test/unit/spec/interpretation/siLanguage.ts +28 -0
  524. package/test/unit/spec/locus-info/controlsUtils.js +325 -32
  525. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  526. package/test/unit/spec/locus-info/index.js +1458 -21
  527. package/test/unit/spec/locus-info/infoUtils.js +71 -40
  528. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  529. package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
  530. package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
  531. package/test/unit/spec/locus-info/parser.js +119 -44
  532. package/test/unit/spec/locus-info/selfConstant.js +120 -103
  533. package/test/unit/spec/locus-info/selfUtils.js +291 -12
  534. package/test/unit/spec/media/index.ts +194 -111
  535. package/test/unit/spec/media/properties.ts +11 -11
  536. package/test/unit/spec/meeting/in-meeting-actions.ts +96 -3
  537. package/test/unit/spec/meeting/index.js +8616 -1921
  538. package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
  539. package/test/unit/spec/meeting/muteState.js +568 -207
  540. package/test/unit/spec/meeting/request.js +602 -82
  541. package/test/unit/spec/meeting/utils.js +867 -179
  542. package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
  543. package/test/unit/spec/meeting-info/index.js +300 -0
  544. package/test/unit/spec/meeting-info/meetinginfov2.js +631 -78
  545. package/test/unit/spec/meeting-info/request.js +7 -9
  546. package/test/unit/spec/meeting-info/util.js +11 -12
  547. package/test/unit/spec/meeting-info/utilv2.js +131 -74
  548. package/test/unit/spec/meetings/collection.js +27 -1
  549. package/test/unit/spec/meetings/index.js +1826 -374
  550. package/test/unit/spec/meetings/utils.js +243 -14
  551. package/test/unit/spec/member/index.js +61 -7
  552. package/test/unit/spec/member/util.js +526 -26
  553. package/test/unit/spec/members/index.js +536 -55
  554. package/test/unit/spec/members/request.js +228 -40
  555. package/test/unit/spec/members/utils.js +217 -4
  556. package/test/unit/spec/metrics/index.js +13 -68
  557. package/test/unit/spec/multistream/mediaRequestManager.ts +1032 -110
  558. package/test/unit/spec/multistream/receiveSlot.ts +77 -18
  559. package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
  560. package/test/unit/spec/multistream/remoteMedia.ts +40 -2
  561. package/test/unit/spec/multistream/remoteMediaGroup.ts +350 -5
  562. package/test/unit/spec/multistream/remoteMediaManager.ts +937 -65
  563. package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
  564. package/test/unit/spec/networkQualityMonitor/index.js +24 -18
  565. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  566. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  567. package/test/unit/spec/reachability/index.ts +606 -26
  568. package/test/unit/spec/reachability/request.js +68 -0
  569. package/test/unit/spec/reachability/util.ts +40 -0
  570. package/test/unit/spec/reconnection-manager/index.js +222 -34
  571. package/test/unit/spec/recording-controller/index.js +306 -0
  572. package/test/unit/spec/recording-controller/util.js +229 -0
  573. package/test/unit/spec/roap/index.ts +238 -82
  574. package/test/unit/spec/roap/request.ts +255 -0
  575. package/test/unit/spec/roap/turnDiscovery.ts +707 -110
  576. package/test/unit/spec/rtcMetrics/index.ts +122 -0
  577. package/test/unit/spec/stats-analyzer/index.js +1331 -62
  578. package/test/unit/spec/webinar/collection.ts +13 -0
  579. package/test/unit/spec/webinar/index.ts +60 -0
  580. package/test/utils/cmr.js +44 -42
  581. package/test/utils/constants.js +9 -0
  582. package/test/utils/integrationTestUtils.js +46 -0
  583. package/test/utils/testUtils.js +63 -99
  584. package/test/utils/webex-config.js +22 -18
  585. package/test/utils/webex-test-users.js +65 -50
  586. package/tsconfig.json +6 -0
  587. package/dist/media/internal-media-core-wrapper.js +0 -22
  588. package/dist/media/internal-media-core-wrapper.js.map +0 -1
  589. package/dist/meeting/effectsState.js +0 -327
  590. package/dist/meeting/effectsState.js.map +0 -1
  591. package/dist/metrics/config.js +0 -301
  592. package/dist/metrics/config.js.map +0 -1
  593. package/dist/multistream/multistreamMedia.js +0 -116
  594. package/dist/multistream/multistreamMedia.js.map +0 -1
  595. package/dist/peer-connection-manager/util.js +0 -124
  596. package/dist/peer-connection-manager/util.js.map +0 -1
  597. package/src/common/logs/logger-proxy.js +0 -33
  598. package/src/index.js +0 -15
  599. package/src/locus-info/controlsUtils.js +0 -102
  600. package/src/media/index.js +0 -459
  601. package/src/media/internal-media-core-wrapper.ts +0 -9
  602. package/src/media/properties.js +0 -289
  603. package/src/mediaQualityMetrics/config.js +0 -382
  604. package/src/meeting/effectsState.js +0 -205
  605. package/src/meeting/index.js +0 -6284
  606. package/src/meeting/muteState.js +0 -318
  607. package/src/meeting/request.js +0 -684
  608. package/src/meeting/util.js +0 -506
  609. package/src/meeting-info/index.js +0 -131
  610. package/src/meeting-info/meeting-info-v2.js +0 -255
  611. package/src/meetings/collection.js +0 -40
  612. package/src/meetings/index.js +0 -1015
  613. package/src/member/util.js +0 -254
  614. package/src/members/request.js +0 -131
  615. package/src/members/util.js +0 -258
  616. package/src/metrics/config.js +0 -324
  617. package/src/metrics/index.js +0 -530
  618. package/src/multistream/multistreamMedia.ts +0 -92
  619. package/src/peer-connection-manager/util.ts +0 -117
  620. package/src/reachability/index.js +0 -464
  621. package/src/reconnection-manager/index.js +0 -519
  622. package/src/roap/index.js +0 -220
  623. package/src/roap/request.js +0 -127
  624. package/src/statsAnalyzer/global.js +0 -133
  625. package/src/statsAnalyzer/index.js +0 -1006
  626. package/src/statsAnalyzer/mqaUtil.js +0 -173
  627. package/test/unit/spec/meeting/effectsState.js +0 -291
  628. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
  629. /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
@@ -1,61 +1,39 @@
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"));
18
+ var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
19
+ var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
20
+ var _assignWith2 = _interopRequireDefault(require("lodash/assignWith"));
27
21
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
28
-
29
22
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
30
-
31
23
  var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
32
-
33
24
  var _constants = require("../constants");
34
-
25
+ var _infoUtils = _interopRequireDefault(require("./infoUtils"));
26
+ var _fullState = _interopRequireDefault(require("./fullState"));
27
+ var _selfUtils = _interopRequireDefault(require("./selfUtils"));
28
+ var _hostUtils = _interopRequireDefault(require("./hostUtils"));
29
+ var _controlsUtils = _interopRequireDefault(require("./controlsUtils"));
30
+ var _embeddedAppsUtils = _interopRequireDefault(require("./embeddedAppsUtils"));
31
+ var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
32
+ var _parser = _interopRequireDefault(require("./parser"));
35
33
  var _metrics = _interopRequireDefault(require("../metrics"));
36
-
37
- 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
-
34
+ var _constants2 = _interopRequireDefault(require("../metrics/constants"));
55
35
  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
36
  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
37
  /**
60
38
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
61
39
  * @export
@@ -64,14 +42,48 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
64
42
  */
65
43
  var LocusInfo = /*#__PURE__*/function (_EventsScope) {
66
44
  (0, _inherits2.default)(LocusInfo, _EventsScope);
67
-
68
45
  var _super = _createSuper(LocusInfo);
69
-
46
+ /**
47
+ * Constructor
48
+ * @param {function} updateMeeting callback to update the meeting object from an object
49
+ * @param {object} webex
50
+ * @param {string} meetingId
51
+ * @returns {undefined}
52
+ */
70
53
  function LocusInfo(updateMeeting, webex, meetingId) {
71
54
  var _this;
72
-
73
55
  (0, _classCallCheck2.default)(this, LocusInfo);
74
56
  _this = _super.call(this);
57
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "compareAndUpdateFlags", void 0);
58
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "emitChange", void 0);
59
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "locusParser", void 0);
60
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingId", void 0);
61
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parsedLocus", void 0);
62
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateMeeting", void 0);
63
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "webex", void 0);
64
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "aclUrl", void 0);
65
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "baseSequence", void 0);
66
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "created", void 0);
67
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "deltaParticipants", void 0);
68
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "identities", void 0);
69
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "membership", void 0);
70
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participants", void 0);
71
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "participantsUrl", void 0);
72
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaces", void 0);
73
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduledMeeting", void 0);
74
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sequence", void 0);
75
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", void 0);
76
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "conversationUrl", void 0);
77
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "embeddedApps", void 0);
78
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fullState", void 0);
79
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "host", void 0);
80
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "info", void 0);
81
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "roles", void 0);
82
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaShares", void 0);
83
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replace", void 0);
84
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "url", void 0);
85
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "services", void 0);
86
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mainSessionLocusCache", void 0);
75
87
  _this.parsedLocus = {
76
88
  states: []
77
89
  };
@@ -83,52 +95,103 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
83
95
  _this.locusParser = new _parser.default();
84
96
  return _this;
85
97
  }
98
+
86
99
  /**
87
- * Apply locus delta data to meeting
88
- * @param {string} action Locus delta action
89
- * @param {Locus} locus
100
+ * Does a Locus sync. It tries to get the latest delta DTO or if it can't, it falls back to getting the full Locus DTO.
101
+ *
90
102
  * @param {Meeting} meeting
91
103
  * @returns {undefined}
92
104
  */
93
-
94
-
95
105
  (0, _createClass2.default)(LocusInfo, [{
96
- key: "applyLocusDeltaData",
97
- value: function applyLocusDeltaData(action, locus, meeting) {
106
+ key: "doLocusSync",
107
+ value: function doLocusSync(meeting) {
98
108
  var _this2 = this;
109
+ var isDelta;
110
+ var url;
111
+ if (this.locusParser.workingCopy.syncUrl) {
112
+ url = this.locusParser.workingCopy.syncUrl;
113
+ isDelta = true;
114
+ } else {
115
+ url = meeting.locusUrl;
116
+ isDelta = false;
117
+ }
118
+ _loggerProxy.default.logger.info("Locus-info:index#doLocusSync --> doing Locus sync (getting ".concat(isDelta ? 'delta' : 'full', " DTO)"));
119
+
120
+ // return value ignored on purpose
121
+ meeting.meetingRequest.getLocusDTO({
122
+ url: url
123
+ }).catch(function (e) {
124
+ if (isDelta) {
125
+ _loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> delta sync failed, falling back to full sync');
126
+ _metrics.default.sendBehavioralMetric(_constants2.default.LOCUS_DELTA_SYNC_FAILED, {
127
+ correlationId: meeting.correlationId,
128
+ url: url,
129
+ reason: e.message,
130
+ errorName: e.name,
131
+ stack: e.stack,
132
+ code: e.code
133
+ });
134
+ isDelta = false;
135
+ return meeting.meetingRequest.getLocusDTO({
136
+ url: meeting.locusUrl
137
+ }).catch(function (err) {
138
+ _loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
139
+ _this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
140
+ throw err;
141
+ });
142
+ }
143
+ _loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> fallback full sync failed, destroying the meeting');
144
+ _this2.webex.meetings.destroy(meeting, _constants.MEETING_REMOVED_REASON.LOCUS_DTO_SYNC_FAILED);
145
+ throw e;
146
+ }).then(function (res) {
147
+ if (isDelta) {
148
+ if (!(0, _isEmpty2.default)(res.body)) {
149
+ meeting.locusInfo.handleLocusDelta(res.body, meeting);
150
+ } else {
151
+ _loggerProxy.default.logger.info('Locus-info:index#doLocusSync --> received empty body from syncUrl, so we already have latest Locus DTO');
152
+ }
153
+ } else {
154
+ meeting.locusInfo.onFullLocus(res.body);
155
+ }
156
+ // Notify parser to resume processing delta events.
157
+ // Any deltas in the queue that have now been superseded by this sync will simply be ignored
158
+ _this2.locusParser.resume();
159
+ });
160
+ }
99
161
 
162
+ /**
163
+ * Apply locus delta data to meeting
164
+ * @param {string} action Locus delta action
165
+ * @param {Locus} locus
166
+ * @param {Meeting} meeting
167
+ * @returns {undefined}
168
+ */
169
+ }, {
170
+ key: "applyLocusDeltaData",
171
+ value: function applyLocusDeltaData(action, locus, meeting) {
100
172
  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
-
173
+ DESYNC = _LocusDeltaParser$loc.DESYNC,
174
+ USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
175
+ USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING,
176
+ WAIT = _LocusDeltaParser$loc.WAIT,
177
+ LOCUS_URL_CHANGED = _LocusDeltaParser$loc.LOCUS_URL_CHANGED;
105
178
  switch (action) {
106
179
  case USE_INCOMING:
107
180
  meeting.locusInfo.onDeltaLocus(locus);
108
181
  break;
109
-
110
182
  case USE_CURRENT:
111
- meeting.locusDesync = false;
112
- meeting.needToGetFullLocus = false;
183
+ case WAIT:
184
+ // do nothing
113
185
  break;
114
-
115
186
  case DESYNC:
116
- meeting.meetingRequest.getFullLocus({
117
- desync: true,
118
- locusUrl: meeting.locusUrl
119
- }).then(function (res) {
120
- meeting.locusInfo.onFullLocus(res.body); // Notify parser to resume processing delta events
121
- // now that we have full locus from DESYNC.
122
-
123
- _this2.locusParser.resume();
124
- });
187
+ case LOCUS_URL_CHANGED:
188
+ this.doLocusSync(meeting);
125
189
  break;
126
-
127
190
  default:
128
191
  _loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
129
-
130
192
  }
131
193
  }
194
+
132
195
  /**
133
196
  * Adds locus delta to parser's queue
134
197
  * and registers a function handler
@@ -137,12 +200,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
137
200
  * @param {Meeting} meeting
138
201
  * @returns {undefined}
139
202
  */
140
-
141
203
  }, {
142
204
  key: "handleLocusDelta",
143
205
  value: function handleLocusDelta(locus, meeting) {
144
206
  var _this3 = this;
145
-
146
207
  // register a function to process delta actions
147
208
  if (!this.locusParser.onDeltaAction) {
148
209
  // delta action, along with associated loci
@@ -150,20 +211,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
150
211
  this.locusParser.onDeltaAction = function (action, parsedLoci) {
151
212
  _this3.applyLocusDeltaData(action, parsedLoci, meeting);
152
213
  };
153
- } // queue delta event with parser
154
-
155
-
214
+ }
215
+ // queue delta event with parser
156
216
  this.locusParser.onDeltaEvent(locus);
157
217
  }
218
+
158
219
  /**
159
220
  * @param {Locus} locus
160
221
  * @returns {undefined}
161
222
  * @memberof LocusInfo
162
223
  */
163
-
164
224
  }, {
165
225
  key: "init",
166
226
  value: function init() {
227
+ var _locus$links;
167
228
  var locus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
168
229
  this.created = locus.created || null;
169
230
  this.scheduledMeeting = locus.meeting || null;
@@ -175,6 +236,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
175
236
  this.membership = locus.membership || null;
176
237
  this.identities = locus.identities || null;
177
238
  this.participants = locus.participants || null;
239
+
178
240
  /**
179
241
  * Stores the delta values for a changed participant.
180
242
  *
@@ -192,50 +254,53 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
192
254
  * @private
193
255
  * @member LocusInfo
194
256
  */
195
-
196
- this.deltaParticipants = []; // above section only updates the locusInfo object
257
+ this.deltaParticipants = [];
258
+ this.updateLocusCache(locus);
259
+ // above section only updates the locusInfo object
197
260
  // 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
-
261
+ this.updateParticipants(locus.participants);
262
+ // For 1:1 space meeting the conversation Url does not exist in locus.conversation
201
263
  this.updateConversationUrl(locus.conversationUrl, locus.info);
202
- this.updateControls(locus.controls);
264
+ this.updateControls(locus.controls, locus.self);
203
265
  this.updateLocusUrl(locus.url);
204
266
  this.updateFullState(locus.fullState);
205
267
  this.updateMeetingInfo(locus.info);
206
- this.updateEmbeddedApps(locus.embeddedApps); // self and participants generate sipUrl for 1:1 meeting
207
-
268
+ this.updateEmbeddedApps(locus.embeddedApps);
269
+ // self and participants generate sipUrl for 1:1 meeting
208
270
  this.updateSelf(locus.self, locus.participants);
209
271
  this.updateHostInfo(locus.host);
210
272
  this.updateMediaShares(locus.mediaShares);
273
+ this.updateServices((_locus$links = locus.links) === null || _locus$links === void 0 ? void 0 : _locus$links.services);
211
274
  }
275
+
212
276
  /**
213
277
  * @param {Object} locus
214
278
  * @returns {undefined}
215
279
  * @memberof LocusInfo
216
280
  */
217
-
218
281
  }, {
219
282
  key: "initialSetup",
220
283
  value: function initialSetup(locus) {
221
- this.onFullLocus(locus); // Change it to true after it receives it first locus object
284
+ this.updateLocusCache(locus);
285
+ this.onFullLocus(locus);
222
286
 
287
+ // Change it to true after it receives it first locus object
223
288
  this.emitChange = true;
224
289
  }
290
+
225
291
  /**
226
292
  * @param {Meeting} meeting
227
293
  * @param {Object} data
228
294
  * @returns {undefined}
229
295
  * @memberof LocusInfo
230
296
  */
231
-
232
297
  }, {
233
298
  key: "parse",
234
299
  value: function parse(meeting, data) {
300
+ // eslint-disable-next-line @typescript-eslint/no-shadow
235
301
  var eventType = data.eventType;
236
-
302
+ var locus = this.getTheLocusToUpdate(data.locus);
237
303
  _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
238
-
239
304
  switch (eventType) {
240
305
  case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
241
306
  case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
@@ -251,19 +316,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
251
316
  case _constants.LOCUSEVENT.PARTICIPANT_DECLINED:
252
317
  case _constants.LOCUSEVENT.FLOOR_GRANTED:
253
318
  case _constants.LOCUSEVENT.FLOOR_RELEASED:
254
- this.onFullLocus(data.locus, eventType);
319
+ this.onFullLocus(locus, eventType);
255
320
  break;
256
-
257
321
  case _constants.LOCUSEVENT.DIFFERENCE:
258
- this.handleLocusDelta(data.locus, meeting);
322
+ this.handleLocusDelta(locus, meeting);
259
323
  break;
260
-
261
324
  default:
262
325
  // Why will there be a event with no eventType ????
263
326
  // we may not need this, we can get full locus
264
- this.handleLocusDelta(data.locus, meeting);
327
+ this.handleLocusDelta(locus, meeting);
265
328
  }
266
329
  }
330
+
267
331
  /**
268
332
  * @param {String} scope
269
333
  * @param {String} eventName
@@ -271,45 +335,49 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
271
335
  * @returns {undefined}
272
336
  * @memberof LocusInfo
273
337
  */
274
-
275
338
  }, {
276
339
  key: "emitScoped",
277
340
  value: function emitScoped(scope, eventName, args) {
278
341
  return this.emit(scope, eventName, args);
279
342
  }
343
+
280
344
  /**
281
345
  * updates the locus with full locus object
282
346
  * @param {object} locus locus object
283
- * @param {sting} eventType particulat locus event
347
+ * @param {string} eventType particulat locus event
284
348
  * @returns {object} null
285
349
  * @memberof LocusInfo
286
350
  */
287
-
288
351
  }, {
289
352
  key: "onFullLocus",
290
353
  value: function onFullLocus(locus, eventType) {
291
354
  if (!locus) {
292
355
  _loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
293
356
  }
294
-
357
+ if (!this.locusParser.isNewFullLocus(locus)) {
358
+ _loggerProxy.default.logger.info("Locus-info:index#onFullLocus --> ignoring old full locus DTO, eventType=".concat(eventType));
359
+ return;
360
+ }
295
361
  this.updateParticipantDeltas(locus.participants);
296
362
  this.scheduledMeeting = locus.meeting || null;
297
363
  this.participants = locus.participants;
364
+ var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
298
365
  this.updateLocusInfo(locus);
299
- this.updateParticipants(locus.participants);
366
+ this.updateParticipants(locus.participants, isReplaceMembers);
300
367
  this.isMeetingActive();
301
368
  this.handleOneOnOneEvent(eventType);
302
- this.updateEmbeddedApps(locus.embeddedApps); // set current (working copy) for parser
303
-
369
+ this.updateEmbeddedApps(locus.embeddedApps);
370
+ // set current (working copy) for parser
304
371
  this.locusParser.workingCopy = locus;
305
- } // used for ringing stops on one on one
372
+ }
306
373
 
374
+ // used for ringing stops on one on one
307
375
  /**
308
376
  * @param {String} eventType
309
377
  * @returns {undefined}
310
378
  * @memberof LocusInfo
311
379
  */
312
-
380
+ // eslint-disable-next-line @typescript-eslint/no-shadow
313
381
  }, {
314
382
  key: "handleOneOnOneEvent",
315
383
  value: function handleOneOnOneEvent(eventType) {
@@ -324,9 +392,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
324
392
  remoteDeclined: true,
325
393
  remoteAnswered: false
326
394
  });
327
- } // for 1:1 bob calls alice and alice answers, notify the meeting state
328
-
329
-
395
+ }
396
+ // for 1:1 bob calls alice and alice answers, notify the meeting state
330
397
  if (eventType === _constants.LOCUSEVENT.PARTICIPANT_JOIN) {
331
398
  // trigger the event for stop ringing
332
399
  this.emitScoped({
@@ -339,29 +406,37 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
339
406
  }
340
407
  }
341
408
  }
409
+
342
410
  /**
343
411
  * @param {Object} locus
344
412
  * @returns {undefined}
345
413
  * @memberof LocusInfo
346
414
  */
347
-
348
415
  }, {
349
416
  key: "onDeltaLocus",
350
417
  value: function onDeltaLocus(locus) {
418
+ var isReplaceMembers = _controlsUtils.default.isNeedReplaceMembers(this.controls, locus.controls);
351
419
  this.updateLocusInfo(locus);
352
- this.updateParticipants(locus.participants);
420
+ this.updateParticipants(locus.participants, isReplaceMembers);
353
421
  this.isMeetingActive();
354
422
  }
423
+
355
424
  /**
356
425
  * @param {Object} locus
357
426
  * @returns {undefined}
358
427
  * @memberof LocusInfo
359
428
  */
360
-
361
429
  }, {
362
430
  key: "updateLocusInfo",
363
431
  value: function updateLocusInfo(locus) {
364
- this.updateControls(locus.controls);
432
+ var _locus$self, _locus$self2, _locus$links2;
433
+ 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') {
434
+ // When moved to a breakout session locus sends a message for the previous locus
435
+ // indicating that we have been moved. It isn't helpful to continue parsing this
436
+ // as it gets interpreted as if we have left the call
437
+ return;
438
+ }
439
+ this.updateControls(locus.controls, locus.self);
365
440
  this.updateConversationUrl(locus.conversationUrl, locus.info);
366
441
  this.updateCreated(locus.created);
367
442
  this.updateFullState(locus.fullState);
@@ -378,53 +453,63 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
378
453
  this.updateMemberShip(locus.membership);
379
454
  this.updateIdentifiers(locus.identities);
380
455
  this.updateEmbeddedApps(locus.embeddedApps);
381
- this.compareAndUpdate(); // update which required to compare different objects from locus
456
+ this.updateServices((_locus$links2 = locus.links) === null || _locus$links2 === void 0 ? void 0 : _locus$links2.services);
457
+ this.compareAndUpdate();
458
+ // update which required to compare different objects from locus
382
459
  }
460
+
383
461
  /**
384
462
  * @param {Array} participants
385
463
  * @param {Object} self
386
464
  * @returns {Array}
387
465
  * @memberof LocusInfo
388
466
  */
389
-
390
467
  }, {
391
468
  key: "getLocusPartner",
392
469
  value: function getLocusPartner(participants, self) {
393
470
  if (!participants || participants.length === 0) {
394
471
  return null;
395
472
  }
396
-
397
473
  return participants.find(function (participant) {
398
474
  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
475
+ }
476
+ // @ts-ignore
477
+ ) || this.partner;
478
+ }
401
479
 
480
+ // TODO: all the leave states need to be checked
402
481
  /**
403
482
  * @returns {undefined}
404
483
  * @memberof LocusInfo
405
484
  */
406
-
407
485
  }, {
408
486
  key: "isMeetingActive",
409
487
  value: function isMeetingActive() {
410
488
  if (this.parsedLocus.fullState.type === _constants._CALL_ || this.parsedLocus.fullState.type === _constants._SIP_BRIDGE_) {
489
+ // @ts-ignore
411
490
  var partner = this.getLocusPartner(this.participants, this.self);
412
491
  this.updateMeeting({
413
492
  partner: partner
414
- }); // Check if guest user needs to be checked here
493
+ });
494
+
495
+ // Check if guest user needs to be checked here
496
+
415
497
  // 1) when bob declines call from bob, (bob='DECLINED')
416
498
  // 2) When alice rejects call to bob , (bob='NOTIFIED')
499
+
417
500
  // When we dont add MEDIA for condition 2. The state of bob='IDLE'
418
501
 
419
502
  if (this.fullState && this.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
420
503
  // TODO: update the meeting state
421
504
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.');
422
505
 
423
- _metrics.default.postEvent({
424
- event: _config.eventType.REMOTE_ENDED,
425
- meetingId: this.meetingId
506
+ // @ts-ignore
507
+ this.webex.internal.newMetrics.submitClientEvent({
508
+ name: 'client.call.remote-ended',
509
+ options: {
510
+ meetingId: this.meetingId
511
+ }
426
512
  });
427
-
428
513
  this.emitScoped({
429
514
  file: 'locus-info',
430
515
  function: 'isMeetingActive'
@@ -433,11 +518,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
433
518
  shouldLeave: false
434
519
  });
435
520
  } else if (partner.state === _constants.MEETING_STATE.STATES.LEFT && this.parsedLocus.self && (this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.DECLINED || this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.NOTIFIED || this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.JOINED)) {
436
- _metrics.default.postEvent({
437
- event: _config.eventType.REMOTE_ENDED,
438
- meetingId: this.meetingId
521
+ // @ts-ignore
522
+ this.webex.internal.newMetrics.submitClientEvent({
523
+ name: 'client.call.remote-ended',
524
+ options: {
525
+ meetingId: this.meetingId
526
+ }
439
527
  });
440
-
441
528
  this.emitScoped({
442
529
  file: 'locus-info',
443
530
  function: 'isMeetingActive'
@@ -447,11 +534,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
447
534
  });
448
535
  } else if (this.parsedLocus.self && this.parsedLocus.self.state === _constants.MEETING_STATE.STATES.LEFT && (partner.state === _constants.MEETING_STATE.STATES.LEFT || partner.state === _constants.MEETING_STATE.STATES.DECLINED || partner.state === _constants.MEETING_STATE.STATES.NOTIFIED || partner.state === _constants.MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
449
536
  ) {
450
- _metrics.default.postEvent({
451
- event: _config.eventType.REMOTE_ENDED,
452
- meetingId: this.meetingId
537
+ // @ts-ignore
538
+ this.webex.internal.newMetrics.submitClientEvent({
539
+ name: 'client.call.remote-ended',
540
+ options: {
541
+ meetingId: this.meetingId
542
+ }
453
543
  });
454
-
455
544
  this.emitScoped({
456
545
  file: 'locus-info',
457
546
  function: 'isMeetingActive'
@@ -461,14 +550,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
461
550
  });
462
551
  }
463
552
  } 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)) {
553
+ if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE ||
554
+ // @ts-ignore
555
+ this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
465
556
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
466
557
 
467
- _metrics.default.postEvent({
468
- event: _config.eventType.REMOTE_ENDED,
469
- meetingId: this.meetingId
558
+ // @ts-ignore
559
+ this.webex.internal.newMetrics.submitClientEvent({
560
+ name: 'client.call.remote-ended',
561
+ options: {
562
+ meetingId: this.meetingId
563
+ }
470
564
  });
471
-
472
565
  this.emitScoped({
473
566
  file: 'locus-info',
474
567
  function: 'isMeetingActive'
@@ -478,11 +571,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
478
571
  });
479
572
  } else if (this.fullState && this.fullState.removed) {
480
573
  // user has been dropped from a meeting
481
- _metrics.default.postEvent({
482
- event: _config.eventType.REMOTE_ENDED,
483
- meetingId: this.meetingId
484
- });
485
574
 
575
+ // @ts-ignore
576
+ this.webex.internal.newMetrics.submitClientEvent({
577
+ name: 'client.call.remote-ended',
578
+ options: {
579
+ meetingId: this.meetingId
580
+ }
581
+ });
486
582
  this.emitScoped({
487
583
  file: 'locus-info',
488
584
  function: 'isMeetingActive'
@@ -490,7 +586,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
490
586
  reason: _constants.MEETING_REMOVED_REASON.FULLSTATE_REMOVED,
491
587
  shouldLeave: false
492
588
  });
493
- } // If you are guest and you are removed from the meeting
589
+ }
590
+ // If you are guest and you are removed from the meeting
494
591
  // You wont get any further events
495
592
  else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
496
593
  // Check if we need to send an event
@@ -506,13 +603,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
506
603
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
507
604
  }
508
605
  }
606
+
509
607
  /**
510
608
  * checks if the host permissions have changed while in the meeting
511
609
  * This would be the case if your role as host or moderator has been updated
512
610
  * @returns {undefined}
513
611
  * @memberof LocusInfo
514
612
  */
515
-
516
613
  }, {
517
614
  key: "compareAndUpdate",
518
615
  value: function compareAndUpdate() {
@@ -522,17 +619,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
522
619
  this.compareSelfAndHost();
523
620
  }
524
621
  }
622
+
525
623
  /**
526
624
  * compared the self object to check if the user has host permissions
527
625
  * @returns {undefined}
528
626
  * @memberof LocusInfo
529
627
  */
530
-
531
628
  }, {
532
629
  key: "compareSelfAndHost",
533
630
  value: function compareSelfAndHost() {
534
631
  var _this$parsedLocus$hos;
535
-
536
632
  // In some cases the host info is not present but the moderator values changes from null to false so it triggers an update
537
633
  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
634
  this.emitScoped({
@@ -550,6 +646,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
550
646
  });
551
647
  }
552
648
  }
649
+
553
650
  /**
554
651
  * Update the deltaParticipants property of this object based on a list of
555
652
  * provided participants.
@@ -557,22 +654,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
557
654
  * @param {Array} [participants] - The participants to update against.
558
655
  * @returns {void}
559
656
  */
560
-
561
657
  }, {
562
658
  key: "updateParticipantDeltas",
563
659
  value: function updateParticipantDeltas() {
564
660
  var _this4 = this;
565
-
566
661
  var participants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
567
-
568
662
  // Used to find a participant within a participants collection.
569
663
  var findParticipant = function findParticipant(participant, collection) {
570
664
  return collection.find(function (item) {
571
665
  return item.person.id === participant.person.id;
572
666
  });
573
- }; // Generates an object that indicates which state properties have changed.
574
-
667
+ };
575
668
 
669
+ // Generates an object that indicates which state properties have changed.
576
670
  var generateDelta = function generateDelta() {
577
671
  var prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
578
672
  var newState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -581,8 +675,9 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
581
675
  audioStatus: prevState.audioStatus !== newState.audioStatus,
582
676
  videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
583
677
  videoStatus: prevState.videoStatus !== newState.videoStatus
584
- }; // Clean the object
678
+ };
585
679
 
680
+ // Clean the object
586
681
  (0, _keys.default)(deltas).forEach(function (key) {
587
682
  if (deltas[key] !== true) {
588
683
  delete deltas[key];
@@ -590,35 +685,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
590
685
  });
591
686
  return deltas;
592
687
  };
593
-
594
688
  this.deltaParticipants = participants.reduce(function (collection, participant) {
595
689
  var existingParticipant = findParticipant(participant, _this4.participants || []) || {};
596
690
  var delta = generateDelta(existingParticipant.status, participant.status);
597
691
  var changed = (0, _keys.default)(delta).length > 0;
598
-
599
692
  if (changed) {
600
693
  collection.push({
601
694
  person: participant.person,
602
695
  delta: delta
603
696
  });
604
697
  }
605
-
606
698
  return collection;
607
699
  }, []);
608
700
  }
701
+
609
702
  /**
610
- *
703
+ * update meeting's members
611
704
  * @param {Object} participants new participants object
612
- * @param {boolen} deltaParticpantFlag delta event
705
+ * @param {Boolean} isReplace is replace the whole members
613
706
  * @returns {Array} updatedParticipants
614
707
  * @memberof LocusInfo
615
708
  */
616
-
617
709
  }, {
618
710
  key: "updateParticipants",
619
- value: function updateParticipants(participants) {
711
+ value: function updateParticipants(participants, isReplace) {
620
712
  var _this$parsedLocus$con;
621
-
622
713
  this.emitScoped({
623
714
  file: 'locus-info',
624
715
  function: 'updateParticipants'
@@ -627,33 +718,99 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
627
718
  recordingId: this.parsedLocus.controls && ((_this$parsedLocus$con = this.parsedLocus.controls.record) === null || _this$parsedLocus$con === void 0 ? void 0 : _this$parsedLocus$con.modifiedBy),
628
719
  selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
629
720
  selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
630
- hostId: this.parsedLocus.host && this.parsedLocus.host.hostId
721
+ hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
722
+ isReplace: isReplace
631
723
  });
632
724
  }
725
+
633
726
  /**
634
727
  * @param {Object} controls
728
+ * @param {Object} self
635
729
  * @returns {undefined}
636
730
  * @memberof LocusInfo
637
731
  */
638
-
639
732
  }, {
640
733
  key: "updateControls",
641
- value: function updateControls(controls) {
734
+ value: function updateControls(controls, self) {
642
735
  if (controls && !(0, _isEqual2.default)(this.controls, controls)) {
643
736
  this.parsedLocus.controls = _controlsUtils.default.parse(controls);
644
-
645
737
  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
-
738
+ _ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
739
+ hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
740
+ hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
741
+ hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
742
+ hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
743
+ hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
744
+ hasBreakoutChanged = _ControlsUtils$getCon2.hasBreakoutChanged,
745
+ hasVideoEnabledChanged = _ControlsUtils$getCon2.hasVideoEnabledChanged,
746
+ hasMuteOnEntryChanged = _ControlsUtils$getCon2.hasMuteOnEntryChanged,
747
+ hasShareControlChanged = _ControlsUtils$getCon2.hasShareControlChanged,
748
+ hasDisallowUnmuteChanged = _ControlsUtils$getCon2.hasDisallowUnmuteChanged,
749
+ hasReactionsChanged = _ControlsUtils$getCon2.hasReactionsChanged,
750
+ hasReactionDisplayNamesChanged = _ControlsUtils$getCon2.hasReactionDisplayNamesChanged,
751
+ hasViewTheParticipantListChanged = _ControlsUtils$getCon2.hasViewTheParticipantListChanged,
752
+ hasRaiseHandChanged = _ControlsUtils$getCon2.hasRaiseHandChanged,
753
+ hasVideoChanged = _ControlsUtils$getCon2.hasVideoChanged,
754
+ hasInterpretationChanged = _ControlsUtils$getCon2.hasInterpretationChanged,
755
+ current = _ControlsUtils$getCon.current;
756
+ if (hasMuteOnEntryChanged) {
757
+ this.emitScoped({
758
+ file: 'locus-info',
759
+ function: 'updateControls'
760
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, {
761
+ state: current.muteOnEntry
762
+ });
763
+ }
764
+ if (hasShareControlChanged) {
765
+ this.emitScoped({
766
+ file: 'locus-info',
767
+ function: 'updateControls'
768
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, {
769
+ state: current.shareControl
770
+ });
771
+ }
772
+ if (hasDisallowUnmuteChanged) {
773
+ this.emitScoped({
774
+ file: 'locus-info',
775
+ function: 'updateControls'
776
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, {
777
+ state: current.disallowUnmute
778
+ });
779
+ }
780
+ if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
781
+ this.emitScoped({
782
+ file: 'locus-info',
783
+ function: 'updateControls'
784
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, {
785
+ state: current.reactions
786
+ });
787
+ }
788
+ if (hasViewTheParticipantListChanged) {
789
+ this.emitScoped({
790
+ file: 'locus-info',
791
+ function: 'updateControls'
792
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, {
793
+ state: current.viewTheParticipantList
794
+ });
795
+ }
796
+ if (hasRaiseHandChanged) {
797
+ this.emitScoped({
798
+ file: 'locus-info',
799
+ function: 'updateControls'
800
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, {
801
+ state: current.raiseHand
802
+ });
803
+ }
804
+ if (hasVideoChanged) {
805
+ this.emitScoped({
806
+ file: 'locus-info',
807
+ function: 'updateControls'
808
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED, {
809
+ state: current.video
810
+ });
811
+ }
654
812
  if (hasRecordingChanged || hasRecordingPausedChanged) {
655
813
  var state = null;
656
-
657
814
  if (hasRecordingPausedChanged) {
658
815
  if (current.record.paused) {
659
816
  state = _constants.RECORDING_STATE.PAUSED;
@@ -664,7 +821,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
664
821
  } else if (hasRecordingChanged) {
665
822
  state = current.record.recording ? _constants.RECORDING_STATE.RECORDING : _constants.RECORDING_STATE.IDLE;
666
823
  }
667
-
668
824
  this.emitScoped({
669
825
  file: 'locus-info',
670
826
  function: 'updateControls'
@@ -674,7 +830,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
674
830
  lastModified: current.record.lastModified
675
831
  });
676
832
  }
677
-
678
833
  if (hasMeetingContainerChanged) {
679
834
  var meetingContainerUrl = current.meetingContainer.meetingContainerUrl;
680
835
  this.emitScoped({
@@ -684,11 +839,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
684
839
  meetingContainerUrl: meetingContainerUrl
685
840
  });
686
841
  }
687
-
688
842
  if (hasTranscribeChanged) {
689
843
  var _current$transcribe = current.transcribe,
690
- transcribing = _current$transcribe.transcribing,
691
- caption = _current$transcribe.caption;
844
+ transcribing = _current$transcribe.transcribing,
845
+ caption = _current$transcribe.caption;
692
846
  this.emitScoped({
693
847
  file: 'locus-info',
694
848
  function: 'updateControls'
@@ -697,30 +851,63 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
697
851
  caption: caption
698
852
  });
699
853
  }
700
-
854
+ if (hasBreakoutChanged) {
855
+ var breakout = current.breakout;
856
+ breakout.breakoutMoveId = _selfUtils.default.getReplacedBreakoutMoveId(self, this.webex.internal.device.url);
857
+ this.emitScoped({
858
+ file: 'locus-info',
859
+ function: 'updateControls'
860
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED, {
861
+ breakout: breakout
862
+ });
863
+ }
864
+ if (hasInterpretationChanged) {
865
+ var interpretation = current.interpretation;
866
+ this.emitScoped({
867
+ file: 'locus-info',
868
+ function: 'updateControls'
869
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED, {
870
+ interpretation: interpretation
871
+ });
872
+ }
701
873
  if (hasEntryExitToneChanged) {
702
874
  var entryExitTone = current.entryExitTone;
875
+ this.updateMeeting({
876
+ entryExitTone: entryExitTone
877
+ });
703
878
  this.emitScoped({
704
879
  file: 'locus-info',
705
880
  function: 'updateControls'
706
881
  }, _constants.LOCUSINFO.EVENTS.CONTROLS_ENTRY_EXIT_TONE_UPDATED, {
707
882
  entryExitTone: entryExitTone
708
883
  });
884
+ }
885
+
886
+ // videoEnabled is handled differently than other controls,
887
+ // to fit with audio mute status logic
888
+ if (hasVideoEnabledChanged) {
889
+ var videoEnabled = current.videoEnabled;
709
890
  this.updateMeeting({
710
- entryExitTone: entryExitTone
891
+ unmuteVideoAllowed: videoEnabled
892
+ });
893
+ this.emitScoped({
894
+ file: 'locus-info',
895
+ function: 'updateControls'
896
+ }, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
897
+ // muted: not part of locus.controls
898
+ unmuteAllowed: videoEnabled
711
899
  });
712
900
  }
713
-
714
901
  this.controls = controls;
715
902
  }
716
903
  }
904
+
717
905
  /**
718
906
  * @param {String} conversationUrl
719
907
  * @param {Object} info
720
908
  * @returns {undefined}
721
909
  * @memberof LocusInfo
722
910
  */
723
-
724
911
  }, {
725
912
  key: "updateConversationUrl",
726
913
  value: function updateConversationUrl(conversationUrl, info) {
@@ -736,12 +923,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
736
923
  });
737
924
  }
738
925
  }
926
+
739
927
  /**
740
928
  * @param {Object} created
741
929
  * @returns {undefined}
742
930
  * @memberof LocusInfo
743
931
  */
744
-
745
932
  }, {
746
933
  key: "updateCreated",
747
934
  value: function updateCreated(created) {
@@ -749,20 +936,37 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
749
936
  this.created = created;
750
937
  }
751
938
  }
939
+
752
940
  /**
753
- * @param {Object} fullState
941
+ * @param {Object} services
754
942
  * @returns {undefined}
755
943
  * @memberof LocusInfo
756
944
  */
945
+ }, {
946
+ key: "updateServices",
947
+ value: function updateServices(services) {
948
+ if (services && !(0, _isEqual2.default)(this.services, services)) {
949
+ this.services = services;
950
+ this.emitScoped({
951
+ file: 'locus-info',
952
+ function: 'updateServices'
953
+ }, _constants.LOCUSINFO.EVENTS.LINKS_SERVICES, {
954
+ services: services
955
+ });
956
+ }
957
+ }
757
958
 
959
+ /**
960
+ * @param {Object} fullState
961
+ * @returns {undefined}
962
+ * @memberof LocusInfo
963
+ */
758
964
  }, {
759
965
  key: "updateFullState",
760
966
  value: function updateFullState(fullState) {
761
967
  if (fullState && !(0, _isEqual2.default)(this.fullState, fullState)) {
762
968
  var result = _fullState.default.getFullState(this.fullState, fullState);
763
-
764
969
  this.updateMeeting(result.current);
765
-
766
970
  if (result.updates.meetingStateChangedTo) {
767
971
  this.emitScoped({
768
972
  file: 'locus-info',
@@ -772,7 +976,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
772
976
  currentState: result.current.meetingState
773
977
  });
774
978
  }
775
-
776
979
  if (result.updates.meetingTypeChangedTo) {
777
980
  this.emitScoped({
778
981
  file: 'locus-info',
@@ -781,11 +984,11 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
781
984
  type: result.current.type
782
985
  });
783
986
  }
784
-
785
987
  this.parsedLocus.fullState = result.current;
786
988
  this.fullState = fullState;
787
989
  }
788
990
  }
991
+
789
992
  /**
790
993
  * handles when the locus.host is updated
791
994
  * @param {Object} host the locus.host property
@@ -793,16 +996,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
793
996
  * @memberof LocusInfo
794
997
  * emits internal event locus_info_update_host
795
998
  */
796
-
797
999
  }, {
798
1000
  key: "updateHostInfo",
799
1001
  value: function updateHostInfo(host) {
800
1002
  if (host && !(0, _isEqual2.default)(this.host, host)) {
801
1003
  var parsedHosts = _hostUtils.default.getHosts(this.host, host);
802
-
803
1004
  this.updateMeeting(parsedHosts.current);
804
1005
  this.parsedLocus.host = parsedHosts.current;
805
-
806
1006
  if (parsedHosts.updates.isNewHost) {
807
1007
  this.compareAndUpdateFlags.compareSelfAndHost = true;
808
1008
  this.emitScoped({
@@ -813,65 +1013,58 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
813
1013
  oldHost: parsedHosts.previous
814
1014
  });
815
1015
  }
816
-
817
1016
  this.host = host;
818
1017
  } else {
819
1018
  this.compareAndUpdateFlags.compareSelfAndHost = false;
820
1019
  }
821
1020
  }
1021
+
822
1022
  /**
823
1023
  * @param {Object} info
824
1024
  * @param {Object} self
825
1025
  * @returns {undefined}
826
1026
  * @memberof LocusInfo
827
1027
  */
828
-
829
1028
  }, {
830
1029
  key: "updateMeetingInfo",
831
1030
  value: function updateMeetingInfo(info, self) {
832
- if (info && !(0, _isEqual2.default)(this.info, info)) {
833
- var _this$parsedLocus$sel;
834
-
835
- 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
-
1031
+ var _this$parsedLocus$sel;
1032
+ 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) || [];
1033
+ if (info && !(0, _isEqual2.default)(this.info, info) || roles.length && !(0, _isEqual2.default)(this.roles, roles) && info) {
837
1034
  var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
838
-
839
1035
  var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
840
-
841
- this.emitScoped({
842
- file: 'locus-info',
843
- function: 'updateMeetingInfo'
844
- }, _constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, {
845
- info: parsedInfo.current,
846
- self: self
847
- });
848
-
849
1036
  if (parsedInfo.updates.isLocked) {
850
1037
  this.emitScoped({
851
1038
  file: 'locus-info',
852
1039
  function: 'updateMeetingInfo'
853
1040
  }, _constants.LOCUSINFO.EVENTS.MEETING_LOCKED, info);
854
1041
  }
855
-
856
1042
  if (parsedInfo.updates.isUnlocked) {
857
1043
  this.emitScoped({
858
1044
  file: 'locus-info',
859
1045
  function: 'updateMeetingInfo'
860
1046
  }, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
861
1047
  }
862
-
863
1048
  this.info = info;
864
- this.parsedLocus.info = parsedInfo.current; // Parses the info and adds necessary values
865
-
1049
+ this.parsedLocus.info = parsedInfo.current;
1050
+ // Parses the info and adds necessary values
866
1051
  this.updateMeeting(parsedInfo.current);
1052
+ this.emitScoped({
1053
+ file: 'locus-info',
1054
+ function: 'updateMeetingInfo'
1055
+ }, _constants.LOCUSINFO.EVENTS.MEETING_INFO_UPDATED, {
1056
+ isInitializing: !self // if self is undefined, then the update is caused by locus init
1057
+ });
867
1058
  }
1059
+
1060
+ this.roles = roles;
868
1061
  }
1062
+
869
1063
  /**
870
1064
  * @param {Object} embeddedApps
871
1065
  * @returns {undefined}
872
1066
  * @memberof LocusInfo
873
1067
  */
874
-
875
1068
  }, {
876
1069
  key: "updateEmbeddedApps",
877
1070
  value: function updateEmbeddedApps(embeddedApps) {
@@ -879,9 +1072,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
879
1072
  if (_embeddedAppsUtils.default.areSimilar(this.embeddedApps, embeddedApps)) {
880
1073
  return;
881
1074
  }
882
-
883
1075
  var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
884
-
885
1076
  this.updateMeeting({
886
1077
  embeddedApps: parsedEmbeddedApps
887
1078
  });
@@ -891,6 +1082,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
891
1082
  }, _constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, parsedEmbeddedApps);
892
1083
  this.embeddedApps = embeddedApps;
893
1084
  }
1085
+
894
1086
  /**
895
1087
  * handles when the locus.mediaShares is updated
896
1088
  * @param {Object} mediaShares the locus.mediaShares property
@@ -898,14 +1090,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
898
1090
  * @memberof LocusInfo
899
1091
  * emits internal event locus_info_update_media_shares
900
1092
  */
901
-
902
1093
  }, {
903
1094
  key: "updateMediaShares",
904
1095
  value: function updateMediaShares(mediaShares) {
905
1096
  if (mediaShares && !(0, _isEqual2.default)(this.mediaShares, mediaShares)) {
906
1097
  var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
907
-
908
1098
  this.updateMeeting(parsedMediaShares.current);
1099
+ this.parsedLocus.mediaShares = parsedMediaShares.current;
1100
+ this.mediaShares = mediaShares;
909
1101
  this.emitScoped({
910
1102
  file: 'locus-info',
911
1103
  function: 'updateMediaShares'
@@ -913,16 +1105,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
913
1105
  current: parsedMediaShares.current,
914
1106
  previous: parsedMediaShares.previous
915
1107
  });
916
- this.parsedLocus.mediaShares = parsedMediaShares.current;
917
- this.mediaShares = mediaShares;
918
1108
  }
919
1109
  }
1110
+
920
1111
  /**
921
1112
  * @param {String} participantsUrl
922
1113
  * @returns {undefined}
923
1114
  * @memberof LocusInfo
924
1115
  */
925
-
926
1116
  }, {
927
1117
  key: "updateParticipantsUrl",
928
1118
  value: function updateParticipantsUrl(participantsUrl) {
@@ -930,12 +1120,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
930
1120
  this.participantsUrl = participantsUrl;
931
1121
  }
932
1122
  }
1123
+
933
1124
  /**
934
1125
  * @param {Object} replace
935
1126
  * @returns {undefined}
936
1127
  * @memberof LocusInfo
937
1128
  */
938
-
939
1129
  }, {
940
1130
  key: "updateReplace",
941
1131
  value: function updateReplace(replace) {
@@ -943,6 +1133,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
943
1133
  this.replace = replace;
944
1134
  }
945
1135
  }
1136
+
946
1137
  /**
947
1138
  * handles when the locus.self is updated
948
1139
  * @param {Object} self the locus.mediaShares property
@@ -951,35 +1142,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
951
1142
  * @memberof LocusInfo
952
1143
  * emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
953
1144
  */
954
-
955
1145
  }, {
956
1146
  key: "updateSelf",
957
1147
  value: function updateSelf(self, participants) {
1148
+ // @ts-ignore - check where this.self come from
958
1149
  if (self && !(0, _isEqual2.default)(this.self, self)) {
1150
+ // @ts-ignore
959
1151
  var parsedSelves = _selfUtils.default.getSelves(this.self, self, this.webex.internal.device.url);
960
-
961
1152
  this.updateMeeting(parsedSelves.current);
962
1153
  this.parsedLocus.self = parsedSelves.current;
963
1154
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
964
-
965
1155
  if (element !== parsedSelves.current.state) {
966
1156
  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
-
1157
+ }
970
1158
 
1159
+ // TODO: check if we need to save the sipUri here as well
1160
+ // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
971
1161
  var result = _selfUtils.default.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri);
972
-
973
1162
  if (result.sipUri) {
974
1163
  this.updateMeeting(result);
975
1164
  }
976
-
977
1165
  if (parsedSelves.updates.moderatorChanged) {
978
1166
  this.compareAndUpdateFlags.compareHostAndSelf = true;
979
1167
  } else {
980
1168
  this.compareAndUpdateFlags.compareHostAndSelf = false;
981
1169
  }
982
-
983
1170
  if (parsedSelves.updates.layoutChanged) {
984
1171
  this.emitScoped({
985
1172
  file: 'locus-info',
@@ -988,7 +1175,23 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
988
1175
  layout: parsedSelves.current.layout
989
1176
  });
990
1177
  }
991
-
1178
+ if (parsedSelves.updates.breakoutsChanged) {
1179
+ this.emitScoped({
1180
+ file: 'locus-info',
1181
+ function: 'updateSelf'
1182
+ }, _constants.LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED, {
1183
+ breakoutSessions: parsedSelves.current.breakoutSessions
1184
+ });
1185
+ }
1186
+ if (parsedSelves.updates.interpretationChanged) {
1187
+ this.emitScoped({
1188
+ file: 'locus-info',
1189
+ function: 'updateSelf'
1190
+ }, _constants.LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED, {
1191
+ interpretation: parsedSelves.current.interpretation,
1192
+ selfParticipantId: parsedSelves.current.selfId
1193
+ });
1194
+ }
992
1195
  if (parsedSelves.updates.isMediaInactiveOrReleased) {
993
1196
  this.emitScoped({
994
1197
  file: 'locus-info',
@@ -997,13 +1200,31 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
997
1200
  reason: self.reason
998
1201
  });
999
1202
  }
1000
-
1001
1203
  if (parsedSelves.updates.moderatorChanged) {
1002
1204
  this.emitScoped({
1003
1205
  file: 'locus-info',
1004
1206
  function: 'updateSelf'
1005
1207
  }, _constants.LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED, self);
1006
1208
  }
1209
+ if (parsedSelves.updates.isRolesChanged) {
1210
+ var _parsedSelves$previou, _parsedSelves$current;
1211
+ this.emitScoped({
1212
+ file: 'locus-info',
1213
+ function: 'updateSelf'
1214
+ }, _constants.LOCUSINFO.EVENTS.SELF_ROLES_CHANGED, {
1215
+ oldRoles: (_parsedSelves$previou = parsedSelves.previous) === null || _parsedSelves$previou === void 0 ? void 0 : _parsedSelves$previou.roles,
1216
+ newRoles: (_parsedSelves$current = parsedSelves.current) === null || _parsedSelves$current === void 0 ? void 0 : _parsedSelves$current.roles
1217
+ });
1218
+ }
1219
+ if (parsedSelves.updates.isVideoMutedByOthersChanged) {
1220
+ this.emitScoped({
1221
+ file: 'locus-info',
1222
+ function: 'updateSelf'
1223
+ }, _constants.LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED, {
1224
+ muted: parsedSelves.current.remoteVideoMuted
1225
+ // unmuteAllowed: not part of .self
1226
+ });
1227
+ }
1007
1228
 
1008
1229
  if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
1009
1230
  this.emitScoped({
@@ -1014,7 +1235,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1014
1235
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1015
1236
  });
1016
1237
  }
1017
-
1018
1238
  if (parsedSelves.updates.isMutedByOthersChanged) {
1019
1239
  this.emitScoped({
1020
1240
  file: 'locus-info',
@@ -1024,55 +1244,49 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1024
1244
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1025
1245
  });
1026
1246
  }
1027
-
1028
1247
  if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
1029
1248
  this.emitScoped({
1030
1249
  file: 'locus-info',
1031
1250
  function: 'updateSelf'
1032
1251
  }, _constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, {});
1033
1252
  }
1034
-
1035
1253
  if (parsedSelves.updates.isUserUnadmitted) {
1036
1254
  this.emitScoped({
1037
1255
  file: 'locus-info',
1038
1256
  function: 'updateSelf'
1039
1257
  }, _constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, self);
1040
1258
  }
1041
-
1042
1259
  if (parsedSelves.updates.isUserAdmitted) {
1043
1260
  this.emitScoped({
1044
1261
  file: 'locus-info',
1045
1262
  function: 'updateSelf'
1046
1263
  }, _constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, self);
1047
1264
  }
1048
-
1049
1265
  if (parsedSelves.updates.isMediaInactive) {
1050
1266
  this.emitScoped({
1051
1267
  file: 'locus-info',
1052
1268
  function: 'updateSelf'
1053
- }, _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
1269
+ },
1270
+ // @ts-ignore
1271
+ _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
1054
1272
  }
1055
-
1056
1273
  if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
1057
- var _parsedSelves$current, _parsedSelves$current2, _parsedSelves$current3;
1058
-
1274
+ var _parsedSelves$current2, _parsedSelves$current3, _parsedSelves$current4;
1059
1275
  this.emitScoped({
1060
1276
  file: 'locus-info',
1061
1277
  function: 'updateSelf'
1062
1278
  }, _constants.LOCUSINFO.EVENTS.MEDIA_STATUS_CHANGE, {
1063
- audioStatus: (_parsedSelves$current = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current === void 0 ? void 0 : _parsedSelves$current.audio,
1064
- videoStatus: (_parsedSelves$current2 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current2 === void 0 ? void 0 : _parsedSelves$current2.video,
1065
- shareStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.share
1279
+ audioStatus: (_parsedSelves$current2 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current2 === void 0 ? void 0 : _parsedSelves$current2.audio,
1280
+ videoStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.video,
1281
+ shareStatus: (_parsedSelves$current4 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current4 === void 0 ? void 0 : _parsedSelves$current4.share
1066
1282
  });
1067
1283
  }
1068
-
1069
1284
  if (parsedSelves.updates.isUserObserving) {
1070
1285
  this.emitScoped({
1071
1286
  file: 'locus-info',
1072
1287
  function: 'updateSelf'
1073
1288
  }, _constants.LOCUSINFO.EVENTS.SELF_OBSERVING);
1074
1289
  }
1075
-
1076
1290
  if (parsedSelves.updates.canNotViewTheParticipantListChanged) {
1077
1291
  this.emitScoped({
1078
1292
  file: 'locus-info',
@@ -1081,7 +1295,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1081
1295
  canNotViewTheParticipantList: parsedSelves.current.canNotViewTheParticipantList
1082
1296
  });
1083
1297
  }
1084
-
1085
1298
  if (parsedSelves.updates.isSharingBlockedChanged) {
1086
1299
  this.emitScoped({
1087
1300
  file: 'locus-info',
@@ -1090,7 +1303,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1090
1303
  isSharingBlocked: parsedSelves.current.isSharingBlocked
1091
1304
  });
1092
1305
  }
1093
-
1094
1306
  this.emitScoped({
1095
1307
  file: 'locus-info',
1096
1308
  function: 'updateSelf'
@@ -1099,18 +1311,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1099
1311
  newSelf: parsedSelves.current
1100
1312
  });
1101
1313
  this.parsedLocus.self = parsedSelves.current;
1314
+ // @ts-ignore
1102
1315
  this.self = self;
1103
1316
  } else {
1104
1317
  this.compareAndUpdateFlags.compareHostAndSelf = false;
1105
1318
  }
1106
1319
  }
1320
+
1107
1321
  /**
1108
1322
  * handles when the locus.url is updated
1109
1323
  * @param {String} url
1110
1324
  * @returns {undefined}
1111
1325
  * emits internal event locus_info_update_url
1112
1326
  */
1113
-
1114
1327
  }, {
1115
1328
  key: "updateLocusUrl",
1116
1329
  value: function updateLocusUrl(url) {
@@ -1125,12 +1338,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1125
1338
  }, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, url);
1126
1339
  }
1127
1340
  }
1341
+
1128
1342
  /**
1129
1343
  * @param {String} aclUrl
1130
1344
  * @returns {undefined}
1131
1345
  * @memberof LocusInfo
1132
1346
  */
1133
-
1134
1347
  }, {
1135
1348
  key: "updateAclUrl",
1136
1349
  value: function updateAclUrl(aclUrl) {
@@ -1138,12 +1351,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1138
1351
  this.aclUrl = aclUrl;
1139
1352
  }
1140
1353
  }
1354
+
1141
1355
  /**
1142
1356
  * @param {Number} baseSequence
1143
1357
  * @returns {undefined}
1144
1358
  * @memberof LocusInfo
1145
1359
  */
1146
-
1147
1360
  }, {
1148
1361
  key: "updateBasequence",
1149
1362
  value: function updateBasequence(baseSequence) {
@@ -1151,12 +1364,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1151
1364
  this.baseSequence = baseSequence;
1152
1365
  }
1153
1366
  }
1367
+
1154
1368
  /**
1155
1369
  * @param {Number} sequence
1156
1370
  * @returns {undefined}
1157
1371
  * @memberof LocusInfo
1158
1372
  */
1159
-
1160
1373
  }, {
1161
1374
  key: "updateSequence",
1162
1375
  value: function updateSequence(sequence) {
@@ -1164,12 +1377,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1164
1377
  this.sequence = sequence;
1165
1378
  }
1166
1379
  }
1380
+
1167
1381
  /**
1168
1382
  * @param {Object} membership
1169
1383
  * @returns {undefined}
1170
1384
  * @memberof LocusInfo
1171
1385
  */
1172
-
1173
1386
  }, {
1174
1387
  key: "updateMemberShip",
1175
1388
  value: function updateMemberShip(membership) {
@@ -1177,12 +1390,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1177
1390
  this.membership = membership;
1178
1391
  }
1179
1392
  }
1393
+
1180
1394
  /**
1181
1395
  * @param {Array} identities
1182
1396
  * @returns {undefined}
1183
1397
  * @memberof LocusInfo
1184
1398
  */
1185
-
1186
1399
  }, {
1187
1400
  key: "updateIdentifiers",
1188
1401
  value: function updateIdentifiers(identities) {
@@ -1190,9 +1403,114 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1190
1403
  this.identities = identities;
1191
1404
  }
1192
1405
  }
1406
+
1407
+ /**
1408
+ * check the locus is main session's one or not, if is main session's, update main session cache
1409
+ * @param {Object} locus
1410
+ * @returns {undefined}
1411
+ * @memberof LocusInfo
1412
+ */
1413
+ }, {
1414
+ key: "updateLocusCache",
1415
+ value: function updateLocusCache(locus) {
1416
+ var isMainSessionDTO = _controlsUtils.default.isMainSessionDTO(locus);
1417
+ if (isMainSessionDTO) {
1418
+ this.updateMainSessionLocusCache(locus);
1419
+ }
1420
+ }
1421
+
1422
+ /**
1423
+ * if return from breakout to main session, need to use cached main session DTO since locus won't send the full locus (participants)
1424
+ * if join breakout from main session, main session is not active for the attendee and remove main session locus cache
1425
+ * @param {Object} newLocus
1426
+ * @returns {Object}
1427
+ * @memberof LocusInfo
1428
+ */
1429
+ }, {
1430
+ key: "getTheLocusToUpdate",
1431
+ value: function getTheLocusToUpdate(newLocus) {
1432
+ var switchStatus = _controlsUtils.default.getSessionSwitchStatus(this.controls, newLocus === null || newLocus === void 0 ? void 0 : newLocus.controls);
1433
+ if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
1434
+ return (0, _cloneDeep2.default)(this.mainSessionLocusCache);
1435
+ }
1436
+ var isMainSessionDTO = this.mainSessionLocusCache && _controlsUtils.default.isMainSessionDTO(this.mainSessionLocusCache);
1437
+ if (isMainSessionDTO) {
1438
+ var _this$fullState, _this$mainSessionLocu, _this$mainSessionLocu2;
1439
+ var isActive = [_constants.LOCUS.STATE.ACTIVE, _constants.LOCUS.STATE.INITIALIZING, _constants.LOCUS.STATE.TERMINATING].includes((_this$fullState = this.fullState) === null || _this$fullState === void 0 ? void 0 : _this$fullState.state) && !((_this$mainSessionLocu = this.mainSessionLocusCache) !== null && _this$mainSessionLocu !== void 0 && (_this$mainSessionLocu2 = _this$mainSessionLocu.self) !== null && _this$mainSessionLocu2 !== void 0 && _this$mainSessionLocu2.removed);
1440
+ if (!isActive) {
1441
+ this.clearMainSessionLocusCache();
1442
+ }
1443
+ }
1444
+ return newLocus;
1445
+ }
1446
+
1447
+ /**
1448
+ * merge participants by participant id
1449
+ * @param {Array} participants
1450
+ * @param {Array} sourceParticipants
1451
+ * @returns {Array} merged participants
1452
+ * @memberof LocusInfo
1453
+ */
1454
+ // eslint-disable-next-line class-methods-use-this
1455
+ }, {
1456
+ key: "mergeParticipants",
1457
+ value: function mergeParticipants(participants, sourceParticipants) {
1458
+ if (!sourceParticipants || !sourceParticipants.length) return participants;
1459
+ if (!participants || !participants.length) {
1460
+ return sourceParticipants;
1461
+ }
1462
+ sourceParticipants.forEach(function (participant) {
1463
+ var existIndex = participants.findIndex(function (p) {
1464
+ return p.id === participant.id;
1465
+ });
1466
+ if (existIndex > -1) {
1467
+ participants.splice(existIndex, 1, participant);
1468
+ } else {
1469
+ participants.push(participant);
1470
+ }
1471
+ });
1472
+ return participants;
1473
+ }
1474
+
1475
+ /**
1476
+ * need cache main sessions' participants since locus will not send the full list when cohost/host leave breakout
1477
+ * @param {Object} mainLocus
1478
+ * @returns {undefined}
1479
+ * @memberof LocusInfo
1480
+ */
1481
+ }, {
1482
+ key: "updateMainSessionLocusCache",
1483
+ value: function updateMainSessionLocusCache(mainLocus) {
1484
+ var _this5 = this;
1485
+ if (!mainLocus) {
1486
+ return;
1487
+ }
1488
+ var locusClone = (0, _cloneDeep2.default)(mainLocus);
1489
+ if (this.mainSessionLocusCache) {
1490
+ // shallow merge and do special merge for participants
1491
+ (0, _assignWith2.default)(this.mainSessionLocusCache, locusClone, function (objValue, srcValue, key) {
1492
+ if (key === 'participants') {
1493
+ return _this5.mergeParticipants(objValue, srcValue);
1494
+ }
1495
+ return srcValue || objValue;
1496
+ });
1497
+ } else {
1498
+ this.mainSessionLocusCache = locusClone;
1499
+ }
1500
+ }
1501
+
1502
+ /**
1503
+ * clear main session cache
1504
+ * @returns {undefined}
1505
+ * @memberof LocusInfo
1506
+ */
1507
+ }, {
1508
+ key: "clearMainSessionLocusCache",
1509
+ value: function clearMainSessionLocusCache() {
1510
+ this.mainSessionLocusCache = null;
1511
+ }
1193
1512
  }]);
1194
1513
  return LocusInfo;
1195
1514
  }(_eventsScope.default);
1196
-
1197
1515
  exports.default = LocusInfo;
1198
1516
  //# sourceMappingURL=index.js.map