@webex/plugin-meetings 3.8.0-next.4 → 3.8.0-next.41

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 (130) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.js +1 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/constants.js +14 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/controls-options-manager/enums.js +2 -0
  8. package/dist/controls-options-manager/enums.js.map +1 -1
  9. package/dist/controls-options-manager/types.js.map +1 -1
  10. package/dist/controls-options-manager/util.js +52 -0
  11. package/dist/controls-options-manager/util.js.map +1 -1
  12. package/dist/interpretation/index.js +1 -1
  13. package/dist/interpretation/siLanguage.js +1 -1
  14. package/dist/locus-info/controlsUtils.js +28 -10
  15. package/dist/locus-info/controlsUtils.js.map +1 -1
  16. package/dist/locus-info/index.js +20 -1
  17. package/dist/locus-info/index.js.map +1 -1
  18. package/dist/media/index.js +3 -15
  19. package/dist/media/index.js.map +1 -1
  20. package/dist/meeting/in-meeting-actions.js +11 -1
  21. package/dist/meeting/in-meeting-actions.js.map +1 -1
  22. package/dist/meeting/index.js +443 -256
  23. package/dist/meeting/index.js.map +1 -1
  24. package/dist/meeting/locusMediaRequest.js +21 -22
  25. package/dist/meeting/locusMediaRequest.js.map +1 -1
  26. package/dist/meeting/muteState.js +0 -2
  27. package/dist/meeting/muteState.js.map +1 -1
  28. package/dist/meeting/request.js +30 -0
  29. package/dist/meeting/request.js.map +1 -1
  30. package/dist/meeting/request.type.js.map +1 -1
  31. package/dist/meeting/util.js +10 -2
  32. package/dist/meeting/util.js.map +1 -1
  33. package/dist/meeting-info/meeting-info-v2.js +359 -60
  34. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  35. package/dist/meetings/index.js +60 -1
  36. package/dist/meetings/index.js.map +1 -1
  37. package/dist/member/index.js +10 -0
  38. package/dist/member/index.js.map +1 -1
  39. package/dist/member/util.js +3 -0
  40. package/dist/member/util.js.map +1 -1
  41. package/dist/metrics/constants.js +9 -0
  42. package/dist/metrics/constants.js.map +1 -1
  43. package/dist/reachability/clusterReachability.js +52 -8
  44. package/dist/reachability/clusterReachability.js.map +1 -1
  45. package/dist/reachability/index.js +70 -45
  46. package/dist/reachability/index.js.map +1 -1
  47. package/dist/reachability/reachability.types.js +14 -0
  48. package/dist/reachability/reachability.types.js.map +1 -1
  49. package/dist/reachability/request.js +19 -3
  50. package/dist/reachability/request.js.map +1 -1
  51. package/dist/reconnection-manager/index.js +2 -2
  52. package/dist/reconnection-manager/index.js.map +1 -1
  53. package/dist/recording-controller/util.js +5 -5
  54. package/dist/recording-controller/util.js.map +1 -1
  55. package/dist/roap/index.js.map +1 -1
  56. package/dist/roap/turnDiscovery.js +45 -27
  57. package/dist/roap/turnDiscovery.js.map +1 -1
  58. package/dist/roap/types.js +17 -0
  59. package/dist/roap/types.js.map +1 -0
  60. package/dist/types/config.d.ts +1 -0
  61. package/dist/types/constants.d.ts +10 -0
  62. package/dist/types/controls-options-manager/enums.d.ts +3 -1
  63. package/dist/types/controls-options-manager/types.d.ts +7 -1
  64. package/dist/types/locus-info/index.d.ts +1 -0
  65. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  66. package/dist/types/meeting/index.d.ts +47 -1
  67. package/dist/types/meeting/muteState.d.ts +0 -1
  68. package/dist/types/meeting/request.d.ts +12 -1
  69. package/dist/types/meeting/request.type.d.ts +6 -0
  70. package/dist/types/meeting/util.d.ts +2 -1
  71. package/dist/types/meeting-info/meeting-info-v2.d.ts +80 -0
  72. package/dist/types/meetings/index.d.ts +29 -0
  73. package/dist/types/member/index.d.ts +1 -0
  74. package/dist/types/metrics/constants.d.ts +9 -0
  75. package/dist/types/reachability/clusterReachability.d.ts +13 -1
  76. package/dist/types/reachability/index.d.ts +2 -1
  77. package/dist/types/reachability/reachability.types.d.ts +5 -0
  78. package/dist/types/roap/index.d.ts +3 -2
  79. package/dist/types/roap/turnDiscovery.d.ts +5 -17
  80. package/dist/types/roap/types.d.ts +16 -0
  81. package/dist/webinar/index.js +1 -1
  82. package/package.json +22 -22
  83. package/src/config.ts +1 -0
  84. package/src/constants.ts +17 -0
  85. package/src/controls-options-manager/enums.ts +2 -0
  86. package/src/controls-options-manager/types.ts +11 -1
  87. package/src/controls-options-manager/util.ts +62 -0
  88. package/src/locus-info/controlsUtils.ts +44 -14
  89. package/src/locus-info/index.ts +23 -1
  90. package/src/media/index.ts +5 -21
  91. package/src/meeting/in-meeting-actions.ts +20 -0
  92. package/src/meeting/index.ts +263 -69
  93. package/src/meeting/locusMediaRequest.ts +27 -22
  94. package/src/meeting/muteState.ts +0 -2
  95. package/src/meeting/request.ts +36 -1
  96. package/src/meeting/request.type.ts +7 -0
  97. package/src/meeting/util.ts +9 -2
  98. package/src/meeting-info/meeting-info-v2.ts +247 -6
  99. package/src/meetings/index.ts +72 -1
  100. package/src/member/index.ts +11 -0
  101. package/src/member/util.ts +3 -0
  102. package/src/metrics/constants.ts +9 -0
  103. package/src/reachability/clusterReachability.ts +47 -1
  104. package/src/reachability/index.ts +15 -0
  105. package/src/reachability/reachability.types.ts +6 -0
  106. package/src/reachability/request.ts +7 -0
  107. package/src/reconnection-manager/index.ts +2 -2
  108. package/src/recording-controller/util.ts +17 -13
  109. package/src/roap/index.ts +3 -7
  110. package/src/roap/turnDiscovery.ts +34 -39
  111. package/src/roap/types.ts +23 -0
  112. package/test/unit/spec/controls-options-manager/util.js +120 -0
  113. package/test/unit/spec/locus-info/controlsUtils.js +103 -9
  114. package/test/unit/spec/locus-info/index.js +28 -0
  115. package/test/unit/spec/media/index.ts +6 -16
  116. package/test/unit/spec/meeting/in-meeting-actions.ts +13 -4
  117. package/test/unit/spec/meeting/index.js +490 -130
  118. package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
  119. package/test/unit/spec/meeting/muteState.js +0 -2
  120. package/test/unit/spec/meeting/request.js +32 -1
  121. package/test/unit/spec/meeting/utils.js +115 -18
  122. package/test/unit/spec/meeting-info/meetinginfov2.js +443 -114
  123. package/test/unit/spec/meetings/index.js +78 -1
  124. package/test/unit/spec/member/index.js +7 -0
  125. package/test/unit/spec/member/util.js +24 -0
  126. package/test/unit/spec/reachability/clusterReachability.ts +47 -1
  127. package/test/unit/spec/reachability/index.ts +12 -0
  128. package/test/unit/spec/reachability/request.js +47 -2
  129. package/test/unit/spec/reconnection-manager/index.js +4 -4
  130. package/test/unit/spec/roap/turnDiscovery.ts +110 -28
