@webex/plugin-meetings 3.0.0 → 3.1.0-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 (272) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
  4. package/dist/common/errors/reconnection-not-started.js.map +1 -0
  5. package/dist/config.js +2 -1
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +18 -6
  8. package/dist/constants.js.map +1 -1
  9. package/dist/index.js +86 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/interpretation/index.js +16 -2
  12. package/dist/interpretation/index.js.map +1 -1
  13. package/dist/interpretation/siLanguage.js +1 -1
  14. package/dist/locus-info/controlsUtils.js +7 -1
  15. package/dist/locus-info/controlsUtils.js.map +1 -1
  16. package/dist/locus-info/index.js +10 -0
  17. package/dist/locus-info/index.js.map +1 -1
  18. package/dist/locus-info/mediaSharesUtils.js +15 -1
  19. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  20. package/dist/locus-info/selfUtils.js +5 -0
  21. package/dist/locus-info/selfUtils.js.map +1 -1
  22. package/dist/media/MediaConnectionAwaiter.js +163 -0
  23. package/dist/media/MediaConnectionAwaiter.js.map +1 -0
  24. package/dist/media/index.js +4 -1
  25. package/dist/media/index.js.map +1 -1
  26. package/dist/media/properties.js +106 -81
  27. package/dist/media/properties.js.map +1 -1
  28. package/dist/meeting/in-meeting-actions.js +6 -0
  29. package/dist/meeting/in-meeting-actions.js.map +1 -1
  30. package/dist/meeting/index.js +1010 -753
  31. package/dist/meeting/index.js.map +1 -1
  32. package/dist/meeting/muteState.js +37 -25
  33. package/dist/meeting/muteState.js.map +1 -1
  34. package/dist/meeting/request.js +32 -23
  35. package/dist/meeting/request.js.map +1 -1
  36. package/dist/meeting/util.js +10 -0
  37. package/dist/meeting/util.js.map +1 -1
  38. package/dist/meeting-info/util.js +304 -267
  39. package/dist/meeting-info/util.js.map +1 -1
  40. package/dist/meeting-info/utilv2.js +334 -295
  41. package/dist/meeting-info/utilv2.js.map +1 -1
  42. package/dist/meetings/index.js +21 -23
  43. package/dist/meetings/index.js.map +1 -1
  44. package/dist/multistream/mediaRequestManager.js +1 -1
  45. package/dist/multistream/mediaRequestManager.js.map +1 -1
  46. package/dist/multistream/remoteMediaGroup.js +16 -2
  47. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  48. package/dist/multistream/remoteMediaManager.js +179 -65
  49. package/dist/multistream/remoteMediaManager.js.map +1 -1
  50. package/dist/multistream/sendSlotManager.js +22 -0
  51. package/dist/multistream/sendSlotManager.js.map +1 -1
  52. package/dist/reachability/clusterReachability.js +29 -15
  53. package/dist/reachability/clusterReachability.js.map +1 -1
  54. package/dist/reachability/index.js +18 -2
  55. package/dist/reachability/index.js.map +1 -1
  56. package/dist/reachability/request.js +12 -10
  57. package/dist/reachability/request.js.map +1 -1
  58. package/dist/reachability/util.js +19 -0
  59. package/dist/reachability/util.js.map +1 -1
  60. package/dist/reconnection-manager/index.js +140 -110
  61. package/dist/reconnection-manager/index.js.map +1 -1
  62. package/dist/roap/index.js +15 -0
  63. package/dist/roap/index.js.map +1 -1
  64. package/dist/roap/request.js +3 -3
  65. package/dist/roap/request.js.map +1 -1
  66. package/dist/roap/turnDiscovery.js +307 -126
  67. package/dist/roap/turnDiscovery.js.map +1 -1
  68. package/dist/statsAnalyzer/index.js +57 -30
  69. package/dist/statsAnalyzer/index.js.map +1 -1
  70. package/dist/statsAnalyzer/mqaUtil.js +3 -0
  71. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  72. package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
  73. package/dist/{config.d.ts → types/config.d.ts} +1 -0
  74. package/dist/{constants.d.ts → types/constants.d.ts} +15 -6
  75. package/dist/types/index.d.ts +19 -0
  76. package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
  77. package/dist/{media → types/media}/properties.d.ts +26 -2
  78. package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
  79. package/dist/{meeting → types/meeting}/index.d.ts +29 -12
  80. package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
  81. package/dist/{meeting → types/meeting}/request.d.ts +3 -0
  82. package/dist/{meeting → types/meeting}/util.d.ts +3 -0
  83. package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
  84. package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
  85. package/dist/types/meeting-info/util.d.ts +49 -0
  86. package/dist/types/meeting-info/utilv2.d.ts +65 -0
  87. package/dist/{meetings → types/meetings}/index.d.ts +9 -16
  88. package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
  89. package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
  90. package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
  91. package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
  92. package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
  93. package/dist/{reachability → types/reachability}/index.d.ts +4 -0
  94. package/dist/{reachability → types/reachability}/util.d.ts +7 -0
  95. package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
  96. package/dist/{roap → types/roap}/index.d.ts +10 -2
  97. package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
  98. package/dist/webinar/index.js +1 -1
  99. package/package.json +23 -23
  100. package/src/common/errors/reconnection-not-started.ts +25 -0
  101. package/src/config.ts +1 -0
  102. package/src/constants.ts +18 -6
  103. package/src/index.ts +31 -0
  104. package/src/interpretation/index.ts +18 -1
  105. package/src/locus-info/controlsUtils.ts +11 -0
  106. package/src/locus-info/index.ts +16 -0
  107. package/src/locus-info/mediaSharesUtils.ts +16 -0
  108. package/src/locus-info/selfUtils.ts +5 -0
  109. package/src/media/MediaConnectionAwaiter.ts +174 -0
  110. package/src/media/index.ts +3 -1
  111. package/src/media/properties.ts +73 -46
  112. package/src/meeting/in-meeting-actions.ts +12 -0
  113. package/src/meeting/index.ts +389 -180
  114. package/src/meeting/muteState.ts +34 -20
  115. package/src/meeting/request.ts +18 -2
  116. package/src/meeting/util.ts +9 -0
  117. package/src/meeting-info/util.ts +241 -233
  118. package/src/meeting-info/utilv2.ts +250 -243
  119. package/src/meetings/index.ts +20 -24
  120. package/src/multistream/mediaRequestManager.ts +4 -1
  121. package/src/multistream/remoteMediaGroup.ts +19 -0
  122. package/src/multistream/remoteMediaManager.ts +101 -16
  123. package/src/multistream/sendSlotManager.ts +28 -0
  124. package/src/reachability/clusterReachability.ts +20 -5
  125. package/src/reachability/index.ts +24 -1
  126. package/src/reachability/request.ts +15 -11
  127. package/src/reachability/util.ts +21 -0
  128. package/src/reconnection-manager/index.ts +129 -106
  129. package/src/roap/index.ts +25 -3
  130. package/src/roap/request.ts +3 -3
  131. package/src/roap/turnDiscovery.ts +244 -78
  132. package/src/statsAnalyzer/index.ts +67 -27
  133. package/src/statsAnalyzer/mqaUtil.ts +5 -0
  134. package/test/integration/spec/journey.js +14 -14
  135. package/test/integration/spec/space-meeting.js +1 -1
  136. package/test/unit/spec/interpretation/index.ts +39 -3
  137. package/test/unit/spec/locus-info/controlsUtils.js +20 -0
  138. package/test/unit/spec/locus-info/index.js +49 -19
  139. package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
  140. package/test/unit/spec/locus-info/selfUtils.js +42 -12
  141. package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
  142. package/test/unit/spec/media/index.ts +89 -78
  143. package/test/unit/spec/media/properties.ts +160 -209
  144. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  145. package/test/unit/spec/meeting/index.js +833 -205
  146. package/test/unit/spec/meeting/muteState.js +219 -67
  147. package/test/unit/spec/meeting/request.js +21 -0
  148. package/test/unit/spec/meeting/utils.js +9 -1
  149. package/test/unit/spec/meeting-info/utilv2.js +6 -0
  150. package/test/unit/spec/meetings/index.js +41 -26
  151. package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
  152. package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
  153. package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
  154. package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
  155. package/test/unit/spec/reachability/clusterReachability.ts +86 -22
  156. package/test/unit/spec/reachability/index.ts +197 -60
  157. package/test/unit/spec/reachability/request.js +15 -7
  158. package/test/unit/spec/reachability/util.ts +32 -2
  159. package/test/unit/spec/reconnection-manager/index.js +155 -39
  160. package/test/unit/spec/roap/index.ts +61 -6
  161. package/test/unit/spec/roap/turnDiscovery.ts +298 -16
  162. package/test/unit/spec/stats-analyzer/index.js +190 -0
  163. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  164. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  165. package/dist/index.d.ts +0 -7
  166. package/dist/meeting-info/util.d.ts +0 -2
  167. package/dist/meeting-info/utilv2.d.ts +0 -2
  168. package/dist/member/member.types.d.ts +0 -11
  169. package/dist/member/member.types.js +0 -17
  170. package/dist/member/member.types.js.map +0 -1
  171. package/src/common/errors/reconnection-in-progress.ts +0 -8
  172. package/src/member/member.types.ts +0 -13
  173. /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
  174. /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
  175. /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
  176. /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
  177. /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
  178. /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
  179. /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
  180. /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
  181. /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
  182. /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
  183. /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
  184. /package/dist/{common → types/common}/collection.d.ts +0 -0
  185. /package/dist/{common → types/common}/config.d.ts +0 -0
  186. /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
  187. /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
  188. /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
  189. /package/dist/{common → types/common}/errors/media.d.ts +0 -0
  190. /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
  191. /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
  192. /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
  193. /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
  194. /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
  195. /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
  196. /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
  197. /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
  198. /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
  199. /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
  200. /package/dist/{common → types/common}/events/events.d.ts +0 -0
  201. /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
  202. /package/dist/{common → types/common}/events/util.d.ts +0 -0
  203. /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
  204. /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
  205. /package/dist/{common → types/common}/logs/request.d.ts +0 -0
  206. /package/dist/{common → types/common}/queue.d.ts +0 -0
  207. /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
  208. /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
  209. /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
  210. /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
  211. /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
  212. /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
  213. /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
  214. /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
  215. /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
  216. /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
  217. /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
  218. /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
  219. /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
  220. /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
  221. /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
  222. /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
  223. /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
  224. /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
  225. /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
  226. /package/dist/{media → types/media}/index.d.ts +0 -0
  227. /package/dist/{media → types/media}/util.d.ts +0 -0
  228. /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
  229. /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
  230. /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
  231. /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
  232. /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
  233. /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
  234. /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
  235. /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
  236. /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
  237. /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
  238. /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
  239. /package/dist/{member → types/member}/index.d.ts +0 -0
  240. /package/dist/{member → types/member}/types.d.ts +0 -0
  241. /package/dist/{member → types/member}/util.d.ts +0 -0
  242. /package/dist/{members → types/members}/collection.d.ts +0 -0
  243. /package/dist/{members → types/members}/index.d.ts +0 -0
  244. /package/dist/{members → types/members}/request.d.ts +0 -0
  245. /package/dist/{members → types/members}/types.d.ts +0 -0
  246. /package/dist/{members → types/members}/util.d.ts +0 -0
  247. /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
  248. /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
  249. /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
  250. /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
  251. /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
  252. /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
  253. /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
  254. /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
  255. /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
  256. /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
  257. /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
  258. /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
  259. /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
  260. /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
  261. /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
  262. /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
  263. /package/dist/{roap → types/roap}/request.d.ts +0 -0
  264. /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
  265. /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
  266. /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
  267. /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
  268. /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
  269. /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
  270. /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
  271. /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
  272. /package/test/unit/spec/locus-info/{lib/selfConstant.js → selfConstant.js} +0 -0
