@webex/plugin-meetings 3.7.0-next.21 → 3.7.0-next.22
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/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +8 -1
- package/dist/meeting/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/meeting/index.ts +9 -0
- package/test/unit/spec/meeting/index.js +45 -0
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
44
44
|
"@webex/jest-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/legacy-tools": "0.0.0",
|
|
46
|
-
"@webex/plugin-meetings": "3.7.0-next.
|
|
46
|
+
"@webex/plugin-meetings": "3.7.0-next.22",
|
|
47
47
|
"@webex/plugin-rooms": "3.7.0-next.7",
|
|
48
48
|
"@webex/test-helper-chai": "3.7.0-next.5",
|
|
49
49
|
"@webex/test-helper-mocha": "3.7.0-next.5",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@webex/internal-plugin-metrics": "3.7.0-next.5",
|
|
71
71
|
"@webex/internal-plugin-support": "3.7.0-next.8",
|
|
72
72
|
"@webex/internal-plugin-user": "3.7.0-next.5",
|
|
73
|
-
"@webex/internal-plugin-voicea": "3.7.0-next.
|
|
73
|
+
"@webex/internal-plugin-voicea": "3.7.0-next.22",
|
|
74
74
|
"@webex/media-helpers": "3.7.0-next.6",
|
|
75
75
|
"@webex/plugin-people": "3.7.0-next.5",
|
|
76
76
|
"@webex/plugin-rooms": "3.7.0-next.7",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"//": [
|
|
92
92
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
93
93
|
],
|
|
94
|
-
"version": "3.7.0-next.
|
|
94
|
+
"version": "3.7.0-next.22"
|
|
95
95
|
}
|
package/src/meeting/index.ts
CHANGED
|
@@ -160,6 +160,7 @@ import PermissionError from '../common/errors/permission';
|
|
|
160
160
|
import {LocusMediaRequest} from './locusMediaRequest';
|
|
161
161
|
import {ConnectionStateHandler, ConnectionStateEvent} from './connectionStateHandler';
|
|
162
162
|
import JoinWebinarError from '../common/errors/join-webinar-error';
|
|
163
|
+
import Member from '../member';
|
|
163
164
|
|
|
164
165
|
// default callback so we don't call an undefined function, but in practice it should never be used
|
|
165
166
|
const DEFAULT_ICE_PHASE_CALLBACK = () => 'JOIN_MEETING_FINAL';
|
|
@@ -6472,6 +6473,14 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
6472
6473
|
this.webex.meetings.geoHintInfo?.clientAddress ||
|
|
6473
6474
|
options.data.intervalMetadata.peerReflexiveIP ||
|
|
6474
6475
|
MQA_STATS.DEFAULT_IP;
|
|
6476
|
+
|
|
6477
|
+
const {members} = this.getMembers().membersCollection;
|
|
6478
|
+
|
|
6479
|
+
// Count members that are in the meeting
|
|
6480
|
+
options.data.intervalMetadata.meetingUserCount = Object.values(members).filter(
|
|
6481
|
+
(member: Member) => member.isInMeeting
|
|
6482
|
+
).length;
|
|
6483
|
+
|
|
6475
6484
|
// @ts-ignore
|
|
6476
6485
|
this.webex.internal.newMetrics.submitMQE({
|
|
6477
6486
|
name: 'client.mediaquality.event',
|
|
@@ -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
|
|