@webex/plugin-meetings 3.0.0-test.1 → 3.1.0-next.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/.eslintrc.js +6 -0
- package/babel.config.js +3 -0
- package/dist/annotation/constants.js +12 -20
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +25 -10
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +2 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js +1 -2
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +1 -2
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js +1 -2
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +13 -14
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +1 -2
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js +3 -6
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js +2 -3
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +3 -4
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +1 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +1 -2
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +1 -2
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +1 -2
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +1 -2
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +1 -2
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +3 -4
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +1 -2
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +1 -2
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +6 -10
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +1 -2
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +1 -2
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +1 -2
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +14 -15
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +1 -2
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +1 -2
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +1 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +1 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +1 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -2
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +3 -4
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +2 -4
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +4 -3
- package/dist/config.js.map +1 -1
- package/dist/constants.js +207 -380
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +3 -6
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +7 -10
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +27 -32
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +71 -4
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +4 -3
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/collection.js +1 -2
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +4 -5
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +2 -3
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +12 -13
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -4
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +1 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +1 -2
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +23 -27
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -4
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +16 -3
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +6 -10
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +12 -6
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +163 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -0
- package/dist/media/index.js +9 -5
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +7 -28
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -2
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +9 -18
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +14 -2
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1411 -1036
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +4 -5
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +2 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +45 -36
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +1 -2
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +13 -10
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +169 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +3 -4
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +5 -4
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +27 -29
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +306 -269
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +336 -294
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +5 -6
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +44 -17
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +2 -3
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +1 -4
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -3
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -8
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +1 -2
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +8 -7
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +2 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +3 -4
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js +3 -4
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +1 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -2
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +9 -11
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +3 -5
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +7 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +3 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +7 -6
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +32 -29
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +9 -6
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +1 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +2 -3
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -3
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +1 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +35 -20
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +41 -12
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +25 -20
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +19 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js +1 -2
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js +2 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +6 -8
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +18 -11
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +4 -5
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +43 -51
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +1 -2
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +17 -3
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +10 -10
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +316 -134
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +1 -2
- package/dist/rtcMetrics/constants.js.map +1 -1
- package/dist/rtcMetrics/index.js +4 -6
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/global.js +1 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +123 -96
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +24 -31
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +1 -2
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/common/logs/request.d.ts +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +10 -5
- package/dist/types/index.d.ts +11 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/types/meeting/index.d.ts +71 -16
- package/dist/types/meeting/request.d.ts +3 -0
- package/dist/types/meeting/util.d.ts +1 -0
- package/dist/types/meeting/voicea-meeting.d.ts +16 -0
- package/dist/types/meeting-info/index.d.ts +1 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -1
- package/dist/types/meeting-info/util.d.ts +49 -2
- package/dist/types/meeting-info/utilv2.d.ts +65 -2
- package/dist/types/meetings/index.d.ts +11 -2
- package/dist/types/members/util.d.ts +1 -1
- package/dist/types/multistream/mediaRequestManager.d.ts +1 -2
- package/dist/types/multistream/remoteMediaGroup.d.ts +1 -1
- package/dist/types/multistream/remoteMediaManager.d.ts +1 -2
- package/dist/types/multistream/sendSlotManager.d.ts +1 -2
- package/dist/types/reachability/clusterReachability.d.ts +1 -0
- package/dist/types/reachability/index.d.ts +4 -0
- package/dist/types/reachability/util.d.ts +7 -0
- package/dist/types/roap/index.d.ts +10 -2
- package/dist/types/roap/turnDiscovery.d.ts +64 -17
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +2 -3
- package/dist/webinar/index.js.map +1 -1
- package/jest.config.js +3 -0
- package/package.json +44 -25
- package/process +1 -0
- package/src/config.ts +3 -4
- package/src/constants.ts +13 -4
- package/src/index.ts +27 -0
- package/src/interpretation/index.ts +2 -2
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/media/MediaConnectionAwaiter.ts +174 -0
- package/src/media/index.ts +3 -1
- package/src/media/properties.ts +6 -31
- package/src/meeting/index.ts +526 -227
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +6 -1
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/meeting-info-v2.ts +5 -11
- package/src/meeting-info/util.ts +244 -233
- package/src/meeting-info/utilv2.ts +262 -245
- package/src/meetings/index.ts +18 -0
- package/src/member/index.ts +0 -1
- package/src/multistream/mediaRequestManager.ts +1 -1
- package/src/multistream/remoteMediaGroup.ts +1 -1
- package/src/multistream/remoteMediaManager.ts +1 -2
- package/src/multistream/sendSlotManager.ts +1 -2
- package/src/reachability/clusterReachability.ts +20 -5
- package/src/reachability/index.ts +24 -1
- package/src/reachability/request.ts +15 -11
- package/src/reachability/util.ts +21 -0
- package/src/reconnection-manager/index.ts +1 -1
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +2 -2
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +63 -27
- package/test/integration/spec/journey.js +2 -2
- package/test/unit/spec/breakouts/breakout.ts +2 -1
- package/test/unit/spec/breakouts/index.ts +7 -4
- package/test/unit/spec/interpretation/index.ts +4 -1
- package/test/unit/spec/locus-info/index.js +27 -18
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/locus-info/selfUtils.js +41 -11
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
- package/test/unit/spec/media/index.ts +94 -78
- package/test/unit/spec/media/properties.ts +16 -70
- package/test/unit/spec/meeting/index.js +757 -141
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +58 -11
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +20 -15
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +101 -13
- package/test/unit/spec/metrics/index.js +1 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1
- package/test/unit/spec/reachability/clusterReachability.ts +86 -22
- package/test/unit/spec/reachability/index.ts +197 -60
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reachability/util.ts +32 -2
- package/test/unit/spec/reconnection-manager/index.js +28 -0
- package/test/unit/spec/recording-controller/index.js +0 -1
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +299 -17
- package/test/unit/spec/stats-analyzer/index.js +179 -0
|
@@ -2,7 +2,7 @@ import {Defer} from '@webex/common';
|
|
|
2
2
|
|
|
3
3
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
4
|
import {ClusterNode} from './request';
|
|
5
|
-
import {convertStunUrlToTurn} from './util';
|
|
5
|
+
import {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';
|
|
6
6
|
|
|
7
7
|
import {ICE_GATHERING_STATE, CONNECTION_STATE} from '../constants';
|
|
8
8
|
|
|
@@ -29,6 +29,7 @@ export type ClusterReachabilityResult = {
|
|
|
29
29
|
export class ClusterReachability {
|
|
30
30
|
private numUdpUrls: number;
|
|
31
31
|
private numTcpUrls: number;
|
|
32
|
+
private numXTlsUrls: number;
|
|
32
33
|
private result: ClusterReachabilityResult;
|
|
33
34
|
private pc?: RTCPeerConnection;
|
|
34
35
|
private defer: Defer; // this defer is resolved once reachability checks for this cluster are completed
|
|
@@ -46,6 +47,7 @@ export class ClusterReachability {
|
|
|
46
47
|
this.isVideoMesh = clusterInfo.isVideoMesh;
|
|
47
48
|
this.numUdpUrls = clusterInfo.udp.length;
|
|
48
49
|
this.numTcpUrls = clusterInfo.tcp.length;
|
|
50
|
+
this.numXTlsUrls = clusterInfo.xtls.length;
|
|
49
51
|
|
|
50
52
|
this.pc = this.createPeerConnection(clusterInfo);
|
|
51
53
|
|
|
@@ -94,8 +96,16 @@ export class ClusterReachability {
|
|
|
94
96
|
};
|
|
95
97
|
});
|
|
96
98
|
|
|
99
|
+
const turnTlsIceServers = cluster.xtls.map((urlString: string) => {
|
|
100
|
+
return {
|
|
101
|
+
username: 'webexturnreachuser',
|
|
102
|
+
credential: 'webexturnreachpwd',
|
|
103
|
+
urls: [convertStunUrlToTurnTls(urlString)],
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
|
|
97
107
|
return {
|
|
98
|
-
iceServers: [...udpIceServers, ...tcpIceServers],
|
|
108
|
+
iceServers: [...udpIceServers, ...tcpIceServers, ...turnTlsIceServers],
|
|
99
109
|
iceCandidatePoolSize: 0,
|
|
100
110
|
iceTransportPolicy: 'all',
|
|
101
111
|
};
|
|
@@ -194,7 +204,7 @@ export class ClusterReachability {
|
|
|
194
204
|
* @returns {boolean} true if we have all results, false otherwise
|
|
195
205
|
*/
|
|
196
206
|
private haveWeGotAllResults(): boolean {
|
|
197
|
-
return ['udp', 'tcp'].every(
|
|
207
|
+
return ['udp', 'tcp', 'xtls'].every(
|
|
198
208
|
(protocol) =>
|
|
199
209
|
this.result[protocol].result === 'reachable' || this.result[protocol].result === 'untested'
|
|
200
210
|
);
|
|
@@ -207,7 +217,7 @@ export class ClusterReachability {
|
|
|
207
217
|
* @param {number} latency
|
|
208
218
|
* @returns {void}
|
|
209
219
|
*/
|
|
210
|
-
private storeLatencyResult(protocol: 'udp' | 'tcp', latency: number) {
|
|
220
|
+
private storeLatencyResult(protocol: 'udp' | 'tcp' | 'xtls', latency: number) {
|
|
211
221
|
const result = this.result[protocol];
|
|
212
222
|
|
|
213
223
|
if (result.latencyInMilliseconds === undefined) {
|
|
@@ -227,6 +237,7 @@ export class ClusterReachability {
|
|
|
227
237
|
*/
|
|
228
238
|
private registerIceCandidateListener() {
|
|
229
239
|
this.pc.onicecandidate = (e) => {
|
|
240
|
+
const TURN_TLS_PORT = 443;
|
|
230
241
|
const CANDIDATE_TYPES = {
|
|
231
242
|
SERVER_REFLEXIVE: 'srflx',
|
|
232
243
|
RELAY: 'relay',
|
|
@@ -239,7 +250,8 @@ export class ClusterReachability {
|
|
|
239
250
|
}
|
|
240
251
|
|
|
241
252
|
if (e.candidate.type === CANDIDATE_TYPES.RELAY) {
|
|
242
|
-
|
|
253
|
+
const protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';
|
|
254
|
+
this.storeLatencyResult(protocol, this.getElapsedTime());
|
|
243
255
|
// we don't add public IP for TCP, because in the case of relay candidates
|
|
244
256
|
// e.candidate.address is the TURN server address, not the client's public IP
|
|
245
257
|
}
|
|
@@ -275,6 +287,9 @@ export class ClusterReachability {
|
|
|
275
287
|
this.result.tcp = {
|
|
276
288
|
result: this.numTcpUrls > 0 ? 'unreachable' : 'untested',
|
|
277
289
|
};
|
|
290
|
+
this.result.xtls = {
|
|
291
|
+
result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested',
|
|
292
|
+
};
|
|
278
293
|
|
|
279
294
|
try {
|
|
280
295
|
const offer = await this.pc.createOffer({offerToReceiveAudio: true});
|
|
@@ -22,10 +22,14 @@ export type ReachabilityMetrics = {
|
|
|
22
22
|
reachability_public_udp_failed: number;
|
|
23
23
|
reachability_public_tcp_success: number;
|
|
24
24
|
reachability_public_tcp_failed: number;
|
|
25
|
+
reachability_public_xtls_success: number;
|
|
26
|
+
reachability_public_xtls_failed: number;
|
|
25
27
|
reachability_vmn_udp_success: number;
|
|
26
28
|
reachability_vmn_udp_failed: number;
|
|
27
29
|
reachability_vmn_tcp_success: number;
|
|
28
30
|
reachability_vmn_tcp_failed: number;
|
|
31
|
+
reachability_vmn_xtls_success: number;
|
|
32
|
+
reachability_vmn_xtls_failed: number;
|
|
29
33
|
};
|
|
30
34
|
|
|
31
35
|
/**
|
|
@@ -141,10 +145,14 @@ export default class Reachability {
|
|
|
141
145
|
reachability_public_udp_failed: 0,
|
|
142
146
|
reachability_public_tcp_success: 0,
|
|
143
147
|
reachability_public_tcp_failed: 0,
|
|
148
|
+
reachability_public_xtls_success: 0,
|
|
149
|
+
reachability_public_xtls_failed: 0,
|
|
144
150
|
reachability_vmn_udp_success: 0,
|
|
145
151
|
reachability_vmn_udp_failed: 0,
|
|
146
152
|
reachability_vmn_tcp_success: 0,
|
|
147
153
|
reachability_vmn_tcp_failed: 0,
|
|
154
|
+
reachability_vmn_xtls_success: 0,
|
|
155
|
+
reachability_vmn_xtls_failed: 0,
|
|
148
156
|
};
|
|
149
157
|
|
|
150
158
|
const updateStats = (clusterType: 'public' | 'vmn', result: ClusterReachabilityResult) => {
|
|
@@ -156,6 +164,10 @@ export default class Reachability {
|
|
|
156
164
|
const outcome = result.tcp.result === 'reachable' ? 'success' : 'failed';
|
|
157
165
|
stats[`reachability_${clusterType}_tcp_${outcome}`] += 1;
|
|
158
166
|
}
|
|
167
|
+
if (result.xtls && result.xtls.result !== 'untested') {
|
|
168
|
+
const outcome = result.xtls.result === 'reachable' ? 'success' : 'failed';
|
|
169
|
+
stats[`reachability_${clusterType}_xtls_${outcome}`] += 1;
|
|
170
|
+
}
|
|
159
171
|
};
|
|
160
172
|
|
|
161
173
|
try {
|
|
@@ -338,7 +350,10 @@ export default class Reachability {
|
|
|
338
350
|
LoggerProxy.logger.log(
|
|
339
351
|
`Reachability:index#performReachabilityChecks --> doing UDP${
|
|
340
352
|
// @ts-ignore
|
|
341
|
-
this.webex.config.meetings.experimental.enableTcpReachability ? '
|
|
353
|
+
this.webex.config.meetings.experimental.enableTcpReachability ? ',TCP' : ''
|
|
354
|
+
}${
|
|
355
|
+
// @ts-ignore
|
|
356
|
+
this.webex.config.meetings.experimental.enableTlsReachability ? ',TLS' : ''
|
|
342
357
|
} reachability checks`
|
|
343
358
|
);
|
|
344
359
|
|
|
@@ -354,6 +369,14 @@ export default class Reachability {
|
|
|
354
369
|
cluster.tcp = [];
|
|
355
370
|
}
|
|
356
371
|
|
|
372
|
+
const includeTlsReachability =
|
|
373
|
+
// @ts-ignore
|
|
374
|
+
this.webex.config.meetings.experimental.enableTlsReachability && !cluster.isVideoMesh;
|
|
375
|
+
|
|
376
|
+
if (!includeTlsReachability) {
|
|
377
|
+
cluster.xtls = [];
|
|
378
|
+
}
|
|
379
|
+
|
|
357
380
|
this.clusterReachability[key] = new ClusterReachability(key, cluster);
|
|
358
381
|
|
|
359
382
|
return this.clusterReachability[key].start().then((result) => {
|
|
@@ -34,17 +34,21 @@ class ReachabilityRequest {
|
|
|
34
34
|
* @returns {Promise}
|
|
35
35
|
*/
|
|
36
36
|
getClusters = (ipVersion?: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>
|
|
37
|
-
this.webex
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
this.webex.internal.newMetrics.callDiagnosticLatencies
|
|
38
|
+
.measureLatency(
|
|
39
|
+
() =>
|
|
40
|
+
this.webex.request({
|
|
41
|
+
method: HTTP_VERBS.GET,
|
|
42
|
+
shouldRefreshAccessToken: false,
|
|
43
|
+
api: API.CALLIOPEDISCOVERY,
|
|
44
|
+
resource: RESOURCE.CLUSTERS,
|
|
45
|
+
qs: {
|
|
46
|
+
JCSupport: 1,
|
|
47
|
+
ipver: ipVersion,
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
'internal.get.cluster.time'
|
|
51
|
+
)
|
|
48
52
|
.then((res) => {
|
|
49
53
|
const {clusters, joinCookie} = res.body;
|
|
50
54
|
|
package/src/reachability/util.ts
CHANGED
|
@@ -22,3 +22,24 @@ export function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp') {
|
|
|
22
22
|
|
|
23
23
|
return url.toString();
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Converts a stun url to a turns url
|
|
28
|
+
*
|
|
29
|
+
* @param {string} stunUrl url of a stun server
|
|
30
|
+
* @returns {string} url of a turns server
|
|
31
|
+
*/
|
|
32
|
+
export function convertStunUrlToTurnTls(stunUrl: string) {
|
|
33
|
+
// stunUrl looks like this: "stun:external-media1.public.wjfkm-a-15.prod.infra.webex.com:443"
|
|
34
|
+
// and we need it to be like this: "turns:external-media1.public.wjfkm-a-15.prod.infra.webex.com:443?transport=tcp"
|
|
35
|
+
const url = new URL(stunUrl);
|
|
36
|
+
|
|
37
|
+
if (url.protocol !== 'stun:') {
|
|
38
|
+
throw new Error(`Not a STUN URL: ${stunUrl}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
url.protocol = 'turns:';
|
|
42
|
+
url.searchParams.append('transport', 'tcp');
|
|
43
|
+
|
|
44
|
+
return url.toString();
|
|
45
|
+
}
|
|
@@ -568,7 +568,7 @@ export default class ReconnectionManager {
|
|
|
568
568
|
|
|
569
569
|
const iceServers = [];
|
|
570
570
|
|
|
571
|
-
if (turnServerResult.turnServerInfo) {
|
|
571
|
+
if (turnServerResult.turnServerInfo?.url) {
|
|
572
572
|
iceServers.push({
|
|
573
573
|
urls: turnServerResult.turnServerInfo.url,
|
|
574
574
|
username: turnServerResult.turnServerInfo.username || '',
|
package/src/roap/index.ts
CHANGED
|
@@ -5,12 +5,18 @@ import {ROAP} from '../constants';
|
|
|
5
5
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
6
6
|
|
|
7
7
|
import RoapRequest from './request';
|
|
8
|
-
import TurnDiscovery from './turnDiscovery';
|
|
8
|
+
import TurnDiscovery, {TurnDiscoveryResult} from './turnDiscovery';
|
|
9
9
|
import Meeting from '../meeting';
|
|
10
10
|
import MeetingUtil from '../meeting/util';
|
|
11
11
|
import Metrics from '../metrics';
|
|
12
12
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
13
13
|
|
|
14
|
+
export {
|
|
15
|
+
type TurnDiscoveryResult,
|
|
16
|
+
type TurnServerInfo,
|
|
17
|
+
type TurnDiscoverySkipReason,
|
|
18
|
+
} from './turnDiscovery';
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* Roap options
|
|
16
22
|
* @typedef {Object} RoapOptions
|
|
@@ -39,7 +45,7 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
39
45
|
options: any;
|
|
40
46
|
roapHandler: any;
|
|
41
47
|
roapRequest: any;
|
|
42
|
-
turnDiscovery:
|
|
48
|
+
turnDiscovery: TurnDiscovery;
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
51
|
*
|
|
@@ -260,7 +266,23 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
260
266
|
* @param {Boolean} [isForced]
|
|
261
267
|
* @returns {Promise}
|
|
262
268
|
*/
|
|
263
|
-
doTurnDiscovery(
|
|
269
|
+
doTurnDiscovery(
|
|
270
|
+
meeting: Meeting,
|
|
271
|
+
isReconnecting: boolean,
|
|
272
|
+
isForced?: boolean
|
|
273
|
+
): Promise<TurnDiscoveryResult> {
|
|
264
274
|
return this.turnDiscovery.doTurnDiscovery(meeting, isReconnecting, isForced);
|
|
265
275
|
}
|
|
276
|
+
|
|
277
|
+
generateTurnDiscoveryRequestMessage(meeting: Meeting, isForced: boolean) {
|
|
278
|
+
return this.turnDiscovery.generateTurnDiscoveryRequestMessage(meeting, isForced);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
handleTurnDiscoveryHttpResponse(meeting: Meeting, httpResponse: object) {
|
|
282
|
+
return this.turnDiscovery.handleTurnDiscoveryHttpResponse(meeting, httpResponse);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
abortTurnDiscovery() {
|
|
286
|
+
return this.turnDiscovery.abort();
|
|
287
|
+
}
|
|
266
288
|
}
|
package/src/roap/request.ts
CHANGED
|
@@ -139,9 +139,9 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
139
139
|
rawError: err,
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
|
-
LoggerProxy.logger.error(`Roap:request#sendRoap --> Error
|
|
142
|
+
LoggerProxy.logger.error(`Roap:request#sendRoap --> Error:`, err);
|
|
143
143
|
LoggerProxy.logger.error(
|
|
144
|
-
`Roap:request#sendRoapRequest -->
|
|
144
|
+
`Roap:request#sendRoapRequest --> roapMessage that caused error:${JSON.stringify(
|
|
145
145
|
roapMessage,
|
|
146
146
|
null,
|
|
147
147
|
2
|