@webex/plugin-meetings 3.0.0-beta.17 → 3.0.0-beta.170

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 (427) hide show
  1. package/README.md +45 -1
  2. package/dist/annotation/annotation.types.js +7 -0
  3. package/dist/annotation/annotation.types.js.map +1 -0
  4. package/dist/annotation/constants.js +49 -0
  5. package/dist/annotation/constants.js.map +1 -0
  6. package/dist/annotation/index.js +359 -0
  7. package/dist/annotation/index.js.map +1 -0
  8. package/dist/breakouts/breakout.js +216 -0
  9. package/dist/breakouts/breakout.js.map +1 -0
  10. package/dist/breakouts/collection.js +23 -0
  11. package/dist/breakouts/collection.js.map +1 -0
  12. package/dist/breakouts/edit-lock-error.js +52 -0
  13. package/dist/breakouts/edit-lock-error.js.map +1 -0
  14. package/dist/breakouts/events.js +45 -0
  15. package/dist/breakouts/events.js.map +1 -0
  16. package/dist/breakouts/index.js +1048 -0
  17. package/dist/breakouts/index.js.map +1 -0
  18. package/dist/breakouts/request.js +78 -0
  19. package/dist/breakouts/request.js.map +1 -0
  20. package/dist/breakouts/utils.js +67 -0
  21. package/dist/breakouts/utils.js.map +1 -0
  22. package/dist/common/errors/webex-errors.js +3 -2
  23. package/dist/common/errors/webex-errors.js.map +1 -1
  24. package/dist/common/logs/logger-proxy.js +1 -1
  25. package/dist/common/logs/logger-proxy.js.map +1 -1
  26. package/dist/config.js +6 -8
  27. package/dist/config.js.map +1 -1
  28. package/dist/constants.js +194 -28
  29. package/dist/constants.js.map +1 -1
  30. package/dist/controls-options-manager/constants.js +14 -0
  31. package/dist/controls-options-manager/constants.js.map +1 -0
  32. package/dist/controls-options-manager/enums.js +27 -0
  33. package/dist/controls-options-manager/enums.js.map +1 -0
  34. package/dist/controls-options-manager/index.js +297 -0
  35. package/dist/controls-options-manager/index.js.map +1 -0
  36. package/dist/controls-options-manager/types.js +7 -0
  37. package/dist/controls-options-manager/types.js.map +1 -0
  38. package/dist/controls-options-manager/util.js +300 -0
  39. package/dist/controls-options-manager/util.js.map +1 -0
  40. package/dist/index.js +95 -0
  41. package/dist/index.js.map +1 -1
  42. package/dist/interpretation/collection.js +23 -0
  43. package/dist/interpretation/collection.js.map +1 -0
  44. package/dist/interpretation/index.js +214 -0
  45. package/dist/interpretation/index.js.map +1 -0
  46. package/dist/interpretation/siLanguage.js +25 -0
  47. package/dist/interpretation/siLanguage.js.map +1 -0
  48. package/dist/locus-info/controlsUtils.js +92 -2
  49. package/dist/locus-info/controlsUtils.js.map +1 -1
  50. package/dist/locus-info/index.js +350 -41
  51. package/dist/locus-info/index.js.map +1 -1
  52. package/dist/locus-info/mediaSharesUtils.js +43 -1
  53. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  54. package/dist/locus-info/parser.js +2 -1
  55. package/dist/locus-info/parser.js.map +1 -1
  56. package/dist/locus-info/selfUtils.js +97 -14
  57. package/dist/locus-info/selfUtils.js.map +1 -1
  58. package/dist/media/index.js +39 -134
  59. package/dist/media/index.js.map +1 -1
  60. package/dist/media/properties.js +19 -97
  61. package/dist/media/properties.js.map +1 -1
  62. package/dist/mediaQualityMetrics/config.js +505 -493
  63. package/dist/mediaQualityMetrics/config.js.map +1 -1
  64. package/dist/meeting/in-meeting-actions.js +76 -2
  65. package/dist/meeting/in-meeting-actions.js.map +1 -1
  66. package/dist/meeting/index.js +2640 -2436
  67. package/dist/meeting/index.js.map +1 -1
  68. package/dist/meeting/locusMediaRequest.js +291 -0
  69. package/dist/meeting/locusMediaRequest.js.map +1 -0
  70. package/dist/meeting/muteState.js +229 -124
  71. package/dist/meeting/muteState.js.map +1 -1
  72. package/dist/meeting/request.js +191 -167
  73. package/dist/meeting/request.js.map +1 -1
  74. package/dist/meeting/request.type.js.map +1 -1
  75. package/dist/meeting/util.js +477 -466
  76. package/dist/meeting/util.js.map +1 -1
  77. package/dist/meeting-info/index.js +48 -7
  78. package/dist/meeting-info/index.js.map +1 -1
  79. package/dist/meeting-info/meeting-info-v2.js +172 -50
  80. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  81. package/dist/meeting-info/utilv2.js +20 -5
  82. package/dist/meeting-info/utilv2.js.map +1 -1
  83. package/dist/meetings/collection.js +22 -0
  84. package/dist/meetings/collection.js.map +1 -1
  85. package/dist/meetings/index.js +377 -82
  86. package/dist/meetings/index.js.map +1 -1
  87. package/dist/meetings/meetings.types.js +7 -0
  88. package/dist/meetings/meetings.types.js.map +1 -0
  89. package/dist/meetings/request.js +16 -12
  90. package/dist/meetings/request.js.map +1 -1
  91. package/dist/meetings/util.js +88 -1
  92. package/dist/meetings/util.js.map +1 -1
  93. package/dist/member/index.js +43 -0
  94. package/dist/member/index.js.map +1 -1
  95. package/dist/member/types.js +15 -0
  96. package/dist/member/types.js.map +1 -0
  97. package/dist/member/util.js +97 -3
  98. package/dist/member/util.js.map +1 -1
  99. package/dist/members/collection.js +10 -0
  100. package/dist/members/collection.js.map +1 -1
  101. package/dist/members/index.js +94 -11
  102. package/dist/members/index.js.map +1 -1
  103. package/dist/members/request.js +109 -39
  104. package/dist/members/request.js.map +1 -1
  105. package/dist/members/types.js +15 -0
  106. package/dist/members/types.js.map +1 -0
  107. package/dist/members/util.js +316 -233
  108. package/dist/members/util.js.map +1 -1
  109. package/dist/metrics/constants.js +3 -5
  110. package/dist/metrics/constants.js.map +1 -1
  111. package/dist/metrics/index.js +1 -468
  112. package/dist/metrics/index.js.map +1 -1
  113. package/dist/multistream/mediaRequestManager.js +265 -36
  114. package/dist/multistream/mediaRequestManager.js.map +1 -1
  115. package/dist/multistream/receiveSlot.js +52 -19
  116. package/dist/multistream/receiveSlot.js.map +1 -1
  117. package/dist/multistream/receiveSlotManager.js +53 -33
  118. package/dist/multistream/receiveSlotManager.js.map +1 -1
  119. package/dist/multistream/remoteMedia.js +44 -18
  120. package/dist/multistream/remoteMedia.js.map +1 -1
  121. package/dist/multistream/remoteMediaGroup.js +60 -3
  122. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  123. package/dist/multistream/remoteMediaManager.js +322 -103
  124. package/dist/multistream/remoteMediaManager.js.map +1 -1
  125. package/dist/networkQualityMonitor/index.js +4 -2
  126. package/dist/networkQualityMonitor/index.js.map +1 -1
  127. package/dist/reachability/index.js +117 -60
  128. package/dist/reachability/index.js.map +1 -1
  129. package/dist/reachability/request.js +12 -5
  130. package/dist/reachability/request.js.map +1 -1
  131. package/dist/reactions/constants.js +13 -0
  132. package/dist/reactions/constants.js.map +1 -0
  133. package/dist/reactions/reactions.js +2 -2
  134. package/dist/reactions/reactions.js.map +1 -1
  135. package/dist/reactions/reactions.type.js +18 -18
  136. package/dist/reactions/reactions.type.js.map +1 -1
  137. package/dist/reconnection-manager/index.js +217 -162
  138. package/dist/reconnection-manager/index.js.map +1 -1
  139. package/dist/recording-controller/enums.js +17 -0
  140. package/dist/recording-controller/enums.js.map +1 -0
  141. package/dist/recording-controller/index.js +363 -0
  142. package/dist/recording-controller/index.js.map +1 -0
  143. package/dist/recording-controller/util.js +64 -0
  144. package/dist/recording-controller/util.js.map +1 -0
  145. package/dist/roap/index.js +21 -29
  146. package/dist/roap/index.js.map +1 -1
  147. package/dist/roap/request.js +135 -94
  148. package/dist/roap/request.js.map +1 -1
  149. package/dist/roap/turnDiscovery.js +135 -53
  150. package/dist/roap/turnDiscovery.js.map +1 -1
  151. package/dist/statsAnalyzer/global.js +1 -93
  152. package/dist/statsAnalyzer/global.js.map +1 -1
  153. package/dist/statsAnalyzer/index.js +329 -314
  154. package/dist/statsAnalyzer/index.js.map +1 -1
  155. package/dist/statsAnalyzer/mqaUtil.js +103 -54
  156. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  157. package/dist/types/annotation/annotation.types.d.ts +43 -0
  158. package/dist/types/annotation/constants.d.ts +31 -0
  159. package/dist/types/annotation/index.d.ts +124 -0
  160. package/dist/types/breakouts/breakout.d.ts +8 -0
  161. package/dist/types/breakouts/collection.d.ts +5 -0
  162. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  163. package/dist/types/breakouts/events.d.ts +8 -0
  164. package/dist/types/breakouts/index.d.ts +5 -0
  165. package/dist/types/breakouts/request.d.ts +22 -0
  166. package/dist/types/breakouts/utils.d.ts +15 -0
  167. package/dist/types/common/browser-detection.d.ts +9 -0
  168. package/dist/types/common/collection.d.ts +48 -0
  169. package/dist/types/common/config.d.ts +2 -0
  170. package/dist/types/common/errors/captcha-error.d.ts +15 -0
  171. package/dist/types/common/errors/intent-to-join.d.ts +16 -0
  172. package/dist/types/common/errors/join-meeting.d.ts +17 -0
  173. package/dist/types/common/errors/media.d.ts +15 -0
  174. package/dist/types/common/errors/parameter.d.ts +15 -0
  175. package/dist/types/common/errors/password-error.d.ts +15 -0
  176. package/dist/types/common/errors/permission.d.ts +14 -0
  177. package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
  178. package/dist/types/common/errors/reconnection.d.ts +15 -0
  179. package/dist/types/common/errors/stats.d.ts +15 -0
  180. package/dist/types/common/errors/webex-errors.d.ts +69 -0
  181. package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
  182. package/dist/types/common/events/events-scope.d.ts +17 -0
  183. package/dist/types/common/events/events.d.ts +12 -0
  184. package/dist/types/common/events/trigger-proxy.d.ts +2 -0
  185. package/dist/types/common/events/util.d.ts +2 -0
  186. package/dist/types/common/logs/logger-config.d.ts +2 -0
  187. package/dist/types/common/logs/logger-proxy.d.ts +2 -0
  188. package/dist/types/common/logs/request.d.ts +34 -0
  189. package/dist/types/common/queue.d.ts +32 -0
  190. package/dist/types/config.d.ts +72 -0
  191. package/dist/types/constants.d.ts +1007 -0
  192. package/dist/types/controls-options-manager/constants.d.ts +4 -0
  193. package/dist/types/controls-options-manager/enums.d.ts +15 -0
  194. package/dist/types/controls-options-manager/index.d.ts +136 -0
  195. package/dist/types/controls-options-manager/types.d.ts +43 -0
  196. package/dist/types/controls-options-manager/util.d.ts +1 -0
  197. package/dist/types/index.d.ts +7 -0
  198. package/dist/types/interpretation/collection.d.ts +5 -0
  199. package/dist/types/interpretation/index.d.ts +5 -0
  200. package/dist/types/interpretation/siLanguage.d.ts +5 -0
  201. package/dist/types/locus-info/controlsUtils.d.ts +2 -0
  202. package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
  203. package/dist/types/locus-info/fullState.d.ts +2 -0
  204. package/dist/types/locus-info/hostUtils.d.ts +2 -0
  205. package/dist/types/locus-info/index.d.ts +315 -0
  206. package/dist/types/locus-info/infoUtils.d.ts +2 -0
  207. package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
  208. package/dist/types/locus-info/parser.d.ts +212 -0
  209. package/dist/types/locus-info/selfUtils.d.ts +2 -0
  210. package/dist/types/media/index.d.ts +34 -0
  211. package/dist/types/media/properties.d.ts +86 -0
  212. package/dist/types/media/util.d.ts +2 -0
  213. package/dist/types/mediaQualityMetrics/config.d.ts +365 -0
  214. package/dist/types/meeting/in-meeting-actions.d.ts +149 -0
  215. package/dist/types/meeting/index.d.ts +1430 -0
  216. package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
  217. package/dist/types/meeting/muteState.d.ts +184 -0
  218. package/dist/types/meeting/request.d.ts +270 -0
  219. package/dist/types/meeting/request.type.d.ts +11 -0
  220. package/dist/types/meeting/state.d.ts +9 -0
  221. package/dist/types/meeting/util.d.ts +77 -0
  222. package/dist/types/meeting-info/collection.d.ts +20 -0
  223. package/dist/types/meeting-info/index.d.ts +62 -0
  224. package/dist/types/meeting-info/meeting-info-v2.d.ts +122 -0
  225. package/dist/types/meeting-info/request.d.ts +22 -0
  226. package/dist/types/meeting-info/util.d.ts +2 -0
  227. package/dist/types/meeting-info/utilv2.d.ts +2 -0
  228. package/dist/types/meetings/collection.d.ts +31 -0
  229. package/dist/types/meetings/index.d.ts +365 -0
  230. package/dist/types/meetings/meetings.types.d.ts +4 -0
  231. package/dist/types/meetings/request.d.ts +27 -0
  232. package/dist/types/meetings/util.d.ts +18 -0
  233. package/dist/types/member/index.d.ts +158 -0
  234. package/dist/types/member/types.d.ts +21 -0
  235. package/dist/types/member/util.d.ts +2 -0
  236. package/dist/types/members/collection.d.ts +29 -0
  237. package/dist/types/members/index.d.ts +353 -0
  238. package/dist/types/members/request.d.ts +114 -0
  239. package/dist/types/members/types.d.ts +24 -0
  240. package/dist/types/members/util.d.ts +210 -0
  241. package/dist/types/metrics/constants.d.ts +55 -0
  242. package/dist/types/metrics/index.d.ts +45 -0
  243. package/dist/types/multistream/mediaRequestManager.d.ts +118 -0
  244. package/dist/types/multistream/receiveSlot.d.ts +68 -0
  245. package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
  246. package/dist/types/multistream/remoteMedia.d.ts +72 -0
  247. package/dist/types/multistream/remoteMediaGroup.d.ts +47 -0
  248. package/dist/types/multistream/remoteMediaManager.d.ts +277 -0
  249. package/dist/types/networkQualityMonitor/index.d.ts +70 -0
  250. package/dist/types/personal-meeting-room/index.d.ts +47 -0
  251. package/dist/types/personal-meeting-room/request.d.ts +14 -0
  252. package/dist/types/personal-meeting-room/util.d.ts +2 -0
  253. package/dist/types/reachability/index.d.ts +152 -0
  254. package/dist/types/reachability/request.d.ts +37 -0
  255. package/dist/types/reactions/constants.d.ts +3 -0
  256. package/dist/types/reactions/reactions.d.ts +4 -0
  257. package/dist/types/reactions/reactions.type.d.ts +52 -0
  258. package/dist/types/reconnection-manager/index.d.ts +126 -0
  259. package/dist/types/recording-controller/enums.d.ts +7 -0
  260. package/dist/types/recording-controller/index.d.ts +208 -0
  261. package/dist/types/recording-controller/util.d.ts +14 -0
  262. package/dist/types/roap/index.d.ts +77 -0
  263. package/dist/types/roap/request.d.ts +36 -0
  264. package/dist/types/roap/turnDiscovery.d.ts +91 -0
  265. package/dist/types/statsAnalyzer/global.d.ts +36 -0
  266. package/dist/types/statsAnalyzer/index.d.ts +200 -0
  267. package/dist/types/statsAnalyzer/mqaUtil.d.ts +24 -0
  268. package/dist/types/transcription/index.d.ts +64 -0
  269. package/package.json +29 -21
  270. package/src/annotation/annotation.types.ts +52 -0
  271. package/src/annotation/constants.ts +36 -0
  272. package/src/annotation/index.ts +343 -0
  273. package/src/breakouts/README.md +220 -0
  274. package/src/breakouts/breakout.ts +188 -0
  275. package/src/breakouts/collection.ts +19 -0
  276. package/src/breakouts/edit-lock-error.ts +25 -0
  277. package/src/breakouts/events.ts +56 -0
  278. package/src/breakouts/index.ts +925 -0
  279. package/src/breakouts/request.ts +55 -0
  280. package/src/breakouts/utils.ts +57 -0
  281. package/src/common/errors/webex-errors.ts +6 -2
  282. package/src/common/logs/logger-proxy.ts +1 -1
  283. package/src/config.ts +5 -7
  284. package/src/constants.ts +183 -22
  285. package/src/controls-options-manager/constants.ts +5 -0
  286. package/src/controls-options-manager/enums.ts +18 -0
  287. package/src/controls-options-manager/index.ts +278 -0
  288. package/src/controls-options-manager/types.ts +59 -0
  289. package/src/controls-options-manager/util.ts +286 -0
  290. package/src/index.ts +37 -0
  291. package/src/interpretation/README.md +51 -0
  292. package/src/interpretation/collection.ts +19 -0
  293. package/src/interpretation/index.ts +182 -0
  294. package/src/interpretation/siLanguage.ts +18 -0
  295. package/src/locus-info/controlsUtils.ts +110 -0
  296. package/src/locus-info/index.ts +374 -38
  297. package/src/locus-info/mediaSharesUtils.ts +48 -0
  298. package/src/locus-info/parser.ts +2 -1
  299. package/src/locus-info/selfUtils.ts +86 -2
  300. package/src/media/index.ts +70 -142
  301. package/src/media/properties.ts +41 -104
  302. package/src/mediaQualityMetrics/config.ts +379 -377
  303. package/src/meeting/in-meeting-actions.ts +151 -3
  304. package/src/meeting/index.ts +2029 -2033
  305. package/src/meeting/locusMediaRequest.ts +309 -0
  306. package/src/meeting/muteState.ts +228 -132
  307. package/src/meeting/request.ts +100 -91
  308. package/src/meeting/request.type.ts +2 -0
  309. package/src/meeting/util.ts +450 -439
  310. package/src/meeting-info/index.ts +54 -8
  311. package/src/meeting-info/meeting-info-v2.ts +150 -14
  312. package/src/meeting-info/utilv2.ts +13 -3
  313. package/src/meetings/collection.ts +20 -0
  314. package/src/meetings/index.ts +396 -89
  315. package/src/meetings/meetings.types.ts +12 -0
  316. package/src/meetings/request.ts +3 -1
  317. package/src/meetings/util.ts +103 -4
  318. package/src/member/index.ts +42 -0
  319. package/src/member/types.ts +24 -0
  320. package/src/member/util.ts +95 -1
  321. package/src/members/collection.ts +8 -0
  322. package/src/members/index.ts +108 -6
  323. package/src/members/request.ts +98 -17
  324. package/src/members/types.ts +28 -0
  325. package/src/members/util.ts +319 -240
  326. package/src/metrics/constants.ts +2 -4
  327. package/src/metrics/index.ts +1 -490
  328. package/src/multistream/mediaRequestManager.ts +337 -63
  329. package/src/multistream/receiveSlot.ts +68 -26
  330. package/src/multistream/receiveSlotManager.ts +61 -38
  331. package/src/multistream/remoteMedia.ts +29 -3
  332. package/src/multistream/remoteMediaGroup.ts +61 -2
  333. package/src/multistream/remoteMediaManager.ts +260 -66
  334. package/src/networkQualityMonitor/index.ts +6 -6
  335. package/src/reachability/index.ts +75 -25
  336. package/src/reachability/request.ts +10 -5
  337. package/src/reactions/constants.ts +4 -0
  338. package/src/reactions/reactions.ts +4 -4
  339. package/src/reactions/reactions.type.ts +28 -3
  340. package/src/reconnection-manager/index.ts +80 -49
  341. package/src/recording-controller/enums.ts +8 -0
  342. package/src/recording-controller/index.ts +333 -0
  343. package/src/recording-controller/util.ts +75 -0
  344. package/src/roap/index.ts +21 -30
  345. package/src/roap/request.ts +72 -61
  346. package/src/roap/turnDiscovery.ts +51 -27
  347. package/src/statsAnalyzer/global.ts +1 -94
  348. package/src/statsAnalyzer/index.ts +380 -390
  349. package/src/statsAnalyzer/mqaUtil.ts +106 -99
  350. package/test/integration/spec/converged-space-meetings.js +233 -0
  351. package/test/integration/spec/journey.js +331 -254
  352. package/test/integration/spec/space-meeting.js +77 -4
  353. package/test/unit/spec/annotation/index.ts +436 -0
  354. package/test/unit/spec/breakouts/breakout.ts +237 -0
  355. package/test/unit/spec/breakouts/collection.ts +15 -0
  356. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  357. package/test/unit/spec/breakouts/events.ts +89 -0
  358. package/test/unit/spec/breakouts/index.ts +1790 -0
  359. package/test/unit/spec/breakouts/request.ts +104 -0
  360. package/test/unit/spec/breakouts/utils.js +72 -0
  361. package/test/unit/spec/controls-options-manager/index.js +287 -0
  362. package/test/unit/spec/controls-options-manager/util.js +518 -0
  363. package/test/unit/spec/fixture/locus.js +1 -0
  364. package/test/unit/spec/interpretation/collection.ts +15 -0
  365. package/test/unit/spec/interpretation/index.ts +329 -0
  366. package/test/unit/spec/interpretation/siLanguage.ts +26 -0
  367. package/test/unit/spec/locus-info/controlsUtils.js +323 -30
  368. package/test/unit/spec/locus-info/index.js +792 -4
  369. package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
  370. package/test/unit/spec/locus-info/selfConstant.js +48 -0
  371. package/test/unit/spec/locus-info/selfUtils.js +275 -0
  372. package/test/unit/spec/media/index.ts +118 -22
  373. package/test/unit/spec/media/properties.ts +9 -9
  374. package/test/unit/spec/meeting/in-meeting-actions.ts +75 -3
  375. package/test/unit/spec/meeting/index.js +2742 -1441
  376. package/test/unit/spec/meeting/locusMediaRequest.ts +436 -0
  377. package/test/unit/spec/meeting/muteState.js +370 -208
  378. package/test/unit/spec/meeting/request.js +354 -42
  379. package/test/unit/spec/meeting/utils.js +384 -170
  380. package/test/unit/spec/meeting-info/index.js +181 -0
  381. package/test/unit/spec/meeting-info/meetinginfov2.js +383 -5
  382. package/test/unit/spec/meeting-info/utilv2.js +21 -0
  383. package/test/unit/spec/meetings/collection.js +14 -0
  384. package/test/unit/spec/meetings/index.js +847 -121
  385. package/test/unit/spec/meetings/utils.js +206 -2
  386. package/test/unit/spec/member/index.js +31 -0
  387. package/test/unit/spec/member/util.js +408 -32
  388. package/test/unit/spec/members/index.js +320 -1
  389. package/test/unit/spec/members/request.js +206 -27
  390. package/test/unit/spec/members/utils.js +184 -0
  391. package/test/unit/spec/metrics/index.js +1 -50
  392. package/test/unit/spec/multistream/mediaRequestManager.ts +1012 -109
  393. package/test/unit/spec/multistream/receiveSlot.ts +77 -18
  394. package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
  395. package/test/unit/spec/multistream/remoteMedia.ts +32 -2
  396. package/test/unit/spec/multistream/remoteMediaGroup.ts +271 -5
  397. package/test/unit/spec/multistream/remoteMediaManager.ts +672 -65
  398. package/test/unit/spec/networkQualityMonitor/index.js +4 -4
  399. package/test/unit/spec/reachability/index.ts +176 -25
  400. package/test/unit/spec/reachability/request.js +66 -0
  401. package/test/unit/spec/reconnection-manager/index.js +95 -13
  402. package/test/unit/spec/recording-controller/index.js +307 -0
  403. package/test/unit/spec/recording-controller/util.js +229 -0
  404. package/test/unit/spec/roap/index.ts +28 -52
  405. package/test/unit/spec/roap/request.ts +225 -0
  406. package/test/unit/spec/roap/turnDiscovery.ts +73 -34
  407. package/test/unit/spec/stats-analyzer/index.js +94 -43
  408. package/test/utils/constants.js +9 -0
  409. package/test/utils/integrationTestUtils.js +46 -0
  410. package/test/utils/testUtils.js +0 -45
  411. package/test/utils/webex-config.js +4 -0
  412. package/test/utils/webex-test-users.js +7 -3
  413. package/tsconfig.json +6 -0
  414. package/dist/media/internal-media-core-wrapper.js +0 -18
  415. package/dist/media/internal-media-core-wrapper.js.map +0 -1
  416. package/dist/meeting/effectsState.js +0 -262
  417. package/dist/meeting/effectsState.js.map +0 -1
  418. package/dist/metrics/config.js +0 -299
  419. package/dist/metrics/config.js.map +0 -1
  420. package/dist/multistream/multistreamMedia.js +0 -106
  421. package/dist/multistream/multistreamMedia.js.map +0 -1
  422. package/src/index.js +0 -15
  423. package/src/media/internal-media-core-wrapper.ts +0 -9
  424. package/src/meeting/effectsState.ts +0 -211
  425. package/src/metrics/config.ts +0 -495
  426. package/src/multistream/multistreamMedia.ts +0 -93
  427. package/test/unit/spec/meeting/effectsState.js +0 -281
