@webex/plugin-meetings 3.10.0-next.26 → 3.10.0-next.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +2 -7
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +10 -7
- package/dist/locus-info/index.js.map +1 -1
- package/dist/reachability/clusterReachability.js +171 -18
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +3 -1
- 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/types/config.d.ts +1 -0
- package/dist/types/reachability/clusterReachability.d.ts +30 -3
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/hashTree/hashTreeParser.ts +1 -5
- package/src/locus-info/index.ts +11 -10
- package/src/reachability/clusterReachability.ts +153 -27
- package/src/reachability/index.ts +6 -1
- package/src/reachability/reachabilityPeerConnection.ts +3 -1
- package/test/unit/spec/hashTree/hashTreeParser.ts +2 -10
- package/test/unit/spec/reachability/clusterReachability.ts +125 -1
- package/test/unit/spec/reachability/index.ts +3 -3
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
+
var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
|
|
5
|
+
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
|
|
6
|
+
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
|
|
7
|
+
var _Array$isArray = require("@babel/runtime-corejs2/core-js/array/is-array");
|
|
4
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
5
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
@@ -9,6 +13,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
9
13
|
exports.Events = exports.ClusterReachability = void 0;
|
|
10
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
11
15
|
var _set = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/set"));
|
|
16
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
12
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
13
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
14
19
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
@@ -17,8 +22,12 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
17
22
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
18
23
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
24
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
25
|
+
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
20
26
|
var _reachability = require("./reachability.types");
|
|
21
27
|
var _reachabilityPeerConnection = require("./reachabilityPeerConnection");
|
|
28
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && r[_Symbol$iterator] || r["@@iterator"]; if (!t) { if (_Array$isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
29
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
30
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
31
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
23
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
33
|
// data for the Events.resultReady event
|
|
@@ -34,71 +43,203 @@ var Events = exports.Events = {
|
|
|
34
43
|
};
|
|
35
44
|
/**
|
|
36
45
|
* A class that handles reachability checks for a single cluster.
|
|
37
|
-
* Creates and orchestrates
|
|
46
|
+
* Creates and orchestrates ReachabilityPeerConnection instance(s).
|
|
38
47
|
* Listens to events and emits them to consumers.
|
|
48
|
+
*
|
|
49
|
+
* When enablePerUdpUrlReachability is true:
|
|
50
|
+
* - Creates one ReachabilityPeerConnection for each UDP URL
|
|
51
|
+
* - Creates one ReachabilityPeerConnection for all TCP and TLS URLs together
|
|
52
|
+
* Otherwise:
|
|
53
|
+
* - Creates a single ReachabilityPeerConnection for all URLs
|
|
39
54
|
*/
|
|
40
55
|
var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_EventsScope) {
|
|
41
56
|
/**
|
|
42
57
|
* Constructor for ClusterReachability
|
|
43
58
|
* @param {string} name cluster name
|
|
44
59
|
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
60
|
+
* @param {boolean} enablePerUdpUrlReachability whether to create separate peer connections per UDP URL
|
|
45
61
|
*/
|
|
46
62
|
function ClusterReachability(name, clusterInfo) {
|
|
47
63
|
var _this;
|
|
64
|
+
var enablePerUdpUrlReachability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
48
65
|
(0, _classCallCheck2.default)(this, ClusterReachability);
|
|
49
66
|
_this = _callSuper(this, ClusterReachability);
|
|
50
|
-
(0, _defineProperty2.default)(_this, "reachabilityPeerConnection",
|
|
67
|
+
(0, _defineProperty2.default)(_this, "reachabilityPeerConnection", null);
|
|
68
|
+
(0, _defineProperty2.default)(_this, "reachabilityPeerConnectionsForUdp", []);
|
|
51
69
|
(0, _defineProperty2.default)(_this, "isVideoMesh", void 0);
|
|
52
70
|
(0, _defineProperty2.default)(_this, "name", void 0);
|
|
53
71
|
(0, _defineProperty2.default)(_this, "reachedSubnets", new _set.default());
|
|
72
|
+
(0, _defineProperty2.default)(_this, "enablePerUdpUrlReachability", void 0);
|
|
73
|
+
(0, _defineProperty2.default)(_this, "udpResultEmitted", false);
|
|
54
74
|
_this.name = name;
|
|
55
75
|
_this.isVideoMesh = clusterInfo.isVideoMesh;
|
|
56
|
-
_this.
|
|
57
|
-
_this.
|
|
76
|
+
_this.enablePerUdpUrlReachability = enablePerUdpUrlReachability;
|
|
77
|
+
if (_this.enablePerUdpUrlReachability) {
|
|
78
|
+
_this.initializePerUdpUrlReachabilityCheck(clusterInfo);
|
|
79
|
+
} else {
|
|
80
|
+
_this.initializeSingleReachabilityPeerConnection(clusterInfo);
|
|
81
|
+
}
|
|
58
82
|
return _this;
|
|
59
83
|
}
|
|
60
84
|
|
|
61
85
|
/**
|
|
62
|
-
*
|
|
86
|
+
* Initializes a single ReachabilityPeerConnection for all protocols
|
|
87
|
+
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
63
88
|
* @returns {void}
|
|
64
89
|
*/
|
|
65
90
|
(0, _inherits2.default)(ClusterReachability, _EventsScope);
|
|
66
91
|
return (0, _createClass2.default)(ClusterReachability, [{
|
|
67
|
-
key: "
|
|
68
|
-
value: function
|
|
92
|
+
key: "initializeSingleReachabilityPeerConnection",
|
|
93
|
+
value: function initializeSingleReachabilityPeerConnection(clusterInfo) {
|
|
94
|
+
this.reachabilityPeerConnection = new _reachabilityPeerConnection.ReachabilityPeerConnection(this.name, clusterInfo);
|
|
95
|
+
this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Initializes per-URL UDP reachability checks:
|
|
100
|
+
* - One ReachabilityPeerConnection per UDP URL
|
|
101
|
+
* - One ReachabilityPeerConnection for all TCP and TLS URLs together
|
|
102
|
+
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
103
|
+
* @returns {void}
|
|
104
|
+
*/
|
|
105
|
+
}, {
|
|
106
|
+
key: "initializePerUdpUrlReachabilityCheck",
|
|
107
|
+
value: function initializePerUdpUrlReachabilityCheck(clusterInfo) {
|
|
69
108
|
var _this2 = this;
|
|
70
|
-
this.
|
|
71
|
-
|
|
109
|
+
_loggerProxy.default.logger.log("ClusterReachability#initializePerUdpUrlReachabilityCheck --> cluster: ".concat(this.name, ", performing per-URL UDP reachability for ").concat(clusterInfo.udp.length, " URLs"));
|
|
110
|
+
|
|
111
|
+
// Create one ReachabilityPeerConnection for each UDP URL
|
|
112
|
+
clusterInfo.udp.forEach(function (udpUrl) {
|
|
113
|
+
var singleUdpClusterInfo = {
|
|
114
|
+
isVideoMesh: clusterInfo.isVideoMesh,
|
|
115
|
+
udp: [udpUrl],
|
|
116
|
+
tcp: [],
|
|
117
|
+
xtls: []
|
|
118
|
+
};
|
|
119
|
+
var rpc = new _reachabilityPeerConnection.ReachabilityPeerConnection(_this2.name, singleUdpClusterInfo);
|
|
120
|
+
_this2.setupReachabilityPeerConnectionEventListeners(rpc, true);
|
|
121
|
+
_this2.reachabilityPeerConnectionsForUdp.push(rpc);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Create one ReachabilityPeerConnection for all TCP and TLS URLs together
|
|
125
|
+
if (clusterInfo.tcp.length > 0 || clusterInfo.xtls.length > 0) {
|
|
126
|
+
var tcpTlsClusterInfo = {
|
|
127
|
+
isVideoMesh: clusterInfo.isVideoMesh,
|
|
128
|
+
udp: [],
|
|
129
|
+
tcp: clusterInfo.tcp,
|
|
130
|
+
xtls: clusterInfo.xtls
|
|
131
|
+
};
|
|
132
|
+
this.reachabilityPeerConnection = new _reachabilityPeerConnection.ReachabilityPeerConnection(this.name, tcpTlsClusterInfo);
|
|
133
|
+
this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Sets up event listeners for a ReachabilityPeerConnection instance
|
|
139
|
+
* @param {ReachabilityPeerConnection} rpc the ReachabilityPeerConnection instance
|
|
140
|
+
* @param {boolean} isUdpPerUrl whether this is a per-URL UDP instance
|
|
141
|
+
* @returns {void}
|
|
142
|
+
*/
|
|
143
|
+
}, {
|
|
144
|
+
key: "setupReachabilityPeerConnectionEventListeners",
|
|
145
|
+
value: function setupReachabilityPeerConnectionEventListeners(rpc) {
|
|
146
|
+
var _this3 = this;
|
|
147
|
+
var isUdpPerUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
148
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.resultReady, function (data) {
|
|
149
|
+
// For per-URL UDP checks, only emit the first successful UDP result
|
|
150
|
+
if (isUdpPerUrl && data.protocol === 'udp') {
|
|
151
|
+
if (_this3.udpResultEmitted) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (data.result === 'reachable') {
|
|
155
|
+
_this3.udpResultEmitted = true;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
_this3.emit({
|
|
72
159
|
file: 'clusterReachability',
|
|
73
160
|
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
74
161
|
}, Events.resultReady, data);
|
|
75
162
|
});
|
|
76
|
-
|
|
77
|
-
|
|
163
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.clientMediaIpsUpdated, function (data) {
|
|
164
|
+
_this3.emit({
|
|
78
165
|
file: 'clusterReachability',
|
|
79
166
|
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
80
167
|
}, Events.clientMediaIpsUpdated, data);
|
|
81
168
|
});
|
|
82
|
-
|
|
83
|
-
|
|
169
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.natTypeUpdated, function (data) {
|
|
170
|
+
_this3.emit({
|
|
84
171
|
file: 'clusterReachability',
|
|
85
172
|
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
86
173
|
}, Events.natTypeUpdated, data);
|
|
87
174
|
});
|
|
88
|
-
|
|
175
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.reachedSubnets, function (data) {
|
|
89
176
|
data.subnets.forEach(function (subnet) {
|
|
90
|
-
|
|
177
|
+
_this3.reachedSubnets.add(subnet);
|
|
91
178
|
});
|
|
92
179
|
});
|
|
93
180
|
}
|
|
94
181
|
|
|
95
182
|
/**
|
|
183
|
+
* Gets the aggregated reachability result for this cluster.
|
|
96
184
|
* @returns {ClusterReachabilityResult} reachability result for this cluster
|
|
97
185
|
*/
|
|
98
186
|
}, {
|
|
99
187
|
key: "getResult",
|
|
100
188
|
value: function getResult() {
|
|
101
|
-
|
|
189
|
+
if (!this.enablePerUdpUrlReachability) {
|
|
190
|
+
var _this$reachabilityPee, _this$reachabilityPee2;
|
|
191
|
+
return (_this$reachabilityPee = (_this$reachabilityPee2 = this.reachabilityPeerConnection) === null || _this$reachabilityPee2 === void 0 ? void 0 : _this$reachabilityPee2.getResult()) !== null && _this$reachabilityPee !== void 0 ? _this$reachabilityPee : {
|
|
192
|
+
udp: {
|
|
193
|
+
result: 'untested'
|
|
194
|
+
},
|
|
195
|
+
tcp: {
|
|
196
|
+
result: 'untested'
|
|
197
|
+
},
|
|
198
|
+
xtls: {
|
|
199
|
+
result: 'untested'
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
var result = {
|
|
204
|
+
udp: {
|
|
205
|
+
result: 'untested'
|
|
206
|
+
},
|
|
207
|
+
tcp: {
|
|
208
|
+
result: 'untested'
|
|
209
|
+
},
|
|
210
|
+
xtls: {
|
|
211
|
+
result: 'untested'
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Get the first reachable UDP result from per-URL instances
|
|
216
|
+
var _iterator = _createForOfIteratorHelper(this.reachabilityPeerConnectionsForUdp),
|
|
217
|
+
_step;
|
|
218
|
+
try {
|
|
219
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
220
|
+
var rpc = _step.value;
|
|
221
|
+
var rpcResult = rpc.getResult();
|
|
222
|
+
if (rpcResult.udp.result === 'reachable') {
|
|
223
|
+
result.udp = rpcResult.udp;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
if (rpcResult.udp.result === 'unreachable' && result.udp.result === 'untested') {
|
|
227
|
+
result.udp = rpcResult.udp;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Get TCP and TLS results from the main peer connection
|
|
232
|
+
} catch (err) {
|
|
233
|
+
_iterator.e(err);
|
|
234
|
+
} finally {
|
|
235
|
+
_iterator.f();
|
|
236
|
+
}
|
|
237
|
+
if (this.reachabilityPeerConnection) {
|
|
238
|
+
var mainResult = this.reachabilityPeerConnection.getResult();
|
|
239
|
+
result.tcp = mainResult.tcp;
|
|
240
|
+
result.xtls = mainResult.xtls;
|
|
241
|
+
}
|
|
242
|
+
return result;
|
|
102
243
|
}
|
|
103
244
|
|
|
104
245
|
/**
|
|
@@ -109,11 +250,19 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
109
250
|
key: "start",
|
|
110
251
|
value: (function () {
|
|
111
252
|
var _start = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
253
|
+
var startPromises;
|
|
112
254
|
return _regenerator.default.wrap(function (_context) {
|
|
113
255
|
while (1) switch (_context.prev = _context.next) {
|
|
114
256
|
case 0:
|
|
257
|
+
startPromises = [];
|
|
258
|
+
this.reachabilityPeerConnectionsForUdp.forEach(function (rpc) {
|
|
259
|
+
startPromises.push(rpc.start());
|
|
260
|
+
});
|
|
261
|
+
if (this.reachabilityPeerConnection) {
|
|
262
|
+
startPromises.push(this.reachabilityPeerConnection.start());
|
|
263
|
+
}
|
|
115
264
|
_context.next = 1;
|
|
116
|
-
return
|
|
265
|
+
return _promise.default.all(startPromises);
|
|
117
266
|
case 1:
|
|
118
267
|
return _context.abrupt("return", this.getResult());
|
|
119
268
|
case 2:
|
|
@@ -135,7 +284,11 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
135
284
|
}, {
|
|
136
285
|
key: "abort",
|
|
137
286
|
value: function abort() {
|
|
138
|
-
|
|
287
|
+
var _this$reachabilityPee3;
|
|
288
|
+
this.reachabilityPeerConnectionsForUdp.forEach(function (rpc) {
|
|
289
|
+
return rpc.abort();
|
|
290
|
+
});
|
|
291
|
+
(_this$reachabilityPee3 = this.reachabilityPeerConnection) === null || _this$reachabilityPee3 === void 0 ? void 0 : _this$reachabilityPee3.abort();
|
|
139
292
|
}
|
|
140
293
|
}]);
|
|
141
294
|
}(_eventsScope.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_eventsScope","_interopRequireDefault","require","_reachability","_reachabilityPeerConnection","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","Events","exports","resultReady","clientMediaIpsUpdated","natTypeUpdated","ClusterReachability","_EventsScope","name","clusterInfo","_this","_classCallCheck2","_defineProperty2","_set","isVideoMesh","reachabilityPeerConnection","ReachabilityPeerConnection","setupReachabilityPeerConnectionEventListeners","_inherits2","_createClass2","key","value","_this2","on","ReachabilityPeerConnectionEvents","data","emit","file","function","reachedSubnets","subnets","forEach","subnet","add","getResult","_start","_asyncToGenerator2","_regenerator","mark","_callee","wrap","_context","prev","next","start","abrupt","stop","arguments","abort","EventsScope"],"sources":["clusterReachability.ts"],"sourcesContent":["import {ClusterNode} from './request';\nimport EventsScope from '../common/events/events-scope';\n\nimport {Enum} from '../constants';\nimport {\n ClusterReachabilityResult,\n NatType,\n ReachabilityPeerConnectionEvents,\n} from './reachability.types';\nimport {ReachabilityPeerConnection} from './reachabilityPeerConnection';\n\n// data for the Events.resultReady event\nexport type ResultEventData = {\n protocol: 'udp' | 'tcp' | 'xtls';\n result: 'reachable' | 'unreachable' | 'untested';\n latencyInMilliseconds: number; // amount of time it took to get the ICE candidate\n clientMediaIPs?: string[];\n};\n\n// data for the Events.clientMediaIpsUpdated event\nexport type ClientMediaIpsUpdatedEventData = {\n protocol: 'udp' | 'tcp' | 'xtls';\n clientMediaIPs: string[];\n};\n\nexport type NatTypeUpdatedEventData = {\n natType: NatType;\n};\n\nexport const Events = {\n resultReady: 'resultReady', // emitted when a cluster is reached successfully using specific protocol\n clientMediaIpsUpdated: 'clientMediaIpsUpdated', // emitted when more public IPs are found after resultReady was already sent for a given protocol\n natTypeUpdated: 'natTypeUpdated', // emitted when NAT type is determined\n} as const;\n\nexport type Events = Enum<typeof Events>;\n\n/**\n * A class that handles reachability checks for a single cluster.\n * Creates and orchestrates a ReachabilityPeerConnection instance.\n * Listens to events and emits them to consumers.\n */\nexport class ClusterReachability extends EventsScope {\n private reachabilityPeerConnection: ReachabilityPeerConnection;\n public readonly isVideoMesh: boolean;\n public readonly name;\n public readonly reachedSubnets: Set<string> = new Set();\n\n /**\n * Constructor for ClusterReachability\n * @param {string} name cluster name\n * @param {ClusterNode} clusterInfo information about the media cluster\n */\n constructor(name: string, clusterInfo: ClusterNode) {\n super();\n this.name = name;\n this.isVideoMesh = clusterInfo.isVideoMesh;\n\n this.reachabilityPeerConnection = new ReachabilityPeerConnection(name, clusterInfo);\n\n this.setupReachabilityPeerConnectionEventListeners();\n }\n\n /**\n * Sets up event listeners for the ReachabilityPeerConnection instance\n * @returns {void}\n */\n private setupReachabilityPeerConnectionEventListeners() {\n this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.resultReady, (data) => {\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.resultReady,\n data\n );\n });\n\n this.reachabilityPeerConnection.on(\n ReachabilityPeerConnectionEvents.clientMediaIpsUpdated,\n (data) => {\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.clientMediaIpsUpdated,\n data\n );\n }\n );\n\n this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.natTypeUpdated, (data) => {\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.natTypeUpdated,\n data\n );\n });\n\n this.reachabilityPeerConnection.on(ReachabilityPeerConnectionEvents.reachedSubnets, (data) => {\n data.subnets.forEach((subnet) => {\n this.reachedSubnets.add(subnet);\n });\n });\n }\n\n /**\n * @returns {ClusterReachabilityResult} reachability result for this cluster\n */\n getResult(): ClusterReachabilityResult {\n return this.reachabilityPeerConnection.getResult();\n }\n\n /**\n * Starts the process of doing UDP, TCP, and XTLS reachability checks on the media cluster.\n * @returns {Promise<ClusterReachabilityResult>}\n */\n async start(): Promise<ClusterReachabilityResult> {\n await this.reachabilityPeerConnection.start();\n\n return this.getResult();\n }\n\n /**\n * Aborts the cluster reachability checks\n * @returns {void}\n */\n public abort() {\n this.reachabilityPeerConnection.abort();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,2BAAA,GAAAF,OAAA;AAAwE,SAAAG,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAN,kBAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAM,yBAAA,YAAAA,0BAAA,aAAAN,CAAA;AAExE;;AAQA;;AAUO,IAAMc,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACpBE,WAAW,EAAE,aAAa;EAAE;EAC5BC,qBAAqB,EAAE,uBAAuB;EAAE;EAChDC,cAAc,EAAE,gBAAgB,CAAE;AACpC,CAAU;AAIV;AACA;AACA;AACA;AACA;AAJA,IAKaC,mBAAmB,GAAAJ,OAAA,CAAAI,mBAAA,0BAAAC,YAAA;EAM9B;AACF;AACA;AACA;AACA;EACE,SAAAD,oBAAYE,IAAY,EAAEC,WAAwB,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAApB,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A;QAAA,OAAAT,MAAA,CAAAvC,KAAA,OAAAmD,SAAA;MAAA;MAAA,OAALH,KAAK;IAAA;IAMX;AACF;AACA;AACA;IAHE;EAAA;IAAAxB,GAAA;IAAAC,KAAA,EAIA,SAAO2B,KAAKA,CAAA,EAAG;MACb,IAAI,CAACjC,0BAA0B,CAACiC,KAAK,CAAC,CAAC;IACzC;EAAC;AAAA,EA5FsCC,oBAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_eventsScope","_interopRequireDefault","require","_loggerProxy","_reachability","_reachabilityPeerConnection","_createForOfIteratorHelper","r","e","t","_Symbol","_Symbol$iterator","_Array$isArray","_unsupportedIterableToArray","length","_n","F","s","n","done","value","f","TypeError","o","a","u","call","next","return","_arrayLikeToArray","toString","slice","constructor","name","_Array$from","test","Array","_callSuper","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","apply","Boolean","prototype","valueOf","Events","exports","resultReady","clientMediaIpsUpdated","natTypeUpdated","ClusterReachability","_EventsScope","clusterInfo","_this","enablePerUdpUrlReachability","arguments","undefined","_classCallCheck2","_defineProperty2","_set","isVideoMesh","initializePerUdpUrlReachabilityCheck","initializeSingleReachabilityPeerConnection","_inherits2","_createClass2","key","reachabilityPeerConnection","ReachabilityPeerConnection","setupReachabilityPeerConnectionEventListeners","_this2","LoggerProxy","logger","log","concat","udp","forEach","udpUrl","singleUdpClusterInfo","tcp","xtls","rpc","reachabilityPeerConnectionsForUdp","push","tcpTlsClusterInfo","_this3","isUdpPerUrl","on","ReachabilityPeerConnectionEvents","data","protocol","udpResultEmitted","result","emit","file","function","reachedSubnets","subnets","subnet","add","getResult","_this$reachabilityPee","_this$reachabilityPee2","_iterator","_step","rpcResult","err","mainResult","_start","_asyncToGenerator2","_regenerator","mark","_callee","startPromises","wrap","_context","prev","start","_promise","all","abrupt","stop","abort","_this$reachabilityPee3","EventsScope"],"sources":["clusterReachability.ts"],"sourcesContent":["import {ClusterNode} from './request';\nimport EventsScope from '../common/events/events-scope';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\nimport {Enum} from '../constants';\nimport {\n ClusterReachabilityResult,\n NatType,\n ReachabilityPeerConnectionEvents,\n} from './reachability.types';\nimport {ReachabilityPeerConnection} from './reachabilityPeerConnection';\n\n// data for the Events.resultReady event\nexport type ResultEventData = {\n protocol: 'udp' | 'tcp' | 'xtls';\n result: 'reachable' | 'unreachable' | 'untested';\n latencyInMilliseconds: number; // amount of time it took to get the ICE candidate\n clientMediaIPs?: string[];\n};\n\n// data for the Events.clientMediaIpsUpdated event\nexport type ClientMediaIpsUpdatedEventData = {\n protocol: 'udp' | 'tcp' | 'xtls';\n clientMediaIPs: string[];\n};\n\nexport type NatTypeUpdatedEventData = {\n natType: NatType;\n};\n\nexport const Events = {\n resultReady: 'resultReady', // emitted when a cluster is reached successfully using specific protocol\n clientMediaIpsUpdated: 'clientMediaIpsUpdated', // emitted when more public IPs are found after resultReady was already sent for a given protocol\n natTypeUpdated: 'natTypeUpdated', // emitted when NAT type is determined\n} as const;\n\nexport type Events = Enum<typeof Events>;\n\n/**\n * A class that handles reachability checks for a single cluster.\n * Creates and orchestrates ReachabilityPeerConnection instance(s).\n * Listens to events and emits them to consumers.\n *\n * When enablePerUdpUrlReachability is true:\n * - Creates one ReachabilityPeerConnection for each UDP URL\n * - Creates one ReachabilityPeerConnection for all TCP and TLS URLs together\n * Otherwise:\n * - Creates a single ReachabilityPeerConnection for all URLs\n */\nexport class ClusterReachability extends EventsScope {\n private reachabilityPeerConnection: ReachabilityPeerConnection | null = null;\n private reachabilityPeerConnectionsForUdp: ReachabilityPeerConnection[] = [];\n\n public readonly isVideoMesh: boolean;\n public readonly name;\n public readonly reachedSubnets: Set<string> = new Set();\n\n private enablePerUdpUrlReachability: boolean;\n private udpResultEmitted = false;\n\n /**\n * Constructor for ClusterReachability\n * @param {string} name cluster name\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @param {boolean} enablePerUdpUrlReachability whether to create separate peer connections per UDP URL\n */\n constructor(name: string, clusterInfo: ClusterNode, enablePerUdpUrlReachability = false) {\n super();\n this.name = name;\n this.isVideoMesh = clusterInfo.isVideoMesh;\n this.enablePerUdpUrlReachability = enablePerUdpUrlReachability;\n\n if (this.enablePerUdpUrlReachability) {\n this.initializePerUdpUrlReachabilityCheck(clusterInfo);\n } else {\n this.initializeSingleReachabilityPeerConnection(clusterInfo);\n }\n }\n\n /**\n * Initializes a single ReachabilityPeerConnection for all protocols\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @returns {void}\n */\n private initializeSingleReachabilityPeerConnection(clusterInfo: ClusterNode) {\n this.reachabilityPeerConnection = new ReachabilityPeerConnection(this.name, clusterInfo);\n this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);\n }\n\n /**\n * Initializes per-URL UDP reachability checks:\n * - One ReachabilityPeerConnection per UDP URL\n * - One ReachabilityPeerConnection for all TCP and TLS URLs together\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @returns {void}\n */\n private initializePerUdpUrlReachabilityCheck(clusterInfo: ClusterNode) {\n LoggerProxy.logger.log(\n `ClusterReachability#initializePerUdpUrlReachabilityCheck --> cluster: ${this.name}, performing per-URL UDP reachability for ${clusterInfo.udp.length} URLs`\n );\n\n // Create one ReachabilityPeerConnection for each UDP URL\n clusterInfo.udp.forEach((udpUrl) => {\n const singleUdpClusterInfo: ClusterNode = {\n isVideoMesh: clusterInfo.isVideoMesh,\n udp: [udpUrl],\n tcp: [],\n xtls: [],\n };\n const rpc = new ReachabilityPeerConnection(this.name, singleUdpClusterInfo);\n this.setupReachabilityPeerConnectionEventListeners(rpc, true);\n this.reachabilityPeerConnectionsForUdp.push(rpc);\n });\n\n // Create one ReachabilityPeerConnection for all TCP and TLS URLs together\n if (clusterInfo.tcp.length > 0 || clusterInfo.xtls.length > 0) {\n const tcpTlsClusterInfo: ClusterNode = {\n isVideoMesh: clusterInfo.isVideoMesh,\n udp: [],\n tcp: clusterInfo.tcp,\n xtls: clusterInfo.xtls,\n };\n this.reachabilityPeerConnection = new ReachabilityPeerConnection(\n this.name,\n tcpTlsClusterInfo\n );\n this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);\n }\n }\n\n /**\n * Sets up event listeners for a ReachabilityPeerConnection instance\n * @param {ReachabilityPeerConnection} rpc the ReachabilityPeerConnection instance\n * @param {boolean} isUdpPerUrl whether this is a per-URL UDP instance\n * @returns {void}\n */\n private setupReachabilityPeerConnectionEventListeners(\n rpc: ReachabilityPeerConnection,\n isUdpPerUrl = false\n ) {\n rpc.on(ReachabilityPeerConnectionEvents.resultReady, (data) => {\n // For per-URL UDP checks, only emit the first successful UDP result\n if (isUdpPerUrl && data.protocol === 'udp') {\n if (this.udpResultEmitted) {\n return;\n }\n if (data.result === 'reachable') {\n this.udpResultEmitted = true;\n }\n }\n\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.resultReady,\n data\n );\n });\n\n rpc.on(ReachabilityPeerConnectionEvents.clientMediaIpsUpdated, (data) => {\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.clientMediaIpsUpdated,\n data\n );\n });\n\n rpc.on(ReachabilityPeerConnectionEvents.natTypeUpdated, (data) => {\n this.emit(\n {\n file: 'clusterReachability',\n function: 'setupReachabilityPeerConnectionEventListeners',\n },\n Events.natTypeUpdated,\n data\n );\n });\n\n rpc.on(ReachabilityPeerConnectionEvents.reachedSubnets, (data) => {\n data.subnets.forEach((subnet: string) => {\n this.reachedSubnets.add(subnet);\n });\n });\n }\n\n /**\n * Gets the aggregated reachability result for this cluster.\n * @returns {ClusterReachabilityResult} reachability result for this cluster\n */\n getResult(): ClusterReachabilityResult {\n if (!this.enablePerUdpUrlReachability) {\n return (\n this.reachabilityPeerConnection?.getResult() ?? {\n udp: {result: 'untested'},\n tcp: {result: 'untested'},\n xtls: {result: 'untested'},\n }\n );\n }\n\n const result: ClusterReachabilityResult = {\n udp: {result: 'untested'},\n tcp: {result: 'untested'},\n xtls: {result: 'untested'},\n };\n\n // Get the first reachable UDP result from per-URL instances\n for (const rpc of this.reachabilityPeerConnectionsForUdp) {\n const rpcResult = rpc.getResult();\n if (rpcResult.udp.result === 'reachable') {\n result.udp = rpcResult.udp;\n break;\n }\n if (rpcResult.udp.result === 'unreachable' && result.udp.result === 'untested') {\n result.udp = rpcResult.udp;\n }\n }\n\n // Get TCP and TLS results from the main peer connection\n if (this.reachabilityPeerConnection) {\n const mainResult = this.reachabilityPeerConnection.getResult();\n result.tcp = mainResult.tcp;\n result.xtls = mainResult.xtls;\n }\n\n return result;\n }\n\n /**\n * Starts the process of doing UDP, TCP, and XTLS reachability checks on the media cluster.\n * @returns {Promise<ClusterReachabilityResult>}\n */\n async start(): Promise<ClusterReachabilityResult> {\n const startPromises: Promise<ClusterReachabilityResult>[] = [];\n\n this.reachabilityPeerConnectionsForUdp.forEach((rpc) => {\n startPromises.push(rpc.start());\n });\n\n if (this.reachabilityPeerConnection) {\n startPromises.push(this.reachabilityPeerConnection.start());\n }\n\n await Promise.all(startPromises);\n\n return this.getResult();\n }\n\n /**\n * Aborts the cluster reachability checks\n * @returns {void}\n */\n public abort() {\n this.reachabilityPeerConnectionsForUdp.forEach((rpc) => rpc.abort());\n this.reachabilityPeerConnection?.abort();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,2BAAA,GAAAH,OAAA;AAAwE,SAAAI,2BAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,yBAAAC,OAAA,IAAAH,CAAA,CAAAI,gBAAA,KAAAJ,CAAA,qBAAAE,CAAA,QAAAG,cAAA,CAAAL,CAAA,MAAAE,CAAA,GAAAI,2BAAA,CAAAN,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AAC,IAAI,CAAChB,0BAA0B,CAACkD,KAAK,CAAC,CAAC,CAAC;cAC7D;cAACF,QAAA,CAAAzF,IAAA;cAAA,OAEK4F,QAAA,CAAAhF,OAAA,CAAQiF,GAAG,CAACN,aAAa,CAAC;YAAA;cAAA,OAAAE,QAAA,CAAAK,MAAA,WAEzB,IAAI,CAACpB,SAAS,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAe,QAAA,CAAAM,IAAA;UAAA;QAAA,GAAAT,OAAA;MAAA,CACxB;MAAA,SAdKK,KAAKA,CAAA;QAAA,OAAAT,MAAA,CAAAlE,KAAA,OAAAc,SAAA;MAAA;MAAA,OAAL6D,KAAK;IAAA;IAgBX;AACF;AACA;AACA;IAHE;EAAA;IAAAnD,GAAA;IAAA/C,KAAA,EAIA,SAAOuG,KAAKA,CAAA,EAAG;MAAA,IAAAC,sBAAA;MACb,IAAI,CAACzC,iCAAiC,CAACN,OAAO,CAAC,UAACK,GAAG;QAAA,OAAKA,GAAG,CAACyC,KAAK,CAAC,CAAC;MAAA,EAAC;MACpE,CAAAC,sBAAA,OAAI,CAACxD,0BAA0B,cAAAwD,sBAAA,uBAA/BA,sBAAA,CAAiCD,KAAK,CAAC,CAAC;IAC1C;EAAC;AAAA,EAnNsCE,oBAAW","ignoreList":[]}
|
|
@@ -1145,7 +1145,9 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1145
1145
|
// now start the reachability on all the clusters
|
|
1146
1146
|
(0, _keys.default)(clusterList).forEach(function (key) {
|
|
1147
1147
|
var cluster = clusterList[key];
|
|
1148
|
-
_this4.clusterReachability[key] = new _clusterReachability.ClusterReachability(key, cluster
|
|
1148
|
+
_this4.clusterReachability[key] = new _clusterReachability.ClusterReachability(key, cluster,
|
|
1149
|
+
// @ts-ignore
|
|
1150
|
+
_this4.webex.config.meetings.enablePerUdpUrlReachability);
|
|
1149
1151
|
_this4.clusterReachability[key].on(_clusterReachability.Events.resultReady, /*#__PURE__*/function () {
|
|
1150
1152
|
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
|
|
1151
1153
|
var protocol, result, clientMediaIPs, latencyInMilliseconds, areAllResultsReady;
|