@webex/plugin-meetings 3.0.0-beta.25 → 3.0.0-beta.26
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 +5 -1
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +15 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +203 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- package/dist/controls-options-manager/util.js +28 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/meeting/in-meeting-actions.js +8 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +59 -12
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +5 -0
- package/dist/types/controls-options-manager/index.d.ts +120 -0
- package/dist/types/controls-options-manager/util.d.ts +7 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/types/meeting/index.d.ts +18 -0
- package/package.json +18 -18
- package/src/constants.ts +4 -0
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +6 -0
- package/src/controls-options-manager/index.ts +183 -0
- package/src/controls-options-manager/util.ts +20 -0
- package/src/meeting/in-meeting-actions.ts +16 -0
- package/src/meeting/index.ts +49 -0
- package/test/unit/spec/controls-options-manager/index.js +124 -0
- package/test/unit/spec/controls-options-manager/util.js +66 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
- package/test/unit/spec/meeting/index.js +15 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import ControlsOptionsManager from '@webex/plugin-meetings/src/controls-options-manager';
|
|
2
|
+
import sinon from 'sinon';
|
|
3
|
+
import {assert} from '@webex/test-helper-chai';
|
|
4
|
+
import { HTTP_VERBS } from '@webex/plugin-meetings/src/constants';
|
|
5
|
+
|
|
6
|
+
describe('plugin-meetings', () => {
|
|
7
|
+
describe('controls-options-manager tests', () => {
|
|
8
|
+
describe('index', () => {
|
|
9
|
+
let request;
|
|
10
|
+
|
|
11
|
+
describe('class tests', () => {
|
|
12
|
+
it('can set and extract new values later on', () => {
|
|
13
|
+
const manager = new ControlsOptionsManager({});
|
|
14
|
+
assert.isUndefined(manager.getLocusUrl());
|
|
15
|
+
manager.set({
|
|
16
|
+
locusUrl: 'test/id',
|
|
17
|
+
})
|
|
18
|
+
assert(manager.getLocusUrl(), 'test/id');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('Mute On Entry', () => {
|
|
23
|
+
let manager;
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
request = {
|
|
27
|
+
request: sinon.stub().returns(Promise.resolve()),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
manager = new ControlsOptionsManager(request);
|
|
31
|
+
|
|
32
|
+
manager.set({
|
|
33
|
+
locusUrl: 'test/id',
|
|
34
|
+
displayHints: [],
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe('setMuteOnEntry', () => {
|
|
39
|
+
it('rejects when correct display hint is not present enabled=false', () => {
|
|
40
|
+
const result = manager.setMuteOnEntry(false);
|
|
41
|
+
|
|
42
|
+
assert.notCalled(request.request);
|
|
43
|
+
|
|
44
|
+
assert.isRejected(result);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('rejects when correct display hint is not present enabled=true', () => {
|
|
48
|
+
const result = manager.setMuteOnEntry(true);
|
|
49
|
+
|
|
50
|
+
assert.notCalled(request.request);
|
|
51
|
+
|
|
52
|
+
assert.isRejected(result);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('can set mute on entry when the display hint is available enabled=true', () => {
|
|
56
|
+
manager.setDisplayHints(['ENABLE_MUTE_ON_ENTRY']);
|
|
57
|
+
|
|
58
|
+
const result = manager.setMuteOnEntry(true);
|
|
59
|
+
|
|
60
|
+
assert.calledWith(request.request, { uri: 'test/id/controls',
|
|
61
|
+
body: { muteOnEntry: { enabled: true } },
|
|
62
|
+
method: HTTP_VERBS.PATCH});
|
|
63
|
+
|
|
64
|
+
assert.deepEqual(result, request.request.firstCall.returnValue);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('can set mute on entry when the display hint is available enabled=false', () => {
|
|
68
|
+
manager.setDisplayHints(['DISABLE_MUTE_ON_ENTRY']);
|
|
69
|
+
|
|
70
|
+
const result = manager.setMuteOnEntry(false);
|
|
71
|
+
|
|
72
|
+
assert.calledWith(request.request, { uri: 'test/id/controls',
|
|
73
|
+
body: { muteOnEntry: { enabled: false } },
|
|
74
|
+
method: HTTP_VERBS.PATCH});
|
|
75
|
+
|
|
76
|
+
assert.deepEqual(result, request.request.firstCall.returnValue);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
describe('setDisallowUnmute', () => {
|
|
81
|
+
it('rejects when correct display hint is not present enabled=false', () => {
|
|
82
|
+
const result = manager.setDisallowUnmute(false);
|
|
83
|
+
|
|
84
|
+
assert.notCalled(request.request);
|
|
85
|
+
|
|
86
|
+
assert.isRejected(result);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('rejects when correct display hint is not present enabled=true', () => {
|
|
90
|
+
const result = manager.setDisallowUnmute(true);
|
|
91
|
+
|
|
92
|
+
assert.notCalled(request.request);
|
|
93
|
+
|
|
94
|
+
assert.isRejected(result);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('can set mute on entry when the display hint is available enabled=true', () => {
|
|
98
|
+
manager.setDisplayHints(['ENABLE_HARD_MUTE']);
|
|
99
|
+
|
|
100
|
+
const result = manager.setDisallowUnmute(true);
|
|
101
|
+
|
|
102
|
+
assert.calledWith(request.request, { uri: 'test/id/controls',
|
|
103
|
+
body: { disallowUnmute: { enabled: true } },
|
|
104
|
+
method: HTTP_VERBS.PATCH});
|
|
105
|
+
|
|
106
|
+
assert.deepEqual(result, request.request.firstCall.returnValue);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('can set mute on entry when the display hint is available enabled=false', () => {
|
|
110
|
+
manager.setDisplayHints(['DISABLE_HARD_MUTE']);
|
|
111
|
+
|
|
112
|
+
const result = manager.setDisallowUnmute(false);
|
|
113
|
+
|
|
114
|
+
assert.calledWith(request.request, { uri: 'test/id/controls',
|
|
115
|
+
body: { disallowUnmute: { enabled: false } },
|
|
116
|
+
method: HTTP_VERBS.PATCH});
|
|
117
|
+
|
|
118
|
+
assert.deepEqual(result, request.request.firstCall.returnValue);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import ControlsOptionsUtil from '@webex/plugin-meetings/src/controls-options-manager/util';
|
|
2
|
+
import { assert } from 'chai';
|
|
3
|
+
|
|
4
|
+
describe('plugin-meetings', () => {
|
|
5
|
+
describe('controls-option-manager tests', () => {
|
|
6
|
+
describe('util tests', () => {
|
|
7
|
+
|
|
8
|
+
let locusInfo;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
locusInfo = {
|
|
12
|
+
parsedLocus: {
|
|
13
|
+
info: {
|
|
14
|
+
userDisplayHints: [],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe('canUserSetMuteOnEntry', () => {
|
|
21
|
+
it('can set mute on entry enable', () => {
|
|
22
|
+
locusInfo.parsedLocus.info.userDisplayHints.push('ENABLE_MUTE_ON_ENTRY');
|
|
23
|
+
|
|
24
|
+
assert.equal(ControlsOptionsUtil.canSetMuteOnEntry(locusInfo.parsedLocus.info.userDisplayHints), true);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('can set mute on entry disable', () => {
|
|
28
|
+
locusInfo.parsedLocus.info.userDisplayHints.push('DISABLE_MUTE_ON_ENTRY');
|
|
29
|
+
|
|
30
|
+
assert.equal(ControlsOptionsUtil.canUnsetMuteOnEntry(locusInfo.parsedLocus.info.userDisplayHints), true);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('rejects when correct display hint is not present for setting mute on entry', () => {
|
|
34
|
+
assert.equal(ControlsOptionsUtil.canSetMuteOnEntry(locusInfo.parsedLocus.info.userDisplayHints), false);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('rejects when correct display hint is not present for unsetting mute on entry', () => {
|
|
38
|
+
assert.equal(ControlsOptionsUtil.canUnsetMuteOnEntry(locusInfo.parsedLocus.info.userDisplayHints), false);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
describe('canSetDisallowUnmute', () => {
|
|
43
|
+
it('can set disallow unmute enable', () => {
|
|
44
|
+
locusInfo.parsedLocus.info.userDisplayHints.push('ENABLE_HARD_MUTE');
|
|
45
|
+
|
|
46
|
+
assert.equal(ControlsOptionsUtil.canSetDisallowUnmute(locusInfo.parsedLocus.info.userDisplayHints), true);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('can set disallow unmute disable', () => {
|
|
50
|
+
locusInfo.parsedLocus.info.userDisplayHints.push('DISABLE_HARD_MUTE');
|
|
51
|
+
|
|
52
|
+
assert.equal(ControlsOptionsUtil.canUnsetDisallowUnmute(locusInfo.parsedLocus.info.userDisplayHints), true);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('rejects when correct display hint is not present', () => {
|
|
56
|
+
assert.equal(ControlsOptionsUtil.canSetDisallowUnmute(locusInfo.parsedLocus.info.userDisplayHints), false);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('rejects when correct display hint is not present', () => {
|
|
60
|
+
assert.equal(ControlsOptionsUtil.canUnsetDisallowUnmute(locusInfo.parsedLocus.info.userDisplayHints), false);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -13,6 +13,10 @@ describe('plugin-meetings', () => {
|
|
|
13
13
|
canStartRecording: null,
|
|
14
14
|
canPauseRecording: null,
|
|
15
15
|
canResumeRecording: null,
|
|
16
|
+
canSetMuteOnEntry: null,
|
|
17
|
+
canUnsetMuteOnEntry: null,
|
|
18
|
+
canSetDisallowUnmute: null,
|
|
19
|
+
canUnsetDisallowUnmute: null,
|
|
16
20
|
canStopRecording: null,
|
|
17
21
|
canRaiseHand: null,
|
|
18
22
|
canLowerAllHands: null,
|
|
@@ -51,6 +55,10 @@ describe('plugin-meetings', () => {
|
|
|
51
55
|
'canPauseRecording',
|
|
52
56
|
'canResumeRecording',
|
|
53
57
|
'canStopRecording',
|
|
58
|
+
'canSetMuteOnEntry',
|
|
59
|
+
'canUnsetMuteOnEntry',
|
|
60
|
+
'canSetDisallowUnmute',
|
|
61
|
+
'canUnsetDisallowUnmute',
|
|
54
62
|
'canRaiseHand',
|
|
55
63
|
'canLowerAllHands',
|
|
56
64
|
'canLowerSomeoneElsesHand',
|
|
@@ -38,6 +38,7 @@ import Media from '@webex/plugin-meetings/src/media/index';
|
|
|
38
38
|
import ReconnectionManager from '@webex/plugin-meetings/src/reconnection-manager';
|
|
39
39
|
import MediaUtil from '@webex/plugin-meetings/src/media/util';
|
|
40
40
|
import RecordingUtil from '@webex/plugin-meetings/src/recording-controller/util';
|
|
41
|
+
import ControlsOptionsUtil from '@webex/plugin-meetings/src/controls-options-manager/util';
|
|
41
42
|
import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
|
|
42
43
|
import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
|
|
43
44
|
import TriggerProxy from '@webex/plugin-meetings/src/common/events/trigger-proxy';
|
|
@@ -4419,6 +4420,7 @@ describe('plugin-meetings', () => {
|
|
|
4419
4420
|
|
|
4420
4421
|
meeting.members = {locusUrlUpdate: sinon.stub().returns(Promise.resolve(test1))};
|
|
4421
4422
|
meeting.recordingController = {setLocusUrl: sinon.stub().returns(undefined)};
|
|
4423
|
+
meeting.controlsOptionsManager = {setLocusUrl: sinon.stub().returns(undefined)};
|
|
4422
4424
|
|
|
4423
4425
|
meeting.breakouts.locusUrlUpdate = sinon.stub();
|
|
4424
4426
|
|
|
@@ -4430,6 +4432,7 @@ describe('plugin-meetings', () => {
|
|
|
4430
4432
|
assert.calledOnceWithExactly(meeting.breakouts.locusUrlUpdate, newLocusUrl);
|
|
4431
4433
|
assert.calledWith(meeting.members.locusUrlUpdate, newLocusUrl);
|
|
4432
4434
|
assert.calledWith(meeting.recordingController.setLocusUrl, newLocusUrl);
|
|
4435
|
+
assert.calledWith(meeting.controlsOptionsManager.setLocusUrl, newLocusUrl);
|
|
4433
4436
|
assert.equal(meeting.locusUrl, newLocusUrl);
|
|
4434
4437
|
assert(meeting.locusId, '12345');
|
|
4435
4438
|
done();
|
|
@@ -4870,6 +4873,10 @@ describe('plugin-meetings', () => {
|
|
|
4870
4873
|
let canUserStopSpy;
|
|
4871
4874
|
let canUserPauseSpy;
|
|
4872
4875
|
let canUserResumeSpy;
|
|
4876
|
+
let canSetMuteOnEntrySpy;
|
|
4877
|
+
let canUnsetMuteOnEntrySpy;
|
|
4878
|
+
let canSetDisallowUnmuteSpy;
|
|
4879
|
+
let canUnsetDisallowUnmuteSpy;
|
|
4873
4880
|
let canUserRaiseHandSpy;
|
|
4874
4881
|
let bothLeaveAndEndMeetingAvailableSpy;
|
|
4875
4882
|
let canUserLowerAllHandsSpy;
|
|
@@ -4887,6 +4894,10 @@ describe('plugin-meetings', () => {
|
|
|
4887
4894
|
canUserStopSpy = sinon.spy(RecordingUtil, 'canUserStop');
|
|
4888
4895
|
canUserPauseSpy = sinon.spy(RecordingUtil, 'canUserPause');
|
|
4889
4896
|
canUserResumeSpy = sinon.spy(RecordingUtil, 'canUserResume');
|
|
4897
|
+
canSetMuteOnEntrySpy = sinon.spy(ControlsOptionsUtil, 'canSetMuteOnEntry');
|
|
4898
|
+
canUnsetMuteOnEntrySpy = sinon.spy(ControlsOptionsUtil, 'canUnsetMuteOnEntry');
|
|
4899
|
+
canSetDisallowUnmuteSpy = sinon.spy(ControlsOptionsUtil, 'canSetDisallowUnmute');
|
|
4900
|
+
canUnsetDisallowUnmuteSpy = sinon.spy(ControlsOptionsUtil, 'canUnsetDisallowUnmute');
|
|
4890
4901
|
inMeetingActionsSetSpy = sinon.spy(meeting.inMeetingActions, 'set');
|
|
4891
4902
|
canUserRaiseHandSpy = sinon.spy(MeetingUtil, 'canUserRaiseHand');
|
|
4892
4903
|
canUserLowerAllHandsSpy = sinon.spy(MeetingUtil, 'canUserLowerAllHands');
|
|
@@ -4932,6 +4943,10 @@ describe('plugin-meetings', () => {
|
|
|
4932
4943
|
assert.calledWith(canUserStopSpy, payload.info.userDisplayHints);
|
|
4933
4944
|
assert.calledWith(canUserPauseSpy, payload.info.userDisplayHints);
|
|
4934
4945
|
assert.calledWith(canUserResumeSpy, payload.info.userDisplayHints);
|
|
4946
|
+
assert.calledWith(canSetMuteOnEntrySpy, payload.info.userDisplayHints);
|
|
4947
|
+
assert.calledWith(canUnsetMuteOnEntrySpy, payload.info.userDisplayHints);
|
|
4948
|
+
assert.calledWith(canSetDisallowUnmuteSpy, payload.info.userDisplayHints);
|
|
4949
|
+
assert.calledWith(canUnsetDisallowUnmuteSpy, payload.info.userDisplayHints);
|
|
4935
4950
|
assert.calledWith(canUserRaiseHandSpy, payload.info.userDisplayHints);
|
|
4936
4951
|
assert.calledWith(bothLeaveAndEndMeetingAvailableSpy, payload.info.userDisplayHints);
|
|
4937
4952
|
assert.calledWith(canUserLowerAllHandsSpy, payload.info.userDisplayHints);
|