@@ -432,11 +432,11 @@ skipInNode(describe)('plugin-meetings', () => {
432
432
  {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
433
433
  ]);
434
434
 
435
- localStreams.alice.microphone.setMuted(true);
435
+ localStreams.alice.microphone.setUserMuted(true);
436
436
 
437
437
  await membersUpdate;
438
438
 
439
- assert.equal(localStreams.alice.microphone.muted, true);
439
+ assert.equal(localStreams.alice.microphone.userMuted, true);
440
440
  });
441
441
 
442
442
  it('alice Audio unMute ', async () => {
@@ -451,11 +451,11 @@ skipInNode(describe)('plugin-meetings', () => {
451
451
  {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
452
452
  ]);
453
453
 
454
- localStreams.alice.microphone.setMuted(false);
454
+ localStreams.alice.microphone.setUserMuted(false);
455
455
 
456
456
  await membersUpdate;
457
457
 
458
- assert.equal(localStreams.alice.microphone.muted, false);
458
+ assert.equal(localStreams.alice.microphone.userMuted, false);
459
459
  });
460
460
 
461
461
  it('alice video mute', async () => {
@@ -470,11 +470,11 @@ skipInNode(describe)('plugin-meetings', () => {
470
470
  {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
471
471
  ]);
472
472
 
473
- localStreams.alice.camera.setMuted(true);
473
+ localStreams.alice.camera.setUserMuted(true);
474
474
 
475
475
  await membersUpdate;
476
476
 
477
- assert.equal(localStreams.alice.camera.muted, true);
477
+ assert.equal(localStreams.alice.camera.userMuted, true);
478
478
  });
479
479
 
480
480
  it('alice video unmute', async () => {
@@ -489,11 +489,11 @@ skipInNode(describe)('plugin-meetings', () => {
489
489
  {scope: bob.meeting.members, event: 'members:update', match: checkEvent},
490
490
  ]);
491
491
 
492
- localStreams.alice.camera.setMuted(false);
492
+ localStreams.alice.camera.setUserMuted(false);
493
493
 
494
494
  await membersUpdate;
495
495
 
496
- assert.equal(localStreams.alice.camera.muted, false);
496
+ assert.equal(localStreams.alice.camera.userMuted, false);
497
497
  });
498
498
 
499
499
  it('alice update Audio', async () => {
@@ -574,11 +574,11 @@ skipInNode(describe)('plugin-meetings', () => {
574
574
  ]);
575
575
 
576
576
  // first bob mutes himself
577
- localStreams.bob.microphone.setMuted(true);
577
+ localStreams.bob.microphone.setUserMuted(true);
578
578
 
579
579
  await membersUpdate;
580
580
 
581
- assert.equal(localStreams.bob.microphone.muted, true);
581
+ assert.equal(localStreams.bob.microphone.userMuted, true);
582
582
 
583
583
  // now alice tries to unmmute bob
584
584
  await testUtils.delayedPromise(alice.meeting.mute(bob.meeting.members.selfId, false))
@@ -593,7 +593,7 @@ skipInNode(describe)('plugin-meetings', () => {
593
593
  assert.fail('bob received unexpected meeting:self:unmutedByOthers event');
594
594
  })
595
595
  .catch(() => {
596
- assert.equal(localStreams.bob.microphone.muted, true);
596
+ assert.equal(localStreams.bob.microphone.userMuted, true);
597
597
  });
598
598
  });
599
599
 
@@ -607,11 +607,11 @@ skipInNode(describe)('plugin-meetings', () => {
607
607
  {scope: alice.meeting.members, event: 'members:update', match: checkEvent},
608
608
  ]);
609
609
 
610
- localStreams.bob.microphone.setMuted(false);
610
+ localStreams.bob.microphone.setUserMuted(false);
611
611
 
612
612
  await membersUpdate;
613
613
 
614
- assert.equal(localStreams.bob.microphone.muted, false);
614
+ assert.equal(localStreams.bob.microphone.userMuted, false);
615
615
  });
