@webex/plugin-meetings 3.7.0-next.3 → 3.7.0-next.31

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 (114) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
  4. package/dist/common/errors/join-webinar-error.js.map +1 -0
  5. package/dist/config.js +1 -1
  6. package/dist/config.js.map +1 -1
  7. package/dist/constants.js +31 -6
  8. package/dist/constants.js.map +1 -1
  9. package/dist/index.js +8 -15
  10. package/dist/index.js.map +1 -1
  11. package/dist/interpretation/index.js +1 -1
  12. package/dist/interpretation/siLanguage.js +1 -1
  13. package/dist/locus-info/index.js +13 -2
  14. package/dist/locus-info/index.js.map +1 -1
  15. package/dist/locus-info/selfUtils.js +30 -17
  16. package/dist/locus-info/selfUtils.js.map +1 -1
  17. package/dist/meeting/in-meeting-actions.js +11 -1
  18. package/dist/meeting/in-meeting-actions.js.map +1 -1
  19. package/dist/meeting/index.js +810 -779
  20. package/dist/meeting/index.js.map +1 -1
  21. package/dist/meeting/request.js +30 -0
  22. package/dist/meeting/request.js.map +1 -1
  23. package/dist/meeting/request.type.js.map +1 -1
  24. package/dist/meeting/util.js +3 -8
  25. package/dist/meeting/util.js.map +1 -1
  26. package/dist/meeting-info/meeting-info-v2.js +29 -17
  27. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  28. package/dist/meetings/index.js +6 -3
  29. package/dist/meetings/index.js.map +1 -1
  30. package/dist/member/index.js +9 -0
  31. package/dist/member/index.js.map +1 -1
  32. package/dist/member/types.js.map +1 -1
  33. package/dist/member/util.js +39 -28
  34. package/dist/member/util.js.map +1 -1
  35. package/dist/members/util.js +4 -2
  36. package/dist/members/util.js.map +1 -1
  37. package/dist/metrics/constants.js +1 -1
  38. package/dist/metrics/constants.js.map +1 -1
  39. package/dist/multistream/remoteMedia.js +30 -15
  40. package/dist/multistream/remoteMedia.js.map +1 -1
  41. package/dist/multistream/sendSlotManager.js +24 -0
  42. package/dist/multistream/sendSlotManager.js.map +1 -1
  43. package/dist/reachability/clusterReachability.js +12 -11
  44. package/dist/reachability/clusterReachability.js.map +1 -1
  45. package/dist/recording-controller/enums.js +8 -4
  46. package/dist/recording-controller/enums.js.map +1 -1
  47. package/dist/recording-controller/index.js +18 -9
  48. package/dist/recording-controller/index.js.map +1 -1
  49. package/dist/recording-controller/util.js +13 -9
  50. package/dist/recording-controller/util.js.map +1 -1
  51. package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
  52. package/dist/types/constants.d.ts +23 -1
  53. package/dist/types/index.d.ts +3 -3
  54. package/dist/types/locus-info/index.d.ts +2 -1
  55. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  56. package/dist/types/meeting/index.d.ts +9 -10
  57. package/dist/types/meeting/request.d.ts +12 -1
  58. package/dist/types/meeting/request.type.d.ts +6 -0
  59. package/dist/types/meeting/util.d.ts +1 -1
  60. package/dist/types/meeting-info/meeting-info-v2.d.ts +4 -4
  61. package/dist/types/meetings/index.d.ts +3 -0
  62. package/dist/types/member/index.d.ts +1 -0
  63. package/dist/types/member/types.d.ts +7 -0
  64. package/dist/types/members/util.d.ts +2 -0
  65. package/dist/types/metrics/constants.d.ts +1 -1
  66. package/dist/types/multistream/sendSlotManager.d.ts +8 -1
  67. package/dist/types/recording-controller/enums.d.ts +5 -2
  68. package/dist/types/recording-controller/index.d.ts +1 -0
  69. package/dist/types/recording-controller/util.d.ts +2 -1
  70. package/dist/webinar/index.js +390 -7
  71. package/dist/webinar/index.js.map +1 -1
  72. package/package.json +23 -22
  73. package/src/common/errors/join-webinar-error.ts +24 -0
  74. package/src/config.ts +1 -1
  75. package/src/constants.ts +28 -3
  76. package/src/index.ts +2 -3
  77. package/src/locus-info/index.ts +17 -2
  78. package/src/locus-info/selfUtils.ts +19 -6
  79. package/src/meeting/in-meeting-actions.ts +21 -0
  80. package/src/meeting/index.ts +147 -54
  81. package/src/meeting/request.ts +26 -1
  82. package/src/meeting/request.type.ts +7 -0
  83. package/src/meeting/util.ts +3 -9
  84. package/src/meeting-info/meeting-info-v2.ts +23 -11
  85. package/src/meetings/index.ts +8 -2
  86. package/src/member/index.ts +9 -0
  87. package/src/member/types.ts +8 -0
  88. package/src/member/util.ts +34 -24
  89. package/src/members/util.ts +1 -0
  90. package/src/metrics/constants.ts +1 -1
  91. package/src/multistream/remoteMedia.ts +28 -15
  92. package/src/multistream/sendSlotManager.ts +31 -0
  93. package/src/reachability/clusterReachability.ts +4 -1
  94. package/src/recording-controller/enums.ts +5 -2
  95. package/src/recording-controller/index.ts +17 -4
  96. package/src/recording-controller/util.ts +20 -5
  97. package/src/webinar/index.ts +235 -9
  98. package/test/unit/spec/locus-info/index.js +222 -0
  99. package/test/unit/spec/locus-info/selfConstant.js +7 -0
  100. package/test/unit/spec/locus-info/selfUtils.js +91 -1
  101. package/test/unit/spec/meeting/in-meeting-actions.ts +13 -1
  102. package/test/unit/spec/meeting/index.js +318 -81
  103. package/test/unit/spec/meeting/utils.js +11 -19
  104. package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
  105. package/test/unit/spec/meetings/index.js +9 -5
  106. package/test/unit/spec/member/util.js +52 -11
  107. package/test/unit/spec/members/utils.js +95 -0
  108. package/test/unit/spec/multistream/remoteMedia.ts +11 -7
  109. package/test/unit/spec/reachability/clusterReachability.ts +7 -0
  110. package/test/unit/spec/recording-controller/index.js +61 -5
  111. package/test/unit/spec/recording-controller/util.js +39 -3
  112. package/test/unit/spec/webinar/index.ts +504 -0
  113. package/dist/common/errors/webinar-registration-error.js.map +0 -1
  114. package/src/common/errors/webinar-registration-error.ts +0 -27
