@webex/plugin-meetings 3.4.0-next.1 → 3.4.0-next.2
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 +2 -3
- package/dist/meeting/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +1 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +5 -5
- package/src/meeting/index.ts +4 -3
- package/dist/networkQualityMonitor/index.js +0 -227
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/src/networkQualityMonitor/index.ts +0 -211
- package/test/unit/spec/networkQualityMonitor/index.js +0 -99
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import 'jsdom-global/register';
|
|
2
|
-
import chai from 'chai';
|
|
3
|
-
import chaiAsPromised from 'chai-as-promised';
|
|
4
|
-
import sinon from 'sinon';
|
|
5
|
-
|
|
6
|
-
import NetworkQualityMonitor from '../../../../src/networkQualityMonitor';
|
|
7
|
-
import {EVENT_TRIGGERS} from '../../../../src/constants';
|
|
8
|
-
|
|
9
|
-
const {assert} = chai;
|
|
10
|
-
|
|
11
|
-
chai.use(chaiAsPromised);
|
|
12
|
-
sinon.assert.expose(chai.assert, {prefix: ''});
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line mocha/no-exclusive-tests
|
|
15
|
-
describe('plugin-meetings', () => {
|
|
16
|
-
describe('NetworkQualityMonitor', () => {
|
|
17
|
-
let networkQualityMonitor;
|
|
18
|
-
let sandBoxEmitSpy;
|
|
19
|
-
|
|
20
|
-
const initialConfig = {
|
|
21
|
-
videoPacketLossRatioThreshold: 9,
|
|
22
|
-
rttThreshold: 500,
|
|
23
|
-
jitterThreshold: 500,
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const configObject = {
|
|
27
|
-
mediaType: 'video-send',
|
|
28
|
-
remoteRtpResults: {
|
|
29
|
-
id: 'RTCRemoteInboundRtpVideoStream_2411086660',
|
|
30
|
-
timestamp: 1624472676193.79,
|
|
31
|
-
type: 'remote-inbound-rtp',
|
|
32
|
-
ssrc: 2411086660,
|
|
33
|
-
kind: 'video',
|
|
34
|
-
transportId: 'RTCTransport_1_1',
|
|
35
|
-
codecId: 'RTCCodec_1_Outbound_102',
|
|
36
|
-
jitter: 0.004,
|
|
37
|
-
packetsLost: 8,
|
|
38
|
-
localId: 'RTCOutboundRTPVideoStream_2411086660',
|
|
39
|
-
roundTripTime: 0.648,
|
|
40
|
-
fractionLost: 0,
|
|
41
|
-
totalRoundTripTime: 3.554,
|
|
42
|
-
roundTripTimeMeasurements: 14,
|
|
43
|
-
},
|
|
44
|
-
statsAnalyzerCurrentStats: {
|
|
45
|
-
'audio-send': {
|
|
46
|
-
send: {
|
|
47
|
-
currentPacketLossRatio: 8,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
'video-send': {
|
|
51
|
-
send: {
|
|
52
|
-
currentPacketLossRatio: 10,
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const sandbox = sinon.createSandbox();
|
|
59
|
-
|
|
60
|
-
beforeEach(() => {
|
|
61
|
-
networkQualityMonitor = new NetworkQualityMonitor(initialConfig);
|
|
62
|
-
sandbox.spy(networkQualityMonitor, 'updateNetworkQualityStatus');
|
|
63
|
-
sandBoxEmitSpy = sandbox.spy(networkQualityMonitor, 'emit');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
afterEach(() => {
|
|
67
|
-
sandbox.restore();
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('should trigger updateNetworkQualityStatus when determineUplinkNetworkQuality has finished', async () => {
|
|
71
|
-
await networkQualityMonitor.determineUplinkNetworkQuality(configObject);
|
|
72
|
-
|
|
73
|
-
assert.calledOnce(networkQualityMonitor.updateNetworkQualityStatus);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('should emit a network quality judgement event with the proper payload', async () => {
|
|
77
|
-
await networkQualityMonitor.determineUplinkNetworkQuality(configObject);
|
|
78
|
-
assert(
|
|
79
|
-
sandBoxEmitSpy.calledWith(
|
|
80
|
-
sinon.match({
|
|
81
|
-
file: 'networkQualityMonitor',
|
|
82
|
-
function: 'emitNetworkQuality',
|
|
83
|
-
}),
|
|
84
|
-
sinon.match(EVENT_TRIGGERS.NETWORK_QUALITY),
|
|
85
|
-
sinon.match({
|
|
86
|
-
mediaType: 'video-send',
|
|
87
|
-
networkQualityScore: 0,
|
|
88
|
-
})
|
|
89
|
-
)
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('should reset to default values after determineUplinkNetworkQuality call stack is complete', async () => {
|
|
94
|
-
await networkQualityMonitor.determineUplinkNetworkQuality(configObject);
|
|
95
|
-
assert.isNull(networkQualityMonitor.mediaType);
|
|
96
|
-
assert.deepEqual(networkQualityMonitor.networkQualityScore, 1);
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
});
|