@@ -1,6 +1,10 @@
1
1
  import {assert} from '@webex/test-helper-chai';
2
2
  import ControlsUtils from '@webex/plugin-meetings/src/locus-info/controlsUtils';
3
3
  import controlsUtils from "@webex/plugin-meetings/src/locus-info/controlsUtils";
4
+ import {
5
+ MEETING_STATE,
6
+ BREAKOUTS,
7
+ } from '../../../../src/constants';
4
8
 
5
9
  const defaultControls = {
6
10
  entryExitTone: {
@@ -140,7 +144,25 @@ describe('plugin-meetings', () => {
140
144
  assert.equal(parsedControls.videoLayout.overrideDefault, newControls.videoLayout.overrideDefault);
141
145
  assert.equal(parsedControls.videoLayout.lockAttendeeViewOnStageOnly, newControls.videoLayout.lockAttendeeViewOnStageOnly);
142
146
  assert.equal(parsedControls.videoLayout.stageParameters, newControls.videoLayout.stageParameters);
147
+ });
148
+
149
+ it('should parse the annotationControl control', () => {
150
+ const newControls = {annotationControl: {enabled: true}};
151
+
152
+ const parsedControls = ControlsUtils.parse(newControls);
143
153
 
154
+ assert.equal(
155
+ parsedControls.annotationControl.enabled,
156
+ newControls.annotationControl.enabled
157
+ );
158
+ });
159
+
160
+ it('should parse the rdcControl control', () => {
161
+ const newControls = {rdcControl: {enabled: true}};
162
+
163
+ const parsedControls = ControlsUtils.parse(newControls);
164
+
165
+ assert.equal(parsedControls.rdcControl.enabled, newControls.rdcControl.enabled);
144
166
  });
145
167
 
146
168
  describe('videoEnabled', () => {
@@ -269,6 +291,14 @@ describe('plugin-meetings', () => {
269
291
  assert.equal(updates.hasPracticeSessionEnabledChanged, true);
270
292
  });
271
293
 
294
+ it('returns hasPracticeSessionEnabledChanged = false when enabled is false and previous state is false', () => {
295
+ const newControls = {practiceSession: {enabled: false}};
296
+
297
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
298
+
299
+ assert.equal(updates.hasPracticeSessionEnabledChanged, false);
300
+ });
301
+
272
302
  it('returns hasEntryExitToneChanged = true when mode changed', () => {
273
303
  const newControls = {
274
304
  entryExitTone: {
@@ -365,6 +395,22 @@ describe('plugin-meetings', () => {
365
395
  assert.equal(updates.hasManualCaptionChanged, false);
366
396
  });
367
397
 
398
+ it('returns hasAnnotationControlChanged = true when changed', () => {
399
+ const newControls = {annotationControl: {enabled: true}};
400
+
401
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
402
+
403
+ assert.equal(updates.hasAnnotationControlChanged, true);
404
+ });
405
+
406
+ it('returns hasRemoteDesktopControlChanged = true when changed', () => {
407
+ const newControls = {rdcControl: {enabled: true}};
408
+
409
+ const {updates} = ControlsUtils.getControls(defaultControls, newControls);
410
+
411
+ assert.equal(updates.hasRemoteDesktopControlChanged, true);
412
+ });
413
+
368
414
  describe('videoEnabled', () => {
369
415
  const testVideoEnabled = (oldControls, newControls, updatedProperty) => {
370
416
  const result = ControlsUtils.getControls(oldControls, newControls);
@@ -424,28 +470,76 @@ describe('plugin-meetings', () => {
424
470
 
425
471
  describe('getSessionSwitchStatus', () => {
426
472
  it('if no breakout control, return switch status both false', () => {
427
- const oldControls = {};
428
- const newControls = {};
429
- assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldControls, newControls), {
473
+ const oldLocus = {};
474
+ const newLocus = {};
475
+ assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
430
476
  isReturnToMain: false, isJoinToBreakout: false
431
477
  });
432
478
  });
433
479
 
434
480
  it('if switch session from breakout to main, return isReturnToMain as true', () => {
435
- const oldControls = {breakout: {sessionType: 'BREAKOUT'}};
436
- const newControls = {breakout: {sessionType: 'MAIN'}};
437
- assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldControls, newControls), {
481
+ const oldLocus = {controls: {breakout: {sessionType: 'BREAKOUT'}}};
482
+ const newLocus = {controls: {breakout: {sessionType: 'MAIN'}}};
483
+ assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
438
484
  isReturnToMain: true, isJoinToBreakout: false
439
485
  });
440
486
  });
441
487
 
442
488
  it('if switch session from main to breakout, return isJoinToBreakout as true', () => {
443
- const oldControls = {breakout: {sessionType: 'MAIN'}};
444
- const newControls = {breakout: {sessionType: 'BREAKOUT'}};
445
- assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldControls, newControls), {
489
+ const oldLocus = {controls: {breakout: {sessionType: 'MAIN'}}};
490
+ const newLocus = {controls: {breakout: {sessionType: 'BREAKOUT'}}};
491
+ assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
446
492
  isReturnToMain: false, isJoinToBreakout: true
447
493
  });
448
494
  });
495
+
496
+ it('if needUseCache conditions are met, return isJoinToBreakout as true', () => {
497
+ const oldLocus = {
498
+ self: { isCreator: true },
499
+ controls: { breakout: { sessionType: BREAKOUTS.SESSION_TYPES.MAIN} },
500
+ };
501
+
502
+ const newLocus = {
503
+ participants: [
504
+ { isCreator: true, state: MEETING_STATE.STATES.JOINED },
505
+ ],
506
+ controls: {
507
+ breakout: {
508
+ sessionType: BREAKOUTS.SESSION_TYPES.MAIN,
509
+ groups: [{ id: 'group1' }]
510
+ },
511
+ },
512
+ };
513
+
514
+ assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
515
+ isReturnToMain: true,
516
+ isJoinToBreakout: false
517
+ });
518
+ });
519
+
520
+ it('if needUseCache conditions are not met, return newLocus and isReturnToMain as false', () => {
521
+ const oldLocus = {
522
+ self: { isCreator: false },
523
+ controls: { breakout: { sessionType: BREAKOUTS.SESSION_TYPES.BREAKOUT} },
524
+ };
525
+
526
+ const newLocus = {
527
+ participants: [
528
+ { isCreator: true, state: MEETING_STATE.STATES.JOINED },
529
+ ],
530
+ controls: {
531
+ breakout: {
532
+ sessionType: BREAKOUTS.SESSION_TYPES.BREAKOUT,
533
+ groups: []
534
+ },
535
+ },
536
+ };
537
+
538
+ assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
539
+ isReturnToMain: false,
540
+ isJoinToBreakout: false
541
+ });
542
+ });
449
543
  });
450
544
 
451
545
  describe('#isMainSessionDTO', () => {
@@ -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,32 @@ 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
+
281
309
  it('should keep the recording state to `IDLE`', () => {
282
310
  locusInfo.controls = {
283
311
  record: {
@@ -79,7 +79,7 @@ describe('createMediaConnection', () => {
79
79
  enableRtx: ENABLE_RTX,
80
80
  enableExtmap: ENABLE_EXTMAP,
81
81
  turnServerInfo: {
82
- url: 'turns:turn-server-url:443?transport=tcp',
82
+ urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
83
83
  username: 'turn username',
84
84
  password: 'turn password',
85
85
  },
@@ -91,12 +91,7 @@ describe('createMediaConnection', () => {
91
91
  {
92
92
  iceServers: [
93
93
  {
94
- urls: 'turn:turn-server-url:5004?transport=tcp',
95
- username: 'turn username',
96
- credential: 'turn password',
97
- },
98
- {
99
- urls: 'turns:turn-server-url:443?transport=tcp',
94
+ urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
100
95
  username: 'turn username',
101
96
  credential: 'turn password',
102
97
  },
@@ -159,7 +154,7 @@ describe('createMediaConnection', () => {
159
154
  },
160
155
  rtcMetrics,
161
156
  turnServerInfo: {
162
- url: 'turns:turn-server-url:443?transport=tcp',
157
+ urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
163
158
  username: 'turn username',
164
159
  password: 'turn password',
165
160
  },
@@ -171,12 +166,7 @@ describe('createMediaConnection', () => {
171
166
  {
172
167
  iceServers: [
173
168
  {
174
- urls: 'turn:turn-server-url:5004?transport=tcp',
175
- username: 'turn username',
176
- credential: 'turn password',
177
- },
178
- {
179
- urls: 'turns:turn-server-url:443?transport=tcp',
169
+ urls: ['turns:turn-server-url-1:443?transport=tcp', 'turns:turn-server-url-2:443?transport=tcp'],
180
170
  username: 'turn username',
181
171
  credential: 'turn password',
182
172
  },
@@ -212,7 +202,7 @@ describe('createMediaConnection', () => {
212
202
  {testCase: 'turnServerInfo is undefined', turnServerInfo: undefined},
213
203
  {
214
204
  testCase: 'turnServerInfo.url is empty string',
215
- turnServerInfo: {url: '', username: 'turn username', password: 'turn password'},
205
+ turnServerInfo: {urls: [], username: 'turn username', password: 'turn password'},
216
206
  },
217
207
  ].forEach(({testCase, turnServerInfo}) => {
218
208
  it(`passes empty ICE servers array to MultistreamRoapMediaConnection if ${testCase} (multistream enabled)`, () => {
@@ -276,7 +266,7 @@ describe('createMediaConnection', () => {
276
266
  {testCase: 'turnServerInfo is undefined', turnServerInfo: undefined},
277
267
  {
278
268
  testCase: 'turnServerInfo.url is empty string',
279
- turnServerInfo: {url: '', username: 'turn username', password: 'turn password'},
269
+ turnServerInfo: {urls: [], username: 'turn username', password: 'turn password'},
280
270
  },
281
271
  ].forEach(({testCase, turnServerInfo}) => {
282
272
  it(`passes empty ICE servers array to RoapMediaConnection if ${testCase} (multistream disabled)`, () => {
@@ -90,10 +90,15 @@ describe('plugin-meetings', () => {
90
90
  canShowStageView: null,
91
91
  canEnableStageView: null,
92
92
  canDisableStageView: null,
93
- isPracticeSessionOn : null,
94
- isPracticeSessionOff : null,
93
+ isPracticeSessionOn: null,
94
+ isPracticeSessionOff: null,
95
95
  canStartPracticeSession: null,
96
96
  canStopPracticeSession: null,
97
+ requiresPostMeetingDataConsentPrompt: null,
98
+ canEnableAnnotation: null,
99
+ canDisableAnnotation: null,
100
+ canEnableRemoteDesktopControl: null,
101
+ canDisableRemoteDesktopControl: null,
97
102
 
98
103
  ...expected,
99
104
  };
@@ -194,8 +199,12 @@ describe('plugin-meetings', () => {
194
199
  'isPracticeSessionOff',
195
200
  'canStartPracticeSession',
196
201
  'canStopPracticeSession',
197
-
198
- ].forEach((key) => {
202
+ 'requiresPostMeetingDataConsentPrompt',
203
+ 'canEnableAnnotation',
204
+ 'canDisableAnnotation',
205
+ 'canEnableRemoteDesktopControl',
206
+ 'canDisableRemoteDesktopControl',
207
+ ].forEach((key) => {
199
208
  it(`get and set for ${key} work as expected`, () => {
200
209
  const inMeetingActions = new InMeetingActions();
201
210