@@ -1,9 +1,10 @@
1
1
  import {assert} from '@webex/test-helper-chai';
2
2
  import Sinon from 'sinon';
3
- import {cloneDeep} from 'lodash';
3
+ import {cloneDeep, defaultsDeep} from 'lodash';
4
4
  import SelfUtils from '@webex/plugin-meetings/src/locus-info/selfUtils';
5
5
 
6
6
  import {self} from './selfConstant';
7
+ import {_IDLE_, _WAIT_} from '@webex/plugin-meetings/src/constants';
7
8
 
8
9
  describe('plugin-meetings', () => {
9
10
  describe('selfUtils', () => {
@@ -60,6 +61,14 @@ describe('plugin-meetings', () => {
60
61
  assert.calledWith(spy, self);
61
62
  assert.deepEqual(parsedSelf.layout, self.controls.layouts[0].type);
62
63
  });
64
+
65
+ it('calls getBrb and returns the resulting brb value', () => {
66
+ const spy = Sinon.spy(SelfUtils, 'getBrb');
67
+ const parsedSelf = SelfUtils.parse(self);
68
+
69
+ assert.calledWith(spy, self);
70
+ assert.deepEqual(parsedSelf.brb, self.controls.brb);
71
+ });
63
72
  });
64
73
 
65
74
  describe('getLayout', () => {
@@ -170,6 +179,37 @@ describe('plugin-meetings', () => {
170
179
  });
171
180
  });
172
181
 
182
+ describe('brbChanged', () => {
183
+ it('should return true if brb have changed', () => {
184
+ const current = {
185
+ brb: {enabled: true},
186
+ };
187
+ const previous = {
188
+ brb: {enabled: false},
189
+ };
190
+
191
+ assert.isTrue(SelfUtils.brbChanged(previous, current));
192
+ });
193
+
194
+ it('should return false if brb have not changed', () => {
195
+ const current = {
196
+ brb: {enabled: true},
197
+ };
198
+ const previous = {
199
+ brb: {enabled: true},
200
+ };
201
+
202
+ assert.isFalse(SelfUtils.brbChanged(previous, current));
203
+ });
204
+
205
+ it('should return false if brb in current is undefined', () => {
206
+ const current = {};
207
+ const previous = {brb: {enabled: true}};
208
+
209
+ assert.isFalse(SelfUtils.brbChanged(previous, current));
210
+ });
211
+ });
212
+
173
213
  describe('canNotViewTheParticipantList', () => {
174
214
  it('should return the correct value', () => {
175
215
  assert.equal(
@@ -299,6 +339,56 @@ describe('plugin-meetings', () => {
299
339
  assert.equal(updates.localAudioUnmuteRequestedByServer, false);
300
340
  });
301
341
  });
342
+
343
+ describe('updates.isUserUnadmitted', () => {
344
+ const testIsUserUnadmitted = (previousObjectDelta, currentObjectDelta, expected) => function () {
345
+ const previous =
346
+ previousObjectDelta === undefined ? undefined : defaultsDeep(previousObjectDelta, self);
347
+ const current = defaultsDeep(currentObjectDelta, self);
348
+
349
+ const {updates} = SelfUtils.getSelves(previous, current, self.devices[0].url);
350
+
351
+ assert.equal(updates.isUserUnadmitted, expected);
352
+ };
353
+
354
+ it(
355
+ 'should return true when previous is undefined and current is in lobby',
356
+ testIsUserUnadmitted(
357
+ undefined,
358
+ {devices: [{intent: {type: _WAIT_}}], state: _IDLE_},
359
+ true
360
+ )
361
+ );
362
+
363
+ it(
364
+ 'should return false when previous is undefined and user is not in meeting',
365
+ testIsUserUnadmitted(undefined, {devices: [], state: _IDLE_}, false)
366
+ );
367
+
368
+ it(
369
+ 'should return false when previous is undefined and current is in meeting',
370
+ testIsUserUnadmitted(undefined, {}, false)
371
+ );
372
+
373
+ it(
374
+ 'should return false when previous is in lobby and current is in lobby',
375
+ testIsUserUnadmitted(
376
+ {devices: [{intent: {type: _WAIT_}}], state: _IDLE_},
377
+ {devices: [{intent: {type: _WAIT_}}], state: _IDLE_},
378
+ false
379
+ )
380
+ );
381
+
382
+ it(
383
+ 'should return false when previous is in lobby and current is in meeting',
384
+ testIsUserUnadmitted({devices: [{intent: {type: _WAIT_}}], state: _IDLE_}, {}, false)
385
+ );
386
+
387
+ it(
388
+ 'should return true when previous is in meeting and current is in lobby',
389
+ testIsUserUnadmitted({}, {devices: [{intent: {type: _WAIT_}}], state: _IDLE_}, true)
390
+ );
391
+ });
302
392
  });
303
393
 
304
394
  describe('isSharingBlocked', () => {
@@ -33,6 +33,7 @@ describe('plugin-meetings', () => {
33
33
  canStartManualCaption: null,
34
34
  canStopManualCaption: null,
35
35
  isManualCaptionActive: null,
36
+ isPremiseRecordingEnabled: null,
36
37
  isSaveTranscriptsEnabled: null,
37
38
  isWebexAssistantActive: null,
38
39
  canViewCaptionPanel: null,
@@ -88,6 +89,11 @@ describe('plugin-meetings', () => {
88
89
  canShowStageView: null,
89
90
  canEnableStageView: null,
90
91
  canDisableStageView: null,
92
+ isPracticeSessionOn : null,
93
+ isPracticeSessionOff : null,
94
+ canStartPracticeSession: null,
95
+ canStopPracticeSession: null,
96
+
91
97
  ...expected,
92
98
  };
93
99
 
@@ -126,6 +132,7 @@ describe('plugin-meetings', () => {
126
132
  'canStartManualCaption',
127
133
  'canStopManualCaption',
128
134
  'isManualCaptionActive',
135
+ 'isPremiseRecordingEnabled',
129
136
  'isSaveTranscriptsEnabled',
130
137
  'isWebexAssistantActive',
131
138
  'canViewCaptionPanel',
@@ -181,7 +188,12 @@ describe('plugin-meetings', () => {
181
188
  'canShowStageView',
182
189
  'canEnableStageView',
183
190
  'canDisableStageView',
184
- ].forEach((key) => {
191
+ 'isPracticeSessionOn',
192
+ 'isPracticeSessionOff',
193
+ 'canStartPracticeSession',
194
+ 'canStopPracticeSession',
195
+
196
+ ].forEach((key) => {
185
197
  it(`get and set for ${key} work as expected`, () => {
186
198
  const inMeetingActions = new InMeetingActions();
187
199