@webex/plugin-meetings 3.7.0-next.21 → 3.7.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +8 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +20 -11
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/meeting/index.js +718 -646
- package/dist/meeting/index.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/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/multistream/sendSlotManager.js +24 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/meeting/index.d.ts +8 -0
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +7 -0
- package/dist/types/multistream/sendSlotManager.d.ts +8 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/constants.ts +2 -0
- package/src/locus-info/index.ts +13 -0
- package/src/locus-info/selfUtils.ts +6 -0
- package/src/meeting/index.ts +67 -0
- package/src/meeting/request.ts +26 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/member/index.ts +9 -0
- package/src/member/types.ts +8 -0
- package/src/member/util.ts +34 -24
- package/src/multistream/sendSlotManager.ts +31 -0
- package/test/unit/spec/locus-info/index.js +93 -0
- package/test/unit/spec/locus-info/selfConstant.js +7 -0
- package/test/unit/spec/locus-info/selfUtils.js +39 -0
- package/test/unit/spec/meeting/index.js +153 -0
- package/test/unit/spec/member/util.js +46 -11
|
@@ -3479,6 +3479,51 @@ describe('plugin-meetings', () => {
|
|
|
3479
3479
|
});
|
|
3480
3480
|
});
|
|
3481
3481
|
|
|
3482
|
+
it('counts the number of members that are in the meeting for MEDIA_QUALITY event', async () => {
|
|
3483
|
+
let fakeMembersCollection = {
|
|
3484
|
+
members: {
|
|
3485
|
+
member1: { isInMeeting: true },
|
|
3486
|
+
member2: { isInMeeting: true },
|
|
3487
|
+
member3: { isInMeeting: false },
|
|
3488
|
+
},
|
|
3489
|
+
};
|
|
3490
|
+
sinon.stub(meeting, 'getMembers').returns({ membersCollection: fakeMembersCollection });
|
|
3491
|
+
const fakeData = { intervalMetadata: {}, networkType: 'wifi' };
|
|
3492
|
+
|
|
3493
|
+
statsAnalyzerStub.emit(
|
|
3494
|
+
{ file: 'test', function: 'test' },
|
|
3495
|
+
StatsAnalyzerEventNames.MEDIA_QUALITY,
|
|
3496
|
+
{ data: fakeData }
|
|
3497
|
+
);
|
|
3498
|
+
|
|
3499
|
+
assert.calledWithMatch(webex.internal.newMetrics.submitMQE, {
|
|
3500
|
+
name: 'client.mediaquality.event',
|
|
3501
|
+
options: {
|
|
3502
|
+
meetingId: meeting.id,
|
|
3503
|
+
},
|
|
3504
|
+
payload: {
|
|
3505
|
+
intervals: [sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 2))],
|
|
3506
|
+
},
|
|
3507
|
+
});
|
|
3508
|
+
fakeMembersCollection.members.member2.isInMeeting = false;
|
|
3509
|
+
|
|
3510
|
+
statsAnalyzerStub.emit(
|
|
3511
|
+
{ file: 'test', function: 'test' },
|
|
3512
|
+
StatsAnalyzerEventNames.MEDIA_QUALITY,
|
|
3513
|
+
{ data: fakeData }
|
|
3514
|
+
);
|
|
3515
|
+
|
|
3516
|
+
assert.calledWithMatch(webex.internal.newMetrics.submitMQE, {
|
|
3517
|
+
name: 'client.mediaquality.event',
|
|
3518
|
+
options: {
|
|
3519
|
+
meetingId: meeting.id,
|
|
3520
|
+
},
|
|
3521
|
+
payload: {
|
|
3522
|
+
intervals: [sinon.match.has('intervalMetadata', sinon.match.has('meetingUserCount', 1))],
|
|
3523
|
+
},
|
|
3524
|
+
});
|
|
3525
|
+
});
|
|
3526
|
+
|
|
3482
3527
|
it('calls submitMQE correctly', async () => {
|
|
3483
3528
|
const fakeData = {intervalMetadata: {bla: 'bla'}, networkType: 'wifi'};
|
|
3484
3529
|
|
|
@@ -3697,6 +3742,93 @@ describe('plugin-meetings', () => {
|
|
|
3697
3742
|
});
|
|
3698
3743
|
});
|
|
3699
3744
|
|
|
3745
|
+
describe(`#beRightBack`, () => {
|
|
3746
|
+
const fakeMultistreamRoapMediaConnection = {
|
|
3747
|
+
createSendSlot: sinon.stub().returns({
|
|
3748
|
+
setSourceStateOverride: sinon.stub().resolves(),
|
|
3749
|
+
clearSourceStateOverride: sinon.stub().resolves(),
|
|
3750
|
+
}),
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
beforeEach(() => {
|
|
3754
|
+
meeting.meetingRequest.setBrb = sinon.stub().resolves({body: 'test'});
|
|
3755
|
+
meeting.mediaProperties.webrtcMediaConnection = {createSendSlot: sinon.stub()};
|
|
3756
|
+
meeting.sendSlotManager.createSlot(
|
|
3757
|
+
fakeMultistreamRoapMediaConnection,
|
|
3758
|
+
MediaType.VideoMain
|
|
3759
|
+
);
|
|
3760
|
+
|
|
3761
|
+
meeting.locusUrl = 'locus url';
|
|
3762
|
+
meeting.deviceUrl = 'device url';
|
|
3763
|
+
meeting.selfId = 'self id';
|
|
3764
|
+
});
|
|
3765
|
+
|
|
3766
|
+
afterEach(() => {
|
|
3767
|
+
sinon.restore();
|
|
3768
|
+
});
|
|
3769
|
+
|
|
3770
|
+
it('should have #beRightBack', () => {
|
|
3771
|
+
assert.exists(meeting.beRightBack);
|
|
3772
|
+
});
|
|
3773
|
+
|
|
3774
|
+
describe('when in a multistream meeting', () => {
|
|
3775
|
+
|
|
3776
|
+
beforeEach(() => {
|
|
3777
|
+
meeting.isMultistream = true;
|
|
3778
|
+
});
|
|
3779
|
+
|
|
3780
|
+
it('should enable #beRightBack and return a promise', async () => {
|
|
3781
|
+
const brbResult = meeting.beRightBack(true);
|
|
3782
|
+
|
|
3783
|
+
await brbResult;
|
|
3784
|
+
assert.exists(brbResult.then);
|
|
3785
|
+
assert.calledOnce(meeting.meetingRequest.setBrb);
|
|
3786
|
+
})
|
|
3787
|
+
|
|
3788
|
+
it('should disable #beRightBack and return a promise', async () => {
|
|
3789
|
+
const brbResult = meeting.beRightBack(false);
|
|
3790
|
+
|
|
3791
|
+
await brbResult;
|
|
3792
|
+
assert.exists(brbResult.then);
|
|
3793
|
+
assert.calledOnce(meeting.meetingRequest.setBrb);
|
|
3794
|
+
})
|
|
3795
|
+
|
|
3796
|
+
it('should throw an error and reject the promise if setBrb fails', async () => {
|
|
3797
|
+
const error = new Error('setBrb failed');
|
|
3798
|
+
meeting.meetingRequest.setBrb.rejects(error);
|
|
3799
|
+
|
|
3800
|
+
try {
|
|
3801
|
+
await meeting.beRightBack(true);
|
|
3802
|
+
} catch (err) {
|
|
3803
|
+
assert.instanceOf(err, Error);
|
|
3804
|
+
assert.equal(err.message, 'setBrb failed');
|
|
3805
|
+
assert.isRejected((Promise.reject()));
|
|
3806
|
+
}
|
|
3807
|
+
})
|
|
3808
|
+
});
|
|
3809
|
+
|
|
3810
|
+
describe('when in a transcoded meeting', () => {
|
|
3811
|
+
|
|
3812
|
+
beforeEach(() => {
|
|
3813
|
+
meeting.isMultistream = false;
|
|
3814
|
+
});
|
|
3815
|
+
|
|
3816
|
+
it('should ignore enabling #beRightBack', async () => {
|
|
3817
|
+
meeting.beRightBack(true);
|
|
3818
|
+
|
|
3819
|
+
assert.isRejected((Promise.reject()));
|
|
3820
|
+
assert.notCalled(meeting.meetingRequest.setBrb);
|
|
3821
|
+
})
|
|
3822
|
+
|
|
3823
|
+
it('should ignore disabling #beRightBack', async () => {
|
|
3824
|
+
meeting.beRightBack(false);
|
|
3825
|
+
|
|
3826
|
+
assert.isRejected((Promise.reject()));
|
|
3827
|
+
assert.notCalled(meeting.meetingRequest.setBrb);
|
|
3828
|
+
})
|
|
3829
|
+
});
|
|
3830
|
+
});
|
|
3831
|
+
|
|
3700
3832
|
/* This set of tests are like semi-integration tests, they use real MuteState, Media, LocusMediaRequest and Roap classes.
|
|
3701
3833
|
They mock the @webex/internal-media-core and sending of /media http requests to Locus.
|
|
3702
3834
|
Their main purpose is to test that we send the right http requests to Locus and make right calls
|
|
@@ -8674,6 +8806,7 @@ describe('plugin-meetings', () => {
|
|
|
8674
8806
|
});
|
|
8675
8807
|
});
|
|
8676
8808
|
});
|
|
8809
|
+
|
|
8677
8810
|
describe('#setUpLocusInfoSelfListener', () => {
|
|
8678
8811
|
it('listens to the self unadmitted guest event', (done) => {
|
|
8679
8812
|
meeting.startKeepAlive = sinon.stub();
|
|
@@ -8768,6 +8901,26 @@ describe('plugin-meetings', () => {
|
|
|
8768
8901
|
);
|
|
8769
8902
|
});
|
|
8770
8903
|
|
|
8904
|
+
it('listens to the brb state changed event', () => {
|
|
8905
|
+
const assertBrb = (enabled) => {
|
|
8906
|
+
meeting.locusInfo.emit(
|
|
8907
|
+
{ function: 'test', file: 'test' },
|
|
8908
|
+
LOCUSINFO.EVENTS.SELF_MEETING_BRB_CHANGED,
|
|
8909
|
+
{ brb: { enabled } },
|
|
8910
|
+
)
|
|
8911
|
+
assert.calledWithExactly(
|
|
8912
|
+
TriggerProxy.trigger,
|
|
8913
|
+
meeting,
|
|
8914
|
+
{file: 'meeting/index', function: 'setUpLocusInfoSelfListener'},
|
|
8915
|
+
EVENT_TRIGGERS.MEETING_SELF_BRB_UPDATE,
|
|
8916
|
+
{ payload: { brb: { enabled } } },
|
|
8917
|
+
);
|
|
8918
|
+
}
|
|
8919
|
+
|
|
8920
|
+
assertBrb(true);
|
|
8921
|
+
assertBrb(false);
|
|
8922
|
+
})
|
|
8923
|
+
|
|
8771
8924
|
it('listens to the interpretation changed event', () => {
|
|
8772
8925
|
meeting.simultaneousInterpretation.updateSelfInterpretation = sinon.stub();
|
|
8773
8926
|
|
|
@@ -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,43 @@ 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
|
+
|
|
355
390
|
describe('MemberUtil.isBreakoutsSupported', () => {
|
|
356
|
-
it('throws error when there is no participant', () => {
|
|
391
|
+
it('throws an error when there is no participant', () => {
|
|
357
392
|
assert.throws(() => {
|
|
358
393
|
MemberUtil.isBreakoutsSupported();
|
|
359
394
|
}, 'Breakout support could not be processed, participant is undefined.');
|
|
@@ -377,7 +412,7 @@ describe('plugin-meetings', () => {
|
|
|
377
412
|
});
|
|
378
413
|
|
|
379
414
|
describe('MemberUtil.isLiveAnnotationSupported', () => {
|
|
380
|
-
it('throws error when there is no participant', () => {
|
|
415
|
+
it('throws an error when there is no participant', () => {
|
|
381
416
|
assert.throws(() => {
|
|
382
417
|
MemberUtil.isLiveAnnotationSupported();
|
|
383
418
|
}, 'LiveAnnotation support could not be processed, participant is undefined.');
|
|
@@ -401,7 +436,7 @@ describe('plugin-meetings', () => {
|
|
|
401
436
|
});
|
|
402
437
|
|
|
403
438
|
describe('MemberUtil.isInterpretationSupported', () => {
|
|
404
|
-
it('throws error when there is no participant', () => {
|
|
439
|
+
it('throws an error when there is no participant', () => {
|
|
405
440
|
assert.throws(() => {
|
|
406
441
|
MemberUtil.isInterpretationSupported();
|
|
407
442
|
}, 'Interpretation support could not be processed, participant is undefined.');
|
|
@@ -432,7 +467,7 @@ describe('plugin-meetings', () => {
|
|
|
432
467
|
};
|
|
433
468
|
|
|
434
469
|
describe('MemberUtil.isAudioMuted', () => {
|
|
435
|
-
it('throws error when there is no participant', () => {
|
|
470
|
+
it('throws an error when there is no participant', () => {
|
|
436
471
|
assert.throws(() => {
|
|
437
472
|
MemberUtil.isAudioMuted();
|
|
438
473
|
}, 'Audio could not be processed, participant is undefined.');
|
|
@@ -475,7 +510,7 @@ describe('plugin-meetings', () => {
|
|
|
475
510
|
});
|
|
476
511
|
|
|
477
512
|
describe('MemberUtil.isVideoMuted', () => {
|
|
478
|
-
it('throws error when there is no participant', () => {
|
|
513
|
+
it('throws an error when there is no participant', () => {
|
|
479
514
|
assert.throws(() => {
|
|
480
515
|
MemberUtil.isVideoMuted();
|
|
481
516
|
}, 'Video could not be processed, participant is undefined.');
|
|
@@ -519,7 +554,7 @@ describe('plugin-meetings', () => {
|
|
|
519
554
|
});
|
|
520
555
|
|
|
521
556
|
describe('extractMediaStatus', () => {
|
|
522
|
-
it('throws error when there is no participant', () => {
|
|
557
|
+
it('throws an error when there is no participant', () => {
|
|
523
558
|
assert.throws(() => {
|
|
524
559
|
MemberUtil.extractMediaStatus()
|
|
525
560
|
}, 'Media status could not be extracted, participant is undefined.');
|
|
@@ -529,7 +564,7 @@ describe('extractMediaStatus', () => {
|
|
|
529
564
|
const participant = {
|
|
530
565
|
status: {}
|
|
531
566
|
};
|
|
532
|
-
|
|
567
|
+
|
|
533
568
|
const mediaStatus = MemberUtil.extractMediaStatus(participant)
|
|
534
569
|
|
|
535
570
|
assert.deepEqual(mediaStatus, {audio: undefined, video: undefined});
|
|
@@ -542,7 +577,7 @@ describe('extractMediaStatus', () => {
|
|
|
542
577
|
videoStatus: 'SENDRECV'
|
|
543
578
|
}
|
|
544
579
|
};
|
|
545
|
-
|
|
580
|
+
|
|
546
581
|
const mediaStatus = MemberUtil.extractMediaStatus(participant)
|
|
547
582
|
|
|
548
583
|
assert.deepEqual(mediaStatus, {audio: 'RECVONLY', video: 'SENDRECV'});
|