@webex/plugin-meetings 3.8.0-next.38 → 3.8.0-next.39
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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +11 -1
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +2 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +52 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +14 -2
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +18 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +9 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +42 -8
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/constants.d.ts +8 -0
- package/dist/types/controls-options-manager/enums.d.ts +3 -1
- package/dist/types/controls-options-manager/types.d.ts +7 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/constants.ts +13 -0
- package/src/controls-options-manager/enums.ts +2 -0
- package/src/controls-options-manager/types.ts +11 -1
- package/src/controls-options-manager/util.ts +62 -0
- package/src/locus-info/controlsUtils.ts +18 -0
- package/src/locus-info/index.ts +18 -0
- package/src/meeting/in-meeting-actions.ts +16 -0
- package/src/meeting/index.ts +34 -0
- package/test/unit/spec/controls-options-manager/util.js +120 -0
- package/test/unit/spec/locus-info/controlsUtils.js +46 -12
- package/test/unit/spec/locus-info/index.js +28 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -1
- package/test/unit/spec/meeting/index.js +52 -0
@@ -144,7 +144,25 @@ describe('plugin-meetings', () => {
|
|
144
144
|
assert.equal(parsedControls.videoLayout.overrideDefault, newControls.videoLayout.overrideDefault);
|
145
145
|
assert.equal(parsedControls.videoLayout.lockAttendeeViewOnStageOnly, newControls.videoLayout.lockAttendeeViewOnStageOnly);
|
146
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);
|
147
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);
|
148
166
|
});
|
149
167
|
|
150
168
|
describe('videoEnabled', () => {
|
@@ -377,6 +395,22 @@ describe('plugin-meetings', () => {
|
|
377
395
|
assert.equal(updates.hasManualCaptionChanged, false);
|
378
396
|
});
|
379
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
|
+
|
380
414
|
describe('videoEnabled', () => {
|
381
415
|
const testVideoEnabled = (oldControls, newControls, updatedProperty) => {
|
382
416
|
const result = ControlsUtils.getControls(oldControls, newControls);
|
@@ -464,31 +498,31 @@ describe('plugin-meetings', () => {
|
|
464
498
|
self: { isCreator: true },
|
465
499
|
controls: { breakout: { sessionType: BREAKOUTS.SESSION_TYPES.MAIN} },
|
466
500
|
};
|
467
|
-
|
501
|
+
|
468
502
|
const newLocus = {
|
469
503
|
participants: [
|
470
|
-
{ isCreator: true, state: MEETING_STATE.STATES.JOINED },
|
504
|
+
{ isCreator: true, state: MEETING_STATE.STATES.JOINED },
|
471
505
|
],
|
472
506
|
controls: {
|
473
507
|
breakout: {
|
474
|
-
sessionType: BREAKOUTS.SESSION_TYPES.MAIN,
|
475
|
-
groups: [{ id: 'group1' }]
|
508
|
+
sessionType: BREAKOUTS.SESSION_TYPES.MAIN,
|
509
|
+
groups: [{ id: 'group1' }]
|
476
510
|
},
|
477
511
|
},
|
478
512
|
};
|
479
|
-
|
513
|
+
|
480
514
|
assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
|
481
|
-
isReturnToMain: true,
|
515
|
+
isReturnToMain: true,
|
482
516
|
isJoinToBreakout: false
|
483
517
|
});
|
484
518
|
});
|
485
|
-
|
519
|
+
|
486
520
|
it('if needUseCache conditions are not met, return newLocus and isReturnToMain as false', () => {
|
487
521
|
const oldLocus = {
|
488
|
-
self: { isCreator: false },
|
522
|
+
self: { isCreator: false },
|
489
523
|
controls: { breakout: { sessionType: BREAKOUTS.SESSION_TYPES.BREAKOUT} },
|
490
524
|
};
|
491
|
-
|
525
|
+
|
492
526
|
const newLocus = {
|
493
527
|
participants: [
|
494
528
|
{ isCreator: true, state: MEETING_STATE.STATES.JOINED },
|
@@ -496,13 +530,13 @@ describe('plugin-meetings', () => {
|
|
496
530
|
controls: {
|
497
531
|
breakout: {
|
498
532
|
sessionType: BREAKOUTS.SESSION_TYPES.BREAKOUT,
|
499
|
-
groups: []
|
533
|
+
groups: []
|
500
534
|
},
|
501
535
|
},
|
502
536
|
};
|
503
|
-
|
537
|
+
|
504
538
|
assert.deepEqual(controlsUtils.getSessionSwitchStatus(oldLocus, newLocus), {
|
505
|
-
isReturnToMain: false,
|
539
|
+
isReturnToMain: false,
|
506
540
|
isJoinToBreakout: false
|
507
541
|
});
|
508
542
|
});
|
@@ -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: {
|
@@ -94,6 +94,10 @@ describe('plugin-meetings', () => {
|
|
94
94
|
isPracticeSessionOff : null,
|
95
95
|
canStartPracticeSession: null,
|
96
96
|
canStopPracticeSession: null,
|
97
|
+
canEnableAnnotation: null,
|
98
|
+
canDisableAnnotation: null,
|
99
|
+
canEnableRemoteDesktopControl: null,
|
100
|
+
canDisableRemoteDesktopControl: null,
|
97
101
|
|
98
102
|
...expected,
|
99
103
|
};
|
@@ -194,7 +198,10 @@ describe('plugin-meetings', () => {
|
|
194
198
|
'isPracticeSessionOff',
|
195
199
|
'canStartPracticeSession',
|
196
200
|
'canStopPracticeSession',
|
197
|
-
|
201
|
+
'canEnableAnnotation',
|
202
|
+
'canDisableAnnotation',
|
203
|
+
'canEnableRemoteDesktopControl',
|
204
|
+
'canDisableRemoteDesktopControl',
|
198
205
|
].forEach((key) => {
|
199
206
|
it(`get and set for ${key} work as expected`, () => {
|
200
207
|
const inMeetingActions = new InMeetingActions();
|
@@ -9791,6 +9791,42 @@ describe('plugin-meetings', () => {
|
|
9791
9791
|
);
|
9792
9792
|
});
|
9793
9793
|
|
9794
|
+
it('listens to CONTROLS_ANNOTATION_CHANGED', async () => {
|
9795
|
+
const state = {example: 'value'};
|
9796
|
+
|
9797
|
+
await meeting.locusInfo.emitScoped(
|
9798
|
+
{function: 'test', file: 'test'},
|
9799
|
+
LOCUSINFO.EVENTS.CONTROLS_ANNOTATION_CHANGED,
|
9800
|
+
{state}
|
9801
|
+
);
|
9802
|
+
|
9803
|
+
assert.calledWith(
|
9804
|
+
TriggerProxy.trigger,
|
9805
|
+
meeting,
|
9806
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
9807
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_ANNOTATION_UPDATED,
|
9808
|
+
{state}
|
9809
|
+
);
|
9810
|
+
});
|
9811
|
+
|
9812
|
+
it('listens to CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED', async () => {
|
9813
|
+
const state = {example: 'value'};
|
9814
|
+
|
9815
|
+
await meeting.locusInfo.emitScoped(
|
9816
|
+
{function: 'test', file: 'test'},
|
9817
|
+
LOCUSINFO.EVENTS.CONTROLS_REMOTE_DESKTOP_CONTROL_CHANGED,
|
9818
|
+
{state}
|
9819
|
+
);
|
9820
|
+
|
9821
|
+
assert.calledWith(
|
9822
|
+
TriggerProxy.trigger,
|
9823
|
+
meeting,
|
9824
|
+
{file: 'meeting/index', function: 'setupLocusControlsListener'},
|
9825
|
+
EVENT_TRIGGERS.MEETING_CONTROLS_REMOTE_DESKTOP_CONTROL_UPDATED,
|
9826
|
+
{state}
|
9827
|
+
);
|
9828
|
+
});
|
9829
|
+
|
9794
9830
|
it('listens to the locus interpretation update event', () => {
|
9795
9831
|
const interpretation = {
|
9796
9832
|
siLanguages: [{languageCode: 20, languageName: 'en'}],
|
@@ -11348,6 +11384,22 @@ describe('plugin-meetings', () => {
|
|
11348
11384
|
requiredPolicies: [SELF_POLICY.SUPPORT_VOIP],
|
11349
11385
|
policies: selfUserPolicies,
|
11350
11386
|
});
|
11387
|
+
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
11388
|
+
requiredHints: [DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION],
|
11389
|
+
displayHints: userDisplayHints,
|
11390
|
+
});
|
11391
|
+
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
11392
|
+
requiredHints: [DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION],
|
11393
|
+
displayHints: userDisplayHints,
|
11394
|
+
});
|
11395
|
+
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
11396
|
+
requiredHints: [DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION],
|
11397
|
+
displayHints: userDisplayHints,
|
11398
|
+
});
|
11399
|
+
assert.calledWith(ControlsOptionsUtil.hasHints, {
|
11400
|
+
requiredHints: [DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION],
|
11401
|
+
displayHints: userDisplayHints,
|
11402
|
+
});
|
11351
11403
|
|
11352
11404
|
assert.calledWith(
|
11353
11405
|
TriggerProxy.trigger,
|