@webex/plugin-meetings 3.8.0 → 3.8.1-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +26 -13
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +70 -6
  4. package/dist/breakouts/index.js.map +1 -1
  5. package/dist/common/errors/webex-errors.js +12 -2
  6. package/dist/common/errors/webex-errors.js.map +1 -1
  7. package/dist/config.js +5 -1
  8. package/dist/config.js.map +1 -1
  9. package/dist/constants.js +28 -123
  10. package/dist/constants.js.map +1 -1
  11. package/dist/controls-options-manager/enums.js +3 -0
  12. package/dist/controls-options-manager/enums.js.map +1 -1
  13. package/dist/controls-options-manager/types.js.map +1 -1
  14. package/dist/controls-options-manager/util.js +78 -0
  15. package/dist/controls-options-manager/util.js.map +1 -1
  16. package/dist/interpretation/index.js +4 -4
  17. package/dist/interpretation/index.js.map +1 -1
  18. package/dist/interpretation/siLanguage.js +1 -1
  19. package/dist/locus-info/controlsUtils.js +37 -11
  20. package/dist/locus-info/controlsUtils.js.map +1 -1
  21. package/dist/locus-info/index.js +92 -12
  22. package/dist/locus-info/index.js.map +1 -1
  23. package/dist/locus-info/selfUtils.js +432 -418
  24. package/dist/locus-info/selfUtils.js.map +1 -1
  25. package/dist/media/index.js +17 -17
  26. package/dist/media/index.js.map +1 -1
  27. package/dist/media/properties.js +94 -6
  28. package/dist/media/properties.js.map +1 -1
  29. package/dist/meeting/brbState.js +9 -2
  30. package/dist/meeting/brbState.js.map +1 -1
  31. package/dist/meeting/in-meeting-actions.js +21 -1
  32. package/dist/meeting/in-meeting-actions.js.map +1 -1
  33. package/dist/meeting/index.js +678 -344
  34. package/dist/meeting/index.js.map +1 -1
  35. package/dist/meeting/locusMediaRequest.js +21 -22
  36. package/dist/meeting/locusMediaRequest.js.map +1 -1
  37. package/dist/meeting/muteState.js +4 -4
  38. package/dist/meeting/muteState.js.map +1 -1
  39. package/dist/meeting/request.js +30 -0
  40. package/dist/meeting/request.js.map +1 -1
  41. package/dist/meeting/request.type.js.map +1 -1
  42. package/dist/meeting/util.js +13 -2
  43. package/dist/meeting/util.js.map +1 -1
  44. package/dist/meeting-info/meeting-info-v2.js +373 -68
  45. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  46. package/dist/meeting-info/utilv2.js +5 -1
  47. package/dist/meeting-info/utilv2.js.map +1 -1
  48. package/dist/meetings/index.js +136 -1
  49. package/dist/meetings/index.js.map +1 -1
  50. package/dist/meetings/util.js +14 -0
  51. package/dist/meetings/util.js.map +1 -1
  52. package/dist/member/index.js +55 -9
  53. package/dist/member/index.js.map +1 -1
  54. package/dist/member/types.js +3 -0
  55. package/dist/member/types.js.map +1 -1
  56. package/dist/member/util.js +335 -353
  57. package/dist/member/util.js.map +1 -1
  58. package/dist/members/collection.js.map +1 -1
  59. package/dist/members/index.js +137 -29
  60. package/dist/members/index.js.map +1 -1
  61. package/dist/members/request.js +38 -0
  62. package/dist/members/request.js.map +1 -1
  63. package/dist/members/util.js +36 -1
  64. package/dist/members/util.js.map +1 -1
  65. package/dist/metrics/constants.js +10 -0
  66. package/dist/metrics/constants.js.map +1 -1
  67. package/dist/multistream/remoteMediaManager.js +40 -8
  68. package/dist/multistream/remoteMediaManager.js.map +1 -1
  69. package/dist/reachability/clusterReachability.js +63 -27
  70. package/dist/reachability/clusterReachability.js.map +1 -1
  71. package/dist/reachability/index.js +107 -47
  72. package/dist/reachability/index.js.map +1 -1
  73. package/dist/reachability/reachability.types.js +14 -0
  74. package/dist/reachability/reachability.types.js.map +1 -1
  75. package/dist/reachability/request.js +19 -3
  76. package/dist/reachability/request.js.map +1 -1
  77. package/dist/reconnection-manager/index.js +2 -2
  78. package/dist/reconnection-manager/index.js.map +1 -1
  79. package/dist/recording-controller/util.js +5 -5
  80. package/dist/recording-controller/util.js.map +1 -1
  81. package/dist/roap/index.js.map +1 -1
  82. package/dist/roap/turnDiscovery.js +45 -27
  83. package/dist/roap/turnDiscovery.js.map +1 -1
  84. package/dist/roap/types.js +17 -0
  85. package/dist/roap/types.js.map +1 -0
  86. package/dist/types/common/errors/webex-errors.d.ts +7 -1
  87. package/dist/types/config.d.ts +3 -0
  88. package/dist/types/constants.d.ts +20 -85
  89. package/dist/types/controls-options-manager/enums.d.ts +4 -1
  90. package/dist/types/controls-options-manager/types.d.ts +10 -1
  91. package/dist/types/locus-info/index.d.ts +3 -3
  92. package/dist/types/locus-info/selfUtils.d.ts +216 -1
  93. package/dist/types/media/properties.d.ts +15 -0
  94. package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
  95. package/dist/types/meeting/index.d.ts +65 -1
  96. package/dist/types/meeting/muteState.d.ts +0 -1
  97. package/dist/types/meeting/request.d.ts +12 -1
  98. package/dist/types/meeting/request.type.d.ts +6 -0
  99. package/dist/types/meeting/util.d.ts +3 -1
  100. package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
  101. package/dist/types/meetings/index.d.ts +57 -0
  102. package/dist/types/member/index.d.ts +21 -6
  103. package/dist/types/member/types.d.ts +73 -14
  104. package/dist/types/member/util.d.ts +156 -1
  105. package/dist/types/members/collection.d.ts +6 -5
  106. package/dist/types/members/index.d.ts +32 -43
  107. package/dist/types/members/request.d.ts +26 -0
  108. package/dist/types/members/util.d.ts +27 -0
  109. package/dist/types/metrics/constants.d.ts +10 -0
  110. package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
  111. package/dist/types/reachability/clusterReachability.d.ts +15 -7
  112. package/dist/types/reachability/index.d.ts +10 -1
  113. package/dist/types/reachability/reachability.types.d.ts +5 -0
  114. package/dist/types/roap/index.d.ts +3 -2
  115. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  116. package/dist/types/roap/types.d.ts +16 -0
  117. package/dist/webinar/index.js +2 -2
  118. package/dist/webinar/index.js.map +1 -1
  119. package/package.json +24 -23
  120. package/src/breakouts/index.ts +69 -0
  121. package/src/common/errors/webex-errors.ts +8 -1
  122. package/src/config.ts +3 -0
  123. package/src/constants.ts +30 -90
  124. package/src/controls-options-manager/enums.ts +3 -0
  125. package/src/controls-options-manager/types.ts +16 -1
  126. package/src/controls-options-manager/util.ts +93 -0
  127. package/src/interpretation/index.ts +3 -3
  128. package/src/locus-info/controlsUtils.ts +59 -14
  129. package/src/locus-info/index.ts +97 -13
  130. package/src/locus-info/selfUtils.ts +496 -442
  131. package/src/media/index.ts +23 -21
  132. package/src/media/properties.ts +96 -0
  133. package/src/meeting/brbState.ts +11 -2
  134. package/src/meeting/in-meeting-actions.ts +40 -0
  135. package/src/meeting/index.ts +470 -105
  136. package/src/meeting/locusMediaRequest.ts +27 -22
  137. package/src/meeting/muteState.ts +4 -4
  138. package/src/meeting/request.ts +36 -1
  139. package/src/meeting/request.type.ts +7 -0
  140. package/src/meeting/util.ts +11 -2
  141. package/src/meeting-info/meeting-info-v2.ts +254 -8
  142. package/src/meeting-info/utilv2.ts +5 -0
  143. package/src/meetings/index.ts +148 -1
  144. package/src/meetings/util.ts +18 -0
  145. package/src/member/index.ts +68 -22
  146. package/src/member/types.ts +82 -16
  147. package/src/member/util.ts +357 -350
  148. package/src/members/collection.ts +4 -3
  149. package/src/members/index.ts +137 -18
  150. package/src/members/request.ts +44 -0
  151. package/src/members/util.ts +43 -1
  152. package/src/metrics/constants.ts +10 -0
  153. package/src/multistream/remoteMediaManager.ts +32 -10
  154. package/src/reachability/clusterReachability.ts +73 -26
  155. package/src/reachability/index.ts +62 -1
  156. package/src/reachability/reachability.types.ts +6 -0
  157. package/src/reachability/request.ts +7 -0
  158. package/src/reconnection-manager/index.ts +2 -2
  159. package/src/recording-controller/util.ts +17 -13
  160. package/src/roap/index.ts +3 -7
  161. package/src/roap/turnDiscovery.ts +34 -39
  162. package/src/roap/types.ts +23 -0
  163. package/src/webinar/index.ts +1 -1
  164. package/test/unit/spec/breakouts/index.ts +167 -95
  165. package/test/unit/spec/controls-options-manager/util.js +178 -0
  166. package/test/unit/spec/interpretation/index.ts +39 -1
  167. package/test/unit/spec/locus-info/controlsUtils.js +155 -9
  168. package/test/unit/spec/locus-info/index.js +209 -73
  169. package/test/unit/spec/locus-info/selfUtils.js +98 -24
  170. package/test/unit/spec/media/index.ts +150 -18
  171. package/test/unit/spec/media/properties.ts +130 -0
  172. package/test/unit/spec/meeting/brbState.ts +40 -2
  173. package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
  174. package/test/unit/spec/meeting/index.js +804 -139
  175. package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
  176. package/test/unit/spec/meeting/muteState.js +73 -2
  177. package/test/unit/spec/meeting/request.js +32 -1
  178. package/test/unit/spec/meeting/utils.js +119 -18
  179. package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
  180. package/test/unit/spec/meeting-info/utilv2.js +19 -0
  181. package/test/unit/spec/meetings/index.js +146 -2
  182. package/test/unit/spec/member/index.js +7 -0
  183. package/test/unit/spec/member/util.js +24 -0
  184. package/test/unit/spec/members/index.js +304 -78
  185. package/test/unit/spec/members/request.js +68 -22
  186. package/test/unit/spec/members/utils.js +75 -0
  187. package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
  188. package/test/unit/spec/reachability/clusterReachability.ts +88 -56
  189. package/test/unit/spec/reachability/index.ts +97 -0
  190. package/test/unit/spec/reachability/request.js +47 -2
  191. package/test/unit/spec/reconnection-manager/index.js +4 -4
  192. package/test/unit/spec/roap/turnDiscovery.ts +110 -28
  193. package/test/unit/spec/webinar/index.ts +5 -0
  194. package/dist/annotation/annotation.types.d.ts +0 -42
  195. package/dist/annotation/constants.d.ts +0 -31
  196. package/dist/annotation/index.d.ts +0 -117
  197. package/dist/breakouts/breakout.d.ts +0 -8
  198. package/dist/breakouts/collection.d.ts +0 -5
  199. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  200. package/dist/breakouts/events.d.ts +0 -8
  201. package/dist/breakouts/index.d.ts +0 -5
  202. package/dist/breakouts/request.d.ts +0 -22
  203. package/dist/breakouts/utils.d.ts +0 -15
  204. package/dist/common/browser-detection.d.ts +0 -9
  205. package/dist/common/collection.d.ts +0 -48
  206. package/dist/common/config.d.ts +0 -2
  207. package/dist/common/errors/captcha-error.d.ts +0 -15
  208. package/dist/common/errors/intent-to-join.d.ts +0 -16
  209. package/dist/common/errors/join-meeting.d.ts +0 -17
  210. package/dist/common/errors/media.d.ts +0 -15
  211. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  212. package/dist/common/errors/parameter.d.ts +0 -15
  213. package/dist/common/errors/password-error.d.ts +0 -15
  214. package/dist/common/errors/permission.d.ts +0 -14
  215. package/dist/common/errors/reclaim-host-role-error.js +0 -149
  216. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  217. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  218. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  219. package/dist/common/errors/reconnection-in-progress.js +0 -33
  220. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  221. package/dist/common/errors/reconnection.d.ts +0 -15
  222. package/dist/common/errors/stats.d.ts +0 -15
  223. package/dist/common/errors/webex-errors.d.ts +0 -93
  224. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  225. package/dist/common/events/events-scope.d.ts +0 -17
  226. package/dist/common/events/events.d.ts +0 -12
  227. package/dist/common/events/trigger-proxy.d.ts +0 -2
  228. package/dist/common/events/util.d.ts +0 -2
  229. package/dist/common/logs/logger-config.d.ts +0 -2
  230. package/dist/common/logs/logger-proxy.d.ts +0 -2
  231. package/dist/common/logs/request.d.ts +0 -36
  232. package/dist/common/queue.d.ts +0 -34
  233. package/dist/config.d.ts +0 -72
  234. package/dist/constants.d.ts +0 -1088
  235. package/dist/controls-options-manager/constants.d.ts +0 -4
  236. package/dist/controls-options-manager/enums.d.ts +0 -15
  237. package/dist/controls-options-manager/index.d.ts +0 -136
  238. package/dist/controls-options-manager/types.d.ts +0 -43
  239. package/dist/controls-options-manager/util.d.ts +0 -1
  240. package/dist/index.d.ts +0 -7
  241. package/dist/interceptors/index.d.ts +0 -2
  242. package/dist/interceptors/locusRetry.d.ts +0 -27
  243. package/dist/interpretation/collection.d.ts +0 -5
  244. package/dist/interpretation/index.d.ts +0 -5
  245. package/dist/interpretation/siLanguage.d.ts +0 -5
  246. package/dist/locus-info/controlsUtils.d.ts +0 -2
  247. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  248. package/dist/locus-info/fullState.d.ts +0 -2
  249. package/dist/locus-info/hostUtils.d.ts +0 -2
  250. package/dist/locus-info/index.d.ts +0 -322
  251. package/dist/locus-info/infoUtils.d.ts +0 -2
  252. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  253. package/dist/locus-info/parser.d.ts +0 -272
  254. package/dist/locus-info/selfUtils.d.ts +0 -2
  255. package/dist/media/index.d.ts +0 -34
  256. package/dist/media/properties.d.ts +0 -93
  257. package/dist/media/util.d.ts +0 -2
  258. package/dist/mediaQualityMetrics/config.d.ts +0 -241
  259. package/dist/mediaQualityMetrics/config.js +0 -502
  260. package/dist/mediaQualityMetrics/config.js.map +0 -1
  261. package/dist/meeting/effectsState.js +0 -260
  262. package/dist/meeting/effectsState.js.map +0 -1
  263. package/dist/meeting/in-meeting-actions.d.ts +0 -167
  264. package/dist/meeting/index.d.ts +0 -1825
  265. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  266. package/dist/meeting/muteState.d.ts +0 -178
  267. package/dist/meeting/request.d.ts +0 -295
  268. package/dist/meeting/request.type.d.ts +0 -11
  269. package/dist/meeting/state.d.ts +0 -9
  270. package/dist/meeting/util.d.ts +0 -119
  271. package/dist/meeting/voicea-meeting.d.ts +0 -16
  272. package/dist/meeting-info/collection.d.ts +0 -20
  273. package/dist/meeting-info/index.d.ts +0 -69
  274. package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
  275. package/dist/meeting-info/request.d.ts +0 -22
  276. package/dist/meeting-info/util.d.ts +0 -2
  277. package/dist/meeting-info/utilv2.d.ts +0 -2
  278. package/dist/meetings/collection.d.ts +0 -40
  279. package/dist/meetings/index.d.ts +0 -390
  280. package/dist/meetings/meetings.types.d.ts +0 -4
  281. package/dist/meetings/request.d.ts +0 -27
  282. package/dist/meetings/util.d.ts +0 -18
  283. package/dist/member/index.d.ts +0 -160
  284. package/dist/member/member.types.js +0 -17
  285. package/dist/member/member.types.js.map +0 -1
  286. package/dist/member/types.d.ts +0 -32
  287. package/dist/member/util.d.ts +0 -2
  288. package/dist/members/collection.d.ts +0 -29
  289. package/dist/members/index.d.ts +0 -353
  290. package/dist/members/request.d.ts +0 -114
  291. package/dist/members/types.d.ts +0 -25
  292. package/dist/members/util.d.ts +0 -215
  293. package/dist/metrics/config.js +0 -276
  294. package/dist/metrics/config.js.map +0 -1
  295. package/dist/metrics/constants.d.ts +0 -70
  296. package/dist/metrics/index.d.ts +0 -45
  297. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  298. package/dist/multistream/receiveSlot.d.ts +0 -68
  299. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  300. package/dist/multistream/remoteMedia.d.ts +0 -72
  301. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  302. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  303. package/dist/multistream/sendSlotManager.d.ts +0 -69
  304. package/dist/networkQualityMonitor/index.d.ts +0 -70
  305. package/dist/networkQualityMonitor/index.js +0 -221
  306. package/dist/networkQualityMonitor/index.js.map +0 -1
  307. package/dist/peer-connection-manager/index.js +0 -671
  308. package/dist/peer-connection-manager/index.js.map +0 -1
  309. package/dist/peer-connection-manager/util.js +0 -109
  310. package/dist/peer-connection-manager/util.js.map +0 -1
  311. package/dist/personal-meeting-room/index.d.ts +0 -47
  312. package/dist/personal-meeting-room/request.d.ts +0 -14
  313. package/dist/personal-meeting-room/util.d.ts +0 -2
  314. package/dist/reachability/clusterReachability.d.ts +0 -109
  315. package/dist/reachability/index.d.ts +0 -105
  316. package/dist/reachability/request.d.ts +0 -39
  317. package/dist/reachability/util.d.ts +0 -8
  318. package/dist/reactions/constants.d.ts +0 -3
  319. package/dist/reactions/reactions.d.ts +0 -4
  320. package/dist/reactions/reactions.type.d.ts +0 -52
  321. package/dist/reconnection-manager/index.d.ts +0 -136
  322. package/dist/recording-controller/enums.d.ts +0 -7
  323. package/dist/recording-controller/index.d.ts +0 -207
  324. package/dist/recording-controller/util.d.ts +0 -14
  325. package/dist/roap/collection.js +0 -62
  326. package/dist/roap/collection.js.map +0 -1
  327. package/dist/roap/handler.js +0 -275
  328. package/dist/roap/handler.js.map +0 -1
  329. package/dist/roap/index.d.ts +0 -86
  330. package/dist/roap/request.d.ts +0 -39
  331. package/dist/roap/state.js +0 -126
  332. package/dist/roap/state.js.map +0 -1
  333. package/dist/roap/turnDiscovery.d.ts +0 -155
  334. package/dist/roap/util.js +0 -75
  335. package/dist/roap/util.js.map +0 -1
  336. package/dist/rtcMetrics/constants.d.ts +0 -4
  337. package/dist/rtcMetrics/constants.js +0 -11
  338. package/dist/rtcMetrics/constants.js.map +0 -1
  339. package/dist/rtcMetrics/index.d.ts +0 -61
  340. package/dist/rtcMetrics/index.js +0 -197
  341. package/dist/rtcMetrics/index.js.map +0 -1
  342. package/dist/statsAnalyzer/global.d.ts +0 -36
  343. package/dist/statsAnalyzer/global.js +0 -126
  344. package/dist/statsAnalyzer/global.js.map +0 -1
  345. package/dist/statsAnalyzer/index.d.ts +0 -217
  346. package/dist/statsAnalyzer/index.js +0 -1013
  347. package/dist/statsAnalyzer/index.js.map +0 -1
  348. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
  349. package/dist/statsAnalyzer/mqaUtil.js +0 -179
  350. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  351. package/dist/transcription/index.d.ts +0 -64
  352. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  353. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  354. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  355. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  356. package/dist/types/rtcMetrics/index.d.ts +0 -71
  357. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  358. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  359. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  360. package/dist/webinar/collection.d.ts +0 -16
  361. package/dist/webinar/index.d.ts +0 -5
