@webex/plugin-meetings 3.7.0 → 3.8.0-next.1
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/annotation/index.js +17 -0
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/join-forbidden-error.js +52 -0
- package/dist/common/errors/join-forbidden-error.js.map +1 -0
- package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
- package/dist/common/errors/join-webinar-error.js.map +1 -0
- package/dist/common/errors/multistream-not-supported-error.js +53 -0
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +68 -6
- package/dist/constants.js.map +1 -1
- package/dist/index.js +16 -11
- 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/index.js +14 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +35 -17
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +30 -16
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +167 -0
- package/dist/meeting/brbState.js.map +1 -0
- package/dist/meeting/in-meeting-actions.js +13 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1335 -1052
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +11 -6
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +1 -6
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +51 -29
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +103 -67
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +115 -45
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +6 -2
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +107 -55
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +2 -0
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/util.js +1 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +9 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +39 -28
- package/dist/member/util.js.map +1 -1
- package/dist/members/util.js +4 -2
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +6 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMedia.js +30 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +24 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +12 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +461 -136
- package/dist/reachability/index.js.map +1 -1
- package/dist/{rtcMetrics/constants.js → reachability/reachability.types.js} +1 -5
- package/dist/reachability/reachability.types.js.map +1 -0
- package/dist/reachability/request.js +21 -8
- package/dist/reachability/request.js.map +1 -1
- package/dist/recording-controller/enums.js +8 -4
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +18 -9
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +13 -9
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +15 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +45 -79
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +3 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/annotation/index.d.ts +5 -0
- package/dist/types/common/errors/join-forbidden-error.d.ts +15 -0
- package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
- package/dist/types/common/errors/multistream-not-supported-error.d.ts +17 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +53 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/locus-info/index.d.ts +2 -1
- package/dist/types/meeting/brbState.d.ts +54 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +12 -0
- package/dist/types/meeting/index.d.ts +64 -14
- package/dist/types/meeting/locusMediaRequest.d.ts +6 -3
- package/dist/types/meeting/request.d.ts +14 -3
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -3
- package/dist/types/meeting-info/meeting-info-v2.d.ts +30 -5
- package/dist/types/meetings/index.d.ts +20 -2
- package/dist/types/meetings/meetings.types.d.ts +8 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +7 -0
- package/dist/types/members/util.d.ts +2 -0
- package/dist/types/metrics/constants.d.ts +6 -1
- package/dist/types/multistream/sendSlotManager.d.ts +8 -1
- package/dist/types/reachability/clusterReachability.d.ts +1 -10
- package/dist/types/reachability/index.d.ts +83 -36
- package/dist/types/reachability/reachability.types.d.ts +64 -0
- package/dist/types/reachability/request.d.ts +5 -1
- package/dist/types/recording-controller/enums.d.ts +5 -2
- package/dist/types/recording-controller/index.d.ts +1 -0
- package/dist/types/recording-controller/util.d.ts +2 -1
- package/dist/types/roap/request.d.ts +1 -13
- package/dist/webinar/index.js +390 -7
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -22
- package/src/annotation/index.ts +16 -0
- package/src/common/errors/join-forbidden-error.ts +26 -0
- package/src/common/errors/join-webinar-error.ts +24 -0
- package/src/common/errors/multistream-not-supported-error.ts +30 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +61 -3
- package/src/index.ts +5 -3
- package/src/locus-info/index.ts +20 -3
- package/src/locus-info/selfUtils.ts +24 -6
- package/src/media/MediaConnectionAwaiter.ts +2 -0
- package/src/media/properties.ts +34 -13
- package/src/meeting/brbState.ts +169 -0
- package/src/meeting/in-meeting-actions.ts +25 -0
- package/src/meeting/index.ts +451 -88
- package/src/meeting/locusMediaRequest.ts +11 -8
- package/src/meeting/muteState.ts +1 -6
- package/src/meeting/request.ts +30 -12
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +32 -13
- package/src/meeting-info/meeting-info-v2.ts +83 -12
- package/src/meeting-info/utilv2.ts +17 -3
- package/src/meetings/index.ts +79 -20
- package/src/meetings/meetings.types.ts +10 -0
- package/src/meetings/util.ts +2 -1
- package/src/member/index.ts +9 -0
- package/src/member/types.ts +8 -0
- package/src/member/util.ts +34 -24
- package/src/members/util.ts +1 -0
- package/src/metrics/constants.ts +6 -1
- package/src/multistream/remoteMedia.ts +28 -15
- package/src/multistream/sendSlotManager.ts +31 -0
- package/src/reachability/clusterReachability.ts +5 -15
- package/src/reachability/index.ts +311 -75
- package/src/reachability/reachability.types.ts +85 -0
- package/src/reachability/request.ts +55 -31
- package/src/recording-controller/enums.ts +5 -2
- package/src/recording-controller/index.ts +17 -4
- package/src/recording-controller/util.ts +20 -5
- package/src/roap/index.ts +14 -13
- package/src/roap/request.ts +30 -44
- package/src/roap/turnDiscovery.ts +2 -4
- package/src/webinar/index.ts +235 -9
- package/test/unit/spec/annotation/index.ts +46 -1
- package/test/unit/spec/locus-info/index.js +292 -60
- package/test/unit/spec/locus-info/selfConstant.js +7 -0
- package/test/unit/spec/locus-info/selfUtils.js +101 -1
- package/test/unit/spec/media/properties.ts +15 -0
- package/test/unit/spec/meeting/brbState.ts +114 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +15 -1
- package/test/unit/spec/meeting/index.js +860 -110
- package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
- package/test/unit/spec/meeting/muteState.js +0 -24
- package/test/unit/spec/meeting/request.js +3 -26
- package/test/unit/spec/meeting/utils.js +73 -28
- package/test/unit/spec/meeting-info/meetinginfov2.js +46 -4
- package/test/unit/spec/meeting-info/utilv2.js +26 -0
- package/test/unit/spec/meetings/index.js +159 -18
- package/test/unit/spec/meetings/utils.js +10 -0
- package/test/unit/spec/member/util.js +52 -11
- package/test/unit/spec/members/utils.js +95 -0
- package/test/unit/spec/multistream/remoteMedia.ts +11 -7
- package/test/unit/spec/reachability/clusterReachability.ts +7 -0
- package/test/unit/spec/reachability/index.ts +383 -9
- package/test/unit/spec/reachability/request.js +48 -12
- package/test/unit/spec/recording-controller/index.js +61 -5
- package/test/unit/spec/recording-controller/util.js +39 -3
- package/test/unit/spec/roap/index.ts +48 -1
- package/test/unit/spec/roap/request.ts +51 -109
- package/test/unit/spec/roap/turnDiscovery.ts +202 -147
- package/test/unit/spec/webinar/index.ts +504 -0
- package/dist/common/errors/webinar-registration-error.js.map +0 -1
- package/dist/networkQualityMonitor/index.js +0 -227
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/src/common/errors/webinar-registration-error.ts +0 -27
|
@@ -34,12 +34,19 @@ describe('LocusMediaRequest.send()', () => {
|
|
|
34
34
|
'wjfkm.wjfkm.*': {udp:{reachable: true}, tcp:{reachable:false}},
|
|
35
35
|
'1eb65fdf-9643-417f-9974-ad72cae0e10f.59268c12-7a04-4b23-a1a1-4c74be03019a.*': {udp:{reachable: false}, tcp:{reachable:true}},
|
|
36
36
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
clientMediaPreferences: {
|
|
38
|
+
preferTranscoding: false,
|
|
39
|
+
joinCookie: {
|
|
40
|
+
anycastEntryPoint: 'aws-eu-west-1',
|
|
41
|
+
clientIpAddress: 'some ip',
|
|
42
|
+
timeShot: '2023-05-23T08:03:49Z',
|
|
43
|
+
},
|
|
44
|
+
ipver: IP_VERSION.only_ipv4,
|
|
45
|
+
reachability: {
|
|
46
|
+
version: '1',
|
|
47
|
+
result: 'some fake reachability result',
|
|
48
|
+
}
|
|
49
|
+
}
|
|
43
50
|
};
|
|
44
51
|
|
|
45
52
|
const createExpectedRoapBody = (expectedMessageType, expectedMute:{audioMuted: boolean, videoMuted: boolean}) => {
|
|
@@ -53,12 +60,16 @@ describe('LocusMediaRequest.send()', () => {
|
|
|
53
60
|
}
|
|
54
61
|
],
|
|
55
62
|
clientMediaPreferences: {
|
|
56
|
-
preferTranscoding:
|
|
63
|
+
preferTranscoding: false,
|
|
57
64
|
ipver: 4,
|
|
58
65
|
joinCookie: {
|
|
59
66
|
anycastEntryPoint: 'aws-eu-west-1',
|
|
60
67
|
clientIpAddress: 'some ip',
|
|
61
68
|
timeShot: '2023-05-23T08:03:49Z'
|
|
69
|
+
},
|
|
70
|
+
reachability: {
|
|
71
|
+
version: '1',
|
|
72
|
+
result: 'some fake reachability result',
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
};
|
|
@@ -87,10 +98,6 @@ describe('LocusMediaRequest.send()', () => {
|
|
|
87
98
|
localSdp: `{"audioMuted":${expectedMute.audioMuted},"videoMuted":${expectedMute.videoMuted}}`,
|
|
88
99
|
},
|
|
89
100
|
],
|
|
90
|
-
clientMediaPreferences: {
|
|
91
|
-
preferTranscoding: true,
|
|
92
|
-
ipver: undefined,
|
|
93
|
-
},
|
|
94
101
|
};
|
|
95
102
|
|
|
96
103
|
if (sequence) {
|
|
@@ -113,30 +113,6 @@ describe('plugin-meetings', () => {
|
|
|
113
113
|
assert.isTrue(audio.isRemotelyMuted());
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
it('does not locally unmute on a server unmute', async () => {
|
|
117
|
-
const setServerMutedSpy = meeting.mediaProperties.audioStream.setServerMuted;
|
|
118
|
-
|
|
119
|
-
// simulate remote mute
|
|
120
|
-
audio.handleServerRemoteMuteUpdate(meeting, true, true);
|
|
121
|
-
|
|
122
|
-
assert.isTrue(audio.isRemotelyMuted());
|
|
123
|
-
assert.isTrue(audio.isLocallyMuted());
|
|
124
|
-
|
|
125
|
-
// mutes local
|
|
126
|
-
assert.calledOnceWithExactly(setServerMutedSpy, true, 'remotelyMuted');
|
|
127
|
-
|
|
128
|
-
setServerMutedSpy.resetHistory();
|
|
129
|
-
|
|
130
|
-
// simulate remote unmute
|
|
131
|
-
audio.handleServerRemoteMuteUpdate(meeting, false, true);
|
|
132
|
-
|
|
133
|
-
assert.isFalse(audio.isRemotelyMuted());
|
|
134
|
-
assert.isTrue(audio.isLocallyMuted());
|
|
135
|
-
|
|
136
|
-
// does not unmute local
|
|
137
|
-
assert.notCalled(setServerMutedSpy);
|
|
138
|
-
});
|
|
139
|
-
|
|
140
116
|
it('does local audio unmute if localAudioUnmuteRequired is received', async () => {
|
|
141
117
|
// first we need to have the local stream user muted
|
|
142
118
|
meeting.mediaProperties.audioStream.userMuted = true;
|
|
@@ -196,6 +196,7 @@ describe('plugin-meetings', () => {
|
|
|
196
196
|
const permissionToken = 'permission-token';
|
|
197
197
|
const installationId = 'installationId';
|
|
198
198
|
const reachability = 'reachability';
|
|
199
|
+
const clientMediaPreferences = 'clientMediaPreferences';
|
|
199
200
|
|
|
200
201
|
await meetingsRequest.joinMeeting({
|
|
201
202
|
locusUrl,
|
|
@@ -204,6 +205,7 @@ describe('plugin-meetings', () => {
|
|
|
204
205
|
roapMessage,
|
|
205
206
|
reachability,
|
|
206
207
|
permissionToken,
|
|
208
|
+
clientMediaPreferences
|
|
207
209
|
});
|
|
208
210
|
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
209
211
|
|
|
@@ -214,6 +216,7 @@ describe('plugin-meetings', () => {
|
|
|
214
216
|
assert.equal(requestParams.body.device.countryCode, 'US');
|
|
215
217
|
assert.equal(requestParams.body.permissionToken, 'permission-token');
|
|
216
218
|
assert.equal(requestParams.body.device.regionCode, 'WEST-COAST');
|
|
219
|
+
assert.equal(requestParams.body.clientMediaPreferences, 'clientMediaPreferences');
|
|
217
220
|
assert.include(requestParams.body.device.localIp, '127.0.0');
|
|
218
221
|
assert.deepEqual(requestParams.body.localMedias, [
|
|
219
222
|
{localSdp: '{"roapMessage":"roap-message","reachability":"reachability"}'},
|
|
@@ -386,32 +389,6 @@ describe('plugin-meetings', () => {
|
|
|
386
389
|
|
|
387
390
|
assert.deepEqual(requestParams.body.alias, undefined);
|
|
388
391
|
});
|
|
389
|
-
|
|
390
|
-
it('includes joinCookie and ipver correctly', async () => {
|
|
391
|
-
const locusUrl = 'locusURL';
|
|
392
|
-
const deviceUrl = 'deviceUrl';
|
|
393
|
-
const correlationId = 'random-uuid';
|
|
394
|
-
const roapMessage = 'roap-message';
|
|
395
|
-
const permissionToken = 'permission-token';
|
|
396
|
-
|
|
397
|
-
await meetingsRequest.joinMeeting({
|
|
398
|
-
locusUrl,
|
|
399
|
-
deviceUrl,
|
|
400
|
-
correlationId,
|
|
401
|
-
roapMessage,
|
|
402
|
-
permissionToken,
|
|
403
|
-
ipVersion: IP_VERSION.ipv4_and_ipv6,
|
|
404
|
-
});
|
|
405
|
-
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
406
|
-
|
|
407
|
-
assert.equal(requestParams.method, 'POST');
|
|
408
|
-
assert.equal(requestParams.uri, `${locusUrl}/participant?alternateRedirect=true`);
|
|
409
|
-
assert.deepEqual(requestParams.body.clientMediaPreferences, {
|
|
410
|
-
joinCookie: {anycastEntryPoint: 'aws-eu-west-1'},
|
|
411
|
-
preferTranscoding: true,
|
|
412
|
-
ipver: 1,
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
392
|
});
|
|
416
393
|
|
|
417
394
|
describe('#pstn', () => {
|
|
@@ -22,6 +22,12 @@ describe('plugin-meetings', () => {
|
|
|
22
22
|
meetings: Meetings,
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
|
+
|
|
26
|
+
webex.meetings.reachability = {
|
|
27
|
+
getReachabilityReportToAttachToRoap: sinon.stub().resolves({}),
|
|
28
|
+
getClientMediaPreferences: sinon.stub().resolves({}),
|
|
29
|
+
};
|
|
30
|
+
|
|
25
31
|
const logger = {
|
|
26
32
|
info: sandbox.stub(),
|
|
27
33
|
log: sandbox.stub(),
|
|
@@ -39,6 +45,7 @@ describe('plugin-meetings', () => {
|
|
|
39
45
|
meeting.cleanupLocalStreams = sinon.stub().returns(Promise.resolve());
|
|
40
46
|
meeting.closeRemoteStreams = sinon.stub().returns(Promise.resolve());
|
|
41
47
|
meeting.closePeerConnections = sinon.stub().returns(Promise.resolve());
|
|
48
|
+
meeting.stopPeriodicLogUpload = sinon.stub();
|
|
42
49
|
|
|
43
50
|
meeting.unsetRemoteStreams = sinon.stub();
|
|
44
51
|
meeting.unsetPeerConnections = sinon.stub();
|
|
@@ -64,6 +71,7 @@ describe('plugin-meetings', () => {
|
|
|
64
71
|
assert.calledOnce(meeting.cleanupLocalStreams);
|
|
65
72
|
assert.calledOnce(meeting.closeRemoteStreams);
|
|
66
73
|
assert.calledOnce(meeting.closePeerConnections);
|
|
74
|
+
assert.calledOnce(meeting.stopPeriodicLogUpload);
|
|
67
75
|
|
|
68
76
|
assert.calledOnce(meeting.unsetRemoteStreams);
|
|
69
77
|
assert.calledOnce(meeting.unsetPeerConnections);
|
|
@@ -157,21 +165,6 @@ describe('plugin-meetings', () => {
|
|
|
157
165
|
assert(LoggerProxy.logger.log.called, 'log called');
|
|
158
166
|
});
|
|
159
167
|
});
|
|
160
|
-
|
|
161
|
-
describe('#handleDeviceLogging', () => {
|
|
162
|
-
it('should not log if called without devices', () => {
|
|
163
|
-
MeetingUtil.handleDeviceLogging();
|
|
164
|
-
assert(!LoggerProxy.logger.log.called, 'log not called');
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it('should log device settings', () => {
|
|
168
|
-
const mockDevices = [{deviceId: 'device-1'}, {deviceId: 'device-2'}];
|
|
169
|
-
|
|
170
|
-
assert(MeetingUtil.handleDeviceLogging, 'is defined');
|
|
171
|
-
MeetingUtil.handleDeviceLogging(mockDevices);
|
|
172
|
-
assert(LoggerProxy.logger.log.called, 'log called');
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
168
|
});
|
|
176
169
|
|
|
177
170
|
describe('addSequence', () => {
|
|
@@ -408,17 +401,39 @@ describe('plugin-meetings', () => {
|
|
|
408
401
|
});
|
|
409
402
|
|
|
410
403
|
it('#Should call `meetingRequest.joinMeeting', async () => {
|
|
404
|
+
meeting.isMultistream = true;
|
|
405
|
+
|
|
406
|
+
const FAKE_REACHABILITY_REPORT = {
|
|
407
|
+
id: 'fake reachability report',
|
|
408
|
+
};
|
|
409
|
+
const FAKE_CLIENT_MEDIA_PREFERENCES = {
|
|
410
|
+
id: 'fake client media preferences',
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
webex.meetings.reachability.getReachabilityReportToAttachToRoap.resolves(FAKE_REACHABILITY_REPORT);
|
|
414
|
+
webex.meetings.reachability.getClientMediaPreferences.resolves(FAKE_CLIENT_MEDIA_PREFERENCES);
|
|
415
|
+
|
|
416
|
+
sinon
|
|
417
|
+
.stub(webex.internal.device.ipNetworkDetector, 'supportsIpV4')
|
|
418
|
+
.get(() => true);
|
|
419
|
+
sinon
|
|
420
|
+
.stub(webex.internal.device.ipNetworkDetector, 'supportsIpV6')
|
|
421
|
+
.get(() => true);
|
|
422
|
+
|
|
411
423
|
await MeetingUtil.joinMeeting(meeting, {
|
|
412
424
|
reachability: 'reachability',
|
|
413
425
|
roapMessage: 'roapMessage',
|
|
414
426
|
});
|
|
415
427
|
|
|
428
|
+
assert.calledOnceWithExactly(webex.meetings.reachability.getReachabilityReportToAttachToRoap);
|
|
429
|
+
assert.calledOnceWithExactly(webex.meetings.reachability.getClientMediaPreferences, meeting.isMultistream, IP_VERSION.ipv4_and_ipv6);
|
|
430
|
+
|
|
416
431
|
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
417
432
|
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
418
433
|
|
|
419
434
|
assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
|
|
420
|
-
assert.equal(parameter.
|
|
421
|
-
assert.equal(parameter.
|
|
435
|
+
assert.equal(parameter.reachability, FAKE_REACHABILITY_REPORT);
|
|
436
|
+
assert.equal(parameter.clientMediaPreferences, FAKE_CLIENT_MEDIA_PREFERENCES);
|
|
422
437
|
assert.equal(parameter.roapMessage, 'roapMessage');
|
|
423
438
|
|
|
424
439
|
assert.calledOnce(meeting.setLocus)
|
|
@@ -445,6 +460,40 @@ describe('plugin-meetings', () => {
|
|
|
445
460
|
});
|
|
446
461
|
});
|
|
447
462
|
|
|
463
|
+
it('should handle failed reachability report retrieval', async () => {
|
|
464
|
+
webex.meetings.reachability.getReachabilityReportToAttachToRoap.rejects(
|
|
465
|
+
new Error('fake error')
|
|
466
|
+
);
|
|
467
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
468
|
+
// Verify meeting join still proceeds
|
|
469
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
it('should not attach reachability if there is no roap message', async () => {
|
|
473
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
474
|
+
|
|
475
|
+
assert.notCalled(webex.meetings.reachability.getReachabilityReportToAttachToRoap);
|
|
476
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
477
|
+
|
|
478
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
479
|
+
assert.isUndefined(parameter.reachability);
|
|
480
|
+
assert.isUndefined(parameter.roapMessage);
|
|
481
|
+
});
|
|
482
|
+
|
|
483
|
+
it('should handle failed clientMediaPreferences retrieval', async () => {
|
|
484
|
+
webex.meetings.reachability.getClientMediaPreferences.rejects(new Error('fake error'));
|
|
485
|
+
meeting.isMultistream = true;
|
|
486
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
487
|
+
// Verify meeting join still proceeds
|
|
488
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
489
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
490
|
+
assert.deepEqual(parameter.clientMediaPreferences, {
|
|
491
|
+
preferTranscoding: false,
|
|
492
|
+
ipver: 0,
|
|
493
|
+
joinCookie: undefined,
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
|
|
448
497
|
it('#Should call meetingRequest.joinMeeting with breakoutsSupported=true when passed in as true', async () => {
|
|
449
498
|
await MeetingUtil.joinMeeting(meeting, {
|
|
450
499
|
breakoutsSupported: true,
|
|
@@ -480,17 +529,6 @@ describe('plugin-meetings', () => {
|
|
|
480
529
|
assert.deepEqual(parameter.deviceCapabilities, ['TEST']);
|
|
481
530
|
});
|
|
482
531
|
|
|
483
|
-
it('#Should call meetingRequest.joinMeeting with preferTranscoding=false when multistream is enabled', async () => {
|
|
484
|
-
meeting.isMultistream = true;
|
|
485
|
-
await MeetingUtil.joinMeeting(meeting, {});
|
|
486
|
-
|
|
487
|
-
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
488
|
-
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
489
|
-
|
|
490
|
-
assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
|
|
491
|
-
assert.equal(parameter.preferTranscoding, false);
|
|
492
|
-
});
|
|
493
|
-
|
|
494
532
|
it('#Should fallback sipUrl if meetingJoinUrl does not exists', async () => {
|
|
495
533
|
meeting.meetingJoinUrl = undefined;
|
|
496
534
|
meeting.sipUri = 'sipUri';
|
|
@@ -733,6 +771,13 @@ describe('plugin-meetings', () => {
|
|
|
733
771
|
});
|
|
734
772
|
});
|
|
735
773
|
|
|
774
|
+
describe('canStartBreakout', () => {
|
|
775
|
+
it('works as expected', () => {
|
|
776
|
+
assert.deepEqual(MeetingUtil.canStartBreakout(['DISABLE_BREAKOUT_START']), false);
|
|
777
|
+
assert.deepEqual(MeetingUtil.canStartBreakout([]), true);
|
|
778
|
+
});
|
|
779
|
+
});
|
|
780
|
+
|
|
736
781
|
describe('canBroadcastMessageToBreakout', () => {
|
|
737
782
|
it('works as expected', () => {
|
|
738
783
|
assert.deepEqual(
|
|
@@ -18,7 +18,8 @@ import MeetingInfo, {
|
|
|
18
18
|
MeetingInfoV2CaptchaError,
|
|
19
19
|
MeetingInfoV2AdhocMeetingError,
|
|
20
20
|
MeetingInfoV2PolicyError,
|
|
21
|
-
|
|
21
|
+
MeetingInfoV2JoinWebinarError,
|
|
22
|
+
MeetingInfoV2JoinForbiddenError,
|
|
22
23
|
} from '@webex/plugin-meetings/src/meeting-info/meeting-info-v2';
|
|
23
24
|
import MeetingInfoUtil from '@webex/plugin-meetings/src/meeting-info/utilv2';
|
|
24
25
|
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
@@ -895,9 +896,14 @@ describe('plugin-meetings', () => {
|
|
|
895
896
|
{errorCode: 403021},
|
|
896
897
|
{errorCode: 403022},
|
|
897
898
|
{errorCode: 403024},
|
|
899
|
+
{errorCode: 403137},
|
|
900
|
+
{errorCode: 423007},
|
|
901
|
+
{errorCode: 403026},
|
|
902
|
+
{errorCode: 403037},
|
|
903
|
+
{errorCode: 403137},
|
|
898
904
|
],
|
|
899
905
|
({errorCode}) => {
|
|
900
|
-
it(`should throw a
|
|
906
|
+
it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {
|
|
901
907
|
const message = 'a message';
|
|
902
908
|
const meetingInfoData = {meetingInfo: {registrationUrl: 'registrationUrl'}};
|
|
903
909
|
|
|
@@ -909,7 +915,7 @@ describe('plugin-meetings', () => {
|
|
|
909
915
|
await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
|
|
910
916
|
assert.fail('createAdhocSpaceMeeting should have thrown, but has not done that');
|
|
911
917
|
} catch (err) {
|
|
912
|
-
assert.instanceOf(err,
|
|
918
|
+
assert.instanceOf(err, MeetingInfoV2JoinWebinarError);
|
|
913
919
|
assert.deepEqual(err.message, `${message}, code=${errorCode}`);
|
|
914
920
|
assert.equal(err.wbxAppApiCode, errorCode);
|
|
915
921
|
assert.deepEqual(err.meetingInfo, meetingInfoData);
|
|
@@ -917,7 +923,43 @@ describe('plugin-meetings', () => {
|
|
|
917
923
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
918
924
|
assert.calledWith(
|
|
919
925
|
Metrics.sendBehavioralMetric,
|
|
920
|
-
BEHAVIORAL_METRICS.
|
|
926
|
+
BEHAVIORAL_METRICS.JOIN_WEBINAR_ERROR,
|
|
927
|
+
{code: errorCode}
|
|
928
|
+
);
|
|
929
|
+
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
);
|
|
934
|
+
|
|
935
|
+
forEach(
|
|
936
|
+
[
|
|
937
|
+
{errorCode: 403003},
|
|
938
|
+
],
|
|
939
|
+
({errorCode}) => {
|
|
940
|
+
it(`should throw a MeetingInfoV2JoinForbiddenError for error code ${errorCode}`, async () => {
|
|
941
|
+
const message = 'a message';
|
|
942
|
+
const meetingInfoData = 'meeting info';
|
|
943
|
+
|
|
944
|
+
webex.request = sinon.stub().rejects({
|
|
945
|
+
statusCode: 403,
|
|
946
|
+
body: {message, code: errorCode, data: {meetingInfo: meetingInfoData}},
|
|
947
|
+
});
|
|
948
|
+
try {
|
|
949
|
+
await meetingInfo.fetchMeetingInfo('1234323', DESTINATION_TYPE.MEETING_ID, 'abc', {
|
|
950
|
+
id: '999',
|
|
951
|
+
code: 'aabbcc11',
|
|
952
|
+
});
|
|
953
|
+
} catch (err) {
|
|
954
|
+
assert.instanceOf(err, MeetingInfoV2JoinForbiddenError);
|
|
955
|
+
assert.deepEqual(err.message, `${message}, code=${errorCode}`);
|
|
956
|
+
assert.equal(err.wbxAppApiCode, errorCode);
|
|
957
|
+
assert.deepEqual(err.meetingInfo, meetingInfoData);
|
|
958
|
+
|
|
959
|
+
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
960
|
+
assert.calledWith(
|
|
961
|
+
Metrics.sendBehavioralMetric,
|
|
962
|
+
BEHAVIORAL_METRICS.JOIN_FORBIDDEN_ERROR,
|
|
921
963
|
{code: errorCode}
|
|
922
964
|
);
|
|
923
965
|
|
|
@@ -192,6 +192,15 @@ describe('plugin-meetings', () => {
|
|
|
192
192
|
assert.equal(res.meetingUUID, 'xsddsdsdsdssdsdsdsdsd');
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
+
it('for registrationId', () => {
|
|
196
|
+
const res = MeetingInfoUtil.getRequestBody({
|
|
197
|
+
type: DESTINATION_TYPE.MEETING_UUID,
|
|
198
|
+
registrationId: 'registrationId',
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
assert.equal(res.registrationId, 'registrationId');
|
|
202
|
+
});
|
|
203
|
+
|
|
195
204
|
it('for DESTINATION_TYPE.LOCUS_ID', () => {
|
|
196
205
|
const res = MeetingInfoUtil.getRequestBody({
|
|
197
206
|
type: DESTINATION_TYPE.LOCUS_ID,
|
|
@@ -345,5 +354,22 @@ describe('plugin-meetings', () => {
|
|
|
345
354
|
);
|
|
346
355
|
});
|
|
347
356
|
});
|
|
357
|
+
|
|
358
|
+
describe('#isMeetingLink', () => {
|
|
359
|
+
it('should return true for valid join meeting link with MTID', () => {
|
|
360
|
+
const result = MeetingInfoUtil.isMeetingLink('https://cisco.webex.com/cisco/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
|
|
361
|
+
expect(result).to.be.true;
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
it('should return true for valid join meeting link without cisco domain', () => {
|
|
365
|
+
const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
|
|
366
|
+
expect(result).to.be.true;
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
it('should return false for an invalid meeting link', () => {
|
|
370
|
+
const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MiD=m9fe0afd8c435e892afcce9ea25b97046');
|
|
371
|
+
expect(result).to.be.false;
|
|
372
|
+
});
|
|
373
|
+
});
|
|
348
374
|
});
|
|
349
375
|
});
|