@webex/plugin-meetings 3.8.1-next.11 → 3.8.1-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/README.md +13 -26
- 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 +24 -14
- package/dist/meeting/index.js.map +1 -1
- package/dist/reachability/index.js +10 -5
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/reachability/index.d.ts +2 -2
- package/dist/webinar/index.js +1 -1
- package/package.json +24 -24
- package/src/meeting/index.ts +22 -16
- package/src/reachability/index.ts +13 -5
- package/test/unit/spec/meeting/index.js +26 -50
- package/test/unit/spec/reachability/index.ts +6 -2
@@ -140,14 +140,22 @@ export default class Reachability extends EventsScope {
|
|
140
140
|
|
141
141
|
/**
|
142
142
|
* Checks if the given subnet is reachable
|
143
|
-
* @param {string}
|
143
|
+
* @param {string} mediaServerIp - media server ip
|
144
144
|
* @returns {boolean | null} true if reachable, false if not reachable, null if mediaServerIp is not provided
|
145
145
|
* @public
|
146
146
|
* @memberof Reachability
|
147
147
|
*/
|
148
|
-
public isSubnetReachable(
|
148
|
+
public isSubnetReachable(mediaServerIp?: string): boolean | null {
|
149
|
+
if (!mediaServerIp) {
|
150
|
+
LoggerProxy.logger.error(`Reachability:index#isSubnetReachable --> mediaServerIp is null`);
|
151
|
+
|
152
|
+
return null;
|
153
|
+
}
|
154
|
+
|
155
|
+
const subnetFirstOctet = mediaServerIp.split('.')[0];
|
156
|
+
|
149
157
|
LoggerProxy.logger.info(
|
150
|
-
`Reachability:index#isSubnetReachable --> Looking for subnet: ${
|
158
|
+
`Reachability:index#isSubnetReachable --> Looking for subnet: ${subnetFirstOctet}.X.X.X`
|
151
159
|
);
|
152
160
|
|
153
161
|
const matchingReachedClusters = Object.values(this.clusterReachability).reduce(
|
@@ -159,7 +167,7 @@ export default class Reachability extends EventsScope {
|
|
159
167
|
const subnet = reachedSubnetsArray[i];
|
160
168
|
const reachedSubnetFirstOctet = subnet.split('.')[0];
|
161
169
|
|
162
|
-
if (
|
170
|
+
if (subnetFirstOctet === reachedSubnetFirstOctet) {
|
163
171
|
acc.add(cluster.name);
|
164
172
|
}
|
165
173
|
|
@@ -178,7 +186,7 @@ export default class Reachability extends EventsScope {
|
|
178
186
|
);
|
179
187
|
|
180
188
|
LoggerProxy.logger.info(
|
181
|
-
`Reachability:index#isSubnetReachable --> Found ${matchingReachedClusters.size} clusters that use the subnet ${
|
189
|
+
`Reachability:index#isSubnetReachable --> Found ${matchingReachedClusters.size} clusters that use the subnet ${subnetFirstOctet}.X.X.X`
|
182
190
|
);
|
183
191
|
|
184
192
|
return matchingReachedClusters.size > 0;
|
@@ -2227,9 +2227,8 @@ describe('plugin-meetings', () => {
|
|
2227
2227
|
someReachabilityMetric1: 'some value1',
|
2228
2228
|
someReachabilityMetric2: 'some value2',
|
2229
2229
|
selectedCandidatePairChanges: 2,
|
2230
|
-
|
2231
|
-
|
2232
|
-
selected_subnet: null,
|
2230
|
+
isSubnetReachable: null,
|
2231
|
+
selectedCluster: null,
|
2233
2232
|
numTransports: 1,
|
2234
2233
|
iceCandidatesCount: 0,
|
2235
2234
|
}
|
@@ -2276,9 +2275,8 @@ describe('plugin-meetings', () => {
|
|
2276
2275
|
signalingState: 'unknown',
|
2277
2276
|
connectionState: 'unknown',
|
2278
2277
|
iceConnectionState: 'unknown',
|
2279
|
-
|
2280
|
-
|
2281
|
-
selected_subnet: null,
|
2278
|
+
isSubnetReachable: null,
|
2279
|
+
selectedCluster: null,
|
2282
2280
|
})
|
2283
2281
|
);
|
2284
2282
|
|
@@ -2344,9 +2342,8 @@ describe('plugin-meetings', () => {
|
|
2344
2342
|
selectedCandidatePairChanges: 2,
|
2345
2343
|
numTransports: 1,
|
2346
2344
|
iceCandidatesCount: 0,
|
2347
|
-
|
2348
|
-
|
2349
|
-
selected_subnet: null,
|
2345
|
+
isSubnetReachable: null,
|
2346
|
+
selectedCluster: null,
|
2350
2347
|
}
|
2351
2348
|
);
|
2352
2349
|
});
|
@@ -2404,9 +2401,8 @@ describe('plugin-meetings', () => {
|
|
2404
2401
|
signalingState: 'have-local-offer',
|
2405
2402
|
connectionState: 'connecting',
|
2406
2403
|
iceConnectionState: 'checking',
|
2407
|
-
|
2408
|
-
|
2409
|
-
selected_subnet: null,
|
2404
|
+
isSubnetReachable: null,
|
2405
|
+
selectedCluster: null,
|
2410
2406
|
})
|
2411
2407
|
);
|
2412
2408
|
|
@@ -2464,9 +2460,8 @@ describe('plugin-meetings', () => {
|
|
2464
2460
|
signalingState: 'have-local-offer',
|
2465
2461
|
connectionState: 'connecting',
|
2466
2462
|
iceConnectionState: 'checking',
|
2467
|
-
|
2468
|
-
|
2469
|
-
selected_subnet: null,
|
2463
|
+
isSubnetReachable: null,
|
2464
|
+
selectedCluster: null,
|
2470
2465
|
})
|
2471
2466
|
);
|
2472
2467
|
|
@@ -2988,9 +2983,8 @@ describe('plugin-meetings', () => {
|
|
2988
2983
|
selectedCandidatePairChanges: 2,
|
2989
2984
|
numTransports: 1,
|
2990
2985
|
iceCandidatesCount: 0,
|
2991
|
-
|
2992
|
-
|
2993
|
-
selected_subnet: null,
|
2986
|
+
isSubnetReachable: null,
|
2987
|
+
selectedCluster: null,
|
2994
2988
|
},
|
2995
2989
|
]);
|
2996
2990
|
|
@@ -3197,9 +3191,8 @@ describe('plugin-meetings', () => {
|
|
3197
3191
|
retriedWithTurnServer: true,
|
3198
3192
|
isJoinWithMediaRetry: false,
|
3199
3193
|
iceCandidatesCount: 0,
|
3200
|
-
|
3201
|
-
|
3202
|
-
selected_subnet: null,
|
3194
|
+
isSubnetReachable: null,
|
3195
|
+
selectedCluster: null,
|
3203
3196
|
},
|
3204
3197
|
]);
|
3205
3198
|
meeting.roap.doTurnDiscovery;
|
@@ -3362,9 +3355,8 @@ describe('plugin-meetings', () => {
|
|
3362
3355
|
iceCandidatesCount: 3,
|
3363
3356
|
'701_error': 3,
|
3364
3357
|
'701_turn_host_lookup_received_error': 1,
|
3365
|
-
|
3366
|
-
|
3367
|
-
selected_subnet: null,
|
3358
|
+
isSubnetReachable: null,
|
3359
|
+
selectedCluster: 'some.cluster',
|
3368
3360
|
}
|
3369
3361
|
);
|
3370
3362
|
|
@@ -3427,9 +3419,8 @@ describe('plugin-meetings', () => {
|
|
3427
3419
|
iceConnectionState: 'unknown',
|
3428
3420
|
selectedCandidatePairChanges: 2,
|
3429
3421
|
numTransports: 1,
|
3430
|
-
|
3431
|
-
|
3432
|
-
selected_subnet: null,
|
3422
|
+
isSubnetReachable: null,
|
3423
|
+
selectedCluster: null,
|
3433
3424
|
iceCandidatesCount: 0,
|
3434
3425
|
}
|
3435
3426
|
);
|
@@ -3491,9 +3482,8 @@ describe('plugin-meetings', () => {
|
|
3491
3482
|
numTransports: 1,
|
3492
3483
|
'701_error': 2,
|
3493
3484
|
'701_turn_host_lookup_received_error': 1,
|
3494
|
-
|
3495
|
-
|
3496
|
-
selected_subnet: null,
|
3485
|
+
isSubnetReachable: null,
|
3486
|
+
selectedCluster: null,
|
3497
3487
|
iceCandidatesCount: 0,
|
3498
3488
|
}
|
3499
3489
|
);
|
@@ -3501,7 +3491,7 @@ describe('plugin-meetings', () => {
|
|
3501
3491
|
assert.isOk(errorThrown);
|
3502
3492
|
});
|
3503
3493
|
|
3504
|
-
it('should send
|
3494
|
+
it('should send valid isSubnetReachability if media connection success', async () => {
|
3505
3495
|
meeting.roap.doTurnDiscovery = sinon.stub().returns({
|
3506
3496
|
turnServerInfo: undefined,
|
3507
3497
|
turnDiscoverySkippedReason: undefined,
|
@@ -3515,12 +3505,6 @@ describe('plugin-meetings', () => {
|
|
3515
3505
|
stopReachability: sinon.stub(),
|
3516
3506
|
isSubnetReachable: sinon.stub().returns(false),
|
3517
3507
|
};
|
3518
|
-
meeting.mediaServerIp = '1.2.3.4';
|
3519
|
-
meeting.mediaConnections = [
|
3520
|
-
{
|
3521
|
-
mediaAgentCluster: 'some.cluster',
|
3522
|
-
}
|
3523
|
-
]
|
3524
3508
|
|
3525
3509
|
const forceRtcMetricsSend = sinon.stub().resolves();
|
3526
3510
|
const closeMediaConnectionStub = sinon.stub();
|
@@ -3548,13 +3532,12 @@ describe('plugin-meetings', () => {
|
|
3548
3532
|
isJoinWithMediaRetry: false,
|
3549
3533
|
iceCandidatesCount: 0,
|
3550
3534
|
reachability_public_udp_success: 5,
|
3551
|
-
|
3552
|
-
|
3553
|
-
selected_subnet: '1.X.X.X',
|
3535
|
+
isSubnetReachable: false,
|
3536
|
+
selectedCluster: null,
|
3554
3537
|
});
|
3555
3538
|
});
|
3556
3539
|
|
3557
|
-
it('should send
|
3540
|
+
it('should send valid isSubnetReachability if media connection fails', async () => {
|
3558
3541
|
let errorThrown = undefined;
|
3559
3542
|
|
3560
3543
|
meeting.roap.doTurnDiscovery = sinon.stub().returns({
|
@@ -3570,12 +3553,6 @@ describe('plugin-meetings', () => {
|
|
3570
3553
|
stopReachability: sinon.stub(),
|
3571
3554
|
isSubnetReachable: sinon.stub().returns(true),
|
3572
3555
|
};
|
3573
|
-
meeting.mediaServerIp = '1.2.3.4';
|
3574
|
-
meeting.mediaConnections = [
|
3575
|
-
{
|
3576
|
-
mediaAgentCluster: 'some.cluster',
|
3577
|
-
}
|
3578
|
-
]
|
3579
3556
|
|
3580
3557
|
const forceRtcMetricsSend = sinon.stub().resolves();
|
3581
3558
|
const closeMediaConnectionStub = sinon.stub();
|
@@ -3617,9 +3594,8 @@ describe('plugin-meetings', () => {
|
|
3617
3594
|
selectedCandidatePairChanges: 2,
|
3618
3595
|
numTransports: 1,
|
3619
3596
|
reachability_public_udp_success: 5,
|
3620
|
-
|
3621
|
-
|
3622
|
-
selected_subnet: '1.X.X.X',
|
3597
|
+
isSubnetReachable: true,
|
3598
|
+
selectedCluster: null,
|
3623
3599
|
iceCandidatesCount: 0,
|
3624
3600
|
}
|
3625
3601
|
);
|
@@ -2764,10 +2764,14 @@ describe('isSubnetReachable', () => {
|
|
2764
2764
|
});
|
2765
2765
|
|
2766
2766
|
it('returns true if the subnet is reachable', () => {
|
2767
|
-
assert(reachability.isSubnetReachable('1'));
|
2767
|
+
assert(reachability.isSubnetReachable('1.2.3.4'));
|
2768
2768
|
});
|
2769
2769
|
|
2770
2770
|
it(`returns false if the subnet is unreachable`, () => {
|
2771
|
-
assert(!reachability.isSubnetReachable('11'));
|
2771
|
+
assert(!reachability.isSubnetReachable('11.2.3.4'));
|
2772
|
+
});
|
2773
|
+
|
2774
|
+
it('returns null if the subnet is not provided', () => {
|
2775
|
+
assert.isNull(reachability.isSubnetReachable(undefined));
|
2772
2776
|
});
|
2773
2777
|
});
|