@webex/plugin-meetings 3.7.0-next.9 → 3.7.0-wxcc.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 +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +46 -5
- 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 +30 -17
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +2 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +960 -832
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +9 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +16 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +96 -33
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +103 -54
- 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/metrics/constants.js +3 -2
- 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/roap/index.js +10 -8
- package/dist/roap/index.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/constants.d.ts +38 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/locus-info/index.d.ts +2 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +19 -12
- package/dist/types/meeting/locusMediaRequest.d.ts +4 -0
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +1 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +27 -4
- package/dist/types/meetings/index.d.ts +16 -1
- 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/metrics/constants.d.ts +2 -1
- package/dist/types/multistream/sendSlotManager.d.ts +8 -1
- package/dist/webinar/index.js +354 -3
- 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 -1
- package/src/constants.ts +43 -3
- package/src/index.ts +5 -3
- package/src/locus-info/index.ts +20 -3
- package/src/locus-info/selfUtils.ts +19 -6
- package/src/meeting/in-meeting-actions.ts +4 -0
- package/src/meeting/index.ts +259 -80
- package/src/meeting/locusMediaRequest.ts +7 -0
- package/src/meeting/request.ts +26 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +8 -10
- package/src/meeting-info/meeting-info-v2.ts +74 -11
- package/src/meeting-info/utilv2.ts +3 -1
- package/src/meetings/index.ts +73 -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/metrics/constants.ts +2 -1
- package/src/multistream/remoteMedia.ts +28 -15
- package/src/multistream/sendSlotManager.ts +31 -0
- package/src/roap/index.ts +10 -8
- package/src/webinar/index.ts +197 -3
- 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 +91 -1
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -0
- package/test/unit/spec/meeting/index.js +722 -105
- package/test/unit/spec/meeting/utils.js +22 -19
- package/test/unit/spec/meeting-info/meetinginfov2.js +46 -4
- package/test/unit/spec/meeting-info/utilv2.js +17 -0
- package/test/unit/spec/meetings/index.js +150 -13
- package/test/unit/spec/meetings/utils.js +10 -0
- package/test/unit/spec/member/util.js +52 -11
- package/test/unit/spec/multistream/remoteMedia.ts +11 -7
- package/test/unit/spec/roap/index.ts +47 -0
- package/test/unit/spec/webinar/index.ts +457 -0
- package/dist/common/errors/webinar-registration-error.js.map +0 -1
- package/src/common/errors/webinar-registration-error.ts +0 -27
|
@@ -26,7 +26,7 @@ describe('plugin-meetings', () => {
|
|
|
26
26
|
webex.meetings.reachability = {
|
|
27
27
|
getReachabilityReportToAttachToRoap: sinon.stub().resolves({}),
|
|
28
28
|
getClientMediaPreferences: sinon.stub().resolves({}),
|
|
29
|
-
};
|
|
29
|
+
};
|
|
30
30
|
|
|
31
31
|
const logger = {
|
|
32
32
|
info: sandbox.stub(),
|
|
@@ -165,21 +165,6 @@ describe('plugin-meetings', () => {
|
|
|
165
165
|
assert(LoggerProxy.logger.log.called, 'log called');
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
-
|
|
169
|
-
describe('#handleDeviceLogging', () => {
|
|
170
|
-
it('should not log if called without devices', () => {
|
|
171
|
-
MeetingUtil.handleDeviceLogging();
|
|
172
|
-
assert(!LoggerProxy.logger.log.called, 'log not called');
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
it('should log device settings', () => {
|
|
176
|
-
const mockDevices = [{deviceId: 'device-1'}, {deviceId: 'device-2'}];
|
|
177
|
-
|
|
178
|
-
assert(MeetingUtil.handleDeviceLogging, 'is defined');
|
|
179
|
-
MeetingUtil.handleDeviceLogging(mockDevices);
|
|
180
|
-
assert(LoggerProxy.logger.log.called, 'log called');
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
168
|
});
|
|
184
169
|
|
|
185
170
|
describe('addSequence', () => {
|
|
@@ -424,17 +409,17 @@ describe('plugin-meetings', () => {
|
|
|
424
409
|
const FAKE_CLIENT_MEDIA_PREFERENCES = {
|
|
425
410
|
id: 'fake client media preferences',
|
|
426
411
|
};
|
|
427
|
-
|
|
412
|
+
|
|
428
413
|
webex.meetings.reachability.getReachabilityReportToAttachToRoap.resolves(FAKE_REACHABILITY_REPORT);
|
|
429
414
|
webex.meetings.reachability.getClientMediaPreferences.resolves(FAKE_CLIENT_MEDIA_PREFERENCES);
|
|
430
|
-
|
|
415
|
+
|
|
431
416
|
sinon
|
|
432
417
|
.stub(webex.internal.device.ipNetworkDetector, 'supportsIpV4')
|
|
433
418
|
.get(() => true);
|
|
434
419
|
sinon
|
|
435
420
|
.stub(webex.internal.device.ipNetworkDetector, 'supportsIpV6')
|
|
436
421
|
.get(() => true);
|
|
437
|
-
|
|
422
|
+
|
|
438
423
|
await MeetingUtil.joinMeeting(meeting, {
|
|
439
424
|
reachability: 'reachability',
|
|
440
425
|
roapMessage: 'roapMessage',
|
|
@@ -484,6 +469,17 @@ describe('plugin-meetings', () => {
|
|
|
484
469
|
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
485
470
|
});
|
|
486
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
|
+
|
|
487
483
|
it('should handle failed clientMediaPreferences retrieval', async () => {
|
|
488
484
|
webex.meetings.reachability.getClientMediaPreferences.rejects(new Error('fake error'));
|
|
489
485
|
meeting.isMultistream = true;
|
|
@@ -775,6 +771,13 @@ describe('plugin-meetings', () => {
|
|
|
775
771
|
});
|
|
776
772
|
});
|
|
777
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
|
+
|
|
778
781
|
describe('canBroadcastMessageToBreakout', () => {
|
|
779
782
|
it('works as expected', () => {
|
|
780
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
|
|
|
@@ -345,5 +345,22 @@ describe('plugin-meetings', () => {
|
|
|
345
345
|
);
|
|
346
346
|
});
|
|
347
347
|
});
|
|
348
|
+
|
|
349
|
+
describe('#isMeetingLink', () => {
|
|
350
|
+
it('should return true for valid join meeting link with MTID', () => {
|
|
351
|
+
const result = MeetingInfoUtil.isMeetingLink('https://cisco.webex.com/cisco/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
|
|
352
|
+
expect(result).to.be.true;
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
it('should return true for valid join meeting link without cisco domain', () => {
|
|
356
|
+
const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MTID=m9fe0afd8c435e892afcce9ea25b97046');
|
|
357
|
+
expect(result).to.be.true;
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
it('should return false for an invalid meeting link', () => {
|
|
361
|
+
const result = MeetingInfoUtil.isMeetingLink('https://test.webex.com/test/j.php?MiD=m9fe0afd8c435e892afcce9ea25b97046');
|
|
362
|
+
expect(result).to.be.false;
|
|
363
|
+
});
|
|
364
|
+
});
|
|
348
365
|
});
|
|
349
366
|
});
|
|
@@ -37,11 +37,13 @@ import {
|
|
|
37
37
|
LOCUSINFO,
|
|
38
38
|
EVENT_TRIGGERS,
|
|
39
39
|
DESTINATION_TYPE,
|
|
40
|
+
INITIAL_REGISTRATION_STATUS,
|
|
40
41
|
} from '../../../../src/constants';
|
|
41
42
|
import CaptchaError from '@webex/plugin-meetings/src/common/errors/captcha-error';
|
|
42
43
|
import {forEach} from 'lodash';
|
|
43
44
|
import PasswordError from '@webex/plugin-meetings/src/common/errors/password-error';
|
|
44
45
|
import PermissionError from '@webex/plugin-meetings/src/common/errors/permission';
|
|
46
|
+
import JoinForbiddenError from '@webex/plugin-meetings/src/common/errors/join-forbidden-error';
|
|
45
47
|
import {NoiseReductionEffect, VirtualBackgroundEffect} from '@webex/media-helpers';
|
|
46
48
|
import NoMeetingInfoError from '../../../../src/common/errors/no-meeting-info';
|
|
47
49
|
|
|
@@ -267,6 +269,33 @@ describe('plugin-meetings', () => {
|
|
|
267
269
|
});
|
|
268
270
|
});
|
|
269
271
|
|
|
272
|
+
describe('#_setLogUploadIntervalMultiplicationFactor', () => {
|
|
273
|
+
it('should have _setLogUploadIntervalMultiplicationFactor', () => {
|
|
274
|
+
assert.equal(typeof webex.meetings._setLogUploadIntervalMultiplicationFactor, 'function');
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
describe('success', () => {
|
|
278
|
+
it('should update the config', () => {
|
|
279
|
+
const someValue = 1.23;
|
|
280
|
+
|
|
281
|
+
webex.meetings._setLogUploadIntervalMultiplicationFactor(someValue);
|
|
282
|
+
assert.equal(webex.meetings.config.logUploadIntervalMultiplicationFactor, someValue);
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
describe('failure', () => {
|
|
287
|
+
it('should not accept non-number input', () => {
|
|
288
|
+
const logUploadIntervalMultiplicationFactor = webex.meetings.config.logUploadIntervalMultiplicationFactor;
|
|
289
|
+
|
|
290
|
+
webex.meetings._setLogUploadIntervalMultiplicationFactor('test');
|
|
291
|
+
assert.equal(
|
|
292
|
+
webex.meetings.config.logUploadIntervalMultiplicationFactor,
|
|
293
|
+
logUploadIntervalMultiplicationFactor
|
|
294
|
+
);
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
|
|
270
299
|
describe('#_toggleUnifiedMeetings', () => {
|
|
271
300
|
it('should have toggleUnifiedMeetings', () => {
|
|
272
301
|
assert.equal(typeof webex.meetings._toggleUnifiedMeetings, 'function');
|
|
@@ -375,21 +404,21 @@ describe('plugin-meetings', () => {
|
|
|
375
404
|
assert.isTrue(webex.meetings.registered);
|
|
376
405
|
});
|
|
377
406
|
|
|
378
|
-
it('rejects when SDK canAuthorize is false', () => {
|
|
407
|
+
it('rejects when SDK canAuthorize is false', async () => {
|
|
379
408
|
webex.canAuthorize = false;
|
|
380
|
-
assert.isRejected(webex.meetings.register());
|
|
409
|
+
await assert.isRejected(webex.meetings.register());
|
|
381
410
|
});
|
|
382
411
|
|
|
383
|
-
it('rejects when device.register fails', () => {
|
|
412
|
+
it('rejects when device.register fails', async () => {
|
|
384
413
|
webex.canAuthorize = true;
|
|
385
414
|
webex.internal.device.register = sinon.stub().returns(Promise.reject());
|
|
386
|
-
assert.isRejected(webex.meetings.register());
|
|
415
|
+
await assert.isRejected(webex.meetings.register());
|
|
387
416
|
});
|
|
388
417
|
|
|
389
|
-
it('rejects when mercury.connect fails', () => {
|
|
418
|
+
it('rejects when mercury.connect fails', async () => {
|
|
390
419
|
webex.canAuthorize = true;
|
|
391
420
|
webex.internal.mercury.connect = sinon.stub().returns(Promise.reject());
|
|
392
|
-
assert.isRejected(webex.meetings.register());
|
|
421
|
+
await assert.isRejected(webex.meetings.register());
|
|
393
422
|
});
|
|
394
423
|
|
|
395
424
|
it('resolves immediately if already registered', async () => {
|
|
@@ -420,6 +449,100 @@ describe('plugin-meetings', () => {
|
|
|
420
449
|
includeDetails: CatalogDetails.features,
|
|
421
450
|
});
|
|
422
451
|
});
|
|
452
|
+
|
|
453
|
+
it('updates registration status as expected', async () => {
|
|
454
|
+
const clock = sinon.useFakeTimers();
|
|
455
|
+
|
|
456
|
+
const delay = (secs) => () =>
|
|
457
|
+
new Promise((resolve) => {
|
|
458
|
+
setTimeout(resolve, secs * 1000);
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
let i = 1;
|
|
462
|
+
sinon.stub(webex.meetings, 'fetchUserPreferredWebexSite').callsFake(delay(i++));
|
|
463
|
+
MeetingsUtil.checkH264Support.callsFake(delay(i++));
|
|
464
|
+
webex.meetings.startReachability.callsFake(delay(i++));
|
|
465
|
+
webex.internal.device.register.callsFake(delay(i++));
|
|
466
|
+
sinon.stub(webex.meetings, 'getGeoHint').callsFake(delay(i++));
|
|
467
|
+
webex.internal.mercury.connect.callsFake(delay(i++));
|
|
468
|
+
|
|
469
|
+
webex.canAuthorize = true;
|
|
470
|
+
webex.meetings.registered = false;
|
|
471
|
+
|
|
472
|
+
const registerPromise = webex.meetings.register({
|
|
473
|
+
includeDetails: CatalogDetails.features,
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
await clock.tick(1000);
|
|
477
|
+
await webex.meetings.fetchUserPreferredWebexSite;
|
|
478
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
479
|
+
fetchWebexSite: true,
|
|
480
|
+
getGeoHint: false,
|
|
481
|
+
startReachability: false,
|
|
482
|
+
deviceRegister: false,
|
|
483
|
+
mercuryConnect: false,
|
|
484
|
+
checkH264Support: false,
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
await clock.tick(1000);
|
|
488
|
+
await MeetingsUtil.checkH264Support;
|
|
489
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
490
|
+
fetchWebexSite: true,
|
|
491
|
+
getGeoHint: false,
|
|
492
|
+
startReachability: false,
|
|
493
|
+
deviceRegister: false,
|
|
494
|
+
mercuryConnect: false,
|
|
495
|
+
checkH264Support: true,
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
await clock.tick(1000);
|
|
499
|
+
await webex.meetings.startReachability;
|
|
500
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
501
|
+
fetchWebexSite: true,
|
|
502
|
+
getGeoHint: false,
|
|
503
|
+
startReachability: true,
|
|
504
|
+
deviceRegister: false,
|
|
505
|
+
mercuryConnect: false,
|
|
506
|
+
checkH264Support: true,
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
await clock.tick(1000);
|
|
510
|
+
await webex.internal.device.register;
|
|
511
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
512
|
+
fetchWebexSite: true,
|
|
513
|
+
getGeoHint: false,
|
|
514
|
+
startReachability: true,
|
|
515
|
+
deviceRegister: true,
|
|
516
|
+
mercuryConnect: false,
|
|
517
|
+
checkH264Support: true,
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
await clock.tick(1000);
|
|
521
|
+
await webex.meetings.getGeoHint;
|
|
522
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
523
|
+
fetchWebexSite: true,
|
|
524
|
+
getGeoHint: true,
|
|
525
|
+
startReachability: true,
|
|
526
|
+
deviceRegister: true,
|
|
527
|
+
mercuryConnect: false,
|
|
528
|
+
checkH264Support: true,
|
|
529
|
+
});
|
|
530
|
+
|
|
531
|
+
await clock.tick(6000);
|
|
532
|
+
await webex.internal.mercury.connect;
|
|
533
|
+
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
534
|
+
fetchWebexSite: true,
|
|
535
|
+
getGeoHint: true,
|
|
536
|
+
startReachability: true,
|
|
537
|
+
deviceRegister: true,
|
|
538
|
+
mercuryConnect: true,
|
|
539
|
+
checkH264Support: true,
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
await registerPromise;
|
|
543
|
+
|
|
544
|
+
clock.restore();
|
|
545
|
+
});
|
|
423
546
|
});
|
|
424
547
|
|
|
425
548
|
describe('#unregister', () => {
|
|
@@ -440,27 +563,36 @@ describe('plugin-meetings', () => {
|
|
|
440
563
|
});
|
|
441
564
|
});
|
|
442
565
|
|
|
443
|
-
it('rejects when device.unregister fails', () => {
|
|
566
|
+
it('rejects when device.unregister fails', async () => {
|
|
444
567
|
webex.meetings.registered = true;
|
|
445
568
|
webex.internal.device.unregister = sinon.stub().returns(Promise.reject());
|
|
446
|
-
assert.isRejected(webex.meetings.unregister());
|
|
569
|
+
await assert.isRejected(webex.meetings.unregister());
|
|
447
570
|
});
|
|
448
571
|
|
|
449
|
-
it('rejects when mercury.disconnect fails', () => {
|
|
572
|
+
it('rejects when mercury.disconnect fails', async () => {
|
|
450
573
|
webex.meetings.registered = true;
|
|
451
574
|
webex.internal.mercury.disconnect = sinon.stub().returns(Promise.reject());
|
|
452
|
-
assert.isRejected(webex.meetings.unregister());
|
|
575
|
+
await assert.isRejected(webex.meetings.unregister());
|
|
453
576
|
});
|
|
454
577
|
|
|
455
|
-
it('resolves immediately if
|
|
578
|
+
it('resolves immediately if not registered', (done) => {
|
|
456
579
|
webex.meetings.registered = false;
|
|
457
580
|
webex.meetings.unregister().then(() => {
|
|
458
|
-
assert.notCalled(webex.internal.device.
|
|
459
|
-
assert.notCalled(webex.internal.mercury.
|
|
581
|
+
assert.notCalled(webex.internal.device.unregister);
|
|
582
|
+
assert.notCalled(webex.internal.mercury.disconnect);
|
|
460
583
|
assert.isFalse(webex.meetings.registered);
|
|
461
584
|
done();
|
|
462
585
|
});
|
|
463
586
|
});
|
|
587
|
+
|
|
588
|
+
it('resets registration status', (done) => {
|
|
589
|
+
webex.meetings.registered = true;
|
|
590
|
+
webex.meetings.registrationStatus = {foo: 'bar'};
|
|
591
|
+
webex.meetings.unregister().then(() => {
|
|
592
|
+
assert.deepEqual(webex.meetings.registrationStatus, INITIAL_REGISTRATION_STATUS);
|
|
593
|
+
done();
|
|
594
|
+
});
|
|
595
|
+
});
|
|
464
596
|
});
|
|
465
597
|
|
|
466
598
|
describe('virtual background effect', () => {
|
|
@@ -1921,6 +2053,11 @@ describe('plugin-meetings', () => {
|
|
|
1921
2053
|
debugLogMessage:
|
|
1922
2054
|
'Meetings:index#createMeeting --> Debug PermissionError: Not allowed to execute the function, some properties on server, or local client state do not allow you to complete this action. fetching /meetingInfo for creation.',
|
|
1923
2055
|
},
|
|
2056
|
+
{
|
|
2057
|
+
error: new JoinForbiddenError(),
|
|
2058
|
+
debugLogMessage:
|
|
2059
|
+
'Meetings:index#createMeeting --> Debug JoinForbiddenError: Meeting join forbidden. fetching /meetingInfo for creation.',
|
|
2060
|
+
},
|
|
1924
2061
|
{
|
|
1925
2062
|
error: new Error(),
|
|
1926
2063
|
infoLogMessage: true,
|
|
@@ -290,4 +290,14 @@ describe('plugin-meetings', () => {
|
|
|
290
290
|
assert.equal(MeetingsUtil.isValidBreakoutLocus(newLocus), true);
|
|
291
291
|
});
|
|
292
292
|
});
|
|
293
|
+
|
|
294
|
+
describe('#getMediaServer', () => {
|
|
295
|
+
it('returns the contents of o-line lower cased', () => {
|
|
296
|
+
const sdp1 = 'v=0\r\no=homer 0 1 IN IP4 23.89.67.81\r\ns=-\r\nc=IN IP4 23.89.67.81\r\nb=TIAS:128000\r\nt=0 0\r\na=ice-lite\r\n'
|
|
297
|
+
assert.equal(MeetingsUtil.getMediaServer(sdp1), 'homer');
|
|
298
|
+
|
|
299
|
+
const sdp2 = 'v=0\r\no=HOMER 0 1 IN IP4 23.89.67.81\r\ns=-\r\nc=IN IP4 23.89.67.81\r\nb=TIAS:128000\r\nt=0 0\r\na=ice-lite\r\n'
|
|
300
|
+
assert.equal(MeetingsUtil.getMediaServer(sdp2), 'homer');
|
|
301
|
+
});
|
|
302
|
+
})
|
|
293
303
|
});
|
|
@@ -5,13 +5,13 @@ import {_SEND_RECEIVE_, _RECEIVE_ONLY_} from '../../../../src/constants';
|
|
|
5
5
|
|
|
6
6
|
describe('plugin-meetings', () => {
|
|
7
7
|
describe('isHandRaised', () => {
|
|
8
|
-
it('throws error when there is no participant', () => {
|
|
8
|
+
it('throws an error when there is no participant', () => {
|
|
9
9
|
assert.throws(() => {
|
|
10
10
|
MemberUtil.isHandRaised();
|
|
11
11
|
}, 'Raise hand could not be processed, participant is undefined.');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
it('returns false when controls
|
|
14
|
+
it('returns false when controls are not present', () => {
|
|
15
15
|
const participant = {};
|
|
16
16
|
|
|
17
17
|
assert.isFalse(MemberUtil.isHandRaised(participant));
|
|
@@ -51,7 +51,7 @@ describe('plugin-meetings', () => {
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
describe('MemberUtil.canReclaimHost', () => {
|
|
54
|
-
it('throws error when there is no participant', () => {
|
|
54
|
+
it('throws an error when there is no participant', () => {
|
|
55
55
|
assert.throws(() => {
|
|
56
56
|
MemberUtil.canReclaimHost();
|
|
57
57
|
}, 'canReclaimHostRole could not be processed, participant is undefined.');
|
|
@@ -352,8 +352,49 @@ describe('plugin-meetings', () => {
|
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
|
|
355
|
+
describe('MemberUtil.isBrb', () => {
|
|
356
|
+
it('returns true when brb is enabled', () => {
|
|
357
|
+
const participant = {
|
|
358
|
+
controls: {
|
|
359
|
+
brb: {
|
|
360
|
+
enabled: true,
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
assert.isTrue(MemberUtil.isBrb(participant));
|
|
366
|
+
});
|
|
367
|
+
|
|
368
|
+
it('returns false when brb is disabled', () => {
|
|
369
|
+
const participant = {
|
|
370
|
+
controls: {
|
|
371
|
+
brb: {
|
|
372
|
+
enabled: false,
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
assert.isFalse(MemberUtil.isBrb(participant));
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
it('returns false when brb is not present', () => {
|
|
382
|
+
const participant = {
|
|
383
|
+
controls: {},
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
assert.isFalse(MemberUtil.isBrb(participant));
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
it('returns false when controls is not present', () => {
|
|
390
|
+
const participant = {};
|
|
391
|
+
|
|
392
|
+
assert.isFalse(MemberUtil.isBrb(participant));
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
|
|
355
396
|
describe('MemberUtil.isBreakoutsSupported', () => {
|
|
356
|
-
it('throws error when there is no participant', () => {
|
|
397
|
+
it('throws an error when there is no participant', () => {
|
|
357
398
|
assert.throws(() => {
|
|
358
399
|
MemberUtil.isBreakoutsSupported();
|
|
359
400
|
}, 'Breakout support could not be processed, participant is undefined.');
|
|
@@ -377,7 +418,7 @@ describe('plugin-meetings', () => {
|
|
|
377
418
|
});
|
|
378
419
|
|
|
379
420
|
describe('MemberUtil.isLiveAnnotationSupported', () => {
|
|
380
|
-
it('throws error when there is no participant', () => {
|
|
421
|
+
it('throws an error when there is no participant', () => {
|
|
381
422
|
assert.throws(() => {
|
|
382
423
|
MemberUtil.isLiveAnnotationSupported();
|
|
383
424
|
}, 'LiveAnnotation support could not be processed, participant is undefined.');
|
|
@@ -401,7 +442,7 @@ describe('plugin-meetings', () => {
|
|
|
401
442
|
});
|
|
402
443
|
|
|
403
444
|
describe('MemberUtil.isInterpretationSupported', () => {
|
|
404
|
-
it('throws error when there is no participant', () => {
|
|
445
|
+
it('throws an error when there is no participant', () => {
|
|
405
446
|
assert.throws(() => {
|
|
406
447
|
MemberUtil.isInterpretationSupported();
|
|
407
448
|
}, 'Interpretation support could not be processed, participant is undefined.');
|
|
@@ -432,7 +473,7 @@ describe('plugin-meetings', () => {
|
|
|
432
473
|
};
|
|
433
474
|
|
|
434
475
|
describe('MemberUtil.isAudioMuted', () => {
|
|
435
|
-
it('throws error when there is no participant', () => {
|
|
476
|
+
it('throws an error when there is no participant', () => {
|
|
436
477
|
assert.throws(() => {
|
|
437
478
|
MemberUtil.isAudioMuted();
|
|
438
479
|
}, 'Audio could not be processed, participant is undefined.');
|
|
@@ -475,7 +516,7 @@ describe('plugin-meetings', () => {
|
|
|
475
516
|
});
|
|
476
517
|
|
|
477
518
|
describe('MemberUtil.isVideoMuted', () => {
|
|
478
|
-
it('throws error when there is no participant', () => {
|
|
519
|
+
it('throws an error when there is no participant', () => {
|
|
479
520
|
assert.throws(() => {
|
|
480
521
|
MemberUtil.isVideoMuted();
|
|
481
522
|
}, 'Video could not be processed, participant is undefined.');
|
|
@@ -519,7 +560,7 @@ describe('plugin-meetings', () => {
|
|
|
519
560
|
});
|
|
520
561
|
|
|
521
562
|
describe('extractMediaStatus', () => {
|
|
522
|
-
it('throws error when there is no participant', () => {
|
|
563
|
+
it('throws an error when there is no participant', () => {
|
|
523
564
|
assert.throws(() => {
|
|
524
565
|
MemberUtil.extractMediaStatus()
|
|
525
566
|
}, 'Media status could not be extracted, participant is undefined.');
|
|
@@ -529,7 +570,7 @@ describe('extractMediaStatus', () => {
|
|
|
529
570
|
const participant = {
|
|
530
571
|
status: {}
|
|
531
572
|
};
|
|
532
|
-
|
|
573
|
+
|
|
533
574
|
const mediaStatus = MemberUtil.extractMediaStatus(participant)
|
|
534
575
|
|
|
535
576
|
assert.deepEqual(mediaStatus, {audio: undefined, video: undefined});
|
|
@@ -542,7 +583,7 @@ describe('extractMediaStatus', () => {
|
|
|
542
583
|
videoStatus: 'SENDRECV'
|
|
543
584
|
}
|
|
544
585
|
};
|
|
545
|
-
|
|
586
|
+
|
|
546
587
|
const mediaStatus = MemberUtil.extractMediaStatus(participant)
|
|
547
588
|
|
|
548
589
|
assert.deepEqual(mediaStatus, {audio: 'RECVONLY', video: 'SENDRECV'});
|
|
@@ -249,14 +249,18 @@ describe('RemoteMedia', () => {
|
|
|
249
249
|
|
|
250
250
|
forEach(
|
|
251
251
|
[
|
|
252
|
-
{height:
|
|
253
|
-
{height:
|
|
254
|
-
{height:
|
|
255
|
-
{height:
|
|
256
|
-
{height:
|
|
257
|
-
{height:
|
|
252
|
+
{height: 90, fs: 60}, // 90p
|
|
253
|
+
{height: 98, fs: 60},
|
|
254
|
+
{height: 99, fs: 240}, // 180p
|
|
255
|
+
{height: 180, fs: 240},
|
|
256
|
+
{height: 197, fs: 240},
|
|
257
|
+
{height: 198, fs: 920}, // 360p
|
|
258
|
+
{height: 360, fs: 920},
|
|
259
|
+
{height: 395, fs: 920},
|
|
260
|
+
{height: 396, fs: 3600}, // 720p
|
|
258
261
|
{height: 720, fs: 3600},
|
|
259
|
-
{height: 721, fs: 8192},
|
|
262
|
+
{height: 721, fs: 8192}, // 1080p
|
|
263
|
+
{height: 1080, fs: 8192},
|
|
260
264
|
],
|
|
261
265
|
({height, fs}) => {
|
|
262
266
|
it(`sets the max fs to ${fs} correctly when height is ${height}`, () => {
|
|
@@ -251,6 +251,53 @@ describe('Roap', () => {
|
|
|
251
251
|
);
|
|
252
252
|
});
|
|
253
253
|
|
|
254
|
+
it('handles the case when there is some other (not an answer) roap message type in the http response', async () => {
|
|
255
|
+
const roapError = {
|
|
256
|
+
seq: 1,
|
|
257
|
+
messageType: 'ERROR',
|
|
258
|
+
sdps: [],
|
|
259
|
+
errorType: 'error type',
|
|
260
|
+
errorCause: 'error cause',
|
|
261
|
+
headers: ['header1', 'header2'],
|
|
262
|
+
};
|
|
263
|
+
const fakeMediaConnections = [
|
|
264
|
+
{
|
|
265
|
+
remoteSdp: JSON.stringify({
|
|
266
|
+
roapMessage: roapError,
|
|
267
|
+
}),
|
|
268
|
+
},
|
|
269
|
+
];
|
|
270
|
+
|
|
271
|
+
sendRoapStub.resolves({
|
|
272
|
+
mediaConnections: fakeMediaConnections,
|
|
273
|
+
locus: fakeLocus,
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
const result = await roap.sendRoapMediaRequest({
|
|
277
|
+
meeting,
|
|
278
|
+
sdp: 'sdp',
|
|
279
|
+
reconnect: false,
|
|
280
|
+
seq: 1,
|
|
281
|
+
tieBreaker: 4294967294,
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
assert.calledOnce(sendRoapStub);
|
|
285
|
+
assert.calledOnceWithExactly(meeting.updateMediaConnections, fakeMediaConnections);
|
|
286
|
+
assert.deepEqual(result, {
|
|
287
|
+
locus: fakeLocus,
|
|
288
|
+
roapAnswer: undefined,
|
|
289
|
+
});
|
|
290
|
+
assert.calledOnceWithExactly(
|
|
291
|
+
Metrics.sendBehavioralMetric,
|
|
292
|
+
BEHAVIORAL_METRICS.ROAP_HTTP_RESPONSE_MISSING,
|
|
293
|
+
{
|
|
294
|
+
correlationId: meeting.correlationId,
|
|
295
|
+
messageType: 'ANSWER',
|
|
296
|
+
isMultistream: meeting.isMultistream,
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
});
|
|
300
|
+
|
|
254
301
|
describe('does not crash when http response is missing things', () => {
|
|
255
302
|
[
|
|
256
303
|
{mediaConnections: undefined, title: 'mediaConnections are undefined'},
|