@webex/plugin-meetings 3.12.0-next.8 → 3.12.0-task-refactor.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 +5 -14
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.js +6 -29
- package/dist/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +29 -1563
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +3 -13
- package/dist/hashTree/types.js.map +1 -1
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +0 -7
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +5 -27
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/index.js +2 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +3 -7
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +247 -642
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +0 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -57
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/properties.js +2 -4
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +1 -7
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1036 -1481
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +0 -50
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +3 -133
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +59 -142
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +7 -11
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +0 -10
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +0 -10
- package/dist/member/util.js.map +1 -1
- package/dist/metrics/constants.js +1 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +60 -9
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +0 -11
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +2 -116
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +18 -171
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +11 -21
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +1 -1
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -0
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/types/common/browser-detection.d.ts +0 -1
- package/dist/types/common/events/events-scope.d.ts +0 -1
- package/dist/types/common/events/events.d.ts +0 -1
- package/dist/types/config.d.ts +0 -5
- package/dist/types/constants.d.ts +1 -24
- package/dist/types/hashTree/hashTreeParser.d.ts +11 -260
- package/dist/types/hashTree/types.d.ts +0 -20
- package/dist/types/index.d.ts +0 -1
- package/dist/types/interceptors/index.d.ts +1 -2
- package/dist/types/interceptors/locusRouteToken.d.ts +0 -2
- package/dist/types/locus-info/index.d.ts +47 -68
- package/dist/types/locus-info/types.d.ts +12 -28
- package/dist/types/media/MediaConnectionAwaiter.d.ts +1 -10
- package/dist/types/media/properties.d.ts +1 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +0 -6
- package/dist/types/meeting/index.d.ts +7 -86
- package/dist/types/meeting/request.d.ts +1 -16
- package/dist/types/meeting/request.type.d.ts +0 -5
- package/dist/types/meeting/util.d.ts +0 -31
- package/dist/types/meeting-info/util.d.ts +0 -1
- package/dist/types/meeting-info/utilv2.d.ts +0 -1
- package/dist/types/meetings/index.d.ts +2 -4
- package/dist/types/member/index.d.ts +0 -1
- package/dist/types/member/types.d.ts +4 -4
- package/dist/types/member/util.d.ts +0 -5
- package/dist/types/metrics/constants.d.ts +0 -6
- package/dist/types/multistream/mediaRequestManager.d.ts +23 -0
- package/dist/types/multistream/sendSlotManager.d.ts +1 -23
- package/dist/types/reachability/clusterReachability.d.ts +3 -30
- package/dist/types/reactions/reactions.type.d.ts +0 -1
- package/dist/types/recording-controller/util.d.ts +5 -5
- package/dist/types/roap/index.d.ts +1 -1
- package/dist/webinar/index.js +163 -438
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -26
- package/src/annotation/index.ts +7 -27
- package/src/config.ts +0 -5
- package/src/constants.ts +1 -30
- package/src/hashTree/hashTreeParser.ts +25 -1523
- package/src/hashTree/types.ts +1 -24
- package/src/index.ts +1 -8
- package/src/interceptors/index.ts +1 -2
- package/src/interceptors/locusRouteToken.ts +5 -22
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/controlsUtils.ts +0 -17
- package/src/locus-info/index.ts +213 -707
- package/src/locus-info/selfUtils.ts +0 -1
- package/src/locus-info/types.ts +12 -27
- package/src/media/MediaConnectionAwaiter.ts +1 -41
- package/src/media/properties.ts +1 -3
- package/src/meeting/in-meeting-actions.ts +0 -12
- package/src/meeting/index.ts +84 -461
- package/src/meeting/request.ts +0 -42
- package/src/meeting/request.type.ts +0 -6
- package/src/meeting/util.ts +2 -160
- package/src/meetings/index.ts +60 -180
- package/src/meetings/util.ts +9 -10
- package/src/member/index.ts +0 -10
- package/src/member/util.ts +0 -12
- package/src/metrics/constants.ts +0 -7
- package/src/multistream/mediaRequestManager.ts +54 -4
- package/src/multistream/remoteMediaManager.ts +0 -13
- package/src/multistream/sendSlotManager.ts +3 -97
- package/src/reachability/clusterReachability.ts +27 -153
- package/src/reachability/index.ts +1 -15
- package/src/reachability/reachabilityPeerConnection.ts +1 -3
- package/src/reactions/reactions.type.ts +0 -1
- package/src/reconnection-manager/index.ts +1 -0
- package/src/webinar/index.ts +6 -265
- package/test/unit/spec/annotation/index.ts +7 -69
- package/test/unit/spec/interceptors/locusRouteToken.ts +0 -44
- package/test/unit/spec/locus-info/controlsUtils.js +1 -56
- package/test/unit/spec/locus-info/index.js +90 -1457
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -41
- package/test/unit/spec/media/properties.ts +3 -12
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -8
- package/test/unit/spec/meeting/index.js +128 -981
- package/test/unit/spec/meeting/request.js +0 -70
- package/test/unit/spec/meeting/utils.js +26 -438
- package/test/unit/spec/meetings/index.js +33 -845
- package/test/unit/spec/meetings/utils.js +1 -51
- package/test/unit/spec/member/index.js +4 -28
- package/test/unit/spec/member/util.js +27 -65
- package/test/unit/spec/multistream/mediaRequestManager.ts +85 -2
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -30
- package/test/unit/spec/multistream/sendSlotManager.ts +36 -135
- package/test/unit/spec/reachability/clusterReachability.ts +1 -125
- package/test/unit/spec/reachability/index.ts +3 -26
- package/test/unit/spec/reconnection-manager/index.js +8 -4
- package/test/unit/spec/webinar/index.ts +37 -534
- package/dist/aiEnableRequest/index.js +0 -184
- package/dist/aiEnableRequest/index.js.map +0 -1
- package/dist/aiEnableRequest/utils.js +0 -36
- package/dist/aiEnableRequest/utils.js.map +0 -1
- package/dist/hashTree/constants.js +0 -22
- package/dist/hashTree/constants.js.map +0 -1
- package/dist/hashTree/hashTree.js +0 -533
- package/dist/hashTree/hashTree.js.map +0 -1
- package/dist/hashTree/utils.js +0 -69
- package/dist/hashTree/utils.js.map +0 -1
- package/dist/interceptors/constant.js +0 -12
- package/dist/interceptors/constant.js.map +0 -1
- package/dist/interceptors/dataChannelAuthToken.js +0 -290
- package/dist/interceptors/dataChannelAuthToken.js.map +0 -1
- package/dist/interceptors/utils.js +0 -27
- package/dist/interceptors/utils.js.map +0 -1
- package/dist/types/aiEnableRequest/index.d.ts +0 -5
- package/dist/types/aiEnableRequest/utils.d.ts +0 -2
- package/dist/types/hashTree/constants.d.ts +0 -9
- package/dist/types/hashTree/hashTree.d.ts +0 -136
- package/dist/types/hashTree/utils.d.ts +0 -22
- package/dist/types/interceptors/constant.d.ts +0 -5
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +0 -43
- package/dist/types/interceptors/utils.d.ts +0 -1
- package/dist/types/webinar/utils.d.ts +0 -6
- package/dist/webinar/utils.js +0 -25
- package/dist/webinar/utils.js.map +0 -1
- package/src/aiEnableRequest/README.md +0 -84
- package/src/aiEnableRequest/index.ts +0 -170
- package/src/aiEnableRequest/utils.ts +0 -25
- package/src/hashTree/constants.ts +0 -10
- package/src/hashTree/hashTree.ts +0 -480
- package/src/hashTree/utils.ts +0 -62
- package/src/interceptors/constant.ts +0 -6
- package/src/interceptors/dataChannelAuthToken.ts +0 -170
- package/src/interceptors/utils.ts +0 -16
- package/src/webinar/utils.ts +0 -16
- package/test/unit/spec/aiEnableRequest/index.ts +0 -981
- package/test/unit/spec/aiEnableRequest/utils.ts +0 -130
- package/test/unit/spec/hashTree/hashTree.ts +0 -721
- package/test/unit/spec/hashTree/hashTreeParser.ts +0 -3670
- package/test/unit/spec/hashTree/utils.ts +0 -140
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +0 -210
- package/test/unit/spec/interceptors/utils.ts +0 -75
- package/test/unit/spec/webinar/utils.ts +0 -39
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
NatTypeUpdatedEventData,
|
|
11
11
|
} from '@webex/plugin-meetings/src/reachability/clusterReachability';
|
|
12
12
|
import {ReachabilityPeerConnection} from '@webex/plugin-meetings/src/reachability/reachabilityPeerConnection';
|
|
13
|
-
import {ReachabilityPeerConnectionEvents} from '@webex/plugin-meetings/src/reachability/reachability.types';
|
|
14
13
|
|
|
15
14
|
describe('ClusterReachability', () => {
|
|
16
15
|
let previousRTCPeerConnection;
|
|
@@ -93,22 +92,6 @@ describe('ClusterReachability', () => {
|
|
|
93
92
|
assert.deepEqual(emittedEvents[Events.clientMediaIpsUpdated], []);
|
|
94
93
|
});
|
|
95
94
|
|
|
96
|
-
it('should create separate peer connections when enablePerUdpUrlReachability is true', () => {
|
|
97
|
-
const perUdpClusterReachability = new ClusterReachability(
|
|
98
|
-
'testName',
|
|
99
|
-
{
|
|
100
|
-
isVideoMesh: false,
|
|
101
|
-
udp: ['stun:udp1', 'stun:udp2'],
|
|
102
|
-
tcp: ['stun:tcp1.webex.com'],
|
|
103
|
-
xtls: ['stun:xtls1.webex.com'],
|
|
104
|
-
},
|
|
105
|
-
true
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
assert.equal((perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp.length, 2);
|
|
109
|
-
assert.instanceOf((perUdpClusterReachability as any).reachabilityPeerConnection, ReachabilityPeerConnection);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
95
|
describe('#event relaying', () => {
|
|
113
96
|
let clock;
|
|
114
97
|
|
|
@@ -189,44 +172,6 @@ describe('ClusterReachability', () => {
|
|
|
189
172
|
clusterReachability.abort();
|
|
190
173
|
await promise;
|
|
191
174
|
});
|
|
192
|
-
|
|
193
|
-
it('emits only the first successful UDP result when enablePerUdpUrlReachability is true', async () => {
|
|
194
|
-
const perUdpClusterReachability = new ClusterReachability(
|
|
195
|
-
'testName',
|
|
196
|
-
{
|
|
197
|
-
isVideoMesh: false,
|
|
198
|
-
udp: ['stun:udp1', 'stun:udp2'],
|
|
199
|
-
tcp: [],
|
|
200
|
-
xtls: [],
|
|
201
|
-
},
|
|
202
|
-
true
|
|
203
|
-
);
|
|
204
|
-
|
|
205
|
-
const udpEvents: ResultEventData[] = [];
|
|
206
|
-
perUdpClusterReachability.on(Events.resultReady, (data: ResultEventData) => {
|
|
207
|
-
udpEvents.push(data);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
const udpRpc1 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[0];
|
|
211
|
-
const udpRpc2 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[1];
|
|
212
|
-
|
|
213
|
-
udpRpc1.emit({file: 'test', function: 'test'}, ReachabilityPeerConnectionEvents.resultReady, {
|
|
214
|
-
protocol: 'udp',
|
|
215
|
-
result: 'reachable',
|
|
216
|
-
latencyInMilliseconds: 50,
|
|
217
|
-
clientMediaIPs: ['1.1.1.1'],
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
udpRpc2.emit({file: 'test', function: 'test'}, ReachabilityPeerConnectionEvents.resultReady, {
|
|
221
|
-
protocol: 'udp',
|
|
222
|
-
result: 'reachable',
|
|
223
|
-
latencyInMilliseconds: 30,
|
|
224
|
-
clientMediaIPs: ['2.2.2.2'],
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
assert.equal(udpEvents.length, 1);
|
|
228
|
-
assert.equal(udpEvents[0].latencyInMilliseconds, 50);
|
|
229
|
-
});
|
|
230
175
|
});
|
|
231
176
|
|
|
232
177
|
describe('#subnet collection', () => {
|
|
@@ -291,38 +236,6 @@ describe('ClusterReachability', () => {
|
|
|
291
236
|
assert.equal(clusterReachability.reachedSubnets.size, 3);
|
|
292
237
|
assert.deepEqual(Array.from(clusterReachability.reachedSubnets), ['192.168.1.1', '10.0.0.1', '172.16.0.1']);
|
|
293
238
|
});
|
|
294
|
-
|
|
295
|
-
it('collects reached subnets from all peer connections when enablePerUdpUrlReachability is true', async () => {
|
|
296
|
-
const perUdpClusterReachability = new ClusterReachability(
|
|
297
|
-
'testName',
|
|
298
|
-
{
|
|
299
|
-
isVideoMesh: false,
|
|
300
|
-
udp: ['stun:udp1', 'stun:udp2'],
|
|
301
|
-
tcp: ['stun:tcp1.webex.com'],
|
|
302
|
-
xtls: [],
|
|
303
|
-
},
|
|
304
|
-
true
|
|
305
|
-
);
|
|
306
|
-
|
|
307
|
-
const udpRpc1 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[0];
|
|
308
|
-
const udpRpc2 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[1];
|
|
309
|
-
const tcpTlsRpc = (perUdpClusterReachability as any).reachabilityPeerConnection;
|
|
310
|
-
|
|
311
|
-
udpRpc1.emit({file: 'test', function: 'test'}, ReachabilityPeerConnectionEvents.reachedSubnets, {
|
|
312
|
-
subnets: ['192.168.1.1'],
|
|
313
|
-
});
|
|
314
|
-
udpRpc2.emit({file: 'test', function: 'test'}, ReachabilityPeerConnectionEvents.reachedSubnets, {
|
|
315
|
-
subnets: ['10.0.0.1'],
|
|
316
|
-
});
|
|
317
|
-
tcpTlsRpc.emit({file: 'test', function: 'test'}, ReachabilityPeerConnectionEvents.reachedSubnets, {
|
|
318
|
-
subnets: ['172.16.0.1'],
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
assert.equal(perUdpClusterReachability.reachedSubnets.size, 3);
|
|
322
|
-
assert.isTrue(perUdpClusterReachability.reachedSubnets.has('192.168.1.1'));
|
|
323
|
-
assert.isTrue(perUdpClusterReachability.reachedSubnets.has('10.0.0.1'));
|
|
324
|
-
assert.isTrue(perUdpClusterReachability.reachedSubnets.has('172.16.0.1'));
|
|
325
|
-
});
|
|
326
239
|
});
|
|
327
240
|
|
|
328
241
|
describe('#delegation', () => {
|
|
@@ -364,43 +277,6 @@ describe('ClusterReachability', () => {
|
|
|
364
277
|
assert.calledOnce(rpcGetResultStub);
|
|
365
278
|
assert.deepEqual(result, expectedResult);
|
|
366
279
|
});
|
|
367
|
-
|
|
368
|
-
it('delegates start() and abort() to all peer connections when enablePerUdpUrlReachability is true', async () => {
|
|
369
|
-
const perUdpClusterReachability = new ClusterReachability(
|
|
370
|
-
'testName',
|
|
371
|
-
{
|
|
372
|
-
isVideoMesh: false,
|
|
373
|
-
udp: ['stun:udp1', 'stun:udp2'],
|
|
374
|
-
tcp: ['stun:tcp1.webex.com'],
|
|
375
|
-
xtls: [],
|
|
376
|
-
},
|
|
377
|
-
true
|
|
378
|
-
);
|
|
379
|
-
|
|
380
|
-
const udpRpc1 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[0];
|
|
381
|
-
const udpRpc2 = (perUdpClusterReachability as any).reachabilityPeerConnectionsForUdp[1];
|
|
382
|
-
const tcpTlsRpc = (perUdpClusterReachability as any).reachabilityPeerConnection;
|
|
383
|
-
|
|
384
|
-
const startStub1 = sinon.stub(udpRpc1, 'start').resolves({udp: {result: 'reachable'}});
|
|
385
|
-
const startStub2 = sinon.stub(udpRpc2, 'start').resolves({udp: {result: 'unreachable'}});
|
|
386
|
-
const startStubTcp = sinon.stub(tcpTlsRpc, 'start').resolves({tcp: {result: 'reachable'}});
|
|
387
|
-
|
|
388
|
-
const abortStub1 = sinon.stub(udpRpc1, 'abort');
|
|
389
|
-
const abortStub2 = sinon.stub(udpRpc2, 'abort');
|
|
390
|
-
const abortStubTcp = sinon.stub(tcpTlsRpc, 'abort');
|
|
391
|
-
|
|
392
|
-
await perUdpClusterReachability.start();
|
|
393
|
-
|
|
394
|
-
assert.calledOnce(startStub1);
|
|
395
|
-
assert.calledOnce(startStub2);
|
|
396
|
-
assert.calledOnce(startStubTcp);
|
|
397
|
-
|
|
398
|
-
perUdpClusterReachability.abort();
|
|
399
|
-
|
|
400
|
-
assert.calledOnce(abortStub1);
|
|
401
|
-
assert.calledOnce(abortStub2);
|
|
402
|
-
assert.calledOnce(abortStubTcp);
|
|
403
|
-
});
|
|
404
280
|
});
|
|
405
281
|
|
|
406
282
|
describe('#WebRTC peer connection setup', () => {
|
|
@@ -740,4 +616,4 @@ describe('ClusterReachability', () => {
|
|
|
740
616
|
});
|
|
741
617
|
});
|
|
742
618
|
});
|
|
743
|
-
});
|
|
619
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {assert} from '@webex/test-helper-chai';
|
|
2
2
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
3
|
-
import { CapabilityState, WebCapabilities } from '@webex/web-capabilities';
|
|
4
3
|
import sinon from 'sinon';
|
|
5
4
|
import EventEmitter from 'events';
|
|
6
5
|
import testUtils from '../../../utils/testUtils';
|
|
@@ -9,7 +8,6 @@ import {ClusterNode} from '../../../../src/reachability/request';
|
|
|
9
8
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
|
10
9
|
import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';
|
|
11
10
|
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
12
|
-
import * as InternalMediaCore from '@webex/internal-media-core';
|
|
13
11
|
|
|
14
12
|
import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
|
|
15
13
|
import { ReachabilityResultsForBackend } from '@webex/plugin-meetings/src/reachability/reachability.types';
|
|
@@ -468,13 +466,11 @@ describe('gatherReachability', () => {
|
|
|
468
466
|
let clock;
|
|
469
467
|
let clusterReachabilityCtorStub;
|
|
470
468
|
let mockClusterReachabilityInstances: Record<string, MockClusterReachability>;
|
|
471
|
-
let supportsRTCPeerConnectionStub;
|
|
472
469
|
|
|
473
470
|
beforeEach(async () => {
|
|
474
471
|
webex = new MockWebex();
|
|
475
472
|
|
|
476
473
|
sinon.stub(Metrics, 'sendBehavioralMetric');
|
|
477
|
-
supportsRTCPeerConnectionStub = sinon.stub(WebCapabilities, 'supportsRTCPeerConnection').returns(CapabilityState.CAPABLE);
|
|
478
474
|
|
|
479
475
|
await webex.boundedStorage.put(
|
|
480
476
|
'Reachability',
|
|
@@ -549,25 +545,6 @@ describe('gatherReachability', () => {
|
|
|
549
545
|
await assert.isRejected(reachability.gatherReachability('test'), 'enableReachabilityChecks is disabled in config');
|
|
550
546
|
});
|
|
551
547
|
|
|
552
|
-
[CapabilityState.NOT_CAPABLE, CapabilityState.UNKNOWN].forEach((capabilityState) =>
|
|
553
|
-
it(`returns empty object if WebRTC API is not available (capabilityState=${capabilityState}`, async () => {
|
|
554
|
-
supportsRTCPeerConnectionStub.returns(capabilityState);
|
|
555
|
-
|
|
556
|
-
const reachability = new Reachability(webex);
|
|
557
|
-
|
|
558
|
-
const result = await reachability.gatherReachability('test');
|
|
559
|
-
|
|
560
|
-
assert.deepEqual(result, {});
|
|
561
|
-
|
|
562
|
-
// Verify that no new reachability result was stored - old results should remain unchanged
|
|
563
|
-
// This check is mainly to ensure that we don't put any "unreachable" results into storage
|
|
564
|
-
const storedResults = await webex.boundedStorage.get('Reachability', 'reachability.result');
|
|
565
|
-
assert.equal(storedResults, JSON.stringify({old: 'results'}));
|
|
566
|
-
|
|
567
|
-
assert.equal(await reachability.isWebexMediaBackendUnreachable(), false);
|
|
568
|
-
})
|
|
569
|
-
);
|
|
570
|
-
|
|
571
548
|
[
|
|
572
549
|
// ========================================================================
|
|
573
550
|
{
|
|
@@ -1716,7 +1693,7 @@ describe('gatherReachability', () => {
|
|
|
1716
1693
|
udp: ['testUDP1', 'testUDP2'],
|
|
1717
1694
|
tcp: [], // empty list because TCP is disabled in config
|
|
1718
1695
|
xtls: ['testXTLS1', 'testXTLS2'],
|
|
1719
|
-
}
|
|
1696
|
+
});
|
|
1720
1697
|
});
|
|
1721
1698
|
|
|
1722
1699
|
it('does not do TLS reachability if it is disabled in config', async () => {
|
|
@@ -1751,7 +1728,7 @@ describe('gatherReachability', () => {
|
|
|
1751
1728
|
udp: ['testUDP1', 'testUDP2'],
|
|
1752
1729
|
tcp: ['testTCP1', 'testTCP2'],
|
|
1753
1730
|
xtls: [], // empty list because TLS is disabled in config
|
|
1754
|
-
}
|
|
1731
|
+
});
|
|
1755
1732
|
});
|
|
1756
1733
|
|
|
1757
1734
|
it('does not do TCP or TLS reachability if it is disabled in config', async () => {
|
|
@@ -1786,7 +1763,7 @@ describe('gatherReachability', () => {
|
|
|
1786
1763
|
udp: ['testUDP1', 'testUDP2'],
|
|
1787
1764
|
tcp: [], // empty list because TCP is disabled in config
|
|
1788
1765
|
xtls: [], // empty list because TLS is disabled in config
|
|
1789
|
-
}
|
|
1766
|
+
});
|
|
1790
1767
|
});
|
|
1791
1768
|
|
|
1792
1769
|
it('retry of getClusters is succesfull', async () => {
|
|
@@ -54,8 +54,8 @@ describe('plugin-meetings', () => {
|
|
|
54
54
|
webrtcMediaConnection: fakeMediaConnection,
|
|
55
55
|
},
|
|
56
56
|
mediaRequestManagers: {
|
|
57
|
-
audio: {commit: sinon.stub()},
|
|
58
|
-
video: {commit: sinon.stub()},
|
|
57
|
+
audio: {commit: sinon.stub(), clearPreviousRequests: sinon.stub()},
|
|
58
|
+
video: {commit: sinon.stub(), clearPreviousRequests: sinon.stub()},
|
|
59
59
|
},
|
|
60
60
|
roap: {
|
|
61
61
|
doTurnDiscovery: sinon.stub().resolves({
|
|
@@ -179,22 +179,26 @@ describe('plugin-meetings', () => {
|
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
181
|
|
|
182
|
-
it('does not re-request media for non-multistream meetings', async () => {
|
|
182
|
+
it('does not clear previous requests and re-request media for non-multistream meetings', async () => {
|
|
183
183
|
fakeMeeting.isMultistream = false;
|
|
184
184
|
const rm = new ReconnectionManager(fakeMeeting);
|
|
185
185
|
|
|
186
186
|
await rm.reconnect();
|
|
187
187
|
|
|
188
|
+
assert.notCalled(fakeMeeting.mediaRequestManagers.audio.clearPreviousRequests);
|
|
189
|
+
assert.notCalled(fakeMeeting.mediaRequestManagers.video.clearPreviousRequests);
|
|
188
190
|
assert.notCalled(fakeMeeting.mediaRequestManagers.audio.commit);
|
|
189
191
|
assert.notCalled(fakeMeeting.mediaRequestManagers.video.commit);
|
|
190
192
|
});
|
|
191
193
|
|
|
192
|
-
it('does re-request media for multistream meetings', async () => {
|
|
194
|
+
it('does clear previous requests and re-request media for multistream meetings', async () => {
|
|
193
195
|
fakeMeeting.isMultistream = true;
|
|
194
196
|
const rm = new ReconnectionManager(fakeMeeting);
|
|
195
197
|
|
|
196
198
|
await rm.reconnect();
|
|
197
199
|
|
|
200
|
+
assert.calledOnce(fakeMeeting.mediaRequestManagers.audio.clearPreviousRequests);
|
|
201
|
+
assert.calledOnce(fakeMeeting.mediaRequestManagers.video.clearPreviousRequests);
|
|
198
202
|
assert.calledOnce(fakeMeeting.mediaRequestManagers.audio.commit);
|
|
199
203
|
assert.calledOnce(fakeMeeting.mediaRequestManagers.video.commit);
|
|
200
204
|
});
|