@webex/plugin-meetings 3.6.0 → 3.7.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 (329) hide show
  1. package/README.md +2 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/webinar-registration-error.js +50 -0
  5. package/dist/common/errors/webinar-registration-error.js.map +1 -0
  6. package/dist/config.js +4 -1
  7. package/dist/config.js.map +1 -1
  8. package/dist/constants.js +40 -2
  9. package/dist/constants.js.map +1 -1
  10. package/dist/controls-options-manager/enums.js +1 -0
  11. package/dist/controls-options-manager/enums.js.map +1 -1
  12. package/dist/controls-options-manager/index.js +10 -3
  13. package/dist/controls-options-manager/index.js.map +1 -1
  14. package/dist/controls-options-manager/types.js.map +1 -1
  15. package/dist/controls-options-manager/util.js +12 -0
  16. package/dist/controls-options-manager/util.js.map +1 -1
  17. package/dist/index.js +7 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/interpretation/index.js +1 -1
  20. package/dist/interpretation/siLanguage.js +1 -1
  21. package/dist/locus-info/controlsUtils.js +28 -4
  22. package/dist/locus-info/controlsUtils.js.map +1 -1
  23. package/dist/locus-info/fullState.js +2 -1
  24. package/dist/locus-info/fullState.js.map +1 -1
  25. package/dist/locus-info/index.js +61 -3
  26. package/dist/locus-info/index.js.map +1 -1
  27. package/dist/locus-info/parser.js +5 -1
  28. package/dist/locus-info/parser.js.map +1 -1
  29. package/dist/meeting/in-meeting-actions.js +29 -1
  30. package/dist/meeting/in-meeting-actions.js.map +1 -1
  31. package/dist/meeting/index.js +786 -528
  32. package/dist/meeting/index.js.map +1 -1
  33. package/dist/meeting/locusMediaRequest.js +2 -6
  34. package/dist/meeting/locusMediaRequest.js.map +1 -1
  35. package/dist/meeting/muteState.js +5 -2
  36. package/dist/meeting/muteState.js.map +1 -1
  37. package/dist/meeting/request.js +21 -29
  38. package/dist/meeting/request.js.map +1 -1
  39. package/dist/meeting/util.js +98 -61
  40. package/dist/meeting/util.js.map +1 -1
  41. package/dist/meeting-info/meeting-info-v2.js +68 -17
  42. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  43. package/dist/meetings/index.js +29 -2
  44. package/dist/meetings/index.js.map +1 -1
  45. package/dist/members/index.js +3 -2
  46. package/dist/members/index.js.map +1 -1
  47. package/dist/members/util.js +13 -7
  48. package/dist/members/util.js.map +1 -1
  49. package/dist/metrics/constants.js +4 -1
  50. package/dist/metrics/constants.js.map +1 -1
  51. package/dist/multistream/remoteMedia.js +4 -0
  52. package/dist/multistream/remoteMedia.js.map +1 -1
  53. package/dist/reachability/clusterReachability.js +12 -15
  54. package/dist/reachability/clusterReachability.js.map +1 -1
  55. package/dist/reachability/index.js +433 -136
  56. package/dist/reachability/index.js.map +1 -1
  57. package/dist/{rtcMetrics/constants.js → reachability/reachability.types.js} +1 -5
  58. package/dist/reachability/reachability.types.js.map +1 -0
  59. package/dist/reachability/request.js +23 -9
  60. package/dist/reachability/request.js.map +1 -1
  61. package/dist/recording-controller/enums.js +8 -4
  62. package/dist/recording-controller/enums.js.map +1 -1
  63. package/dist/recording-controller/index.js +18 -9
  64. package/dist/recording-controller/index.js.map +1 -1
  65. package/dist/recording-controller/util.js +13 -9
  66. package/dist/recording-controller/util.js.map +1 -1
  67. package/dist/roap/index.js +5 -7
  68. package/dist/roap/index.js.map +1 -1
  69. package/dist/roap/request.js +45 -79
  70. package/dist/roap/request.js.map +1 -1
  71. package/dist/roap/turnDiscovery.js +3 -6
  72. package/dist/roap/turnDiscovery.js.map +1 -1
  73. package/dist/{common/errors/parameter.d.ts → types/common/errors/webinar-registration-error.d.ts} +4 -5
  74. package/dist/types/config.d.ts +3 -0
  75. package/dist/types/constants.d.ts +33 -0
  76. package/dist/types/controls-options-manager/enums.d.ts +2 -1
  77. package/dist/types/controls-options-manager/index.d.ts +2 -1
  78. package/dist/types/controls-options-manager/types.d.ts +2 -0
  79. package/dist/types/index.d.ts +2 -1
  80. package/dist/types/locus-info/index.d.ts +9 -0
  81. package/dist/types/meeting/in-meeting-actions.d.ts +28 -0
  82. package/dist/types/meeting/index.d.ts +34 -3
  83. package/dist/types/meeting/locusMediaRequest.d.ts +2 -3
  84. package/dist/types/meeting/muteState.d.ts +2 -1
  85. package/dist/types/meeting/request.d.ts +2 -2
  86. package/dist/types/meeting/util.d.ts +2 -2
  87. package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
  88. package/dist/types/meetings/index.d.ts +13 -1
  89. package/dist/types/members/index.d.ts +2 -1
  90. package/dist/types/members/util.d.ts +5 -1
  91. package/dist/types/metrics/constants.d.ts +3 -0
  92. package/dist/types/multistream/remoteMedia.d.ts +1 -0
  93. package/dist/types/reachability/clusterReachability.d.ts +1 -10
  94. package/dist/types/reachability/index.d.ts +74 -35
  95. package/dist/types/reachability/reachability.types.d.ts +64 -0
  96. package/dist/types/reachability/request.d.ts +5 -1
  97. package/dist/types/recording-controller/enums.d.ts +5 -2
  98. package/dist/types/recording-controller/index.d.ts +1 -0
  99. package/dist/types/recording-controller/util.d.ts +2 -1
  100. package/dist/types/roap/request.d.ts +1 -13
  101. package/dist/webinar/index.js +64 -19
  102. package/dist/webinar/index.js.map +1 -1
  103. package/package.json +22 -22
  104. package/src/common/errors/webinar-registration-error.ts +27 -0
  105. package/src/config.ts +3 -0
  106. package/src/constants.ts +41 -0
  107. package/src/controls-options-manager/enums.ts +1 -0
  108. package/src/controls-options-manager/index.ts +19 -2
  109. package/src/controls-options-manager/types.ts +2 -0
  110. package/src/controls-options-manager/util.ts +12 -0
  111. package/src/index.ts +2 -0
  112. package/src/locus-info/controlsUtils.ts +46 -2
  113. package/src/locus-info/fullState.ts +1 -0
  114. package/src/locus-info/index.ts +60 -0
  115. package/src/locus-info/parser.ts +8 -1
  116. package/src/meeting/in-meeting-actions.ts +58 -0
  117. package/src/meeting/index.ts +247 -22
  118. package/src/meeting/locusMediaRequest.ts +4 -8
  119. package/src/meeting/muteState.ts +6 -2
  120. package/src/meeting/request.ts +4 -11
  121. package/src/meeting/util.ts +31 -6
  122. package/src/meeting-info/meeting-info-v2.ts +51 -0
  123. package/src/meetings/index.ts +74 -40
  124. package/src/members/index.ts +4 -2
  125. package/src/members/util.ts +4 -1
  126. package/src/metrics/constants.ts +3 -0
  127. package/src/multistream/remoteMedia.ts +5 -0
  128. package/src/reachability/clusterReachability.ts +5 -15
  129. package/src/reachability/index.ts +285 -77
  130. package/src/reachability/reachability.types.ts +85 -0
  131. package/src/reachability/request.ts +55 -30
  132. package/src/recording-controller/enums.ts +5 -2
  133. package/src/recording-controller/index.ts +17 -4
  134. package/src/recording-controller/util.ts +20 -5
  135. package/src/roap/index.ts +4 -5
  136. package/src/roap/request.ts +32 -44
  137. package/src/roap/turnDiscovery.ts +2 -4
  138. package/src/webinar/index.ts +62 -16
  139. package/test/unit/spec/controls-options-manager/index.js +56 -32
  140. package/test/unit/spec/controls-options-manager/util.js +44 -0
  141. package/test/unit/spec/locus-info/controlsUtils.js +80 -4
  142. package/test/unit/spec/locus-info/index.js +88 -2
  143. package/test/unit/spec/meeting/in-meeting-actions.ts +31 -1
  144. package/test/unit/spec/meeting/index.js +346 -82
  145. package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
  146. package/test/unit/spec/meeting/muteState.js +8 -4
  147. package/test/unit/spec/meeting/request.js +3 -26
  148. package/test/unit/spec/meeting/utils.js +71 -14
  149. package/test/unit/spec/meeting-info/meetinginfov2.js +37 -0
  150. package/test/unit/spec/meetings/index.js +41 -6
  151. package/test/unit/spec/members/index.js +25 -2
  152. package/test/unit/spec/members/request.js +37 -3
  153. package/test/unit/spec/members/utils.js +110 -1
  154. package/test/unit/spec/multistream/remoteMedia.ts +16 -2
  155. package/test/unit/spec/reachability/clusterReachability.ts +7 -0
  156. package/test/unit/spec/reachability/index.ts +265 -1
  157. package/test/unit/spec/reachability/request.js +56 -15
  158. package/test/unit/spec/recording-controller/index.js +61 -5
  159. package/test/unit/spec/recording-controller/util.js +39 -3
  160. package/test/unit/spec/roap/index.ts +1 -1
  161. package/test/unit/spec/roap/request.ts +51 -109
  162. package/test/unit/spec/roap/turnDiscovery.ts +202 -147
  163. package/test/unit/spec/webinar/index.ts +128 -15
  164. package/dist/annotation/annotation.types.d.ts +0 -42
  165. package/dist/annotation/constants.d.ts +0 -31
  166. package/dist/annotation/index.d.ts +0 -117
  167. package/dist/breakouts/breakout.d.ts +0 -8
  168. package/dist/breakouts/collection.d.ts +0 -5
  169. package/dist/breakouts/edit-lock-error.d.ts +0 -15
  170. package/dist/breakouts/events.d.ts +0 -8
  171. package/dist/breakouts/index.d.ts +0 -5
  172. package/dist/breakouts/request.d.ts +0 -22
  173. package/dist/breakouts/utils.d.ts +0 -15
  174. package/dist/common/browser-detection.d.ts +0 -9
  175. package/dist/common/collection.d.ts +0 -48
  176. package/dist/common/config.d.ts +0 -2
  177. package/dist/common/errors/captcha-error.d.ts +0 -15
  178. package/dist/common/errors/intent-to-join.d.ts +0 -16
  179. package/dist/common/errors/join-meeting.d.ts +0 -17
  180. package/dist/common/errors/media.d.ts +0 -15
  181. package/dist/common/errors/no-meeting-info.d.ts +0 -14
  182. package/dist/common/errors/password-error.d.ts +0 -15
  183. package/dist/common/errors/permission.d.ts +0 -14
  184. package/dist/common/errors/reclaim-host-role-error.js +0 -149
  185. package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
  186. package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
  187. package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
  188. package/dist/common/errors/reconnection-in-progress.js +0 -33
  189. package/dist/common/errors/reconnection-in-progress.js.map +0 -1
  190. package/dist/common/errors/reconnection.d.ts +0 -15
  191. package/dist/common/errors/stats.d.ts +0 -15
  192. package/dist/common/errors/webex-errors.d.ts +0 -93
  193. package/dist/common/errors/webex-meetings-error.d.ts +0 -20
  194. package/dist/common/events/events-scope.d.ts +0 -17
  195. package/dist/common/events/events.d.ts +0 -12
  196. package/dist/common/events/trigger-proxy.d.ts +0 -2
  197. package/dist/common/events/util.d.ts +0 -2
  198. package/dist/common/logs/logger-config.d.ts +0 -2
  199. package/dist/common/logs/logger-proxy.d.ts +0 -2
  200. package/dist/common/logs/request.d.ts +0 -36
  201. package/dist/common/queue.d.ts +0 -34
  202. package/dist/config.d.ts +0 -72
  203. package/dist/constants.d.ts +0 -1088
  204. package/dist/controls-options-manager/constants.d.ts +0 -4
  205. package/dist/controls-options-manager/enums.d.ts +0 -15
  206. package/dist/controls-options-manager/index.d.ts +0 -136
  207. package/dist/controls-options-manager/types.d.ts +0 -43
  208. package/dist/controls-options-manager/util.d.ts +0 -1
  209. package/dist/index.d.ts +0 -7
  210. package/dist/interceptors/index.d.ts +0 -2
  211. package/dist/interceptors/locusRetry.d.ts +0 -27
  212. package/dist/interpretation/collection.d.ts +0 -5
  213. package/dist/interpretation/index.d.ts +0 -5
  214. package/dist/interpretation/siLanguage.d.ts +0 -5
  215. package/dist/locus-info/controlsUtils.d.ts +0 -2
  216. package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
  217. package/dist/locus-info/fullState.d.ts +0 -2
  218. package/dist/locus-info/hostUtils.d.ts +0 -2
  219. package/dist/locus-info/index.d.ts +0 -322
  220. package/dist/locus-info/infoUtils.d.ts +0 -2
  221. package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
  222. package/dist/locus-info/parser.d.ts +0 -272
  223. package/dist/locus-info/selfUtils.d.ts +0 -2
  224. package/dist/media/index.d.ts +0 -34
  225. package/dist/media/properties.d.ts +0 -93
  226. package/dist/media/util.d.ts +0 -2
  227. package/dist/mediaQualityMetrics/config.d.ts +0 -241
  228. package/dist/mediaQualityMetrics/config.js +0 -502
  229. package/dist/mediaQualityMetrics/config.js.map +0 -1
  230. package/dist/meeting/effectsState.js +0 -260
  231. package/dist/meeting/effectsState.js.map +0 -1
  232. package/dist/meeting/in-meeting-actions.d.ts +0 -167
  233. package/dist/meeting/index.d.ts +0 -1825
  234. package/dist/meeting/locusMediaRequest.d.ts +0 -74
  235. package/dist/meeting/muteState.d.ts +0 -178
  236. package/dist/meeting/request.d.ts +0 -295
  237. package/dist/meeting/request.type.d.ts +0 -11
  238. package/dist/meeting/state.d.ts +0 -9
  239. package/dist/meeting/util.d.ts +0 -119
  240. package/dist/meeting/voicea-meeting.d.ts +0 -16
  241. package/dist/meeting-info/collection.d.ts +0 -20
  242. package/dist/meeting-info/index.d.ts +0 -69
  243. package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
  244. package/dist/meeting-info/request.d.ts +0 -22
  245. package/dist/meeting-info/util.d.ts +0 -2
  246. package/dist/meeting-info/utilv2.d.ts +0 -2
  247. package/dist/meetings/collection.d.ts +0 -40
  248. package/dist/meetings/index.d.ts +0 -390
  249. package/dist/meetings/meetings.types.d.ts +0 -4
  250. package/dist/meetings/request.d.ts +0 -27
  251. package/dist/meetings/util.d.ts +0 -18
  252. package/dist/member/index.d.ts +0 -160
  253. package/dist/member/member.types.js +0 -17
  254. package/dist/member/member.types.js.map +0 -1
  255. package/dist/member/types.d.ts +0 -32
  256. package/dist/member/util.d.ts +0 -2
  257. package/dist/members/collection.d.ts +0 -29
  258. package/dist/members/index.d.ts +0 -353
  259. package/dist/members/request.d.ts +0 -114
  260. package/dist/members/types.d.ts +0 -25
  261. package/dist/members/util.d.ts +0 -215
  262. package/dist/metrics/config.js +0 -276
  263. package/dist/metrics/config.js.map +0 -1
  264. package/dist/metrics/constants.d.ts +0 -70
  265. package/dist/metrics/index.d.ts +0 -45
  266. package/dist/multistream/mediaRequestManager.d.ts +0 -119
  267. package/dist/multistream/receiveSlot.d.ts +0 -68
  268. package/dist/multistream/receiveSlotManager.d.ts +0 -56
  269. package/dist/multistream/remoteMedia.d.ts +0 -72
  270. package/dist/multistream/remoteMediaGroup.d.ts +0 -49
  271. package/dist/multistream/remoteMediaManager.d.ts +0 -300
  272. package/dist/multistream/sendSlotManager.d.ts +0 -69
  273. package/dist/networkQualityMonitor/index.d.ts +0 -70
  274. package/dist/networkQualityMonitor/index.js +0 -221
  275. package/dist/networkQualityMonitor/index.js.map +0 -1
  276. package/dist/peer-connection-manager/index.js +0 -671
  277. package/dist/peer-connection-manager/index.js.map +0 -1
  278. package/dist/peer-connection-manager/util.js +0 -109
  279. package/dist/peer-connection-manager/util.js.map +0 -1
  280. package/dist/personal-meeting-room/index.d.ts +0 -47
  281. package/dist/personal-meeting-room/request.d.ts +0 -14
  282. package/dist/personal-meeting-room/util.d.ts +0 -2
  283. package/dist/reachability/clusterReachability.d.ts +0 -109
  284. package/dist/reachability/index.d.ts +0 -105
  285. package/dist/reachability/request.d.ts +0 -39
  286. package/dist/reachability/util.d.ts +0 -8
  287. package/dist/reactions/constants.d.ts +0 -3
  288. package/dist/reactions/reactions.d.ts +0 -4
  289. package/dist/reactions/reactions.type.d.ts +0 -52
  290. package/dist/reconnection-manager/index.d.ts +0 -136
  291. package/dist/recording-controller/enums.d.ts +0 -7
  292. package/dist/recording-controller/index.d.ts +0 -207
  293. package/dist/recording-controller/util.d.ts +0 -14
  294. package/dist/roap/collection.js +0 -62
  295. package/dist/roap/collection.js.map +0 -1
  296. package/dist/roap/handler.js +0 -275
  297. package/dist/roap/handler.js.map +0 -1
  298. package/dist/roap/index.d.ts +0 -86
  299. package/dist/roap/request.d.ts +0 -39
  300. package/dist/roap/state.js +0 -126
  301. package/dist/roap/state.js.map +0 -1
  302. package/dist/roap/turnDiscovery.d.ts +0 -155
  303. package/dist/roap/util.js +0 -75
  304. package/dist/roap/util.js.map +0 -1
  305. package/dist/rtcMetrics/constants.d.ts +0 -4
  306. package/dist/rtcMetrics/constants.js.map +0 -1
  307. package/dist/rtcMetrics/index.d.ts +0 -61
  308. package/dist/rtcMetrics/index.js +0 -197
  309. package/dist/rtcMetrics/index.js.map +0 -1
  310. package/dist/statsAnalyzer/global.d.ts +0 -36
  311. package/dist/statsAnalyzer/global.js +0 -126
  312. package/dist/statsAnalyzer/global.js.map +0 -1
  313. package/dist/statsAnalyzer/index.d.ts +0 -217
  314. package/dist/statsAnalyzer/index.js +0 -1013
  315. package/dist/statsAnalyzer/index.js.map +0 -1
  316. package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
  317. package/dist/statsAnalyzer/mqaUtil.js +0 -179
  318. package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
  319. package/dist/transcription/index.d.ts +0 -64
  320. package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
  321. package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
  322. package/dist/types/networkQualityMonitor/index.d.ts +0 -70
  323. package/dist/types/rtcMetrics/constants.d.ts +0 -4
  324. package/dist/types/rtcMetrics/index.d.ts +0 -71
  325. package/dist/types/statsAnalyzer/global.d.ts +0 -36
  326. package/dist/types/statsAnalyzer/index.d.ts +0 -217
  327. package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
  328. package/dist/webinar/collection.d.ts +0 -16
  329. package/dist/webinar/index.d.ts +0 -5