@@ -111,6 +111,8 @@ describe('plugin-meetings', () => {
111
111
  },
112
112
  webcastControl: {streaming: false},
113
113
  practiceSession: {enabled: true},
114
+ annotationControl: {enabled: true},
115
+ rdcControl: {enabled: true},
114
116
  };
115
117
  });
116
118
 
@@ -278,6 +280,46 @@ describe('plugin-meetings', () => {
278
280
  });
279
281
  });
280
282
 
283
+ it('should trigger the CONTROLS_ANNOTATION_CHANGED event when necessary', () => {
284
+ locusInfo.controls = {};
285
+ locusInfo.emitScoped = sinon.stub();
286
+ locusInfo.updateControls(newControls);
287
+
288
+ assert.calledWith(
289
+ locusInfo.emitScoped,
290
+ {file: 'locus-info', function: 'updateControls'},
291
+ LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED,
292
+ {state: newControls.annotationControl}
293
+ );
294
+ });
295
+
296
+ it('should trigger the CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED event when necessary', () => {
297
+ locusInfo.controls = {};
298
+ locusInfo.emitScoped = sinon.stub();
299
+ locusInfo.updateControls(newControls);
300
+
301
+ assert.calledWith(
302
+ locusInfo.emitScoped,
303
+ {file: 'locus-info', function: 'updateControls'},
304
+ LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED,
305
+ {state: newControls.rdcControl}
306
+ );
307
+ });
308
+
309
+ it('should trigger the CONTROLS_POLLING_QA_CHANGED event when necessary', () => {
310
+ locusInfo.controls = {};
311
+ locusInfo.emitScoped = sinon.stub();
312
+ newControls.pollingQAControl = { enabled: true };
313
+ locusInfo.updateControls(newControls);
314
+
315
+ assert.calledWith(
316
+ locusInfo.emitScoped,
317
+ {file: 'locus-info', function: 'updateControls'},
318
+ LOCUSINFO.EVENTS.CONTROLS_POLLING_QA_CHANGED,
319
+ {state: newControls.pollingQAControl}
320
+ );
321
+ });
322
+
281
323
  it('should keep the recording state to `IDLE`', () => {
282
324
  locusInfo.controls = {
283
325
  record: {
@@ -529,6 +571,34 @@ describe('plugin-meetings', () => {
529
571
  );
530
572
  });
531
573
 
574
+ it('should update the transcribe spoken language', () => {
575
+ locusInfo.emitScoped = sinon.stub();
576
+ locusInfo.controls = {
577
+ transcribe: {
578
+ transcribing: false,
579
+ caption: true,
580
+ spokenLanguage: 'en-US',
581
+ },
582
+ };
583
+ newControls.transcribe.transcribing = false;
584
+ newControls.transcribe.caption = true;
585
+ newControls.transcribe.spokenLanguage = 'fr';
586
+
587
+ locusInfo.updateControls(newControls);
588
+
589
+ assert.calledWith(
590
+ locusInfo.emitScoped,
591
+ {
592
+ file: 'locus-info',
593
+ function: 'updateControls',
594
+ },
595
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED,
596
+ {
597
+ spokenLanguage: 'fr',
598
+ }
599
+ );
600
+ });
601
+
532
602
  it('should update the manual caption state', () => {
533
603
  locusInfo.emitScoped = sinon.stub();
534
604
  locusInfo.controls = {
@@ -797,6 +867,32 @@ describe('plugin-meetings', () => {
797
867
 
798
868
  assert.isTrue(locusInfo.deltaParticipants.length === 0);
799
869
  });
870
+
871
+ it('should call with participant display name', () => {
872
+ const failureParticipant = [
873
+ {
874
+ person: {
875
+ id: 5678,
876
+ primaryDisplayString: 'Test User',
877
+ },
878
+ reason: 'FAILURE',
879
+ },
880
+ ];
881
+
882
+ locusInfo.emitScoped = sinon.stub();
883
+ locusInfo.updateParticipants(failureParticipant);
884
+ assert.calledWith(
885
+ locusInfo.emitScoped,
886
+ {
887
+ file: 'locus-info',
888
+ function: 'updateParticipants',
889
+ },
890
+ LOCUSINFO.EVENTS.PARTICIPANT_REASON_CHANGED,
891
+ {
892
+ displayName: 'Test User',
893
+ }
894
+ );
895
+ })
800
896
  });
801
897
 
802
898
  describe('#updateSelf', () => {
@@ -808,7 +904,7 @@ describe('plugin-meetings', () => {
808
904
  selfWithBrbChanged.controls.brb = enabled;
809
905
 
810
906
  locusInfo.emitScoped = sinon.stub();
811
- locusInfo.updateSelf(selfWithBrbChanged, []);
907
+ locusInfo.updateSelf(selfWithBrbChanged);
812
908
 
813
909
  assert.calledWith(
814
910
  locusInfo.emitScoped,
@@ -828,14 +924,15 @@ describe('plugin-meetings', () => {
828
924
 
829
925
  const selfWithBrbChanged = cloneDeep(self);
830
926
  selfWithBrbChanged.controls.brb = value;
831
- locusInfo.self = selfWithBrbChanged;
927
+
928
+ locusInfo.updateSelf(selfWithBrbChanged);
832
929
 
833
930
  locusInfo.emitScoped = sinon.stub();
834
931
 
835
932
  const newSelf = cloneDeep(self);
836
933
  newSelf.controls.brb = value;
837
934
 
838
- locusInfo.updateSelf(newSelf, []);
935
+ locusInfo.updateSelf(newSelf);
839
936
 
840
937
  assert.neverCalledWith(
841
938
  locusInfo.emitScoped,
@@ -852,14 +949,14 @@ describe('plugin-meetings', () => {
852
949
  it('should not trigger SELF_MEETING_BRB_CHANGED when brb state is undefined', () => {
853
950
  const selfWithBrbChanged = cloneDeep(self);
854
951
  selfWithBrbChanged.controls.brb = false;
855
- locusInfo.self = selfWithBrbChanged;
952
+ locusInfo.updateSelf(selfWithBrbChanged);
856
953
 
857
954
  locusInfo.emitScoped = sinon.stub();
858
955
 
859
956
  const newSelf = cloneDeep(self);
860
957
  newSelf.controls.brb = undefined;
861
958
 
862
- locusInfo.updateSelf(newSelf, []);
959
+ locusInfo.updateSelf(newSelf);
863
960
 
864
961
  assert.neverCalledWith(
865
962
  locusInfo.emitScoped,
@@ -882,7 +979,7 @@ describe('plugin-meetings', () => {
882
979
  ];
883
980
 
884
981
  locusInfo.emitScoped = sinon.stub();
885
- locusInfo.updateSelf(selfWithLayoutChanged, []);
982
+ locusInfo.updateSelf(selfWithLayoutChanged);
886
983
 
887
984
  assert.calledWith(
888
985
  locusInfo.emitScoped,
@@ -908,11 +1005,11 @@ describe('plugin-meetings', () => {
908
1005
  ];
909
1006
 
910
1007
  // Set the layout prior to stubbing to validate it does not change.
911
- locusInfo.updateSelf(selfWithLayoutChanged, []);
1008
+ locusInfo.updateSelf(selfWithLayoutChanged);
912
1009
 
913
1010
  locusInfo.emitScoped = sinon.stub();
914
1011
 
915
- locusInfo.updateSelf(selfWithLayoutChanged, []);
1012
+ locusInfo.updateSelf(selfWithLayoutChanged);
916
1013
 
917
1014
  assert.neverCalledWith(
918
1015
  locusInfo.emitScoped,
@@ -926,11 +1023,11 @@ describe('plugin-meetings', () => {
926
1023
  });
927
1024
 
928
1025
  it('should trigger MEDIA_INACTIVITY on server media inactivity', () => {
929
- locusInfo.self = self;
930
-
931
1026
  locusInfo.webex.internal.device.url = selfWithInactivity.deviceUrl;
1027
+ locusInfo.updateSelf(self);
1028
+
932
1029
  locusInfo.emitScoped = sinon.stub();
933
- locusInfo.updateSelf(selfWithInactivity, []);
1030
+ locusInfo.updateSelf(selfWithInactivity);
934
1031
 
935
1032
  assert.calledWith(
936
1033
  locusInfo.emitScoped,
@@ -952,7 +1049,7 @@ describe('plugin-meetings', () => {
952
1049
 
953
1050
  locusInfo.webex.internal.device.url = self.deviceUrl;
954
1051
  locusInfo.emitScoped = sinon.stub();
955
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1052
+ locusInfo.updateSelf(selfWithMutedByOthers);
956
1053
 
957
1054
  assert.calledWith(
958
1055
  locusInfo.emitScoped,
@@ -965,10 +1062,10 @@ describe('plugin-meetings', () => {
965
1062
  );
966
1063
 
967
1064
  // but sometimes "previous self" is defined, but without controls.audio.muted, so we test this here:
968
- locusInfo.self = cloneDeep(self);
1065
+ locusInfo.updateSelf(self);
969
1066
  locusInfo.self.controls.audio = {};
970
1067
 
971
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1068
+ locusInfo.updateSelf(selfWithMutedByOthers);
972
1069
  assert.calledWith(
973
1070
  locusInfo.emitScoped,
974
1071
  {
@@ -988,7 +1085,7 @@ describe('plugin-meetings', () => {
988
1085
 
989
1086
  locusInfo.webex.internal.device.url = self.deviceUrl;
990
1087
  locusInfo.emitScoped = sinon.stub();
991
- locusInfo.updateSelf(selfWithMutedByOthersFalse, []);
1088
+ locusInfo.updateSelf(selfWithMutedByOthersFalse);
992
1089
 
993
1090
  // we might get some calls to emitScoped, but we need to check that none of them are for SELF_REMOTE_MUTE_STATUS_UPDATED
994
1091
  locusInfo.emitScoped.getCalls().forEach((x) => {
@@ -997,20 +1094,20 @@ describe('plugin-meetings', () => {
997
1094
  });
998
1095
 
999
1096
  it('should not trigger SELF_REMOTE_MUTE_STATUS_UPDATED when being removed from meeting', () => {
1097
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1000
1098
  const selfWithMutedByOthers = cloneDeep(self);
1001
1099
 
1002
1100
  selfWithMutedByOthers.controls.audio.muted = true;
1003
1101
 
1004
- locusInfo.self = selfWithMutedByOthers;
1102
+ locusInfo.updateSelf(selfWithMutedByOthers);
1005
1103
 
1006
1104
  // when user gets removed from meeting we receive a Locus DTO without any self.controls
1007
1105
  const selfWithoutControls = cloneDeep(self);
1008
1106
 
1009
1107
  selfWithoutControls.controls = undefined;
1010
1108
 
1011
- locusInfo.webex.internal.device.url = self.deviceUrl;
1012
1109
  locusInfo.emitScoped = sinon.stub();
1013
- locusInfo.updateSelf(selfWithoutControls, []);
1110
+ locusInfo.updateSelf(selfWithoutControls);
1014
1111
 
1015
1112
  // we might get some calls to emitScoped, but we need to check that none of them are for SELF_REMOTE_MUTE_STATUS_UPDATED
1016
1113
  locusInfo.emitScoped.getCalls().forEach((x) => {
@@ -1019,14 +1116,14 @@ describe('plugin-meetings', () => {
1019
1116
  });
1020
1117
 
1021
1118
  it('should trigger SELF_REMOTE_MUTE_STATUS_UPDATED on othersMuted', () => {
1022
- locusInfo.self = self;
1119
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1120
+ locusInfo.updateSelf(self);
1023
1121
  const selfWithMutedByOthers = cloneDeep(self);
1024
1122
 
1025
1123
  selfWithMutedByOthers.controls.audio.muted = true;
1026
1124
 
1027
- locusInfo.webex.internal.device.url = self.deviceUrl;
1028
1125
  locusInfo.emitScoped = sinon.stub();
1029
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1126
+ locusInfo.updateSelf(selfWithMutedByOthers);
1030
1127
 
1031
1128
  assert.calledWith(
1032
1129
  locusInfo.emitScoped,
@@ -1050,7 +1147,7 @@ describe('plugin-meetings', () => {
1050
1147
 
1051
1148
  locusInfo.webex.internal.device.url = self.deviceUrl;
1052
1149
  locusInfo.emitScoped = sinon.stub();
1053
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1150
+ locusInfo.updateSelf(selfWithMutedByOthers);
1054
1151
 
1055
1152
  assert.calledWith(
1056
1153
  locusInfo.emitScoped,
@@ -1063,10 +1160,10 @@ describe('plugin-meetings', () => {
1063
1160
  );
1064
1161
 
1065
1162
  // but sometimes "previous self" is defined, but without controls.audio.muted, so we test this here:
1066
- locusInfo.self = cloneDeep(self);
1163
+ locusInfo.updateSelf(self);
1067
1164
  locusInfo.self.controls.video = {};
1068
1165
 
1069
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1166
+ locusInfo.updateSelf(selfWithMutedByOthers);
1070
1167
  assert.calledWith(
1071
1168
  locusInfo.emitScoped,
1072
1169
  {
@@ -1086,7 +1183,7 @@ describe('plugin-meetings', () => {
1086
1183
 
1087
1184
  locusInfo.webex.internal.device.url = self.deviceUrl;
1088
1185
  locusInfo.emitScoped = sinon.stub();
1089
- locusInfo.updateSelf(selfWithMutedByOthersFalse, []);
1186
+ locusInfo.updateSelf(selfWithMutedByOthersFalse);
1090
1187
 
1091
1188
  // we might get some calls to emitScoped, but we need to check that none of them are for SELF_REMOTE_VIDEO_MUTE_STATUS_UPDATED
1092
1189
  locusInfo.emitScoped.getCalls().forEach((x) => {
@@ -1095,14 +1192,14 @@ describe('plugin-meetings', () => {
1095
1192
  });
1096
1193
 
1097
1194
  it('should emit event when remoteVideoMuted changed', () => {
1098
- locusInfo.self = self;
1195
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1196
+ locusInfo.updateSelf(self);
1099
1197
  const selfWithMutedByOthers = cloneDeep(self);
1100
1198
 
1101
1199
  selfWithMutedByOthers.controls.video.muted = true;
1102
1200
 
1103
- locusInfo.webex.internal.device.url = self.deviceUrl;
1104
1201
  locusInfo.emitScoped = sinon.stub();
1105
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1202
+ locusInfo.updateSelf(selfWithMutedByOthers);
1106
1203
 
1107
1204
  assert.calledWith(
1108
1205
  locusInfo.emitScoped,
@@ -1117,13 +1214,13 @@ describe('plugin-meetings', () => {
1117
1214
  });
1118
1215
 
1119
1216
  it('should trigger SELF_MEETING_BREAKOUTS_CHANGED when breakouts changed', () => {
1120
- locusInfo.self = self;
1217
+ locusInfo.updateSelf(self);
1121
1218
  const selfWithBreakoutsChanged = cloneDeep(self);
1122
1219
 
1123
1220
  selfWithBreakoutsChanged.controls.breakout.sessions.active[0].name = 'new name';
1124
1221
 
1125
1222
  locusInfo.emitScoped = sinon.stub();
1126
- locusInfo.updateSelf(selfWithBreakoutsChanged, []);
1223
+ locusInfo.updateSelf(selfWithBreakoutsChanged);
1127
1224
 
1128
1225
  assert.calledWith(
1129
1226
  locusInfo.emitScoped,
@@ -1156,16 +1253,16 @@ describe('plugin-meetings', () => {
1156
1253
  });
1157
1254
 
1158
1255
  it('should trigger SELF_REMOTE_MUTE_STATUS_UPDATED if muted and disallowUnmute changed', () => {
1159
- locusInfo.self = self;
1256
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1257
+ locusInfo.updateSelf(self);
1160
1258
  const selfWithMutedByOthersAndDissalowUnmute = cloneDeep(self);
1161
1259
 
1162
1260
  // first simulate remote mute
1163
1261
  selfWithMutedByOthersAndDissalowUnmute.controls.audio.muted = true;
1164
1262
  selfWithMutedByOthersAndDissalowUnmute.controls.audio.disallowUnmute = true;
1165
1263
 
1166
- locusInfo.webex.internal.device.url = self.deviceUrl;
1167
1264
  locusInfo.emitScoped = sinon.stub();
1168
- locusInfo.updateSelf(selfWithMutedByOthersAndDissalowUnmute, []);
1265
+ locusInfo.updateSelf(selfWithMutedByOthersAndDissalowUnmute);
1169
1266
 
1170
1267
  assert.calledWith(
1171
1268
  locusInfo.emitScoped,
@@ -1183,7 +1280,7 @@ describe('plugin-meetings', () => {
1183
1280
  selfWithMutedByOthers.controls.audio.muted = true;
1184
1281
  selfWithMutedByOthers.controls.audio.disallowUnmute = false;
1185
1282
 
1186
- locusInfo.updateSelf(selfWithMutedByOthers, []);
1283
+ locusInfo.updateSelf(selfWithMutedByOthers);
1187
1284
 
1188
1285
  assert.calledWith(
1189
1286
  locusInfo.emitScoped,
@@ -1197,15 +1294,15 @@ describe('plugin-meetings', () => {
1197
1294
  });
1198
1295
 
1199
1296
  it('should trigger LOCAL_UNMUTE_REQUIRED on localAudioUnmuteRequired', () => {
1200
- locusInfo.self = self;
1297
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1298
+ locusInfo.updateSelf(self);
1201
1299
  const selfWithLocalUnmuteRequired = cloneDeep(self);
1202
1300
 
1203
1301
  selfWithLocalUnmuteRequired.controls.audio.muted = false;
1204
1302
  selfWithLocalUnmuteRequired.controls.audio.localAudioUnmuteRequired = true;
1205
1303
 
1206
- locusInfo.webex.internal.device.url = self.deviceUrl;
1207
1304
  locusInfo.emitScoped = sinon.stub();
1208
- locusInfo.updateSelf(selfWithLocalUnmuteRequired, []);
1305
+ locusInfo.updateSelf(selfWithLocalUnmuteRequired);
1209
1306
 
1210
1307
  assert.calledWith(
1211
1308
  locusInfo.emitScoped,
@@ -1222,16 +1319,16 @@ describe('plugin-meetings', () => {
1222
1319
  });
1223
1320
 
1224
1321
  it('should trigger LOCAL_UNMUTE_REQUESTED when receiving requestedToUnmute=true', () => {
1225
- locusInfo.self = self;
1322
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1323
+ locusInfo.updateSelf(self);
1226
1324
  const selfWithRequestedToUnmute = cloneDeep(self);
1227
1325
 
1228
1326
  selfWithRequestedToUnmute.controls.audio.requestedToUnmute = true;
1229
1327
  selfWithRequestedToUnmute.controls.audio.lastModifiedRequestedToUnmute =
1230
1328
  '2023-06-16T19:25:04.369Z';
1231
1329
 
1232
- locusInfo.webex.internal.device.url = self.deviceUrl;
1233
1330
  locusInfo.emitScoped = sinon.stub();
1234
- locusInfo.updateSelf(selfWithRequestedToUnmute, []);
1331
+ locusInfo.updateSelf(selfWithRequestedToUnmute);
1235
1332
 
1236
1333
  assert.calledWith(
1237
1334
  locusInfo.emitScoped,
@@ -1249,7 +1346,7 @@ describe('plugin-meetings', () => {
1249
1346
  selfWithoutRequestedToUnmute.controls.audio.requestedToUnmute = false;
1250
1347
 
1251
1348
  locusInfo.emitScoped.resetHistory();
1252
- locusInfo.updateSelf(selfWithoutRequestedToUnmute, []);
1349
+ locusInfo.updateSelf(selfWithoutRequestedToUnmute);
1253
1350
 
1254
1351
  assert.neverCalledWith(
1255
1352
  locusInfo.emitScoped,
@@ -1263,15 +1360,14 @@ describe('plugin-meetings', () => {
1263
1360
  });
1264
1361
 
1265
1362
  it('should trigger SELF_OBSERVING when moving meeting to DX', () => {
1266
- locusInfo.self = self;
1363
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1364
+ locusInfo.updateSelf(self);
1267
1365
  const selfInitiatedMove = cloneDeep(self);
1268
1366
 
1269
1367
  // Inital move meeting is iniated
1270
1368
  selfInitiatedMove.devices[0].intent.type = 'MOVE_MEDIA';
1271
1369
 
1272
- locusInfo.webex.internal.device.url = self.deviceUrl;
1273
-
1274
- locusInfo.updateSelf(selfInitiatedMove, []);
1370
+ locusInfo.updateSelf(selfInitiatedMove);
1275
1371
 
1276
1372
  locusInfo.emitScoped = sinon.stub();
1277
1373
  // When dx joined the meeting after move
@@ -1279,7 +1375,7 @@ describe('plugin-meetings', () => {
1279
1375
 
1280
1376
  selfAfterDxJoins.devices[0].intent.type = 'OBSERVE';
1281
1377
 
1282
- locusInfo.updateSelf(selfAfterDxJoins, []);
1378
+ locusInfo.updateSelf(selfAfterDxJoins);
1283
1379
 
1284
1380
  assert.calledWith(
1285
1381
  locusInfo.emitScoped,
@@ -1297,11 +1393,11 @@ describe('plugin-meetings', () => {
1297
1393
  selfClone.canNotViewTheParticipantList = false; // same
1298
1394
 
1299
1395
  // Set the layout prior to stubbing to validate it does not change.
1300
- locusInfo.updateSelf(self, []);
1396
+ locusInfo.updateSelf(self);
1301
1397
 
1302
1398
  locusInfo.emitScoped = sinon.stub();
1303
1399
 
1304
- locusInfo.updateSelf(selfClone, []);
1400
+ locusInfo.updateSelf(selfClone);
1305
1401
 
1306
1402
  assert.neverCalledWith(
1307
1403
  locusInfo.emitScoped,
@@ -1320,11 +1416,11 @@ describe('plugin-meetings', () => {
1320
1416
  selfClone.canNotViewTheParticipantList = true; // different
1321
1417
 
1322
1418
  // Set the layout prior to stubbing to validate it does not change.
1323
- locusInfo.updateSelf(self, []);
1419
+ locusInfo.updateSelf(self);
1324
1420
 
1325
1421
  locusInfo.emitScoped = sinon.stub();
1326
1422
 
1327
- locusInfo.updateSelf(selfClone, []);
1423
+ locusInfo.updateSelf(selfClone);
1328
1424
 
1329
1425
  assert.calledWith(
1330
1426
  locusInfo.emitScoped,
@@ -1343,11 +1439,11 @@ describe('plugin-meetings', () => {
1343
1439
  selfClone.isSharingBlocked = false; // same
1344
1440
 
1345
1441
  // Set the layout prior to stubbing to validate it does not change.
1346
- locusInfo.updateSelf(self, []);
1442
+ locusInfo.updateSelf(self);
1347
1443
 
1348
1444
  locusInfo.emitScoped = sinon.stub();
1349
1445
 
1350
- locusInfo.updateSelf(selfClone, []);
1446
+ locusInfo.updateSelf(selfClone);
1351
1447
 
1352
1448
  assert.neverCalledWith(
1353
1449
  locusInfo.emitScoped,
@@ -1366,11 +1462,11 @@ describe('plugin-meetings', () => {
1366
1462
  selfClone.isSharingBlocked = true; // different
1367
1463
 
1368
1464
  // Set the layout prior to stubbing to validate it does not change.
1369
- locusInfo.updateSelf(self, []);
1465
+ locusInfo.updateSelf(self);
1370
1466
 
1371
1467
  locusInfo.emitScoped = sinon.stub();
1372
1468
 
1373
- locusInfo.updateSelf(selfClone, []);
1469
+ locusInfo.updateSelf(selfClone);
1374
1470
 
1375
1471
  assert.calledWith(
1376
1472
  locusInfo.emitScoped,
@@ -1384,12 +1480,12 @@ describe('plugin-meetings', () => {
1384
1480
  });
1385
1481
 
1386
1482
  it('should trigger SELF_ROLES_CHANGED if self roles changed', () => {
1387
- locusInfo.self = self;
1483
+ locusInfo.updateSelf(self);
1388
1484
  locusInfo.emitScoped = sinon.stub();
1389
1485
  const sampleNewSelf = cloneDeep(self);
1390
1486
  sampleNewSelf.controls.role.roles = [{type: 'COHOST', hasRole: true}];
1391
1487
 
1392
- locusInfo.updateSelf(sampleNewSelf, []);
1488
+ locusInfo.updateSelf(sampleNewSelf);
1393
1489
 
1394
1490
  assert.calledWith(
1395
1491
  locusInfo.emitScoped,
@@ -1403,12 +1499,12 @@ describe('plugin-meetings', () => {
1403
1499
  });
1404
1500
 
1405
1501
  it('should not trigger SELF_ROLES_CHANGED if self roles not changed', () => {
1406
- locusInfo.self = self;
1502
+ locusInfo.updateSelf(self);
1407
1503
  locusInfo.emitScoped = sinon.stub();
1408
1504
  const sampleNewSelf = cloneDeep(self);
1409
1505
  sampleNewSelf.controls.role.roles = [{type: 'PRESENTER', hasRole: true}];
1410
1506
 
1411
- locusInfo.updateSelf(sampleNewSelf, []);
1507
+ locusInfo.updateSelf(sampleNewSelf);
1412
1508
 
1413
1509
  assert.neverCalledWith(
1414
1510
  locusInfo.emitScoped,
@@ -1422,12 +1518,12 @@ describe('plugin-meetings', () => {
1422
1518
  });
1423
1519
 
1424
1520
  it('should trigger SELF_MEETING_INTERPRETATION_CHANGED if self interpretation info changed', () => {
1425
- locusInfo.self = self;
1521
+ locusInfo.updateSelf(self);
1426
1522
  locusInfo.emitScoped = sinon.stub();
1427
1523
  const sampleNewSelf = cloneDeep(self);
1428
1524
  sampleNewSelf.controls.interpretation.targetLanguage = 'it';
1429
1525
 
1430
- locusInfo.updateSelf(sampleNewSelf, []);
1526
+ locusInfo.updateSelf(sampleNewSelf);
1431
1527
 
1432
1528
  assert.calledWith(
1433
1529
  locusInfo.emitScoped,
@@ -1444,12 +1540,12 @@ describe('plugin-meetings', () => {
1444
1540
  });
1445
1541
 
1446
1542
  it('should not trigger SELF_MEETING_INTERPRETATION_CHANGED if self interpretation info not changed', () => {
1447
- locusInfo.self = self;
1543
+ locusInfo.updateSelf(self);
1448
1544
  locusInfo.emitScoped = sinon.stub();
1449
1545
  const sampleNewSelf = cloneDeep(self);
1450
1546
  sampleNewSelf.controls.interpretation.targetLanguage = 'cn'; // same with previous one
1451
1547
 
1452
- locusInfo.updateSelf(sampleNewSelf, []);
1548
+ locusInfo.updateSelf(sampleNewSelf);
1453
1549
 
1454
1550
  assert.neverCalledWith(
1455
1551
  locusInfo.emitScoped,
@@ -1466,12 +1562,12 @@ describe('plugin-meetings', () => {
1466
1562
  });
1467
1563
 
1468
1564
  it('should not trigger any events if controls is undefined', () => {
1469
- locusInfo.self = self;
1565
+ locusInfo.updateSelf(self);
1470
1566
  locusInfo.emitScoped = sinon.stub();
1471
1567
  const newSelf = cloneDeep(self);
1472
1568
  newSelf.controls = undefined;
1473
1569
 
1474
- locusInfo.updateSelf(newSelf, []);
1570
+ locusInfo.updateSelf(newSelf);
1475
1571
 
1476
1572
  const eventsSet = new Set([
1477
1573
  LOCUSINFO.EVENTS.CONTROLS_MEETING_LAYOUT_UPDATED,
@@ -1488,6 +1584,31 @@ describe('plugin-meetings', () => {
1488
1584
  assert.isFalse(eventsSet.has(eventName));
1489
1585
  });
1490
1586
  });
1587
+
1588
+ it('calls getSelves with correct parameters', () => {
1589
+ const getSelvesStub = sinon.stub(SelfUtils, 'getSelves').returns({
1590
+ current: {},
1591
+ previous: {},
1592
+ updates: {},
1593
+ });
1594
+
1595
+ locusInfo.webex.internal.device.url = self.deviceUrl;
1596
+ locusInfo.participants = [{id: '1'}, {id: '2'}];
1597
+ locusInfo.parsedLocus.self = {id: 'fake parsed locus self id'};
1598
+
1599
+ const parsedLocusSelf = locusInfo.parsedLocus.self; // need to store it before it's updated in updateSelf
1600
+ locusInfo.updateSelf(self);
1601
+
1602
+ assert.calledWith(
1603
+ getSelvesStub,
1604
+ parsedLocusSelf,
1605
+ self,
1606
+ locusInfo.webex.internal.device.url,
1607
+ locusInfo.participants
1608
+ );
1609
+
1610
+ getSelvesStub.restore();
1611
+ });
1491
1612
  });
1492
1613
 
1493
1614
  describe('#updateMeetingInfo', () => {
@@ -1754,11 +1875,11 @@ describe('plugin-meetings', () => {
1754
1875
  });
1755
1876
 
1756
1877
  it('should update media shares and emit LOCUS_INFO_UPDATE_MEDIA_SHARES when mediaShares change', () => {
1757
- const initialMediaShares = { audio: true, video: false };
1758
- const newMediaShares = { audio: false, video: true };
1878
+ const initialMediaShares = {audio: true, video: false};
1879
+ const newMediaShares = {audio: false, video: true};
1759
1880
 
1760
1881
  locusInfo.mediaShares = initialMediaShares;
1761
- locusInfo.parsedLocus = { mediaShares: null };
1882
+ locusInfo.parsedLocus = {mediaShares: null};
1762
1883
 
1763
1884
  const parsedMediaShares = {
1764
1885
  current: newMediaShares,
@@ -1795,9 +1916,9 @@ describe('plugin-meetings', () => {
1795
1916
  });
1796
1917
 
1797
1918
  it('should force update media shares and emit LOCUS_INFO_UPDATE_MEDIA_SHARES even if shares are the same', () => {
1798
- const initialMediaShares = { audio: true, video: false };
1919
+ const initialMediaShares = {audio: true, video: false};
1799
1920
  locusInfo.mediaShares = initialMediaShares;
1800
- locusInfo.parsedLocus = { mediaShares: null };
1921
+ locusInfo.parsedLocus = {mediaShares: null};
1801
1922
 
1802
1923
  const parsedMediaShares = {
1803
1924
  current: initialMediaShares,
@@ -1829,7 +1950,7 @@ describe('plugin-meetings', () => {
1829
1950
  });
1830
1951
 
1831
1952
  it('should not emit LOCUS_INFO_UPDATE_MEDIA_SHARES if mediaShares do not change and forceUpdate is false', () => {
1832
- const initialMediaShares = { audio: true, video: false };
1953
+ const initialMediaShares = {audio: true, video: false};
1833
1954
  locusInfo.mediaShares = initialMediaShares;
1834
1955
 
1835
1956
  // Call the function with the same mediaShares and forceUpdate = false
@@ -1843,11 +1964,11 @@ describe('plugin-meetings', () => {
1843
1964
  });
1844
1965
 
1845
1966
  it('should update internal state correctly when mediaShares are updated', () => {
1846
- const initialMediaShares = { audio: true, video: false };
1847
- const newMediaShares = { audio: false, video: true };
1967
+ const initialMediaShares = {audio: true, video: false};
1968
+ const newMediaShares = {audio: false, video: true};
1848
1969
 
1849
1970
  locusInfo.mediaShares = initialMediaShares;
1850
- locusInfo.parsedLocus = { mediaShares: null };
1971
+ locusInfo.parsedLocus = {mediaShares: null};
1851
1972
 
1852
1973
  const parsedMediaShares = {
1853
1974
  current: newMediaShares,
@@ -2386,6 +2507,21 @@ describe('plugin-meetings', () => {
2386
2507
  locusInfo.onDeltaLocus(fakeLocus);
2387
2508
  assert.calledWith(locusInfo.updateParticipants, {}, true);
2388
2509
  });
2510
+
2511
+ it('onDeltaLocus merges delta participants with existing participants', () => {
2512
+ const FAKE_DELTA_PARTICIPANTS = [
2513
+ {id: '1111'}, {id: '2222'}
2514
+ ]
2515
+ fakeLocus.participants = FAKE_DELTA_PARTICIPANTS;
2516
+
2517
+ sinon.spy(locusInfo, 'mergeParticipants');
2518
+ locusInfo.updateParticipants = sinon.stub();
2519
+ const existingParticipants = locusInfo.participants;
2520
+
2521
+ locusInfo.onDeltaLocus(fakeLocus);
2522
+ assert.calledOnceWithExactly(locusInfo.mergeParticipants, existingParticipants, FAKE_DELTA_PARTICIPANTS);
2523
+ assert.calledWith(locusInfo.updateParticipants, FAKE_DELTA_PARTICIPANTS, false);
2524
+ });
2389
2525
  });
2390
2526
 
2391
2527
  describe('#updateLocusCache', () => {