616
616
 
617
617
  it('alice shares the screen with highFrameRate', async () => {
@@ -871,7 +871,7 @@ skipInNode(describe)('plugin-meetings', () => {
871
871
  assert.equal(bob.meeting.shareStatus, 'whiteboard_share_active');
872
872
  }));
873
873
 
874
- it('alice adds chris as guest to 1:1 meeting', async() =>
874
+ it('alice adds chris as guest to 1:1 meeting', () =>
875
875
  Promise.all([
876
876
  testUtils.delayedPromise(alice.meeting.invite({emailAddress: chris.emailAddress})),
877
877
  testUtils.waitForEvents([
@@ -34,7 +34,7 @@ skipInNode(describe)('plugin-meetings', () => {
34
34
  describe('space-meeting', () => {
35
35
  let space = null;
36
36
 
37
- before(async () =>
37
+ before(() =>
38
38
  webexTestUsers
39
39
  .generateTestUsers({
40
40
  count: 4,
@@ -1,6 +1,7 @@
1
1
  import {assert, expect} from '@webex/test-helper-chai';
2
2
  import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
3
3
  import SimultaneousInterpretation from '@webex/plugin-meetings/src/interpretation';
4
+ import SILanguage from '@webex/plugin-meetings/src/interpretation/siLanguage';
4
5
  import MockWebex from '@webex/test-helper-mock-webex';
5
6
  import sinon from 'sinon';
6
7
 
@@ -123,22 +124,57 @@ describe('plugin-meetings', () => {
123
124
  receiveLanguage: 'en',
124
125
  order: 0,
125
126
  }, selfParticipantId: '123'};
126
- interpretation.updateSelfInterpretation(sampleData);
127
+ assert.equal(interpretation.updateSelfInterpretation(sampleData), true);
127
128
  assert.equal(interpretation.originalLanguage, 'en');
128
129
  assert.equal(interpretation.sourceLanguage, 'en');
129
130
  assert.equal(interpretation.targetLanguage, 'zh');
130
131
  assert.equal(interpretation.receiveLanguage, 'en');
131
132
  assert.equal(interpretation.isActive, true);
132
133
  assert.equal(interpretation.order, 0);
134
+ assert.equal(interpretation.selfIsInterpreter, true);
133
135
 
134
136
  sampleData.interpretation = {
135
137
  originalLanguage: 'en',
138
+ targetLanguage: 'zh',
136
139
  order: 0,
137
140
  };
138
- interpretation.updateSelfInterpretation(sampleData);
141
+ assert.equal(interpretation.updateSelfInterpretation(sampleData), false);
139
142
  assert.equal(interpretation.sourceLanguage, undefined);
140
- assert.equal(interpretation.targetLanguage, undefined);
143
+ assert.equal(interpretation.targetLanguage, 'zh');
141
144
  assert.equal(interpretation.receiveLanguage, undefined);
145
+ assert.equal(interpretation.selfIsInterpreter, true);
146
+
147
+ sampleData.interpretation = {
148
+ order: 0,
149
+ };
150
+ assert.equal(interpretation.updateSelfInterpretation(sampleData), true);
151
+ assert.equal(interpretation.originalLanguage, undefined);
152
+ assert.equal(interpretation.targetLanguage, undefined);
153
+ assert.equal(interpretation.selfIsInterpreter, false);
154
+ });
155
+ });
156
+
157
+ describe('#getTargetLanguageCode', () => {
158
+ it('get target language id if self is interpreter', () => {
159
+ interpretation.siLanguages.set([{
160
+ languageCode: 24,
161
+ languageName: "fr"
162
+ },
163
+ {
164
+ languageCode: 20,
165
+ languageName: "en"
166
+ }]);
167
+ interpretation.selfIsInterpreter = true;
168
+ interpretation.targetLanguage = 'fr';
169
+
170
+ assert.equal(interpretation.getTargetLanguageCode(), 24);
171
+
172
+ interpretation.targetLanguage = 'en';
173
+ assert.equal(interpretation.getTargetLanguageCode(), 20);
174
+
175
+ interpretation.selfIsInterpreter = false;
176
+ assert.equal(interpretation.getTargetLanguageCode(), 0);
177
+
142
178
  });
143
179
  });
144
180
 
@@ -269,6 +269,26 @@ describe('plugin-meetings', () => {
269
269
  assert.equal(updates.hasInterpretationChanged, false);
270
270
  });
271
271
 
272
+ it('returns hasManualCaptionChanged = true when it has changed', () => {
273
+ const newControls = {
274
+ manualCaptionControl: {enabled: false},
275
+ };
276
+
277
+ const {updates} = ControlsUtils.getControls({manualCaptionControl: {enabled: true}}, newControls);
278
+
279
+ assert.equal(updates.hasManualCaptionChanged, true);
280
+ });
281
+
282
+ it('returns hasManualCaptionChanged = false when it has not changed', () => {
283
+ const newControls = {
284
+ manualCaptionControl: {enabled: true},
285
+ };
286
+
287
+ const {updates} = ControlsUtils.getControls({manualCaptionControl: {enabled: true}}, newControls);
288
+
289
+ assert.equal(updates.hasManualCaptionChanged, false);
290
+ });
291
+
272
292
  describe('videoEnabled', () => {
273
293
  const testVideoEnabled = (oldControls, newControls, updatedProperty) => {
274
294
  const result = ControlsUtils.getControls(oldControls, newControls);
@@ -24,7 +24,7 @@ import {
24
24
  _MEETING_,
25
25
  } from '../../../../src/constants';
26
26
 
27
- import {self, selfWithInactivity} from './lib/selfConstant';
27
+ import {self, selfWithInactivity} from './selfConstant';
28
28
 
29
29
  describe('plugin-meetings', () => {
30
30
  describe('LocusInfo index', () => {
@@ -467,6 +467,27 @@ describe('plugin-meetings', () => {
467
467
  );
468
468
  });
469
469
 
470
+ it('should update the manual caption state', () => {
471
+ locusInfo.emitScoped = sinon.stub();
472
+ locusInfo.controls = {
473
+ manualCaptionControl: {enabled: false},
474
+ };
475
+
476
+ locusInfo.updateControls({manualCaptionControl: { enabled: true, }});
477
+
478
+ assert.calledWith(
479
+ locusInfo.emitScoped,
480
+ {
481
+ file: 'locus-info',
482
+ function: 'updateControls',
483
+ },
484
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_MANUAL_CAPTION_UPDATED,
485
+ {
486
+ enabled: true,
487
+ }
488
+ );
489
+ });
490
+
470
491
  it('should update the meetingContainerURL from null', () => {
471
492
  locusInfo.controls = {
472
493
  meetingContainer: {meetingContainerUrl: null},
@@ -1385,7 +1406,7 @@ describe('plugin-meetings', () => {
1385
1406
  function: 'updateMeetingInfo',
1386
1407
  },
1387
1408
  LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
1388
- payload
1409
+ payload,
1389
1410
  ];
1390
1411
 
1391
1412
  if (expected) {
@@ -1404,7 +1425,7 @@ describe('plugin-meetings', () => {
1404
1425
  function: 'updateMeetingInfo',
1405
1426
  },
1406
1427
  LOCUSINFO.EVENTS.MEETING_INFO_UPDATED,
1407
- payload
1428
+ payload,
1408
1429
  ];
1409
1430
 
1410
1431
  if (expected) {
@@ -1426,8 +1447,7 @@ describe('plugin-meetings', () => {
1426
1447
  */
1427
1448
  sinon.stub(locusInfo, 'emitScoped').callsFake(() => {
1428
1449
  assert.deepEqual(mockMeeting, expectedMeeting);
1429
- })
1430
-
1450
+ });
1431
1451
 
1432
1452
  // set the info initially as locusInfo.info starts as undefined
1433
1453
  expectedMeeting = {
@@ -1907,7 +1927,7 @@ describe('plugin-meetings', () => {
1907
1927
  locusInfo.locusParser.workingCopy = {
1908
1928
  syncUrl: 'current sync url',
1909
1929
  };
1910
-
1930
+
1911
1931
  locusInfo.applyLocusDeltaData(LOCUS_URL_CHANGED, fakeLocus, meeting);
1912
1932
  assert.calledOnceWithExactly(meeting.meetingRequest.getLocusDTO, {url: 'current sync url'});
1913
1933
  });
@@ -1970,8 +1990,12 @@ describe('plugin-meetings', () => {
1970
1990
  }).then(() => {
1971
1991
  assert.calledTwice(meeting.meetingRequest.getLocusDTO);
1972
1992
 
1973
- assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [{url: 'deltaSyncUrl'}]);
1974
- assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [{url: 'fullSyncUrl'}]);
1993
+ assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
1994
+ {url: 'deltaSyncUrl'},
1995
+ ]);
1996
+ assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
1997
+ {url: 'fullSyncUrl'},
1998
+ ]);
1975
1999
 
1976
2000
  assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
1977
2001
  correlationId: meeting.correlationId,
@@ -1999,8 +2023,12 @@ describe('plugin-meetings', () => {
1999
2023
  }).then(() => {
2000
2024
  assert.calledTwice(meeting.meetingRequest.getLocusDTO);
2001
2025
 
2002
- assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [{url: 'deltaSyncUrl'}]);
2003
- assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [{url: 'fullSyncUrl'}]);
2026
+ assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[0].args, [
2027
+ {url: 'deltaSyncUrl'},
2028
+ ]);
2029
+ assert.deepEqual(meeting.meetingRequest.getLocusDTO.getCalls()[1].args, [
2030
+ {url: 'fullSyncUrl'},
2031
+ ]);
2004
2032
 
2005
2033
  assert.calledWith(sendBehavioralMetricStub, 'js_sdk_locus_delta_sync_failed', {
2006
2034
  correlationId: meeting.correlationId,
@@ -2084,7 +2112,7 @@ describe('plugin-meetings', () => {
2084
2112
 
2085
2113
  locusInfo.clearMainSessionLocusCache = sinon.stub();
2086
2114
  locusInfo.getTheLocusToUpdate(newLocus);
2087
- assert.notCalled(locusInfo.clearMainSessionLocusCache)
2115
+ assert.notCalled(locusInfo.clearMainSessionLocusCache);
2088
2116
  });
2089
2117
 
2090
2118
  it('return the new locus if return to main session but no cache and do not clear main session cache', () => {
@@ -2106,7 +2134,7 @@ describe('plugin-meetings', () => {
2106
2134
 
2107
2135
  locusInfo.clearMainSessionLocusCache = sinon.stub();
2108
2136
  locusInfo.getTheLocusToUpdate(newLocus);
2109
- assert.notCalled(locusInfo.clearMainSessionLocusCache)
2137
+ assert.notCalled(locusInfo.clearMainSessionLocusCache);
2110
2138
  });
2111
2139
 
2112
2140
  it('return the new locus if not return to main session and clear main session cache', () => {
@@ -2116,9 +2144,9 @@ describe('plugin-meetings', () => {
2116
2144
  sessionType: 'MAIN',
2117
2145
  },
2118
2146
  },
2119
- self: {removed: true}
2147
+ self: {removed: true},
2120
2148
  };
2121
- locusInfo.fullState = {state: 'ACTIVE'}
2149
+ locusInfo.fullState = {state: 'ACTIVE'};
2122
2150
  locusInfo.controls = {
2123
2151
  breakout: {
2124
2152
  sessionType: 'MAIN',
@@ -2134,7 +2162,7 @@ describe('plugin-meetings', () => {
2134
2162
 
2135
2163
  locusInfo.clearMainSessionLocusCache = sinon.stub();
2136
2164
  const result = locusInfo.getTheLocusToUpdate(newLocus);
2137
- assert.calledOnce(locusInfo.clearMainSessionLocusCache)
2165
+ assert.calledOnce(locusInfo.clearMainSessionLocusCache);
2138
2166
 
2139
2167
  assert.deepEqual(result, newLocus);
2140
2168
  });
@@ -2146,9 +2174,9 @@ describe('plugin-meetings', () => {
2146
2174
  sessionType: 'MAIN',
2147
2175
  },
2148
2176
  },
2149
- self: {removed: undefined}
2177
+ self: {removed: undefined},
2150
2178
  };
2151
- locusInfo.fullState = {state: 'ACTIVE'}
2179
+ locusInfo.fullState = {state: 'ACTIVE'};
2152
2180
  locusInfo.controls = {
2153
2181
  breakout: {
2154
2182
  sessionType: 'MAIN',
@@ -2164,7 +2192,7 @@ describe('plugin-meetings', () => {
2164
2192
 
2165
2193
  locusInfo.clearMainSessionLocusCache = sinon.stub();
2166
2194
  locusInfo.getTheLocusToUpdate(newLocus);
2167
- assert.notCalled(locusInfo.clearMainSessionLocusCache)
2195
+ assert.notCalled(locusInfo.clearMainSessionLocusCache);
2168
2196
  });
2169
2197
  });
2170
2198
 
@@ -2611,7 +2639,9 @@ describe('plugin-meetings', () => {
2611
2639
  // send an out-of-order delta
2612
2640
  locusInfo.handleLocusDelta(oooDelta, mockMeeting);
2613
2641
 
2614
- assert.calledOnceWithExactly(sendBehavioralMetricStub, 'js_sdk_locus_delta_ooo', { stack: sinon.match.any})
2642
+ assert.calledOnceWithExactly(sendBehavioralMetricStub, 'js_sdk_locus_delta_ooo', {
2643
+ stack: sinon.match.any,
2644
+ });
2615
2645
 
2616
2646
  await clock.tickAsync(12499);
2617
2647
  await testUtils.flushPromises();
@@ -20,6 +20,15 @@ describe('getContentUrl', () => {
20
20
  });
21
21
  });
22
22
 
23
+ describe('getContentResourceType', () => {
24
+ it('getContentResourceType return correct resourceType value', () => {
25
+ const stub = Sinon.stub(MediaSharesUtils, 'extractContent').returns({resourceType:'resourceType'});
26
+ const resourceType = MediaSharesUtils.getContentResourceType();
27
+ assert.equal(resourceType,'resourceType');
28
+ stub.restore();
29
+ });
30
+ });
31
+
23
32
  describe('getContentBeneficiaryDeviceUrl', () => {
24
33
  it('getContentBeneficiaryDeviceUrl return correct deviceUrl value', () => {
25
34
  const mockContentBeneficiaryDeviceUrl = "https://wdm-a.wbx2.com/wdm/api/v1/devices/e9ffd8a1-1fae-42d1-afbe-013e951f93ab"
@@ -3,7 +3,7 @@ import Sinon from 'sinon';
3
3
  import {cloneDeep} from 'lodash';
4
4
  import SelfUtils from '@webex/plugin-meetings/src/locus-info/selfUtils';
5
5
 
6
- import {self} from './lib/selfConstant';
6
+ import {self} from './selfConstant';
7
7
 
8
8
  describe('plugin-meetings', () => {
9
9
  describe('selfUtils', () => {
@@ -150,8 +150,7 @@ describe('plugin-meetings', () => {
150
150
 
151
151
  it('should return false if no breakouts in current', () => {
152
152
  const current = {
153
- breakoutSessions: {
154
- },
153
+ breakoutSessions: {},
155
154
  };
156
155
  const previous = {
157
156
  breakoutSessions: {
@@ -293,7 +292,7 @@ describe('plugin-meetings', () => {
293
292
  const clonedSelf = cloneDeep(self);
294
293
 
295
294
  clonedSelf.controls.audio.requestedToUnmute = true;
296
- clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z'
295
+ clonedSelf.controls.audio.lastModifiedRequestedToUnmute = '2023-06-16T18:25:04.369Z';
297
296
 
298
297
  const {updates} = SelfUtils.getSelves(self, clonedSelf);
299
298
 
@@ -345,6 +344,41 @@ describe('plugin-meetings', () => {
345
344
  });
346
345
  });
347
346
 
347
+ describe('mutedByOthersChanged', () => {
348
+ it('throws an error if changedSelf is not provided', function() {
349
+ assert.throws(() => SelfUtils.mutedByOthersChanged({}, null), 'New self must be defined to determine if self was muted by others.');
350
+ });
351
+
352
+ it('return false when oldSelf is not defined', function() {
353
+ assert.equal(SelfUtils.mutedByOthersChanged(null, { remoteMuted: false }), false);
354
+ });
355
+
356
+ it('should return true when remoteMuted is true on entry', function() {
357
+ assert.equal(SelfUtils.mutedByOthersChanged(null, { remoteMuted: true }), true);
358
+ });
359
+
360
+ it('should return false when selfIdentity and modifiedBy are the same', function() {
361
+ assert.equal(SelfUtils.mutedByOthersChanged(
362
+ { remoteMuted: false },
363
+ { remoteMuted: true, selfIdentity: 'user1', modifiedBy: 'user1' }
364
+ ), false);
365
+ });
366
+
367
+ it('should return true when remoteMuted values are different', function() {
368
+ assert.equal(SelfUtils.mutedByOthersChanged(
369
+ { remoteMuted: false },
370
+ { remoteMuted: true, selfIdentity: 'user1', modifiedBy: 'user2' }
371
+ ), true);
372
+ });
373
+
374
+ it('should return true when remoteMuted is true and unmuteAllowed has changed', function() {
375
+ assert.equal(SelfUtils.mutedByOthersChanged(
376
+ { remoteMuted: true, unmuteAllowed: false },
377
+ { remoteMuted: true, unmuteAllowed: true, selfIdentity: 'user1', modifiedBy: 'user2' }
378
+ ), true);
379
+ });
380
+ });
381
+
348
382
  describe('videoMutedByOthersChanged', () => {
349
383
  it('returns true if changed', () => {
350
384
  assert.equal(
@@ -371,23 +405,18 @@ describe('plugin-meetings', () => {
371
405
  const clonedSelf = cloneDeep(self);
372
406
 
373
407
  it('get breakoutMoveId works', () => {
374
-
375
408
  assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(self, deviceId), breakoutMoveId);
376
-
377
409
  });
378
410
 
379
411
  it('replaces is empty', () => {
380
-
381
412
  clonedSelf.devices[0].replaces = undefined;
382
413
  assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(clonedSelf, deviceId), null);
383
-
384
414
  });
385
415
 
386
416
  it('no self or self.devices is not array', () => {
387
-
388
417
  assert.deepEqual(SelfUtils.getReplacedBreakoutMoveId(undefined, deviceId), null);
389
418
 
390
- clonedSelf.devices = {
419
+ clonedSelf.devices = {
391
420
  url: 'https://wdm-a.wbx2.com/wdm/api/v1/devices/20eabde3-4254-48da-9a24',
392
421
  deviceType: 'WEB',
393
422
  mediaSessionsExternal: false,
@@ -395,10 +424,11 @@ describe('plugin-meetings', () => {
395
424
  {
396
425
  breakoutMoveId: 'e5caeb2c-ffcc-4e06-a08a-1122e7710398',
397
426
  lastActive: '2023-05-04T07:14:32.068Z',
398
- locusUrl: 'https://locus-alpha-apdx.prod.meetapi.webex.com/locus/api/v1/loci/495061ca-7b3c-3b77-85ff-4e1bd58600d1',
427
+ locusUrl:
428
+ 'https://locus-alpha-apdx.prod.meetapi.webex.com/locus/api/v1/loci/495061ca-7b3c-3b77-85ff-4e1bd58600d1',
399
429
  replacedAt: '2023-05-04T07:16:04.905Z',
400
430
  sessionId: 'be3147d4-c318-86d8-7611-8d24beaaca8d',
401
- }
431
+ },
402
432
  ],
403
433
  state: 'JOINED',
404
434
  };