@webex/plugin-meetings 3.7.0-next.8 → 3.7.0-web-workers-keepalive.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/{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 +26 -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 +13 -2
- 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/index.js +903 -800
- 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 +29 -17
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +6 -3
- package/dist/meetings/index.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 +1 -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/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/{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 +20 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/locus-info/index.d.ts +2 -1
- 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 +4 -4
- package/dist/types/meetings/index.d.ts +3 -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 +1 -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-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 +23 -3
- package/src/index.ts +5 -3
- package/src/locus-info/index.ts +17 -2
- package/src/locus-info/selfUtils.ts +19 -6
- package/src/meeting/index.ts +234 -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 +23 -11
- package/src/meetings/index.ts +8 -2
- 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 +1 -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 +222 -0
- 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/index.js +683 -103
- package/test/unit/spec/meeting/utils.js +22 -19
- package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
- package/test/unit/spec/meetings/index.js +9 -5
- 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,7 @@ import MeetingInfo, {
|
|
|
18
18
|
MeetingInfoV2CaptchaError,
|
|
19
19
|
MeetingInfoV2AdhocMeetingError,
|
|
20
20
|
MeetingInfoV2PolicyError,
|
|
21
|
-
|
|
21
|
+
MeetingInfoV2JoinWebinarError,
|
|
22
22
|
} from '@webex/plugin-meetings/src/meeting-info/meeting-info-v2';
|
|
23
23
|
import MeetingInfoUtil from '@webex/plugin-meetings/src/meeting-info/utilv2';
|
|
24
24
|
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
@@ -895,9 +895,14 @@ describe('plugin-meetings', () => {
|
|
|
895
895
|
{errorCode: 403021},
|
|
896
896
|
{errorCode: 403022},
|
|
897
897
|
{errorCode: 403024},
|
|
898
|
+
{errorCode: 403137},
|
|
899
|
+
{errorCode: 423007},
|
|
900
|
+
{errorCode: 403026},
|
|
901
|
+
{errorCode: 403037},
|
|
902
|
+
{errorCode: 403137},
|
|
898
903
|
],
|
|
899
904
|
({errorCode}) => {
|
|
900
|
-
it(`should throw a
|
|
905
|
+
it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {
|
|
901
906
|
const message = 'a message';
|
|
902
907
|
const meetingInfoData = {meetingInfo: {registrationUrl: 'registrationUrl'}};
|
|
903
908
|
|
|
@@ -909,7 +914,7 @@ describe('plugin-meetings', () => {
|
|
|
909
914
|
await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
|
|
910
915
|
assert.fail('createAdhocSpaceMeeting should have thrown, but has not done that');
|
|
911
916
|
} catch (err) {
|
|
912
|
-
assert.instanceOf(err,
|
|
917
|
+
assert.instanceOf(err, MeetingInfoV2JoinWebinarError);
|
|
913
918
|
assert.deepEqual(err.message, `${message}, code=${errorCode}`);
|
|
914
919
|
assert.equal(err.wbxAppApiCode, errorCode);
|
|
915
920
|
assert.deepEqual(err.meetingInfo, meetingInfoData);
|
|
@@ -917,7 +922,7 @@ describe('plugin-meetings', () => {
|
|
|
917
922
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
918
923
|
assert.calledWith(
|
|
919
924
|
Metrics.sendBehavioralMetric,
|
|
920
|
-
BEHAVIORAL_METRICS.
|
|
925
|
+
BEHAVIORAL_METRICS.JOIN_WEBINAR_ERROR,
|
|
921
926
|
{code: errorCode}
|
|
922
927
|
);
|
|
923
928
|
|
|
@@ -131,9 +131,9 @@ describe('plugin-meetings', () => {
|
|
|
131
131
|
logger,
|
|
132
132
|
people: {
|
|
133
133
|
_getMe: sinon.stub().resolves({
|
|
134
|
-
type: 'validuser',
|
|
134
|
+
type: 'validuser',
|
|
135
135
|
}),
|
|
136
|
-
}
|
|
136
|
+
},
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
startReachabilityStub = sinon.stub(webex.meetings, 'startReachability').resolves();
|
|
@@ -1985,6 +1985,8 @@ describe('plugin-meetings', () => {
|
|
|
1985
1985
|
const meetingIds = {
|
|
1986
1986
|
meetingId: meeting.id,
|
|
1987
1987
|
correlationId: meeting.correlationId,
|
|
1988
|
+
roles: meeting.roles,
|
|
1989
|
+
callStateForMetrics: meeting.callStateForMetrics,
|
|
1988
1990
|
};
|
|
1989
1991
|
|
|
1990
1992
|
webex.meetings.destroy(meeting, test1);
|
|
@@ -2021,6 +2023,8 @@ describe('plugin-meetings', () => {
|
|
|
2021
2023
|
|
|
2022
2024
|
assert.equal(deletedMeetingInfo.id, meetingIds.meetingId);
|
|
2023
2025
|
assert.equal(deletedMeetingInfo.correlationId, meetingIds.correlationId);
|
|
2026
|
+
assert.equal(deletedMeetingInfo.roles, meetingIds.roles);
|
|
2027
|
+
assert.equal(deletedMeetingInfo.callStateForMetrics, meetingIds.callStateForMetrics);
|
|
2024
2028
|
});
|
|
2025
2029
|
});
|
|
2026
2030
|
|
|
@@ -2092,7 +2096,7 @@ describe('plugin-meetings', () => {
|
|
|
2092
2096
|
);
|
|
2093
2097
|
});
|
|
2094
2098
|
|
|
2095
|
-
const setup = ({me = {
|
|
2099
|
+
const setup = ({me = {type: 'validuser'}, user} = {}) => {
|
|
2096
2100
|
loggerProxySpy = sinon.spy(LoggerProxy.logger, 'error');
|
|
2097
2101
|
assert.deepEqual(webex.internal.services._getCatalog().getAllowedDomains(), []);
|
|
2098
2102
|
|
|
@@ -2113,9 +2117,9 @@ describe('plugin-meetings', () => {
|
|
|
2113
2117
|
|
|
2114
2118
|
it('should not call request.getMeetingPreferences if user is a guest', async () => {
|
|
2115
2119
|
setup({me: {type: 'appuser'}});
|
|
2116
|
-
|
|
2120
|
+
|
|
2117
2121
|
await webex.meetings.fetchUserPreferredWebexSite();
|
|
2118
|
-
|
|
2122
|
+
|
|
2119
2123
|
assert.equal(webex.meetings.preferredWebexSite, '');
|
|
2120
2124
|
assert.deepEqual(webex.internal.services._getCatalog().getAllowedDomains(), []);
|
|
2121
2125
|
assert.notCalled(webex.internal.services.getMeetingPreferences);
|
|
@@ -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'},
|