@@ -1,4 +1,4 @@
1
- import {isEqual} from 'lodash';
1
+ import {isEqual, assignWith, cloneDeep} from 'lodash';
2
2
 
3
3
  import LoggerProxy from '../common/logs/logger-proxy';
4
4
  import EventsScope from '../common/events/events-scope';
@@ -17,8 +17,6 @@ import {
17
17
  CALL_REMOVED_REASON,
18
18
  RECORDING_STATE,
19
19
  } from '../constants';
20
- import Metrics from '../metrics';
21
- import {eventType} from '../metrics/config';
22
20
  import InfoUtils from './infoUtils';
23
21
  import FullState from './fullState';
24
22
  import SelfUtils from './selfUtils';
@@ -59,10 +57,19 @@ export default class LocusInfo extends EventsScope {
59
57
  fullState: any;
60
58
  host: any;
61
59
  info: any;
60
+ roles: any;
62
61
  mediaShares: any;
63
62
  replace: any;
64
63
  url: any;
65
-
64
+ services: any;
65
+ mainSessionLocusCache: any;
66
+ /**
67
+ * Constructor
68
+ * @param {boolean} updateMeeting true if the meeting should be updated
69
+ * @param {object} webex
70
+ * @param {string} meetingId
71
+ * @returns {undefined}
72
+ */
66
73
  constructor(updateMeeting, webex, meetingId) {
67
74
  super();
68
75
  this.parsedLocus = {
@@ -98,7 +105,7 @@ export default class LocusInfo extends EventsScope {
98
105
  meeting.meetingRequest
99
106
  .getFullLocus({
100
107
  desync: true,
101
- locusUrl: meeting.locusUrl,
108
+ locusUrl: locus.url ? locus.url : meeting.locusUrl,
102
109
  })
103
110
  .then((res) => {
104
111
  meeting.locusInfo.onFullLocus(res.body);
@@ -171,12 +178,13 @@ export default class LocusInfo extends EventsScope {
171
178
  */
172
179
  this.deltaParticipants = [];
173
180
 
181
+ this.updateLocusCache(locus);
174
182
  // above section only updates the locusInfo object
175
183
  // The below section makes sure it updates the locusInfo as well as updates the meeting object
176
184
  this.updateParticipants(locus.participants);
177
185
  // For 1:1 space meeting the conversation Url does not exist in locus.conversation
178
186
  this.updateConversationUrl(locus.conversationUrl, locus.info);
179
- this.updateControls(locus.controls);
187
+ this.updateControls(locus.controls, locus.self);
180
188
  this.updateLocusUrl(locus.url);
181
189
  this.updateFullState(locus.fullState);
182
190
  this.updateMeetingInfo(locus.info);
@@ -185,6 +193,7 @@ export default class LocusInfo extends EventsScope {
185
193
  this.updateSelf(locus.self, locus.participants);
186
194
  this.updateHostInfo(locus.host);
187
195
  this.updateMediaShares(locus.mediaShares);
196
+ this.updateServices(locus.links?.services);
188
197
  }
189
198
 
190
199
  /**
@@ -193,6 +202,7 @@ export default class LocusInfo extends EventsScope {
193
202
  * @memberof LocusInfo
194
203
  */
195
204
  initialSetup(locus: object) {
205
+ this.updateLocusCache(locus);
196
206
  this.onFullLocus(locus);
197
207
 
198
208
  // Change it to true after it receives it first locus object
@@ -208,7 +218,7 @@ export default class LocusInfo extends EventsScope {
208
218
  parse(meeting: any, data: any) {
209
219
  // eslint-disable-next-line @typescript-eslint/no-shadow
210
220
  const {eventType} = data;
211
-
221
+ const locus = this.getTheLocusToUpdate(data.locus);
212
222
  LoggerProxy.logger.info(`Locus-info:index#parse --> received locus data: ${eventType}`);
213
223
 
214
224
  switch (eventType) {
@@ -226,16 +236,16 @@ export default class LocusInfo extends EventsScope {
226
236
  case LOCUSEVENT.PARTICIPANT_DECLINED:
227
237
  case LOCUSEVENT.FLOOR_GRANTED:
228
238
  case LOCUSEVENT.FLOOR_RELEASED:
229
- this.onFullLocus(data.locus, eventType);
239
+ this.onFullLocus(locus, eventType);
230
240
  break;
231
241
  case LOCUSEVENT.DIFFERENCE:
232
- this.handleLocusDelta(data.locus, meeting);
242
+ this.handleLocusDelta(locus, meeting);
233
243
  break;
234
244
 
235
245
  default:
236
246
  // Why will there be a event with no eventType ????
237
247
  // we may not need this, we can get full locus
238
- this.handleLocusDelta(data.locus, meeting);
248
+ this.handleLocusDelta(locus, meeting);
239
249
  }
240
250
  }
241
251
 
@@ -267,8 +277,9 @@ export default class LocusInfo extends EventsScope {
267
277
  this.updateParticipantDeltas(locus.participants);
268
278
  this.scheduledMeeting = locus.meeting || null;
269
279
  this.participants = locus.participants;
280
+ const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
270
281
  this.updateLocusInfo(locus);
271
- this.updateParticipants(locus.participants);
282
+ this.updateParticipants(locus.participants, isReplaceMembers);
272
283
  this.isMeetingActive();
273
284
  this.handleOneOnOneEvent(eventType);
274
285
  this.updateEmbeddedApps(locus.embeddedApps);
@@ -327,8 +338,9 @@ export default class LocusInfo extends EventsScope {
327
338
  * @memberof LocusInfo
328
339
  */
329
340
  onDeltaLocus(locus: any) {
341
+ const isReplaceMembers = ControlsUtils.isNeedReplaceMembers(this.controls, locus.controls);
330
342
  this.updateLocusInfo(locus);
331
- this.updateParticipants(locus.participants);
343
+ this.updateParticipants(locus.participants, isReplaceMembers);
332
344
  this.isMeetingActive();
333
345
  }
334
346
 
@@ -337,8 +349,15 @@ export default class LocusInfo extends EventsScope {
337
349
  * @returns {undefined}
338
350
  * @memberof LocusInfo
339
351
  */
340
- updateLocusInfo(locus: any) {
341
- this.updateControls(locus.controls);
352
+ updateLocusInfo(locus) {
353
+ if (locus.self?.reason === 'MOVED' && locus.self?.state === 'LEFT') {
354
+ // When moved to a breakout session locus sends a message for the previous locus
355
+ // indicating that we have been moved. It isn't helpful to continue parsing this
356
+ // as it gets interpreted as if we have left the call
357
+ return;
358
+ }
359
+
360
+ this.updateControls(locus.controls, locus.self);
342
361
  this.updateConversationUrl(locus.conversationUrl, locus.info);
343
362
  this.updateCreated(locus.created);
344
363
  this.updateFullState(locus.fullState);
@@ -355,6 +374,7 @@ export default class LocusInfo extends EventsScope {
355
374
  this.updateMemberShip(locus.membership);
356
375
  this.updateIdentifiers(locus.identities);
357
376
  this.updateEmbeddedApps(locus.embeddedApps);
377
+ this.updateServices(locus.links?.services);
358
378
  this.compareAndUpdate();
359
379
  // update which required to compare different objects from locus
360
380
  }
@@ -408,10 +428,15 @@ export default class LocusInfo extends EventsScope {
408
428
  LoggerProxy.logger.warn(
409
429
  'Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.'
410
430
  );
411
- Metrics.postEvent({
412
- event: eventType.REMOTE_ENDED,
413
- meetingId: this.meetingId,
431
+
432
+ // @ts-ignore
433
+ this.webex.internal.newMetrics.submitClientEvent({
434
+ name: 'client.call.remote-ended',
435
+ options: {
436
+ meetingId: this.meetingId,
437
+ },
414
438
  });
439
+
415
440
  this.emitScoped(
416
441
  {
417
442
  file: 'locus-info',
@@ -430,9 +455,12 @@ export default class LocusInfo extends EventsScope {
430
455
  this.parsedLocus.self.state === MEETING_STATE.STATES.NOTIFIED ||
431
456
  this.parsedLocus.self.state === MEETING_STATE.STATES.JOINED)
432
457
  ) {
433
- Metrics.postEvent({
434
- event: eventType.REMOTE_ENDED,
435
- meetingId: this.meetingId,
458
+ // @ts-ignore
459
+ this.webex.internal.newMetrics.submitClientEvent({
460
+ name: 'client.call.remote-ended',
461
+ options: {
462
+ meetingId: this.meetingId,
463
+ },
436
464
  });
437
465
  this.emitScoped(
438
466
  {
@@ -454,10 +482,14 @@ export default class LocusInfo extends EventsScope {
454
482
  partner.state === MEETING_STATE.STATES.NOTIFIED ||
455
483
  partner.state === MEETING_STATE.STATES.IDLE) // Happens when user just joins and adds no Media
456
484
  ) {
457
- Metrics.postEvent({
458
- event: eventType.REMOTE_ENDED,
459
- meetingId: this.meetingId,
485
+ // @ts-ignore
486
+ this.webex.internal.newMetrics.submitClientEvent({
487
+ name: 'client.call.remote-ended',
488
+ options: {
489
+ meetingId: this.meetingId,
490
+ },
460
491
  });
492
+
461
493
  this.emitScoped(
462
494
  {
463
495
  file: 'locus-info',
@@ -480,9 +512,13 @@ export default class LocusInfo extends EventsScope {
480
512
  LoggerProxy.logger.warn(
481
513
  'Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating'
482
514
  );
483
- Metrics.postEvent({
484
- event: eventType.REMOTE_ENDED,
485
- meetingId: this.meetingId,
515
+
516
+ // @ts-ignore
517
+ this.webex.internal.newMetrics.submitClientEvent({
518
+ name: 'client.call.remote-ended',
519
+ options: {
520
+ meetingId: this.meetingId,
521
+ },
486
522
  });
487
523
  this.emitScoped(
488
524
  {
@@ -497,9 +533,13 @@ export default class LocusInfo extends EventsScope {
497
533
  );
498
534
  } else if (this.fullState && this.fullState.removed) {
499
535
  // user has been dropped from a meeting
500
- Metrics.postEvent({
501
- event: eventType.REMOTE_ENDED,
502
- meetingId: this.meetingId,
536
+
537
+ // @ts-ignore
538
+ this.webex.internal.newMetrics.submitClientEvent({
539
+ name: 'client.call.remote-ended',
540
+ options: {
541
+ meetingId: this.meetingId,
542
+ },
503
543
  });
504
544
  this.emitScoped(
505
545
  {
@@ -636,13 +676,13 @@ export default class LocusInfo extends EventsScope {
636
676
  }
637
677
 
638
678
  /**
639
- *
679
+ * update meeting's members
640
680
  * @param {Object} participants new participants object
641
- * @param {boolen} deltaParticpantFlag delta event
681
+ * @param {Boolean} isReplace is replace the whole members
642
682
  * @returns {Array} updatedParticipants
643
683
  * @memberof LocusInfo
644
684
  */
645
- updateParticipants(participants: object) {
685
+ updateParticipants(participants: object, isReplace?: boolean) {
646
686
  this.emitScoped(
647
687
  {
648
688
  file: 'locus-info',
@@ -655,16 +695,18 @@ export default class LocusInfo extends EventsScope {
655
695
  selfIdentity: this.parsedLocus.self && this.parsedLocus.self.selfIdentity,
656
696
  selfId: this.parsedLocus.self && this.parsedLocus.self.selfId,
657
697
  hostId: this.parsedLocus.host && this.parsedLocus.host.hostId,
698
+ isReplace,
658
699
  }
659
700
  );
660
701
  }
661
702
 
662
703
  /**
663
704
  * @param {Object} controls
705
+ * @param {Object} self
664
706
  * @returns {undefined}
665
707
  * @memberof LocusInfo
666
708
  */
667
- updateControls(controls: object) {
709
+ updateControls(controls: object, self: object) {
668
710
  if (controls && !isEqual(this.controls, controls)) {
669
711
  this.parsedLocus.controls = ControlsUtils.parse(controls);
670
712
  const {
@@ -674,10 +716,77 @@ export default class LocusInfo extends EventsScope {
674
716
  hasMeetingContainerChanged,
675
717
  hasTranscribeChanged,
676
718
  hasEntryExitToneChanged,
719
+ hasBreakoutChanged,
720
+ hasVideoEnabledChanged,
721
+ hasMuteOnEntryChanged,
722
+ hasShareControlChanged,
723
+ hasDisallowUnmuteChanged,
724
+ hasReactionsChanged,
725
+ hasReactionDisplayNamesChanged,
726
+ hasViewTheParticipantListChanged,
727
+ hasRaiseHandChanged,
728
+ hasVideoChanged,
729
+ hasInterpretationChanged,
677
730
  },
678
731
  current,
679
732
  } = ControlsUtils.getControls(this.controls, controls);
680
733
 
734
+ if (hasMuteOnEntryChanged) {
735
+ this.emitScoped(
736
+ {file: 'locus-info', function: 'updateControls'},
737
+ LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED,
738
+ {state: current.muteOnEntry}
739
+ );
740
+ }
741
+
742
+ if (hasShareControlChanged) {
743
+ this.emitScoped(
744
+ {file: 'locus-info', function: 'updateControls'},
745
+ LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED,
746
+ {state: current.shareControl}
747
+ );
748
+ }
749
+
750
+ if (hasDisallowUnmuteChanged) {
751
+ this.emitScoped(
752
+ {file: 'locus-info', function: 'updateControls'},
753
+ LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED,
754
+ {state: current.disallowUnmute}
755
+ );
756
+ }
757
+
758
+ if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
759
+ this.emitScoped(
760
+ {file: 'locus-info', function: 'updateControls'},
761
+ LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED,
762
+ {state: current.reactions}
763
+ );
764
+ }
765
+
766
+ if (hasViewTheParticipantListChanged) {
767
+ this.emitScoped(
768
+ {file: 'locus-info', function: 'updateControls'},
769
+ LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED,
770
+ {state: current.viewTheParticipantList}
771
+ );
772
+ }
773
+
774
+ if (hasRaiseHandChanged) {
775
+ this.emitScoped(
776
+ {file: 'locus-info', function: 'updateControls'},
777
+ LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED,
778
+ {state: current.raiseHand}
779
+ );
780
+ }
781
+
782
+ if (hasVideoChanged) {
783
+ this.emitScoped(
784
+ {file: 'locus-info', function: 'updateControls'},
785
+ LOCUSINFO.EVENTS.CONTROLS_VIDEO_CHANGED,
786
+ {state: current.video}
787
+ );
788
+ }
789
+
681
790
  if (hasRecordingChanged || hasRecordingPausedChanged) {
682
791
  let state = null;
683
792
 
@@ -737,9 +846,43 @@ export default class LocusInfo extends EventsScope {
737
846
  );
738
847
  }
739
848
 
849
+ if (hasBreakoutChanged) {
850
+ const {breakout} = current;
851
+ breakout.breakoutMoveId = SelfUtils.getReplacedBreakoutMoveId(
852
+ self,
853
+ this.webex.internal.device.url
854
+ );
855
+ this.emitScoped(
856
+ {
857
+ file: 'locus-info',
858
+ function: 'updateControls',
859
+ },
860
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_BREAKOUT_UPDATED,
861
+ {
862
+ breakout,
863
+ }
864
+ );
865
+ }
866
+
867
+ if (hasInterpretationChanged) {
868
+ const {interpretation} = current;
869
+ this.emitScoped(
870
+ {
871
+ file: 'locus-info',
872
+ function: 'updateControls',
873
+ },
874
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_INTERPRETATION_UPDATED,
875
+ {
876
+ interpretation,
877
+ }
878
+ );
879
+ }
880
+
740
881
  if (hasEntryExitToneChanged) {
741
882
  const {entryExitTone} = current;
742
883
 
884
+ this.updateMeeting({entryExitTone});
885
+
743
886
  this.emitScoped(
744
887
  {
745
888
  file: 'locus-info',
@@ -750,8 +893,26 @@ export default class LocusInfo extends EventsScope {
750
893
  entryExitTone,
751
894
  }
752
895
  );
896
+ }
753
897
 
754
- this.updateMeeting({entryExitTone});
898
+ // videoEnabled is handled differently than other controls,
899
+ // to fit with audio mute status logic
900
+ if (hasVideoEnabledChanged) {
901
+ const {videoEnabled} = current;
902
+
903
+ this.updateMeeting({unmuteVideoAllowed: videoEnabled});
904
+
905
+ this.emitScoped(
906
+ {
907
+ file: 'locus-info',
908
+ function: 'updateControls',
909
+ },
910
+ LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
911
+ {
912
+ // muted: not part of locus.controls
913
+ unmuteAllowed: videoEnabled,
914
+ }
915
+ );
755
916
  }
756
917
 
757
918
  this.controls = controls;
@@ -789,6 +950,27 @@ export default class LocusInfo extends EventsScope {
789
950
  }
790
951
  }
791
952
 
953
+ /**
954
+ * @param {Object} services
955
+ * @returns {undefined}
956
+ * @memberof LocusInfo
957
+ */
958
+ updateServices(services: Record<'breakout' | 'record', {url: string}>) {
959
+ if (services && !isEqual(this.services, services)) {
960
+ this.services = services;
961
+ this.emitScoped(
962
+ {
963
+ file: 'locus-info',
964
+ function: 'updateServices',
965
+ },
966
+ LOCUSINFO.EVENTS.LINKS_SERVICES,
967
+ {
968
+ services,
969
+ }
970
+ );
971
+ }
972
+ }
973
+
792
974
  /**
793
975
  * @param {Object} fullState
794
976
  * @returns {undefined}
@@ -871,8 +1053,11 @@ export default class LocusInfo extends EventsScope {
871
1053
  * @memberof LocusInfo
872
1054
  */
873
1055
  updateMeetingInfo(info: object, self?: object) {
874
- if (info && !isEqual(this.info, info)) {
875
- const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
1056
+ const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
1057
+ if (
1058
+ (info && !isEqual(this.info, info)) ||
1059
+ (roles.length && !isEqual(this.roles, roles) && info)
1060
+ ) {
876
1061
  const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
877
1062
  const parsedInfo = InfoUtils.getInfos(this.parsedLocus.info, info, roles, isJoined);
878
1063
 
@@ -911,6 +1096,7 @@ export default class LocusInfo extends EventsScope {
911
1096
  // Parses the info and adds necessary values
912
1097
  this.updateMeeting(parsedInfo.current);
913
1098
  }
1099
+ this.roles = roles;
914
1100
  }
915
1101
 
916
1102
  /**
@@ -951,6 +1137,8 @@ export default class LocusInfo extends EventsScope {
951
1137
  const parsedMediaShares = MediaSharesUtils.getMediaShares(this.mediaShares, mediaShares);
952
1138
 
953
1139
  this.updateMeeting(parsedMediaShares.current);
1140
+ this.parsedLocus.mediaShares = parsedMediaShares.current;
1141
+ this.mediaShares = mediaShares;
954
1142
  this.emitScoped(
955
1143
  {
956
1144
  file: 'locus-info',
@@ -962,8 +1150,6 @@ export default class LocusInfo extends EventsScope {
962
1150
  previous: parsedMediaShares.previous,
963
1151
  }
964
1152
  );
965
- this.parsedLocus.mediaShares = parsedMediaShares.current;
966
- this.mediaShares = mediaShares;
967
1153
  }
968
1154
  }
969
1155
 
@@ -1041,6 +1227,31 @@ export default class LocusInfo extends EventsScope {
1041
1227
  );
1042
1228
  }
1043
1229
 
1230
+ if (parsedSelves.updates.breakoutsChanged) {
1231
+ this.emitScoped(
1232
+ {
1233
+ file: 'locus-info',
1234
+ function: 'updateSelf',
1235
+ },
1236
+ LOCUSINFO.EVENTS.SELF_MEETING_BREAKOUTS_CHANGED,
1237
+ {breakoutSessions: parsedSelves.current.breakoutSessions}
1238
+ );
1239
+ }
1240
+
1241
+ if (parsedSelves.updates.interpretationChanged) {
1242
+ this.emitScoped(
1243
+ {
1244
+ file: 'locus-info',
1245
+ function: 'updateSelf',
1246
+ },
1247
+ LOCUSINFO.EVENTS.SELF_MEETING_INTERPRETATION_CHANGED,
1248
+ {
1249
+ interpretation: parsedSelves.current.interpretation,
1250
+ selfParticipantId: parsedSelves.current.selfId,
1251
+ }
1252
+ );
1253
+ }
1254
+
1044
1255
  if (parsedSelves.updates.isMediaInactiveOrReleased) {
1045
1256
  this.emitScoped(
1046
1257
  {
@@ -1062,6 +1273,31 @@ export default class LocusInfo extends EventsScope {
1062
1273
  self
1063
1274
  );
1064
1275
  }
1276
+
1277
+ if (parsedSelves.updates.isRolesChanged) {
1278
+ this.emitScoped(
1279
+ {
1280
+ file: 'locus-info',
1281
+ function: 'updateSelf',
1282
+ },
1283
+ LOCUSINFO.EVENTS.SELF_ROLES_CHANGED,
1284
+ {oldRoles: parsedSelves.previous?.roles, newRoles: parsedSelves.current?.roles}
1285
+ );
1286
+ }
1287
+
1288
+ if (parsedSelves.updates.isVideoMutedByOthersChanged) {
1289
+ this.emitScoped(
1290
+ {
1291
+ file: 'locus-info',
1292
+ function: 'updateSelf',
1293
+ },
1294
+ LOCUSINFO.EVENTS.SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED,
1295
+ {
1296
+ muted: parsedSelves.current.remoteVideoMuted,
1297
+ // unmuteAllowed: not part of .self
1298
+ }
1299
+ );
1300
+ }
1065
1301
  if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
1066
1302
  this.emitScoped(
1067
1303
  {
@@ -1276,4 +1512,104 @@ export default class LocusInfo extends EventsScope {
1276
1512
  this.identities = identities;
1277
1513
  }
1278
1514
  }
1515
+
1516
+ /**
1517
+ * check the locus is main session's one or not, if is main session's, update main session cache
1518
+ * @param {Object} locus
1519
+ * @returns {undefined}
1520
+ * @memberof LocusInfo
1521
+ */
1522
+ updateLocusCache(locus: any) {
1523
+ const isMainSessionDTO = ControlsUtils.isMainSessionDTO(locus);
1524
+ if (isMainSessionDTO) {
1525
+ this.updateMainSessionLocusCache(locus);
1526
+ }
1527
+ }
1528
+
1529
+ /**
1530
+ * if return from breakout to main session, need to use cached main session DTO since locus won't send the full locus (participants)
1531
+ * if join breakout from main session, need to query main locus url (if response with 403 means no privilege, need to clear the cache)
1532
+ * @param {Object} newLocus
1533
+ * @returns {Object}
1534
+ * @memberof LocusInfo
1535
+ */
1536
+ getTheLocusToUpdate(newLocus: any) {
1537
+ const switchStatus = ControlsUtils.getSessionSwitchStatus(this.controls, newLocus?.controls);
1538
+ if (switchStatus.isReturnToMain && this.mainSessionLocusCache) {
1539
+ return cloneDeep(this.mainSessionLocusCache);
1540
+ }
1541
+ if (switchStatus.isJoinToBreakout) {
1542
+ this.emitScoped(
1543
+ {
1544
+ file: 'locus-info',
1545
+ function: 'updateControls',
1546
+ },
1547
+ LOCUSINFO.EVENTS.CONTROLS_JOIN_BREAKOUT_FROM_MAIN,
1548
+ {
1549
+ mainLocusUrl: this.url,
1550
+ }
1551
+ );
1552
+ }
1553
+
1554
+ return newLocus;
1555
+ }
1556
+
1557
+ /**
1558
+ * merge participants by participant id
1559
+ * @param {Array} participants
1560
+ * @param {Array} sourceParticipants
1561
+ * @returns {Array} merged participants
1562
+ * @memberof LocusInfo
1563
+ */
1564
+ // eslint-disable-next-line class-methods-use-this
1565
+ mergeParticipants(participants, sourceParticipants) {
1566
+ if (!sourceParticipants || !sourceParticipants.length) return participants;
1567
+ if (!participants || !participants.length) {
1568
+ return sourceParticipants;
1569
+ }
1570
+ sourceParticipants.forEach((participant) => {
1571
+ const existIndex = participants.findIndex((p) => p.id === participant.id);
1572
+ if (existIndex > -1) {
1573
+ participants.splice(existIndex, 1, participant);
1574
+ } else {
1575
+ participants.push(participant);
1576
+ }
1577
+ });
1578
+
1579
+ return participants;
1580
+ }
1581
+
1582
+ /**
1583
+ * need cache main sessions' participants since locus will not send the full list when cohost/host leave breakout
1584
+ * @param {Object} mainLocus
1585
+ * @returns {undefined}
1586
+ * @memberof LocusInfo
1587
+ */
1588
+ updateMainSessionLocusCache(mainLocus: any) {
1589
+ if (!mainLocus) {
1590
+ return;
1591
+ }
1592
+ const locusClone = cloneDeep(mainLocus);
1593
+ if (this.mainSessionLocusCache) {
1594
+ // shallow merge and do special merge for participants
1595
+ assignWith(this.mainSessionLocusCache, locusClone, (objValue, srcValue, key) => {
1596
+ if (key === 'participants') {
1597
+ return this.mergeParticipants(objValue, srcValue);
1598
+ }
1599
+
1600
+ return srcValue || objValue;
1601
+ });
1602
+ } else {
1603
+ this.mainSessionLocusCache = locusClone;
1604
+ }
1605
+ }
1606
+
1607
+ /**
1608
+ * clear main session cache
1609
+ * @returns {undefined}
1610
+ * @memberof LocusInfo
1611
+ */
1612
+ clearMainSessionLocusCache() {
1613
+ this.mainSessionLocusCache = null;
1614
+ }
1279
1615
  }