@@ -91,12 +91,14 @@ import ParameterError from '../../../../src/common/errors/parameter';
91
91
  import PasswordError from '../../../../src/common/errors/password-error';
92
92
  import CaptchaError from '../../../../src/common/errors/captcha-error';
93
93
  import PermissionError from '../../../../src/common/errors/permission';
94
+ import WebinarRegistrationError from '../../../../src/common/errors/webinar-registration-error';
94
95
  import IntentToJoinError from '../../../../src/common/errors/intent-to-join';
95
96
  import testUtils from '../../../utils/testUtils';
96
97
  import {
97
98
  MeetingInfoV2CaptchaError,
98
99
  MeetingInfoV2PasswordError,
99
100
  MeetingInfoV2PolicyError,
101
+ MeetingInfoV2WebinarRegistrationError,
100
102
  } from '../../../../src/meeting-info/meeting-info-v2';
101
103
  import {
102
104
  DTLS_HANDSHAKE_FAILED_CLIENT_CODE,
@@ -375,7 +377,10 @@ describe('plugin-meetings', () => {
375
377
  }
376
378
  );
377
379
  assert.equal(newMeeting.correlationId, newMeeting.id);
378
- assert.deepEqual(newMeeting.callStateForMetrics, {correlationId: newMeeting.id, sessionCorrelationId: ''});
380
+ assert.deepEqual(newMeeting.callStateForMetrics, {
381
+ correlationId: newMeeting.id,
382
+ sessionCorrelationId: '',
383
+ });
379
384
  });
