@webex/plugin-meetings 3.8.0 → 3.8.1-next.10
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 +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +70 -6
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +12 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +28 -123
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +3 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +78 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +4 -4
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +37 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +92 -12
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +432 -418
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +17 -17
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +94 -6
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +9 -2
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +21 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +678 -344
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +21 -22
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +4 -4
- package/dist/meeting/muteState.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/meeting/util.js +13 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +373 -68
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +5 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +136 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +14 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +55 -9
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +3 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +335 -353
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +137 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +38 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +36 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +40 -8
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +63 -27
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +107 -47
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/util.js +5 -5
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +45 -27
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js +17 -0
- package/dist/roap/types.js.map +1 -0
- package/dist/types/common/errors/webex-errors.d.ts +7 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +20 -85
- package/dist/types/controls-options-manager/enums.d.ts +4 -1
- package/dist/types/controls-options-manager/types.d.ts +10 -1
- package/dist/types/locus-info/index.d.ts +3 -3
- package/dist/types/locus-info/selfUtils.d.ts +216 -1
- package/dist/types/media/properties.d.ts +15 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/muteState.d.ts +0 -1
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
- package/dist/types/meetings/index.d.ts +57 -0
- package/dist/types/member/index.d.ts +21 -6
- package/dist/types/member/types.d.ts +73 -14
- package/dist/types/member/util.d.ts +156 -1
- package/dist/types/members/collection.d.ts +6 -5
- package/dist/types/members/index.d.ts +32 -43
- package/dist/types/members/request.d.ts +26 -0
- package/dist/types/members/util.d.ts +27 -0
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
- package/dist/types/reachability/clusterReachability.d.ts +15 -7
- package/dist/types/reachability/index.d.ts +10 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/types/roap/index.d.ts +3 -2
- package/dist/types/roap/turnDiscovery.d.ts +5 -17
- package/dist/types/roap/types.d.ts +16 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/breakouts/index.ts +69 -0
- package/src/common/errors/webex-errors.ts +8 -1
- package/src/config.ts +3 -0
- package/src/constants.ts +30 -90
- package/src/controls-options-manager/enums.ts +3 -0
- package/src/controls-options-manager/types.ts +16 -1
- package/src/controls-options-manager/util.ts +93 -0
- package/src/interpretation/index.ts +3 -3
- package/src/locus-info/controlsUtils.ts +59 -14
- package/src/locus-info/index.ts +97 -13
- package/src/locus-info/selfUtils.ts +496 -442
- package/src/media/index.ts +23 -21
- package/src/media/properties.ts +96 -0
- package/src/meeting/brbState.ts +11 -2
- package/src/meeting/in-meeting-actions.ts +40 -0
- package/src/meeting/index.ts +470 -105
- package/src/meeting/locusMediaRequest.ts +27 -22
- package/src/meeting/muteState.ts +4 -4
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +11 -2
- package/src/meeting-info/meeting-info-v2.ts +254 -8
- package/src/meeting-info/utilv2.ts +5 -0
- package/src/meetings/index.ts +148 -1
- package/src/meetings/util.ts +18 -0
- package/src/member/index.ts +68 -22
- package/src/member/types.ts +82 -16
- package/src/member/util.ts +357 -350
- package/src/members/collection.ts +4 -3
- package/src/members/index.ts +137 -18
- package/src/members/request.ts +44 -0
- package/src/members/util.ts +43 -1
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/remoteMediaManager.ts +32 -10
- package/src/reachability/clusterReachability.ts +73 -26
- package/src/reachability/index.ts +62 -1
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/src/reconnection-manager/index.ts +2 -2
- package/src/recording-controller/util.ts +17 -13
- package/src/roap/index.ts +3 -7
- package/src/roap/turnDiscovery.ts +34 -39
- package/src/roap/types.ts +23 -0
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +167 -95
- package/test/unit/spec/controls-options-manager/util.js +178 -0
- package/test/unit/spec/interpretation/index.ts +39 -1
- package/test/unit/spec/locus-info/controlsUtils.js +155 -9
- package/test/unit/spec/locus-info/index.js +209 -73
- package/test/unit/spec/locus-info/selfUtils.js +98 -24
- package/test/unit/spec/media/index.ts +150 -18
- package/test/unit/spec/media/properties.ts +130 -0
- package/test/unit/spec/meeting/brbState.ts +40 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
- package/test/unit/spec/meeting/index.js +804 -139
- package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
- package/test/unit/spec/meeting/muteState.js +73 -2
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +119 -18
- package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
- package/test/unit/spec/meeting-info/utilv2.js +19 -0
- package/test/unit/spec/meetings/index.js +146 -2
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/members/index.js +304 -78
- package/test/unit/spec/members/request.js +68 -22
- package/test/unit/spec/members/utils.js +75 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
- package/test/unit/spec/reachability/clusterReachability.ts +88 -56
- package/test/unit/spec/reachability/index.ts +97 -0
- package/test/unit/spec/reachability/request.js +47 -2
- package/test/unit/spec/reconnection-manager/index.js +4 -4
- package/test/unit/spec/roap/turnDiscovery.ts +110 -28
- package/test/unit/spec/webinar/index.ts +5 -0
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -93
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -322
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
@@ -9,7 +9,9 @@ import {
|
|
9
9
|
ResultEventData,
|
10
10
|
Events,
|
11
11
|
ClientMediaIpsUpdatedEventData,
|
12
|
+
NatTypeUpdatedEventData,
|
12
13
|
} from '@webex/plugin-meetings/src/reachability/clusterReachability'; // replace with actual path
|
14
|
+
import { NatType } from 'packages/@webex/plugin-meetings/dist/reachability/reachability.types';
|
13
15
|
|
14
16
|
describe('ClusterReachability', () => {
|
15
17
|
let previousRTCPeerConnection;
|
@@ -17,15 +19,17 @@ describe('ClusterReachability', () => {
|
|
17
19
|
let fakePeerConnection;
|
18
20
|
let gatherIceCandidatesSpy;
|
19
21
|
|
20
|
-
const emittedEvents: Record<Events, (ResultEventData | ClientMediaIpsUpdatedEventData)[]> = {
|
22
|
+
const emittedEvents: Record<Events, (ResultEventData | ClientMediaIpsUpdatedEventData | NatTypeUpdatedEventData)[]> = {
|
21
23
|
[Events.resultReady]: [],
|
22
24
|
[Events.clientMediaIpsUpdated]: [],
|
25
|
+
[Events.natTypeUpdated]: [],
|
23
26
|
};
|
24
27
|
const FAKE_OFFER = {type: 'offer', sdp: 'fake sdp'};
|
25
28
|
|
26
29
|
const resetEmittedEvents = () => {
|
27
30
|
emittedEvents[Events.resultReady].length = 0;
|
28
31
|
emittedEvents[Events.clientMediaIpsUpdated].length = 0;
|
32
|
+
emittedEvents[Events.natTypeUpdated].length = 0;
|
29
33
|
};
|
30
34
|
beforeEach(() => {
|
31
35
|
fakePeerConnection = {
|
@@ -56,6 +60,10 @@ describe('ClusterReachability', () => {
|
|
56
60
|
clusterReachability.on(Events.clientMediaIpsUpdated, (data: ClientMediaIpsUpdatedEventData) => {
|
57
61
|
emittedEvents[Events.clientMediaIpsUpdated].push(data);
|
58
62
|
});
|
63
|
+
|
64
|
+
clusterReachability.on(Events.natTypeUpdated, (data: NatTypeUpdatedEventData) => {
|
65
|
+
emittedEvents[Events.natTypeUpdated].push(data);
|
66
|
+
});
|
59
67
|
});
|
60
68
|
|
61
69
|
afterEach(() => {
|
@@ -166,59 +174,6 @@ describe('ClusterReachability', () => {
|
|
166
174
|
assert.deepEqual(emittedEvents[Events.clientMediaIpsUpdated], []);
|
167
175
|
});
|
168
176
|
|
169
|
-
it('resolves and has correct result as soon as it finds that all udp, tcp and tls are reachable', async () => {
|
170
|
-
const promise = clusterReachability.start();
|
171
|
-
|
172
|
-
await clock.tickAsync(100);
|
173
|
-
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp'}});
|
174
|
-
|
175
|
-
// check the right events were emitted
|
176
|
-
assert.equal(emittedEvents[Events.resultReady].length, 1);
|
177
|
-
assert.deepEqual(emittedEvents[Events.resultReady][0], {
|
178
|
-
protocol: 'udp',
|
179
|
-
result: 'reachable',
|
180
|
-
latencyInMilliseconds: 100,
|
181
|
-
clientMediaIPs: ['somePublicIp'],
|
182
|
-
});
|
183
|
-
|
184
|
-
// clientMediaIpsUpdated shouldn't be emitted, because the IP is already passed in the resultReady event
|
185
|
-
assert.equal(emittedEvents[Events.clientMediaIpsUpdated].length, 0);
|
186
|
-
|
187
|
-
await clock.tickAsync(100);
|
188
|
-
fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
|
189
|
-
|
190
|
-
// check the right event was emitted
|
191
|
-
assert.equal(emittedEvents[Events.resultReady].length, 2);
|
192
|
-
assert.deepEqual(emittedEvents[Events.resultReady][1], {
|
193
|
-
protocol: 'tcp',
|
194
|
-
result: 'reachable',
|
195
|
-
latencyInMilliseconds: 200,
|
196
|
-
});
|
197
|
-
assert.equal(emittedEvents[Events.clientMediaIpsUpdated].length, 0);
|
198
|
-
|
199
|
-
await clock.tickAsync(100);
|
200
|
-
fakePeerConnection.onicecandidate({
|
201
|
-
candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
|
202
|
-
});
|
203
|
-
|
204
|
-
// check the right event was emitted
|
205
|
-
assert.equal(emittedEvents[Events.resultReady].length, 3);
|
206
|
-
assert.deepEqual(emittedEvents[Events.resultReady][2], {
|
207
|
-
protocol: 'xtls',
|
208
|
-
result: 'reachable',
|
209
|
-
latencyInMilliseconds: 300,
|
210
|
-
});
|
211
|
-
assert.equal(emittedEvents[Events.clientMediaIpsUpdated].length, 0);
|
212
|
-
|
213
|
-
await promise;
|
214
|
-
|
215
|
-
assert.deepEqual(clusterReachability.getResult(), {
|
216
|
-
udp: {result: 'reachable', latencyInMilliseconds: 100, clientMediaIPs: ['somePublicIp']},
|
217
|
-
tcp: {result: 'reachable', latencyInMilliseconds: 200},
|
218
|
-
xtls: {result: 'reachable', latencyInMilliseconds: 300},
|
219
|
-
});
|
220
|
-
});
|
221
|
-
|
222
177
|
it('resolves and returns correct results when aborted before it gets any candidates', async () => {
|
223
178
|
const promise = clusterReachability.start();
|
224
179
|
|
@@ -267,7 +222,7 @@ describe('ClusterReachability', () => {
|
|
267
222
|
|
268
223
|
await testUtils.flushPromises();
|
269
224
|
|
270
|
-
fakePeerConnection.
|
225
|
+
fakePeerConnection.iceGatheringState = 'complete';
|
271
226
|
fakePeerConnection.onicegatheringstatechange();
|
272
227
|
await promise;
|
273
228
|
|
@@ -285,7 +240,7 @@ describe('ClusterReachability', () => {
|
|
285
240
|
await clock.tickAsync(30);
|
286
241
|
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp1'}});
|
287
242
|
|
288
|
-
fakePeerConnection.
|
243
|
+
fakePeerConnection.iceGatheringState = 'complete';
|
289
244
|
fakePeerConnection.onicegatheringstatechange();
|
290
245
|
await promise;
|
291
246
|
|
@@ -428,6 +383,9 @@ describe('ClusterReachability', () => {
|
|
428
383
|
candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
|
429
384
|
});
|
430
385
|
|
386
|
+
fakePeerConnection.iceGatheringState = 'complete';
|
387
|
+
fakePeerConnection.onicegatheringstatechange();
|
388
|
+
|
431
389
|
await promise;
|
432
390
|
|
433
391
|
assert.deepEqual(clusterReachability.getResult(), {
|
@@ -440,5 +398,79 @@ describe('ClusterReachability', () => {
|
|
440
398
|
xtls: {result: 'reachable', latencyInMilliseconds: 40},
|
441
399
|
});
|
442
400
|
});
|
401
|
+
|
402
|
+
it('determines correctly if symmetric-nat is detected', async () => {
|
403
|
+
const promise = clusterReachability.start();
|
404
|
+
|
405
|
+
// generate candidates with duplicate addresses
|
406
|
+
await clock.tickAsync(10);
|
407
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp1', relatedPort: 3478, port: 1000}});
|
408
|
+
|
409
|
+
// check events emitted: there shouldn't be any natTypeUpdated emitted
|
410
|
+
assert.equal(emittedEvents[Events.natTypeUpdated].length, 0);
|
411
|
+
|
412
|
+
await clock.tickAsync(10);
|
413
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', address: 'somePublicIp1', relatedPort: 3478, port: 2000}});
|
414
|
+
|
415
|
+
// should emit natTypeUpdated event
|
416
|
+
assert.equal(emittedEvents[Events.natTypeUpdated].length, 1);
|
417
|
+
assert.deepEqual(emittedEvents[Events.natTypeUpdated][0], {
|
418
|
+
natType: 'symmetric-nat',
|
419
|
+
});
|
420
|
+
|
421
|
+
// send also a relay candidate so that the reachability check finishes
|
422
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
|
423
|
+
fakePeerConnection.onicecandidate({
|
424
|
+
candidate: {type: 'relay', address: 'someTurnRelayIp', port: 443},
|
425
|
+
});
|
426
|
+
|
427
|
+
fakePeerConnection.iceGatheringState = 'complete';
|
428
|
+
fakePeerConnection.onicegatheringstatechange();
|
429
|
+
await clock.tickAsync(10);
|
430
|
+
|
431
|
+
await promise;
|
432
|
+
|
433
|
+
assert.deepEqual(clusterReachability.getResult(), {
|
434
|
+
udp: {
|
435
|
+
result: 'reachable',
|
436
|
+
latencyInMilliseconds: 10,
|
437
|
+
clientMediaIPs: ['somePublicIp1'],
|
438
|
+
},
|
439
|
+
tcp: {result: 'reachable', latencyInMilliseconds: 20},
|
440
|
+
xtls: {result: 'reachable', latencyInMilliseconds: 20},
|
441
|
+
});
|
442
|
+
});
|
443
|
+
|
444
|
+
it('should gather correctly reached subnets', async () => {
|
445
|
+
const promise = clusterReachability.start();
|
446
|
+
|
447
|
+
await clock.tickAsync(10);
|
448
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', url: 'stun:1.2.3.4:5004'}});
|
449
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', url: 'stun:4.3.2.1:5004'}});
|
450
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: 'someTurnRelayIp'}});
|
451
|
+
|
452
|
+
clusterReachability.abort();
|
453
|
+
await promise;
|
454
|
+
|
455
|
+
assert.deepEqual(Array.from(clusterReachability.reachedSubnets), [
|
456
|
+
'1.2.3.4',
|
457
|
+
'4.3.2.1',
|
458
|
+
'someTurnRelayIp'
|
459
|
+
]);
|
460
|
+
});
|
461
|
+
|
462
|
+
it('should store only unique subnet address', async () => {
|
463
|
+
const promise = clusterReachability.start();
|
464
|
+
|
465
|
+
await clock.tickAsync(10);
|
466
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', url: 'stun:1.2.3.4:5004'}});
|
467
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'srflx', url: 'stun:1.2.3.4:9000'}});
|
468
|
+
fakePeerConnection.onicecandidate({candidate: {type: 'relay', address: '1.2.3.4'}});
|
469
|
+
|
470
|
+
clusterReachability.abort();
|
471
|
+
await promise;
|
472
|
+
|
473
|
+
assert.deepEqual(Array.from(clusterReachability.reachedSubnets), ['1.2.3.4']);
|
474
|
+
});
|
443
475
|
});
|
444
476
|
});
|
@@ -538,6 +538,14 @@ describe('gatherReachability', () => {
|
|
538
538
|
assert.equal(storedResultForJoinCookie, JSON.stringify(expectedJoinCookie));
|
539
539
|
};
|
540
540
|
|
541
|
+
it('rejects if reachability is disabled in config', async () => {
|
542
|
+
webex.config.meetings.enableReachabilityChecks = false;
|
543
|
+
|
544
|
+
const reachability = new Reachability(webex);
|
545
|
+
|
546
|
+
await assert.isRejected(reachability.gatherReachability('test'), 'enableReachabilityChecks is disabled in config');
|
547
|
+
});
|
548
|
+
|
541
549
|
[
|
542
550
|
// ========================================================================
|
543
551
|
{
|
@@ -1947,6 +1955,7 @@ describe('gatherReachability', () => {
|
|
1947
1955
|
receivedEvents[event] = receivedEvents[event] + 1 || 1;
|
1948
1956
|
});
|
1949
1957
|
};
|
1958
|
+
|
1950
1959
|
it('works as expected', async () => {
|
1951
1960
|
setListener('reachability:stopped');
|
1952
1961
|
setListener('reachability:done');
|
@@ -2008,6 +2017,59 @@ describe('gatherReachability', () => {
|
|
2008
2017
|
assert.equal(receivedEvents['reachability:done'], undefined);
|
2009
2018
|
assert.equal(receivedEvents['reachability:firstResultAvailable'], undefined);
|
2010
2019
|
});
|
2020
|
+
|
2021
|
+
it('does not fallback when no clusters were reached and min clusters were specified', async () => {
|
2022
|
+
setListener('reachability:stopped');
|
2023
|
+
setListener('reachability:done');
|
2024
|
+
setListener('reachability:firstResultAvailable');
|
2025
|
+
|
2026
|
+
const mockGetClustersResult = {
|
2027
|
+
discoveryOptions: {
|
2028
|
+
['early-call-min-clusters']: 1,
|
2029
|
+
},
|
2030
|
+
clusters: {
|
2031
|
+
clusterA: {
|
2032
|
+
udp: [],
|
2033
|
+
tcp: [],
|
2034
|
+
xtls: [],
|
2035
|
+
isVideoMesh: false,
|
2036
|
+
},
|
2037
|
+
clusterB: {
|
2038
|
+
udp: [],
|
2039
|
+
tcp: [],
|
2040
|
+
xtls: [],
|
2041
|
+
isVideoMesh: false,
|
2042
|
+
},
|
2043
|
+
},
|
2044
|
+
joinCookie: {id: 'id'},
|
2045
|
+
};
|
2046
|
+
|
2047
|
+
reachability.reachabilityRequest.getClusters = sinon.stub().returns(mockGetClustersResult);
|
2048
|
+
|
2049
|
+
const gatherReachabilityFallbackSpy = sinon.spy(reachability, 'gatherReachabilityFallback');
|
2050
|
+
|
2051
|
+
const resultPromise = reachability.gatherReachability('test');
|
2052
|
+
|
2053
|
+
await testUtils.flushPromises();
|
2054
|
+
|
2055
|
+
reachability.stopReachability();
|
2056
|
+
|
2057
|
+
await resultPromise;
|
2058
|
+
|
2059
|
+
// simulate a lot of time passing to check that all timers were stopped and nothing else happens
|
2060
|
+
clock.tick(99000);
|
2061
|
+
|
2062
|
+
assert.calledOnceWithExactly(mockClusterReachabilityInstances['clusterA'].abort);
|
2063
|
+
assert.calledOnceWithExactly(mockClusterReachabilityInstances['clusterB'].abort);
|
2064
|
+
|
2065
|
+
assert.calledOnceWithExactly(sendMetricSpy, true);
|
2066
|
+
|
2067
|
+
assert.equal(receivedEvents['reachability:stopped'], 1);
|
2068
|
+
assert.equal(receivedEvents['reachability:done'], undefined);
|
2069
|
+
assert.equal(receivedEvents['reachability:firstResultAvailable'], undefined);
|
2070
|
+
|
2071
|
+
assert.notCalled(gatherReachabilityFallbackSpy);
|
2072
|
+
});
|
2011
2073
|
});
|
2012
2074
|
});
|
2013
2075
|
|
@@ -2148,6 +2210,7 @@ describe('getReachabilityMetrics', () => {
|
|
2148
2210
|
reachability_vmn_tcp_failed: 0,
|
2149
2211
|
reachability_vmn_xtls_success: 0,
|
2150
2212
|
reachability_vmn_xtls_failed: 0,
|
2213
|
+
natType: 'unknown'
|
2151
2214
|
});
|
2152
2215
|
});
|
2153
2216
|
|
@@ -2215,6 +2278,7 @@ describe('getReachabilityMetrics', () => {
|
|
2215
2278
|
reachability_vmn_tcp_failed: 1,
|
2216
2279
|
reachability_vmn_xtls_success: 0,
|
2217
2280
|
reachability_vmn_xtls_failed: 0,
|
2281
|
+
natType: 'unknown'
|
2218
2282
|
}
|
2219
2283
|
);
|
2220
2284
|
});
|
@@ -2276,6 +2340,7 @@ describe('getReachabilityMetrics', () => {
|
|
2276
2340
|
reachability_vmn_tcp_failed: 0,
|
2277
2341
|
reachability_vmn_xtls_success: 0,
|
2278
2342
|
reachability_vmn_xtls_failed: 0,
|
2343
|
+
natType: 'unknown'
|
2279
2344
|
}
|
2280
2345
|
);
|
2281
2346
|
});
|
@@ -2337,6 +2402,7 @@ describe('getReachabilityMetrics', () => {
|
|
2337
2402
|
reachability_vmn_tcp_failed: 3,
|
2338
2403
|
reachability_vmn_xtls_success: 1,
|
2339
2404
|
reachability_vmn_xtls_failed: 1,
|
2405
|
+
natType: 'unknown'
|
2340
2406
|
}
|
2341
2407
|
);
|
2342
2408
|
});
|
@@ -2674,3 +2740,34 @@ describe('sendMetric', () => {
|
|
2674
2740
|
});
|
2675
2741
|
});
|
2676
2742
|
});
|
2743
|
+
|
2744
|
+
describe('isSubnetReachable', () => {
|
2745
|
+
let webex;
|
2746
|
+
let reachability;
|
2747
|
+
|
2748
|
+
beforeEach(() => {
|
2749
|
+
webex = new MockWebex();
|
2750
|
+
reachability = new TestReachability(webex);
|
2751
|
+
|
2752
|
+
reachability.setFakeClusterReachability({
|
2753
|
+
cluster1: {
|
2754
|
+
reachedSubnets: new Set(['1.2.3.4', '2.3.4.5']),
|
2755
|
+
},
|
2756
|
+
cluster2: {
|
2757
|
+
reachedSubnets: new Set(['3.4.5.6', '4.5.6.7']),
|
2758
|
+
},
|
2759
|
+
});
|
2760
|
+
});
|
2761
|
+
|
2762
|
+
afterEach(() => {
|
2763
|
+
sinon.restore();
|
2764
|
+
});
|
2765
|
+
|
2766
|
+
it('returns true if the subnet is reachable', () => {
|
2767
|
+
assert(reachability.isSubnetReachable('1'));
|
2768
|
+
});
|
2769
|
+
|
2770
|
+
it(`returns false if the subnet is unreachable`, () => {
|
2771
|
+
assert(!reachability.isSubnetReachable('11'));
|
2772
|
+
});
|
2773
|
+
});
|
@@ -12,6 +12,9 @@ describe('plugin-meetings/reachability', () => {
|
|
12
12
|
let reachabilityRequest;
|
13
13
|
let webex;
|
14
14
|
|
15
|
+
let appType;
|
16
|
+
let appVersion;
|
17
|
+
|
15
18
|
beforeEach(() => {
|
16
19
|
webex = new MockWebex({
|
17
20
|
children: {
|
@@ -20,6 +23,14 @@ describe('plugin-meetings/reachability', () => {
|
|
20
23
|
},
|
21
24
|
});
|
22
25
|
|
26
|
+
webex.config.support = {
|
27
|
+
'appType': 'NetworkChecker',
|
28
|
+
'appVersion': '43.3.0.1',
|
29
|
+
}
|
30
|
+
|
31
|
+
appType = webex?.config?.support?.appType;
|
32
|
+
appVersion = webex?.config?.support?.appVersion;
|
33
|
+
|
23
34
|
webex.meetings.clientRegion = {
|
24
35
|
countryCode: 'US',
|
25
36
|
regionCode: 'WEST-COAST',
|
@@ -56,7 +67,9 @@ describe('plugin-meetings/reachability', () => {
|
|
56
67
|
|
57
68
|
previousReport = {
|
58
69
|
id: 'fake previous report',
|
59
|
-
}
|
70
|
+
};
|
71
|
+
|
72
|
+
|
60
73
|
});
|
61
74
|
|
62
75
|
afterEach(() => {
|
@@ -79,6 +92,7 @@ describe('plugin-meetings/reachability', () => {
|
|
79
92
|
'report-version': 1,
|
80
93
|
'early-call-min-clusters': true,
|
81
94
|
},
|
95
|
+
'client-environment': { components: { [appType]: appVersion } },
|
82
96
|
'previous-report': previousReport,
|
83
97
|
trigger: 'startup',
|
84
98
|
},
|
@@ -105,6 +119,7 @@ describe('plugin-meetings/reachability', () => {
|
|
105
119
|
'report-version': 1,
|
106
120
|
'early-call-min-clusters': true,
|
107
121
|
},
|
122
|
+
'client-environment': { components: { [appType]: appVersion } },
|
108
123
|
'previous-report': previousReport,
|
109
124
|
trigger: 'early-call/no-min-reached',
|
110
125
|
},
|
@@ -114,5 +129,35 @@ describe('plugin-meetings/reachability', () => {
|
|
114
129
|
assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
|
115
130
|
assert.notCalled(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency);
|
116
131
|
});
|
132
|
+
|
133
|
+
it('sends a POST request with the correct params when appVersion is undefined', async () => {
|
134
|
+
// Setting appType & appVersion to undefined
|
135
|
+
webex.config.support.appType = undefined;
|
136
|
+
webex.config.support.appVersion = undefined;
|
137
|
+
|
138
|
+
const res = await reachabilityRequest.getClusters('startup', IP_VERSION.only_ipv4, previousReport);
|
139
|
+
const requestParams = webex.request.getCall(0).args[0];
|
140
|
+
|
141
|
+
assert.deepEqual(requestParams, {
|
142
|
+
method: 'POST',
|
143
|
+
resource: `clusters`,
|
144
|
+
api: 'calliopeDiscovery',
|
145
|
+
shouldRefreshAccessToken: false,
|
146
|
+
timeout: 3000,
|
147
|
+
body: {
|
148
|
+
ipver: IP_VERSION.only_ipv4,
|
149
|
+
'supported-options': {
|
150
|
+
'report-version': 1,
|
151
|
+
'early-call-min-clusters': true,
|
152
|
+
},
|
153
|
+
'previous-report': previousReport,
|
154
|
+
trigger: 'startup',
|
155
|
+
},
|
156
|
+
});
|
157
|
+
|
158
|
+
assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true});
|
159
|
+
assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"});
|
160
|
+
assert.calledOnceWithExactly(webex.internal.newMetrics.callDiagnosticLatencies.measureLatency, sinon.match.func, 'internal.get.cluster.time');
|
161
|
+
});
|
117
162
|
});
|
118
|
-
});
|
163
|
+
});
|
@@ -60,7 +60,7 @@ describe('plugin-meetings', () => {
|
|
60
60
|
roap: {
|
61
61
|
doTurnDiscovery: sinon.stub().resolves({
|
62
62
|
turnServerInfo: {
|
63
|
-
|
63
|
+
urls: ['fake_turn_url1', 'fake_turn_url2'],
|
64
64
|
username: 'fake_turn_username',
|
65
65
|
password: 'fake_turn_password',
|
66
66
|
},
|
@@ -137,7 +137,7 @@ describe('plugin-meetings', () => {
|
|
137
137
|
assert.calledOnce(fakeMediaConnection.reconnect);
|
138
138
|
assert.calledWith(fakeMediaConnection.reconnect, [
|
139
139
|
{
|
140
|
-
urls: '
|
140
|
+
urls: ['fake_turn_url1', 'fake_turn_url2'],
|
141
141
|
username: 'fake_turn_username',
|
142
142
|
credential: 'fake_turn_password',
|
143
143
|
},
|
@@ -152,12 +152,12 @@ describe('plugin-meetings', () => {
|
|
152
152
|
});
|
153
153
|
|
154
154
|
// this can happen when we land on a video mesh node
|
155
|
-
it('does not use TURN server if TURN
|
155
|
+
it('does not use TURN server if TURN urls is an empty array', async () => {
|
156
156
|
const rm = new ReconnectionManager(fakeMeeting);
|
157
157
|
|
158
158
|
fakeMeeting.roap.doTurnDiscovery.resolves({
|
159
159
|
turnServerInfo: {
|
160
|
-
|
160
|
+
urls: [],
|
161
161
|
username: 'whatever',
|
162
162
|
password: 'whatever',
|
163
163
|
},
|