@webex/plugin-meetings 3.6.0-next.2 → 3.6.0-next.20
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/README.md +2 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/webinar-registration-error.js +50 -0
- package/dist/common/errors/webinar-registration-error.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +31 -2
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +1 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +10 -3
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +12 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +28 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +2 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/index.js +61 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +5 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +19 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +594 -431
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +5 -2
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +68 -17
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +2 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/members/index.js +3 -2
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +9 -5
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMedia.js +4 -0
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/reachability/index.js +3 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +2 -1
- package/dist/reachability/request.js.map +1 -1
- package/dist/types/common/errors/webinar-registration-error.d.ts +14 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +25 -0
- package/dist/types/controls-options-manager/enums.d.ts +2 -1
- package/dist/types/controls-options-manager/index.d.ts +2 -1
- package/dist/types/controls-options-manager/types.d.ts +2 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/locus-info/index.d.ts +9 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +18 -0
- package/dist/types/meeting/index.d.ts +12 -1
- package/dist/types/meeting/muteState.d.ts +2 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +23 -0
- package/dist/types/members/index.d.ts +2 -1
- package/dist/types/members/util.d.ts +3 -1
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/multistream/remoteMedia.d.ts +1 -0
- package/dist/webinar/index.js +32 -19
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/common/errors/webinar-registration-error.ts +27 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +31 -0
- package/src/controls-options-manager/enums.ts +1 -0
- package/src/controls-options-manager/index.ts +19 -2
- package/src/controls-options-manager/types.ts +2 -0
- package/src/controls-options-manager/util.ts +12 -0
- package/src/index.ts +2 -0
- package/src/locus-info/controlsUtils.ts +46 -2
- package/src/locus-info/fullState.ts +1 -0
- package/src/locus-info/index.ts +60 -0
- package/src/locus-info/parser.ts +8 -1
- package/src/meeting/in-meeting-actions.ts +37 -0
- package/src/meeting/index.ts +139 -20
- package/src/meeting/muteState.ts +6 -2
- package/src/meeting-info/meeting-info-v2.ts +51 -0
- package/src/meetings/index.ts +3 -1
- package/src/members/index.ts +4 -2
- package/src/members/util.ts +3 -1
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/remoteMedia.ts +5 -0
- package/src/reachability/index.ts +3 -3
- package/src/reachability/request.ts +1 -0
- package/src/webinar/index.ts +31 -17
- package/test/unit/spec/controls-options-manager/index.js +56 -32
- package/test/unit/spec/controls-options-manager/util.js +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +80 -4
- package/test/unit/spec/locus-info/index.js +88 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +18 -0
- package/test/unit/spec/meeting/index.js +263 -64
- package/test/unit/spec/meeting/muteState.js +8 -4
- package/test/unit/spec/meeting-info/meetinginfov2.js +37 -0
- package/test/unit/spec/members/index.js +25 -2
- package/test/unit/spec/members/request.js +37 -3
- package/test/unit/spec/members/utils.js +15 -1
- package/test/unit/spec/multistream/remoteMedia.ts +16 -2
- package/test/unit/spec/reachability/index.ts +1 -1
- package/test/unit/spec/reachability/request.js +13 -8
- package/test/unit/spec/webinar/index.ts +82 -16
|
@@ -225,7 +225,7 @@ describe('plugin-meetings', () => {
|
|
|
225
225
|
});
|
|
226
226
|
|
|
227
227
|
describe('#assignRolesMember', () => {
|
|
228
|
-
it('sends a PATCH to the locus endpoint', async () => {
|
|
228
|
+
it('sends a assignRolesMember PATCH to the locus endpoint', async () => {
|
|
229
229
|
const locusUrl = url1;
|
|
230
230
|
const memberId = 'test1';
|
|
231
231
|
const roles = [
|
|
@@ -255,7 +255,7 @@ describe('plugin-meetings', () => {
|
|
|
255
255
|
});
|
|
256
256
|
|
|
257
257
|
describe('#raiseHand', () => {
|
|
258
|
-
it('sends a PATCH to the locus endpoint', async () => {
|
|
258
|
+
it('sends a raiseOrLowerHandMember PATCH to the locus endpoint', async () => {
|
|
259
259
|
const locusUrl = url1;
|
|
260
260
|
const memberId = 'test1';
|
|
261
261
|
|
|
@@ -319,7 +319,7 @@ describe('plugin-meetings', () => {
|
|
|
319
319
|
assert.strictEqual(result, requestResponse);
|
|
320
320
|
});
|
|
321
321
|
|
|
322
|
-
it('sends a PATCH to the locus endpoint', async () => {
|
|
322
|
+
it('sends a lowerAllHandsMember PATCH to the locus endpoint', async () => {
|
|
323
323
|
const locusUrl = url1;
|
|
324
324
|
const memberId = 'test1';
|
|
325
325
|
|
|
@@ -348,6 +348,40 @@ describe('plugin-meetings', () => {
|
|
|
348
348
|
},
|
|
349
349
|
});
|
|
350
350
|
});
|
|
351
|
+
|
|
352
|
+
it('sends a lowerAllHandsMember PATCH to the locus endpoint with roles', async () => {
|
|
353
|
+
const locusUrl = url1;
|
|
354
|
+
const memberId = 'test1';
|
|
355
|
+
const roles = ['attendee'];
|
|
356
|
+
|
|
357
|
+
const options = {
|
|
358
|
+
requestingParticipantId: memberId,
|
|
359
|
+
locusUrl,
|
|
360
|
+
roles,
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
const getRequestParamsSpy = sandbox.spy(membersUtil, 'getLowerAllHandsMemberRequestParams');
|
|
364
|
+
|
|
365
|
+
await membersRequest.lowerAllHandsMember(options);
|
|
366
|
+
|
|
367
|
+
assert.calledOnceWithExactly(getRequestParamsSpy, {
|
|
368
|
+
requestingParticipantId: memberId,
|
|
369
|
+
locusUrl: url1,
|
|
370
|
+
roles: ['attendee'],
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
checkRequest({
|
|
374
|
+
method: 'PATCH',
|
|
375
|
+
uri: `${locusUrl}/controls`,
|
|
376
|
+
body: {
|
|
377
|
+
hand: {
|
|
378
|
+
raised: false,
|
|
379
|
+
roles: ['attendee'],
|
|
380
|
+
},
|
|
381
|
+
requestingParticipantId: memberId,
|
|
382
|
+
},
|
|
383
|
+
});
|
|
384
|
+
});
|
|
351
385
|
});
|
|
352
386
|
|
|
353
387
|
describe('#editDisplayName', () => {
|
|
@@ -101,7 +101,7 @@ describe('plugin-meetings', () => {
|
|
|
101
101
|
});
|
|
102
102
|
});
|
|
103
103
|
describe('#generateLowerAllHandsMemberOptions', () => {
|
|
104
|
-
it('returns the correct options', () => {
|
|
104
|
+
it('returns the correct options without roles', () => {
|
|
105
105
|
const requestingParticipantId = 'test';
|
|
106
106
|
const locusUrl = 'urlTest1';
|
|
107
107
|
|
|
@@ -113,6 +113,20 @@ describe('plugin-meetings', () => {
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
});
|
|
116
|
+
it('returns the correct options with roles', () => {
|
|
117
|
+
const requestingParticipantId = 'test';
|
|
118
|
+
const locusUrl = 'urlTest1';
|
|
119
|
+
const roles = ['panelist'];
|
|
120
|
+
|
|
121
|
+
assert.deepEqual(
|
|
122
|
+
MembersUtil.generateLowerAllHandsMemberOptions(requestingParticipantId, locusUrl, roles),
|
|
123
|
+
{
|
|
124
|
+
requestingParticipantId,
|
|
125
|
+
locusUrl,
|
|
126
|
+
roles,
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
});
|
|
116
130
|
});
|
|
117
131
|
describe('#generateEditDisplayNameMemberOptions', () => {
|
|
118
132
|
it('returns the correct options', () => {
|
|
@@ -7,7 +7,7 @@ import {RemoteMedia, RemoteMediaEvents} from '@webex/plugin-meetings/src/multist
|
|
|
7
7
|
import {ReceiveSlotEvents} from '@webex/plugin-meetings/src/multistream/receiveSlot';
|
|
8
8
|
import sinon from 'sinon';
|
|
9
9
|
import {assert} from '@webex/test-helper-chai';
|
|
10
|
-
import {
|
|
10
|
+
import {forEach} from 'lodash';
|
|
11
11
|
|
|
12
12
|
describe('RemoteMedia', () => {
|
|
13
13
|
let remoteMedia;
|
|
@@ -227,12 +227,26 @@ describe('RemoteMedia', () => {
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
describe('setSizeHint()', () => {
|
|
230
|
-
|
|
231
230
|
it('works if the receive slot is undefined', () => {
|
|
232
231
|
remoteMedia.receiveSlot = undefined;
|
|
233
232
|
remoteMedia.setSizeHint(100, 100);
|
|
234
233
|
});
|
|
235
234
|
|
|
235
|
+
forEach(
|
|
236
|
+
[
|
|
237
|
+
{width: 0, height: 0},
|
|
238
|
+
{width: 135, height: 0},
|
|
239
|
+
{width: 0, height: 240},
|
|
240
|
+
],
|
|
241
|
+
({width, height}) => {
|
|
242
|
+
it(`skip updating the max fs when applied ${width}:${height}`, () => {
|
|
243
|
+
remoteMedia.setSizeHint(width, height);
|
|
244
|
+
|
|
245
|
+
assert.notCalled(fakeReceiveSlot.setMaxFs);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
|
|
236
250
|
forEach(
|
|
237
251
|
[
|
|
238
252
|
{height: 134, fs: 60},
|
|
@@ -1234,7 +1234,7 @@ describe('gatherReachability', () => {
|
|
|
1234
1234
|
assert.equal(receivedEvents['done'], 1);
|
|
1235
1235
|
|
|
1236
1236
|
// and that ip network detection was started
|
|
1237
|
-
assert.calledOnceWithExactly(webex.internal.device.ipNetworkDetector.detect);
|
|
1237
|
+
assert.calledOnceWithExactly(webex.internal.device.ipNetworkDetector.detect, true);
|
|
1238
1238
|
|
|
1239
1239
|
// finally, check the metrics - they should contain values from ipNetworkDetector
|
|
1240
1240
|
assert.calledWith(Metrics.sendBehavioralMetric, 'js_sdk_reachability_completed', {
|
|
@@ -57,18 +57,23 @@ describe('plugin-meetings/reachability', () => {
|
|
|
57
57
|
}
|
|
58
58
|
}));
|
|
59
59
|
|
|
60
|
+
webex.config.meetings.reachabilityGetClusterTimeout = 3000;
|
|
61
|
+
|
|
60
62
|
const res = await reachabilityRequest.getClusters(IP_VERSION.only_ipv4);
|
|
61
63
|
const requestParams = webex.request.getCall(0).args[0];
|
|
62
64
|
|
|
63
|
-
assert.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
assert.deepEqual(requestParams, {
|
|
66
|
+
method: 'GET',
|
|
67
|
+
resource: `clusters`,
|
|
68
|
+
api: 'calliopeDiscovery',
|
|
69
|
+
shouldRefreshAccessToken: false,
|
|
70
|
+
qs: {
|
|
71
|
+
JCSupport: 1,
|
|
72
|
+
ipver: 4,
|
|
73
|
+
},
|
|
74
|
+
timeout: 3000,
|
|
71
75
|
});
|
|
76
|
+
|
|
72
77
|
assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
|
|
73
78
|
assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
|
|
74
79
|
assert.calledOnceWithExactly(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency, sinon.match.func, 'internal.get.cluster.time');
|
|
@@ -29,32 +29,98 @@ describe('plugin-meetings', () => {
|
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
describe('#
|
|
33
|
-
it('sets the webcast url', () => {
|
|
34
|
-
webinar.
|
|
32
|
+
describe('#updateWebcastUrl', () => {
|
|
33
|
+
it('sets the webcast instance url', () => {
|
|
34
|
+
webinar.updateWebcastUrl({resources: {webcastInstance: {url:'newUrl'}}});
|
|
35
35
|
|
|
36
|
-
assert.equal(webinar.
|
|
36
|
+
assert.equal(webinar.webcastInstanceUrl, 'newUrl');
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
describe('#webinarAttendeesSearchingUrlUpdate', () => {
|
|
41
|
-
it('sets the webinarAttendeesSearching url', () => {
|
|
42
|
-
webinar.webinarAttendeesSearchingUrlUpdate('newUrl');
|
|
43
|
-
|
|
44
|
-
assert.equal(webinar.webinarAttendeesSearchingUrl, 'newUrl');
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
40
|
|
|
48
41
|
describe('#updateCanManageWebcast', () => {
|
|
49
|
-
it('
|
|
50
|
-
webinar.
|
|
42
|
+
it('sets the webcast instance url when valid', () => {
|
|
43
|
+
webinar.updateWebcastUrl({resources: {webcastInstance: {url:'newUrl'}}});
|
|
44
|
+
assert.equal(webinar.webcastInstanceUrl, 'newUrl', 'webcast instance URL should be updated');
|
|
45
|
+
});
|
|
51
46
|
|
|
52
|
-
|
|
47
|
+
it('handles missing resources gracefully', () => {
|
|
48
|
+
webinar.updateWebcastUrl({});
|
|
49
|
+
assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
|
|
50
|
+
});
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
it('handles missing webcastInstance gracefully', () => {
|
|
53
|
+
webinar.updateWebcastUrl({resources: {}});
|
|
54
|
+
assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
|
|
55
|
+
});
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
it('handles missing URL gracefully', () => {
|
|
58
|
+
webinar.updateWebcastUrl({resources: {webcastInstance: {}}});
|
|
59
|
+
assert.isUndefined(webinar.webcastInstanceUrl, 'webcast instance URL should be undefined');
|
|
57
60
|
});
|
|
58
61
|
});
|
|
62
|
+
|
|
63
|
+
describe('#updateRoleChanged', () => {
|
|
64
|
+
it('updates roles when promoted from attendee to panelist', () => {
|
|
65
|
+
const payload = {
|
|
66
|
+
oldRoles: ['ATTENDEE'],
|
|
67
|
+
newRoles: ['PANELIST']
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const result = webinar.updateRoleChanged(payload);
|
|
71
|
+
|
|
72
|
+
assert.equal(webinar.selfIsPanelist, true, 'self should be a panelist');
|
|
73
|
+
assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
|
|
74
|
+
assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
|
|
75
|
+
assert.equal(result.isPromoted, true, 'should indicate promotion');
|
|
76
|
+
assert.equal(result.isDemoted, false, 'should not indicate demotion');
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('updates roles when demoted from panelist to attendee', () => {
|
|
80
|
+
const payload = {
|
|
81
|
+
oldRoles: ['PANELIST'],
|
|
82
|
+
newRoles: ['ATTENDEE']
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const result = webinar.updateRoleChanged(payload);
|
|
86
|
+
|
|
87
|
+
assert.equal(webinar.selfIsPanelist, false, 'self should not be a panelist');
|
|
88
|
+
assert.equal(webinar.selfIsAttendee, true, 'self should be an attendee');
|
|
89
|
+
assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
|
|
90
|
+
assert.equal(result.isPromoted, false, 'should not indicate promotion');
|
|
91
|
+
assert.equal(result.isDemoted, true, 'should indicate demotion');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('updates roles when promoted to moderator', () => {
|
|
95
|
+
const payload = {
|
|
96
|
+
oldRoles: ['PANELIST'],
|
|
97
|
+
newRoles: ['MODERATOR']
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const result = webinar.updateRoleChanged(payload);
|
|
101
|
+
|
|
102
|
+
assert.equal(webinar.selfIsPanelist, false, 'self should not be a panelist');
|
|
103
|
+
assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
|
|
104
|
+
assert.equal(webinar.canManageWebcast, true, 'self should have manage webcast capability');
|
|
105
|
+
assert.equal(result.isPromoted, false, 'should not indicate promotion');
|
|
106
|
+
assert.equal(result.isDemoted, false, 'should not indicate demotion');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('updates roles when unchanged (remains as panelist)', () => {
|
|
110
|
+
const payload = {
|
|
111
|
+
oldRoles: ['PANELIST'],
|
|
112
|
+
newRoles: ['PANELIST']
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const result = webinar.updateRoleChanged(payload);
|
|
116
|
+
|
|
117
|
+
assert.equal(webinar.selfIsPanelist, true, 'self should remain a panelist');
|
|
118
|
+
assert.equal(webinar.selfIsAttendee, false, 'self should not be an attendee');
|
|
119
|
+
assert.equal(webinar.canManageWebcast, false, 'self should not have manage webcast capability');
|
|
120
|
+
assert.equal(result.isPromoted, false, 'should not indicate promotion');
|
|
121
|
+
assert.equal(result.isDemoted, false, 'should not indicate demotion');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
59
125
|
})
|
|
60
126
|
})
|