380
385
 
381
386
  it('correlationId can be provided in callStateForMetrics', () => {
@@ -644,7 +649,6 @@ describe('plugin-meetings', () => {
644
649
  });
645
650
 
646
651
  const fakeRoapMessage = {id: 'fake TURN discovery message'};
647
- const fakeReachabilityResults = {id: 'fake reachability'};
648
652
  const fakeTurnServerInfo = {id: 'fake turn info'};
649
653
  const fakeJoinResult = {id: 'join result'};
650
654
 
@@ -662,8 +666,6 @@ describe('plugin-meetings', () => {
662
666
  .stub(meeting, 'addMediaInternal')
663
667
  .returns(Promise.resolve(test4));
664
668
 
665
- webex.meetings.reachability.getReachabilityResults.resolves(fakeReachabilityResults);
666
-
667
669
  generateTurnDiscoveryRequestMessageStub = sinon
668
670
  .stub(meeting.roap, 'generateTurnDiscoveryRequestMessage')
669
671
  .resolves({roapMessage: fakeRoapMessage});
@@ -683,7 +685,6 @@ describe('plugin-meetings', () => {
683
685
  assert.calledOnceWithExactly(meeting.join, {
684
686
  ...joinOptions,
685
687
  roapMessage: fakeRoapMessage,
686
- reachability: fakeReachabilityResults,
687
688
  });
688
689
  assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
689
690
  assert.calledOnceWithExactly(
@@ -720,7 +721,6 @@ describe('plugin-meetings', () => {
720
721
  assert.calledOnceWithExactly(meeting.join, {
721
722
  ...joinOptions,
722
723
  roapMessage: undefined,
723
- reachability: fakeReachabilityResults,
724
724
  });
725
725
  assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
726
726
  assert.notCalled(handleTurnDiscoveryHttpResponseStub);
@@ -752,7 +752,6 @@ describe('plugin-meetings', () => {
752
752
  assert.calledOnceWithExactly(meeting.join, {
753
753
  ...joinOptions,
754
754
  roapMessage: fakeRoapMessage,
755
- reachability: fakeReachabilityResults,
756
755
  });
757
756
  assert.calledOnceWithExactly(generateTurnDiscoveryRequestMessageStub, meeting, true);
758
757
  assert.calledOnceWithExactly(
@@ -2466,6 +2465,63 @@ describe('plugin-meetings', () => {
2466
2465
  checkWorking();
2467
2466
  });
2468
2467
 
2468
+ it('should upload logs periodically', async () => {
2469
+ const clock = sinon.useFakeTimers();
2470
+
2471
+ meeting.roap.doTurnDiscovery = sinon
2472
+ .stub()
2473
+ .resolves({turnServerInfo: undefined, turnDiscoverySkippedReason: undefined});
2474
+
2475
+ let logUploadCounter = 0;
2476
+
2477
+ TriggerProxy.trigger.callsFake((meetingObject, options, event) => {
2478
+ if (
2479
+ meetingObject === meeting &&
2480
+ options.file === 'meeting/index' &&
2481
+ options.function === 'uploadLogs' &&
2482
+ event === 'REQUEST_UPLOAD_LOGS'
2483
+ ) {
2484
+ logUploadCounter += 1;
2485
+ }
2486
+ });
2487
+
2488
+ meeting.config.logUploadIntervalMultiplicationFactor = 1;
2489
+ meeting.meetingState = 'ACTIVE';
2490
+
2491
+ await meeting.addMedia({
2492
+ mediaSettings: {},
2493
+ });
2494
+
2495
+ const checkLogCounter = (delay, expectedCounter) => {
2496
+ // first check that the counter is not increased just before the delay
2497
+ clock.tick(delay - 50);
2498
+ assert.equal(logUploadCounter, expectedCounter - 1);
2499
+
2500
+ // and now check that it has reached expected value after the delay
2501
+ clock.tick(50);
2502
+ assert.equal(logUploadCounter, expectedCounter);
2503
+ };
2504
+
2505
+ checkLogCounter(100, 1);
2506
+ checkLogCounter(1000, 2);
2507
+ checkLogCounter(15000, 3);
2508
+ checkLogCounter(15000, 4);
2509
+ checkLogCounter(30000, 5);
2510
+ checkLogCounter(30000, 6);
2511
+ checkLogCounter(30000, 7);
2512
+ checkLogCounter(60000, 8);
2513
+ checkLogCounter(60000, 9);
2514
+ checkLogCounter(60000, 10);
2515
+
2516
+ // simulate media connection being removed -> no more log uploads should happen
2517
+ meeting.mediaProperties.webrtcMediaConnection = undefined;
2518
+
2519
+ clock.tick(60000);
2520
+ assert.equal(logUploadCounter, 11);
2521
+
2522
+ clock.restore();
2523
+ });
2524
+
2469
2525
  it('should attach the media and return promise when in the lobby if allowMediaInLobby is set', async () => {
2470
2526
  meeting.roap.doTurnDiscovery = sinon
2471
2527
  .stub()
@@ -3440,47 +3496,60 @@ describe('plugin-meetings', () => {
3440
3496
  });
3441
3497
  });
3442
3498
 
3443
- it('should pass bundlePolicy to createMediaConnection', async () => {
3499
+ describe('bundlePolicy', () => {
3444
3500
  const FAKE_TURN_URL = 'turns:webex.com:3478';
3445
3501
  const FAKE_TURN_USER = 'some-turn-username';
3446
3502
  const FAKE_TURN_PASSWORD = 'some-password';
3447
3503
 
3448
- meeting.meetingState = 'ACTIVE';
3449
- Media.createMediaConnection.resetHistory();
3450
-
3451
- meeting.roap.doTurnDiscovery = sinon.stub().resolves({
3452
- turnServerInfo: {
3453
- url: FAKE_TURN_URL,
3454
- username: FAKE_TURN_USER,
3455
- password: FAKE_TURN_PASSWORD,
3456
- },
3457
- turnDiscoverySkippedReason: undefined,
3458
- });
3459
- const media = meeting.addMedia({
3460
- mediaSettings: {},
3461
- bundlePolicy: 'bundlePolicy-value',
3462
- });
3504
+ beforeEach(() => {
3505
+ meeting.meetingState = 'ACTIVE';
3506
+ Media.createMediaConnection.resetHistory();
3463
3507
 
3464
- assert.exists(media);
3465
- await media;
3466
- assert.calledOnce(meeting.roap.doTurnDiscovery);
3467
- assert.calledWith(meeting.roap.doTurnDiscovery, meeting, false);
3468
- assert.calledOnce(Media.createMediaConnection);
3469
- assert.calledWith(
3470
- Media.createMediaConnection,
3471
- false,
3472
- meeting.getMediaConnectionDebugId(),
3473
- meeting.id,
3474
- sinon.match({
3508
+ meeting.roap.doTurnDiscovery = sinon.stub().resolves({
3475
3509
  turnServerInfo: {
3476
3510
  url: FAKE_TURN_URL,
3477
3511
  username: FAKE_TURN_USER,
3478
3512
  password: FAKE_TURN_PASSWORD,
3479
3513
  },
3480
- bundlePolicy: 'bundlePolicy-value',
3481
- })
3482
- );
3483
- assert.calledOnce(fakeMediaConnection.initiateOffer);
3514
+ turnDiscoverySkippedReason: undefined,
3515
+ });
3516
+ });
3517
+
3518
+ const runCheck = async (bundlePolicy, expectedValue) => {
3519
+ const media = meeting.addMedia({
3520
+ mediaSettings: {},
3521
+ bundlePolicy,
3522
+ });
3523
+
3524
+ assert.exists(media);
3525
+ await media;
3526
+ assert.calledOnce(meeting.roap.doTurnDiscovery);
3527
+ assert.calledWith(meeting.roap.doTurnDiscovery, meeting, false);
3528
+ assert.calledOnce(Media.createMediaConnection);
3529
+ assert.calledWith(
3530
+ Media.createMediaConnection,
3531
+ false,
3532
+ meeting.getMediaConnectionDebugId(),
3533
+ meeting.id,
3534
+ sinon.match({
3535
+ turnServerInfo: {
3536
+ url: FAKE_TURN_URL,
3537
+ username: FAKE_TURN_USER,
3538
+ password: FAKE_TURN_PASSWORD,
3539
+ },
3540
+ bundlePolicy: expectedValue,
3541
+ })
3542
+ );
3543
+ assert.calledOnce(fakeMediaConnection.initiateOffer);
3544
+ };
3545
+
3546
+ it('should pass bundlePolicy to createMediaConnection', async () => {
3547
+ await runCheck('max-compat', 'max-compat');
3548
+ });
3549
+
3550
+ it('should pass max-bundle to createMediaConnection if bundlePolicy is not provided', async () => {
3551
+ await runCheck(undefined, 'max-bundle');
3552
+ });
3484
3553
  });
3485
3554
 
3486
3555
  it('succeeds even if getDevices() throws', async () => {
@@ -3674,6 +3743,8 @@ describe('plugin-meetings', () => {
3674
3743
  meeting.setMercuryListener = sinon.stub();
3675
3744
  meeting.locusInfo.onFullLocus = sinon.stub();
3676
3745
  meeting.webex.meetings.geoHintInfo = {regionCode: 'EU', countryCode: 'UK'};
3746
+ meeting.webex.meetings.reachability.getReachabilityReportToAttachToRoap = sinon.stub().resolves({id: 'fake reachability'});
3747
+ meeting.webex.meetings.reachability.getClientMediaPreferences = sinon.stub().resolves({id: 'fake clientMediaPreferences'});
3677
3748
  meeting.roap.doTurnDiscovery = sinon.stub().resolves({
3678
3749
  turnServerInfo: {
3679
3750
  url: 'turns:turn-server-url:443?transport=tcp',
@@ -3793,12 +3864,12 @@ describe('plugin-meetings', () => {
3793
3864
  id: 'fake locus from mocked join request',
3794
3865
  locusUrl: 'fake locus url',
3795
3866
  mediaId: 'fake media id',
3796
- })
3867
+ });
3797
3868
  sinon.stub(meeting.meetingRequest, 'joinMeeting').resolves({
3798
3869
  headers: {
3799
3870
  trackingid: 'fake tracking id',
3800
- }
3801
- })
3871
+ },
3872
+ });
3802
3873
  await meeting.join({enableMultistream: isMultistream});
3803
3874
  });
3804
3875
 
@@ -3859,6 +3930,9 @@ describe('plugin-meetings', () => {
3859
3930
  const checkSdpOfferSent = ({audioMuted, videoMuted}) => {
3860
3931
  const {sdp, seq, tieBreaker} = roapOfferMessage;
3861
3932
 
3933
+ assert.calledWith(meeting.webex.meetings.reachability.getClientMediaPreferences, meeting.isMultistream, 0);
3934
+ assert.calledWith(meeting.webex.meetings.reachability.getReachabilityReportToAttachToRoap);
3935
+
3862
3936
  assert.calledWith(locusMediaRequestStub, {
3863
3937
  method: 'PUT',
3864
3938
  uri: `${meeting.selfUrl}/media`,
@@ -3872,14 +3946,12 @@ describe('plugin-meetings', () => {
3872
3946
  correlationId: meeting.correlationId,
3873
3947
  localMedias: [
3874
3948
  {
3875
- localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OFFER","sdps":["${sdp}"],"version":"2","seq":"${seq}","tieBreaker":"${tieBreaker}","headers":["includeAnswerInHttpResponse","noOkInTransaction"]}}`,
3949
+ localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OFFER","sdps":["${sdp}"],"version":"2","seq":"${seq}","tieBreaker":"${tieBreaker}","headers":["includeAnswerInHttpResponse","noOkInTransaction"]},"reachability":{"id":"fake reachability"}}`,
3876
3950
  mediaId: 'fake media id',
3877
3951
  },
3878
3952
  ],
3879
3953
  clientMediaPreferences: {
3880
- preferTranscoding: !meeting.isMultistream,
3881
- joinCookie: undefined,
3882
- ipver: 0,
3954
+ id: 'fake clientMediaPreferences',
3883
3955
  },
3884
3956
  },
3885
3957
  });
@@ -3900,13 +3972,11 @@ describe('plugin-meetings', () => {
3900
3972
  },
3901
3973
  correlationId: meeting.correlationId,
3902
3974
  clientMediaPreferences: {
3903
- preferTranscoding: !meeting.isMultistream,
3904
- ipver: undefined,
3905
- joinCookie: undefined,
3975
+ id: 'fake clientMediaPreferences',
3906
3976
  },
3907
3977
  localMedias: [
3908
3978
  {
3909
- localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OK","version":"2","seq":"${seq}"}}`,
3979
+ localSdp: `{"audioMuted":${audioMuted},"videoMuted":${videoMuted},"roapMessage":{"messageType":"OK","version":"2","seq":"${seq}"},"reachability":{"id":"fake reachability"}}`,
3910
3980
  mediaId: 'fake media id',
3911
3981
  },
3912
3982
  ],
@@ -3932,10 +4002,6 @@ describe('plugin-meetings', () => {
3932
4002
  mediaId: 'fake media id',
3933
4003
  },
3934
4004
  ],
3935
- clientMediaPreferences: {
3936
- preferTranscoding: !meeting.isMultistream,
3937
- ipver: undefined,
3938
- },
3939
4005
  respOnlySdp: true,
3940
4006
  usingResource: null,
3941
4007
  },
@@ -3991,6 +4057,10 @@ describe('plugin-meetings', () => {
3991
4057
  assert.notCalled(
3992
4058
  meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream
3993
4059
  );
4060
+ assert.throws(
4061
+ meeting.publishStreams(localStreams),
4062
+ `Attempted to publish microphone stream with ended readyState, correlationId=${meeting.correlationId}`
4063
+ );
3994
4064
  } else {
3995
4065
  assert.calledOnceWithExactly(
3996
4066
  meeting.sendSlotManager.getSlot(MediaType.AudioMain).publishStream,
@@ -4003,6 +4073,10 @@ describe('plugin-meetings', () => {
4003
4073
  assert.notCalled(
4004
4074
  meeting.sendSlotManager.getSlot(MediaType.VideoMain).publishStream
4005
4075
  );
4076
+ assert.throws(
4077
+ meeting.publishStreams(localStreams),
4078
+ `Attempted to publish camera stream with ended readyState, correlationId=${meeting.correlationId}`
4079
+ );
4006
4080
  } else {
4007
4081
  assert.calledOnceWithExactly(
4008
4082
  meeting.sendSlotManager.getSlot(MediaType.VideoMain).publishStream,
@@ -4015,6 +4089,10 @@ describe('plugin-meetings', () => {
4015
4089
  assert.notCalled(
4016
4090
  meeting.sendSlotManager.getSlot(MediaType.AudioSlides).publishStream
4017
4091
  );
4092
+ assert.throws(
4093
+ meeting.publishStreams(localStreams),
4094
+ `Attempted to publish screenShare audio stream with ended readyState, correlationId=${meeting.correlationId}`
4095
+ );
4018
4096
  } else {
4019
4097
  assert.calledOnceWithExactly(
4020
4098
  meeting.sendSlotManager.getSlot(MediaType.AudioSlides).publishStream,
@@ -4027,6 +4105,10 @@ describe('plugin-meetings', () => {
4027
4105
  assert.notCalled(
4028
4106
  meeting.sendSlotManager.getSlot(MediaType.VideoSlides).publishStream
4029
4107
  );
4108
+ assert.throws(
4109
+ meeting.publishStreams(localStreams),
4110
+ `Attempted to publish screenShare video stream with ended readyState, correlationId=${meeting.correlationId}`
4111
+ );
4030
4112
  } else {
4031
4113
  assert.calledOnceWithExactly(
4032
4114
  meeting.sendSlotManager.getSlot(MediaType.VideoSlides).publishStream,
@@ -4321,14 +4403,14 @@ describe('plugin-meetings', () => {
4321
4403
  const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4322
4404
  await meeting.addMedia({audioEnabled: false});
4323
4405
  //calling handleDeviceLogging with audioEnaled as true adn videoEnabled as false
4324
- assert.calledWith(handleDeviceLoggingSpy,false,true);
4406
+ assert.calledWith(handleDeviceLoggingSpy, false, true);
4325
4407
  });
4326
4408
 
4327
4409
  it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
4328
4410
  const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4329
4411
  await meeting.addMedia({videoEnabled: false});
4330
4412
  //calling handleDeviceLogging audioEnabled as true videoEnabled as false
4331
- assert.calledWith(handleDeviceLoggingSpy,true,false);
4413
+ assert.calledWith(handleDeviceLoggingSpy, true, false);
4332
4414
  });
4333
4415
 
4334
4416
  it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
@@ -4397,12 +4479,11 @@ describe('plugin-meetings', () => {
4397
4479
  assert.calledTwice(locusMediaRequestStub);
4398
4480
  });
4399
4481
 
4400
-
4401
4482
  it('addMedia() works correctly when both shareAudio and shareVideo is disabled with no streams publish', async () => {
4402
4483
  const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4403
4484
  await meeting.addMedia({shareAudioEnabled: false, shareVideoEnabled: false});
4404
4485
  //calling handleDeviceLogging with audioEnabled true and videoEnabled as true
4405
- assert.calledWith(handleDeviceLoggingSpy,true,true);
4486
+ assert.calledWith(handleDeviceLoggingSpy, true, true);
4406
4487
  });
4407
4488
 
4408
4489
  describe('publishStreams()/unpublishStreams() calls', () => {
@@ -6250,6 +6331,30 @@ describe('plugin-meetings', () => {
6250
6331
 
6251
6332
  assert.equal(meeting.fetchMeetingInfoTimeoutId, undefined);
6252
6333
  });
6334
+
6335
+ it('handles meetingInfoProvider webinar need registration error', async () => {
6336
+ meeting.destination = FAKE_DESTINATION;
6337
+ meeting.destinationType = FAKE_TYPE;
6338
+ meeting.attrs.meetingInfoProvider = {
6339
+ fetchMeetingInfo: sinon
6340
+ .stub()
6341
+ .throws(
6342
+ new MeetingInfoV2WebinarRegistrationError(403021, FAKE_MEETING_INFO, 'a message')
6343
+ ),
6344
+ };
6345
+
6346
+ await assert.isRejected(
6347
+ meeting.fetchMeetingInfo({sendCAevents: true}),
6348
+ WebinarRegistrationError
6349
+ );
6350
+
6351
+ assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
6352
+ assert.equal(meeting.meetingInfoFailureCode, 403021);
6353
+ assert.equal(
6354
+ meeting.meetingInfoFailureReason,
6355
+ MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION
6356
+ );
6357
+ });
6253
6358
  });
6254
6359
 
6255
6360
  describe('#refreshPermissionToken', () => {
@@ -6963,7 +7068,10 @@ describe('plugin-meetings', () => {
6963
7068
  assert.deepEqual(meeting.callStateForMetrics, {correlationId, sessionCorrelationId: ''});
6964
7069
  meeting.setCorrelationId(uuid1);
6965
7070
  assert.equal(meeting.correlationId, uuid1);
6966
- assert.deepEqual(meeting.callStateForMetrics, {correlationId: uuid1, sessionCorrelationId: ''});
7071
+ assert.deepEqual(meeting.callStateForMetrics, {
7072
+ correlationId: uuid1,
7073
+ sessionCorrelationId: '',
7074
+ });
6967
7075
  });
6968
7076
  });
6969
7077
 
@@ -7635,11 +7743,11 @@ describe('plugin-meetings', () => {
7635
7743
  id: 'stream',
7636
7744
  getTracks: () => [{id: 'track', addEventListener: sinon.stub()}],
7637
7745
  };
7638
- const simulateConnectionStateChange = (newState) => {
7746
+ const simulateConnectionStateChange = async (newState) => {
7639
7747
  meeting.mediaProperties.webrtcMediaConnection.getConnectionState = sinon
7640
7748
  .stub()
7641
7749
  .returns(newState);
7642
- eventListeners[MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED]();
7750
+ await eventListeners[MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED]();
7643
7751
  };
7644
7752
 
7645
7753
  beforeEach(() => {
@@ -7709,11 +7817,17 @@ describe('plugin-meetings', () => {
7709
7817
  });
7710
7818
 
7711
7819
  it('should collect ice candidates', () => {
7712
- eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: 'candidate'});
7820
+ eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: {candidate: 'candidate'}});
7713
7821
 
7714
7822
  assert.equal(meeting.iceCandidatesCount, 1);
7715
7823
  });
7716
7824
 
7825
+ it('should not collect empty ice candidates', () => {
7826
+ eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: {candidate: ''}});
7827
+
7828
+ assert.equal(meeting.iceCandidatesCount, 0);
7829
+ });
7830
+
7717
7831
  it('should not collect null ice candidates', () => {
7718
7832
  eventListeners[MediaConnectionEventNames.ICE_CANDIDATE]({candidate: null});
7719
7833
 
@@ -7895,7 +8009,7 @@ describe('plugin-meetings', () => {
7895
8009
  meeting.reconnectionManager = new ReconnectionManager(meeting);
7896
8010
  meeting.reconnectionManager.iceReconnected = sinon.stub().returns(undefined);
7897
8011
  meeting.setNetworkStatus = sinon.stub().returns(undefined);
7898
- meeting.statsAnalyzer = {startAnalyzer: sinon.stub()};
8012
+ meeting.statsAnalyzer = {startAnalyzer: sinon.stub(), stopAnalyzer: sinon.stub()};
7899
8013
  meeting.mediaProperties.webrtcMediaConnection = {
7900
8014
  // mock the on() method and store all the listeners
7901
8015
  on: sinon.stub().callsFake((event, listener) => {
@@ -7970,10 +8084,10 @@ describe('plugin-meetings', () => {
7970
8084
  });
7971
8085
 
7972
8086
  describe('CONNECTION_STATE_CHANGED event when state = "Failed"', () => {
7973
- const mockFailedEvent = () => {
8087
+ const mockFailedEvent = async () => {
7974
8088
  meeting.setupMediaConnectionListeners();
7975
8089
 
7976
- simulateConnectionStateChange(ConnectionState.Failed);
8090
+ await simulateConnectionStateChange(ConnectionState.Failed);
7977
8091
  };
7978
8092
 
7979
8093
  const checkBehavioralMetricSent = (hasMediaConnectionConnectedAtLeastOnce = false) => {
@@ -8003,6 +8117,22 @@ describe('plugin-meetings', () => {
8003
8117
  assert.notCalled(webex.internal.newMetrics.submitClientEvent);
8004
8118
  checkBehavioralMetricSent(true);
8005
8119
  });
8120
+
8121
+ it('stop stats analyzer during reconnection ', async () => {
8122
+ meeting.hasMediaConnectionConnectedAtLeastOnce = true;
8123
+ meeting.statsAnalyzer.stopAnalyzer = sinon.stub().resolves();
8124
+ meeting.reconnectionManager = {
8125
+ reconnect: sinon.stub().resolves(),
8126
+ resetReconnectionTimer: () => {}
8127
+ };
8128
+ meeting.currentMediaStatus = {
8129
+ video: true
8130
+ };
8131
+
8132
+ await mockFailedEvent();
8133
+
8134
+ assert.calledOnce(meeting.statsAnalyzer.stopAnalyzer);
8135
+ });
8006
8136
  });
8007
8137
 
8008
8138
  describe('should send correct metrics for ROAP_FAILURE event', () => {
@@ -8547,6 +8677,13 @@ describe('plugin-meetings', () => {
8547
8677
  {payload: test1}
8548
8678
  );
8549
8679
  assert.calledOnce(meeting.updateLLMConnection);
8680
+ assert.calledOnceWithExactly(
8681
+ Metrics.sendBehavioralMetric,
8682
+ BEHAVIORAL_METRICS.GUEST_ENTERED_LOBBY,
8683
+ {
8684
+ correlation_id: meeting.correlationId,
8685
+ }
8686
+ );
8550
8687
  done();
8551
8688
  });
8552
8689
  it('listens to the self admitted guest event', (done) => {
@@ -8568,6 +8705,13 @@ describe('plugin-meetings', () => {
8568
8705
  assert.calledOnce(meeting.updateLLMConnection);
8569
8706
  assert.calledOnceWithExactly(meeting.rtcMetrics.sendNextMetrics);
8570
8707
 
8708
+ assert.calledOnceWithExactly(
8709
+ Metrics.sendBehavioralMetric,
8710
+ BEHAVIORAL_METRICS.GUEST_EXITED_LOBBY,
8711
+ {
8712
+ correlation_id: meeting.correlationId,
8713
+ }
8714
+ );
8571
8715
  done();
8572
8716
  });
8573
8717
 
@@ -8863,6 +9007,81 @@ describe('plugin-meetings', () => {
8863
9007
  );
8864
9008
  });
8865
9009
 
9010
+ it('listens to MEETING_CONTROLS_WEBCAST_UPDATED', async () => {
9011
+ const state = {example: 'value'};
9012
+
9013
+ await meeting.locusInfo.emitScoped(
9014
+ {function: 'test', file: 'test'},
9015
+ LOCUSINFO.EVENTS.CONTROLS_WEBCAST_CHANGED,
9016
+ {state}
9017
+ );
9018
+
9019
+ assert.calledWith(
9020
+ TriggerProxy.trigger,
9021
+ meeting,
9022
+ {file: 'meeting/index', function: 'setupLocusControlsListener'},
9023
+ EVENT_TRIGGERS.MEETING_CONTROLS_WEBCAST_UPDATED,
9024
+ {state}
9025
+ );
9026
+ });
9027
+
9028
+ it('listens to MEETING_CONTROLS_MEETING_FULL_UPDATED', async () => {
9029
+ const state = {example: 'value'};
9030
+
9031
+ await meeting.locusInfo.emitScoped(
9032
+ {function: 'test', file: 'test'},
9033
+ LOCUSINFO.EVENTS.CONTROLS_MEETING_FULL_CHANGED,
9034
+ {state}
9035
+ );
9036
+
9037
+ assert.calledWith(
9038
+ TriggerProxy.trigger,
9039
+ meeting,
9040
+ {file: 'meeting/index', function: 'setupLocusControlsListener'},
9041
+ EVENT_TRIGGERS.MEETING_CONTROLS_MEETING_FULL_UPDATED,
9042
+ {state}
9043
+ );
9044
+ });
9045
+
9046
+ it('listens to MEETING_CONTROLS_PRACTICE_SESSION_STATUS_UPDATED', async () => {
9047
+ meeting.webinar.updatePracticeSessionStatus = sinon.stub();
9048
+
9049
+ const state = {example: 'value'};
9050
+
9051
+ await meeting.locusInfo.emitScoped(
9052
+ {function: 'test', file: 'test'},
9053
+ LOCUSINFO.EVENTS.CONTROLS_PRACTICE_SESSION_STATUS_UPDATED,
9054
+ {state}
9055
+ );
9056
+
9057
+ assert.calledOnceWithExactly( meeting.webinar.updatePracticeSessionStatus, state);
9058
+ assert.calledWith(
9059
+ TriggerProxy.trigger,
9060
+ meeting,
9061
+ {file: 'meeting/index', function: 'setupLocusControlsListener'},
9062
+ EVENT_TRIGGERS.MEETING_CONTROLS_PRACTICE_SESSION_STATUS_UPDATED,
9063
+ {state}
9064
+ );
9065
+ });
9066
+
9067
+ it('listens to MEETING_CONTROLS_STAGE_VIEW_UPDATED', async () => {
9068
+ const state = {example: 'value'};
9069
+
9070
+ await meeting.locusInfo.emitScoped(
9071
+ {function: 'test', file: 'test'},
9072
+ LOCUSINFO.EVENTS.CONTROLS_STAGE_VIEW_UPDATED,
9073
+ {state}
9074
+ );
9075
+
9076
+ assert.calledWith(
9077
+ TriggerProxy.trigger,
9078
+ meeting,
9079
+ {file: 'meeting/index', function: 'setupLocusControlsListener'},
9080
+ EVENT_TRIGGERS.MEETING_CONTROLS_STAGE_VIEW_UPDATED,
9081
+ {state}
9082
+ );
9083
+ });
9084
+
8866
9085
  it('listens to MEETING_CONTROLS_VIDEO_UPDATED', async () => {
8867
9086
  const state = {example: 'value'};
8868
9087
 
@@ -8976,12 +9195,6 @@ describe('plugin-meetings', () => {
8976
9195
  approval: {
8977
9196
  url: 'url',
8978
9197
  },
8979
- webcast: {
8980
- url: 'url',
8981
- },
8982
- webinarAttendeesSearching: {
8983
- url: 'url',
8984
- },
8985
9198
  },
8986
9199
  };
8987
9200
 
@@ -8995,10 +9208,6 @@ describe('plugin-meetings', () => {
8995
9208
  meeting.simultaneousInterpretation = {
8996
9209
  approvalUrlUpdate: sinon.stub().returns(undefined),
8997
9210
  };
8998
- meeting.webinar = {
8999
- webcastUrlUpdate: sinon.stub().returns(undefined),
9000
- webinarAttendeesSearchingUrlUpdate: sinon.stub().returns(undefined),
9001
- };
9002
9211
 
9003
9212
  meeting.locusInfo.emit(
9004
9213
  {function: 'test', file: 'test'},
@@ -9018,19 +9227,37 @@ describe('plugin-meetings', () => {
9018
9227
  meeting.simultaneousInterpretation.approvalUrlUpdate,
9019
9228
  newLocusServices.services.approval.url
9020
9229
  );
9021
- assert.calledWith(
9022
- meeting.webinar.webcastUrlUpdate,
9023
- newLocusServices.services.webcast.url
9024
- );
9025
- assert.calledWith(
9026
- meeting.webinar.webinarAttendeesSearchingUrlUpdate,
9027
- newLocusServices.services.webinarAttendeesSearching.url
9028
- );
9029
9230
  assert.calledOnce(meeting.recordingController.setSessionId);
9030
9231
  done();
9031
9232
  });
9032
9233
  });
9033
9234
 
9235
+ describe('#setUpLocusResourcesListener', () => {
9236
+ it('listens to the locus resources update event', (done) => {
9237
+ const newLocusResources = {
9238
+ resources: {
9239
+ webcastInstance: {
9240
+ url: 'url',
9241
+ },
9242
+ },
9243
+ };
9244
+
9245
+ meeting.webinar = {
9246
+ updateWebcastUrl: sinon.stub().returns(undefined),
9247
+ };
9248
+
9249
+ meeting.locusInfo.emit(
9250
+ {function: 'test', file: 'test'},
9251
+ 'LINKS_RESOURCES',
9252
+ newLocusResources
9253
+ );
9254
+
9255
+ assert.calledWith(meeting.webinar.updateWebcastUrl, newLocusResources);
9256
+
9257
+ done();
9258
+ });
9259
+ });
9260
+
9034
9261
  describe('#setUpLocusInfoMediaInactiveListener', () => {
9035
9262
  it('listens to disconnect due to un activity ', (done) => {
9036
9263
  TriggerProxy.trigger.reset();
@@ -12178,6 +12405,43 @@ describe('plugin-meetings', () => {
12178
12405
  await testEmit(false);
12179
12406
  });
12180
12407
  });
12408
+
12409
+ describe('LOCAL_UNMUTE_REQUIRED locus event', () => {
12410
+ const testEmit = async (unmuteAllowed) => {
12411
+ meeting.audio = {
12412
+ handleServerLocalUnmuteRequired: sinon.stub(),
12413
+ };
12414
+ await meeting.locusInfo.emitScoped({}, LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, {
12415
+ unmuteAllowed,
12416
+ });
12417
+
12418
+ assert.calledWith(
12419
+ TriggerProxy.trigger,
12420
+ sinon.match.instanceOf(Meeting),
12421
+ {
12422
+ file: 'meeting/index',
12423
+ function: 'setUpLocusInfoSelfListener',
12424
+ },
12425
+ EVENT_TRIGGERS.MEETING_SELF_UNMUTED_BY_OTHERS,
12426
+ {
12427
+ payload: {
12428
+ unmuteAllowed,
12429
+ },
12430
+ }
12431
+ );
12432
+ assert.calledOnceWithExactly(
12433
+ meeting.audio.handleServerLocalUnmuteRequired,
12434
+ meeting,
12435
+ unmuteAllowed
12436
+ );
12437
+ };
12438
+
12439
+ [true, false].forEach((unmuteAllowed) => {
12440
+ it(`emits the expected event and calls handleServerLocalUnmuteRequired() when unmuteAllowed=${unmuteAllowed}`, async () => {
12441
+ await testEmit(unmuteAllowed);
12442
+ });
12443
+ });
12444
+ });
12181
12445
  });
12182
12446
  });
12183
12447