@webex/plugin-meetings 3.0.0-beta.11 → 3.0.0-beta.111

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