@webex/plugin-meetings 3.4.0 → 3.5.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/index.js +6 -9
- package/dist/media/index.js.map +1 -1
- package/dist/meeting/index.js +151 -50
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +11 -2
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +175 -103
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/rtcMetrics/index.js +26 -6
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/types/meeting/index.d.ts +22 -2
- package/dist/types/meetings/index.d.ts +4 -2
- package/dist/types/reachability/index.d.ts +14 -2
- package/dist/types/rtcMetrics/index.d.ts +11 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/media/index.ts +5 -9
- package/src/meeting/index.ts +88 -10
- package/src/meeting/util.ts +2 -0
- package/src/meetings/index.ts +11 -4
- package/src/reachability/index.ts +49 -4
- package/src/reconnection-manager/index.ts +1 -1
- package/src/rtcMetrics/index.ts +25 -5
- package/test/integration/spec/converged-space-meetings.js +1 -1
- package/test/unit/spec/breakouts/index.ts +1 -0
- package/test/unit/spec/interceptors/locusRetry.ts +11 -10
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +1 -0
- package/test/unit/spec/media/index.ts +34 -7
- package/test/unit/spec/media/properties.ts +1 -1
- package/test/unit/spec/meeting/connectionStateHandler.ts +1 -0
- package/test/unit/spec/meeting/index.js +116 -12
- package/test/unit/spec/meeting/locusMediaRequest.ts +3 -2
- package/test/unit/spec/meeting/request.js +1 -0
- package/test/unit/spec/meeting/utils.js +4 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +10 -11
- package/test/unit/spec/meeting-info/request.js +1 -1
- package/test/unit/spec/meetings/index.js +40 -5
- package/test/unit/spec/members/request.js +2 -1
- package/test/unit/spec/multistream/mediaRequestManager.ts +1 -0
- package/test/unit/spec/multistream/receiveSlot.ts +1 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +1 -0
- package/test/unit/spec/multistream/remoteMedia.ts +1 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +1 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +1 -0
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +0 -1
- package/test/unit/spec/reachability/index.ts +211 -13
- package/test/unit/spec/reachability/request.js +1 -0
- package/test/unit/spec/roap/request.ts +1 -0
- package/test/unit/spec/rtcMetrics/index.ts +31 -0
- package/dist/networkQualityMonitor/index.js +0 -227
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/src/networkQualityMonitor/index.ts +0 -211
- package/test/unit/spec/networkQualityMonitor/index.js +0 -99
|
@@ -12,11 +12,11 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
12
12
|
value: true
|
|
13
13
|
});
|
|
14
14
|
exports.default = void 0;
|
|
15
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
15
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
17
16
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
18
17
|
var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
|
|
19
18
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
19
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
20
20
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
21
21
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
22
22
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
@@ -101,6 +101,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
101
101
|
xtls: 0
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastTrigger", void 0);
|
|
104
105
|
_this.webex = webex;
|
|
105
106
|
|
|
106
107
|
/**
|
|
@@ -116,48 +117,108 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
|
-
*
|
|
120
|
-
* @
|
|
121
|
-
* @
|
|
122
|
-
* @
|
|
120
|
+
* Fetches the list of media clusters from the backend
|
|
121
|
+
* @param {boolean} isRetry
|
|
122
|
+
* @private
|
|
123
|
+
* @returns {Promise<{clusters: ClusterList, joinCookie: any}>}
|
|
123
124
|
*/
|
|
124
125
|
(0, _createClass2.default)(Reachability, [{
|
|
125
|
-
key: "
|
|
126
|
+
key: "getClusters",
|
|
126
127
|
value: (function () {
|
|
127
|
-
var
|
|
128
|
-
var
|
|
128
|
+
var _getClusters = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
129
|
+
var isRetry,
|
|
130
|
+
_yield$this$reachabil,
|
|
131
|
+
clusters,
|
|
132
|
+
joinCookie,
|
|
133
|
+
_args = arguments;
|
|
129
134
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
130
135
|
while (1) switch (_context.prev = _context.next) {
|
|
131
136
|
case 0:
|
|
132
|
-
|
|
133
|
-
_context.
|
|
137
|
+
isRetry = _args.length > 0 && _args[0] !== undefined ? _args[0] : false;
|
|
138
|
+
_context.prev = 1;
|
|
139
|
+
_context.next = 4;
|
|
134
140
|
return this.reachabilityRequest.getClusters(_util.default.getIpVersion(this.webex));
|
|
135
|
-
case
|
|
141
|
+
case 4:
|
|
136
142
|
_yield$this$reachabil = _context.sent;
|
|
137
143
|
clusters = _yield$this$reachabil.clusters;
|
|
138
144
|
joinCookie = _yield$this$reachabil.joinCookie;
|
|
139
|
-
_context.
|
|
145
|
+
return _context.abrupt("return", {
|
|
146
|
+
clusters: clusters,
|
|
147
|
+
joinCookie: joinCookie
|
|
148
|
+
});
|
|
149
|
+
case 10:
|
|
150
|
+
_context.prev = 10;
|
|
151
|
+
_context.t0 = _context["catch"](1);
|
|
152
|
+
if (!isRetry) {
|
|
153
|
+
_context.next = 14;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
throw _context.t0;
|
|
157
|
+
case 14:
|
|
158
|
+
_loggerProxy.default.logger.error("Reachability:index#getClusters --> Failed with error: ".concat(_context.t0, ", retrying..."));
|
|
159
|
+
return _context.abrupt("return", this.getClusters(true));
|
|
160
|
+
case 16:
|
|
161
|
+
case "end":
|
|
162
|
+
return _context.stop();
|
|
163
|
+
}
|
|
164
|
+
}, _callee, this, [[1, 10]]);
|
|
165
|
+
}));
|
|
166
|
+
function getClusters() {
|
|
167
|
+
return _getClusters.apply(this, arguments);
|
|
168
|
+
}
|
|
169
|
+
return getClusters;
|
|
170
|
+
}()
|
|
171
|
+
/**
|
|
172
|
+
* Gets a list of media clusters from the backend and performs reachability checks on all the clusters
|
|
173
|
+
* @param {string} trigger - explains the reason for starting reachability
|
|
174
|
+
* @returns {Promise<ReachabilityResults>} reachability results
|
|
175
|
+
* @public
|
|
176
|
+
* @memberof Reachability
|
|
177
|
+
*/
|
|
178
|
+
)
|
|
179
|
+
}, {
|
|
180
|
+
key: "gatherReachability",
|
|
181
|
+
value: (function () {
|
|
182
|
+
var _gatherReachability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(trigger) {
|
|
183
|
+
var _yield$this$getCluste, clusters, joinCookie;
|
|
184
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
185
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
186
|
+
case 0:
|
|
187
|
+
_context2.prev = 0;
|
|
188
|
+
this.lastTrigger = trigger;
|
|
189
|
+
|
|
190
|
+
// kick off ip version detection. For now we don't await it, as we're doing it
|
|
191
|
+
// to gather the timings and send them with our reachability metrics
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
this.webex.internal.device.ipNetworkDetector.detect();
|
|
194
|
+
_context2.next = 5;
|
|
195
|
+
return this.getClusters();
|
|
196
|
+
case 5:
|
|
197
|
+
_yield$this$getCluste = _context2.sent;
|
|
198
|
+
clusters = _yield$this$getCluste.clusters;
|
|
199
|
+
joinCookie = _yield$this$getCluste.joinCookie;
|
|
200
|
+
_context2.next = 10;
|
|
140
201
|
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageJoinCookie, (0, _stringify.default)(joinCookie));
|
|
141
|
-
case
|
|
202
|
+
case 10:
|
|
142
203
|
this.reachabilityDefer = new _common.Defer();
|
|
143
204
|
|
|
144
205
|
// Perform Reachability Check
|
|
145
|
-
|
|
206
|
+
_context2.next = 13;
|
|
146
207
|
return this.performReachabilityChecks(clusters);
|
|
147
|
-
case
|
|
148
|
-
return
|
|
149
|
-
case
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error:",
|
|
153
|
-
return
|
|
154
|
-
case
|
|
208
|
+
case 13:
|
|
209
|
+
return _context2.abrupt("return", this.reachabilityDefer.promise);
|
|
210
|
+
case 16:
|
|
211
|
+
_context2.prev = 16;
|
|
212
|
+
_context2.t0 = _context2["catch"](0);
|
|
213
|
+
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error:", _context2.t0);
|
|
214
|
+
return _context2.abrupt("return", {});
|
|
215
|
+
case 20:
|
|
155
216
|
case "end":
|
|
156
|
-
return
|
|
217
|
+
return _context2.stop();
|
|
157
218
|
}
|
|
158
|
-
},
|
|
219
|
+
}, _callee2, this, [[0, 16]]);
|
|
159
220
|
}));
|
|
160
|
-
function gatherReachability() {
|
|
221
|
+
function gatherReachability(_x) {
|
|
161
222
|
return _gatherReachability.apply(this, arguments);
|
|
162
223
|
}
|
|
163
224
|
return gatherReachability;
|
|
@@ -172,10 +233,10 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
172
233
|
}, {
|
|
173
234
|
key: "getReachabilityMetrics",
|
|
174
235
|
value: (function () {
|
|
175
|
-
var _getReachabilityMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
236
|
+
var _getReachabilityMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
176
237
|
var stats, updateStats, resultsJson, results;
|
|
177
|
-
return _regenerator.default.wrap(function
|
|
178
|
-
while (1) switch (
|
|
238
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
239
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
179
240
|
case 0:
|
|
180
241
|
stats = {
|
|
181
242
|
reachability_public_udp_success: 0,
|
|
@@ -205,29 +266,29 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
205
266
|
stats["reachability_".concat(clusterType, "_xtls_").concat(_outcome2)] += 1;
|
|
206
267
|
}
|
|
207
268
|
};
|
|
208
|
-
|
|
209
|
-
|
|
269
|
+
_context3.prev = 2;
|
|
270
|
+
_context3.next = 5;
|
|
210
271
|
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
211
272
|
case 5:
|
|
212
|
-
resultsJson =
|
|
273
|
+
resultsJson = _context3.sent;
|
|
213
274
|
results = JSON.parse(resultsJson);
|
|
214
275
|
(0, _values.default)(results).forEach(function (result) {
|
|
215
276
|
updateStats(result.isVideoMesh ? 'vmn' : 'public', result);
|
|
216
277
|
});
|
|
217
|
-
|
|
278
|
+
_context3.next = 13;
|
|
218
279
|
break;
|
|
219
280
|
case 10:
|
|
220
|
-
|
|
221
|
-
|
|
281
|
+
_context3.prev = 10;
|
|
282
|
+
_context3.t0 = _context3["catch"](2);
|
|
222
283
|
// empty storage, that's ok
|
|
223
|
-
_loggerProxy.default.logger.warn('Roap:request#getReachabilityMetrics --> Error parsing reachability data: ',
|
|
284
|
+
_loggerProxy.default.logger.warn('Roap:request#getReachabilityMetrics --> Error parsing reachability data: ', _context3.t0);
|
|
224
285
|
case 13:
|
|
225
|
-
return
|
|
286
|
+
return _context3.abrupt("return", stats);
|
|
226
287
|
case 14:
|
|
227
288
|
case "end":
|
|
228
|
-
return
|
|
289
|
+
return _context3.stop();
|
|
229
290
|
}
|
|
230
|
-
},
|
|
291
|
+
}, _callee3, this, [[2, 10]]);
|
|
231
292
|
}));
|
|
232
293
|
function getReachabilityMetrics() {
|
|
233
294
|
return _getReachabilityMetrics.apply(this, arguments);
|
|
@@ -280,17 +341,17 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
280
341
|
}, {
|
|
281
342
|
key: "getReachabilityResults",
|
|
282
343
|
value: (function () {
|
|
283
|
-
var _getReachabilityResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
344
|
+
var _getReachabilityResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
|
|
284
345
|
var _this2 = this;
|
|
285
346
|
var results, resultsJson, allClusterResults;
|
|
286
|
-
return _regenerator.default.wrap(function
|
|
287
|
-
while (1) switch (
|
|
347
|
+
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
348
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
288
349
|
case 0:
|
|
289
|
-
|
|
290
|
-
|
|
350
|
+
_context4.prev = 0;
|
|
351
|
+
_context4.next = 3;
|
|
291
352
|
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
292
353
|
case 3:
|
|
293
|
-
resultsJson =
|
|
354
|
+
resultsJson = _context4.sent;
|
|
294
355
|
allClusterResults = JSON.parse(resultsJson);
|
|
295
356
|
results = (0, _lodash.mapValues)(allClusterResults, function (clusterResult) {
|
|
296
357
|
return {
|
|
@@ -305,20 +366,20 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
305
366
|
})
|
|
306
367
|
};
|
|
307
368
|
});
|
|
308
|
-
|
|
369
|
+
_context4.next = 11;
|
|
309
370
|
break;
|
|
310
371
|
case 8:
|
|
311
|
-
|
|
312
|
-
|
|
372
|
+
_context4.prev = 8;
|
|
373
|
+
_context4.t0 = _context4["catch"](0);
|
|
313
374
|
// empty storage, that's ok
|
|
314
|
-
_loggerProxy.default.logger.warn('Roap:request#attachReachabilityData --> Error parsing reachability data: ',
|
|
375
|
+
_loggerProxy.default.logger.warn('Roap:request#attachReachabilityData --> Error parsing reachability data: ', _context4.t0);
|
|
315
376
|
case 11:
|
|
316
|
-
return
|
|
377
|
+
return _context4.abrupt("return", results);
|
|
317
378
|
case 12:
|
|
318
379
|
case "end":
|
|
319
|
-
return
|
|
380
|
+
return _context4.stop();
|
|
320
381
|
}
|
|
321
|
-
},
|
|
382
|
+
}, _callee4, this, [[0, 8]]);
|
|
322
383
|
}));
|
|
323
384
|
function getReachabilityResults() {
|
|
324
385
|
return _getReachabilityResults.apply(this, arguments);
|
|
@@ -335,16 +396,16 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
335
396
|
}, {
|
|
336
397
|
key: "isAnyPublicClusterReachable",
|
|
337
398
|
value: (function () {
|
|
338
|
-
var _isAnyPublicClusterReachable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
399
|
+
var _isAnyPublicClusterReachable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
|
|
339
400
|
var reachable, reachabilityData, reachabilityResults;
|
|
340
|
-
return _regenerator.default.wrap(function
|
|
341
|
-
while (1) switch (
|
|
401
|
+
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
402
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
342
403
|
case 0:
|
|
343
404
|
reachable = false; // @ts-ignore
|
|
344
|
-
|
|
405
|
+
_context5.next = 3;
|
|
345
406
|
return this.webex.boundedStorage.get(this.namespace, _constants.REACHABILITY.localStorageResult).catch(function () {});
|
|
346
407
|
case 3:
|
|
347
|
-
reachabilityData =
|
|
408
|
+
reachabilityData = _context5.sent;
|
|
348
409
|
if (reachabilityData) {
|
|
349
410
|
try {
|
|
350
411
|
reachabilityResults = JSON.parse(reachabilityData);
|
|
@@ -356,12 +417,12 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
356
417
|
_loggerProxy.default.logger.error("Roap:request#attachReachabilityData --> Error in parsing reachability data: ".concat(e));
|
|
357
418
|
}
|
|
358
419
|
}
|
|
359
|
-
return
|
|
420
|
+
return _context5.abrupt("return", reachable);
|
|
360
421
|
case 6:
|
|
361
422
|
case "end":
|
|
362
|
-
return
|
|
423
|
+
return _context5.stop();
|
|
363
424
|
}
|
|
364
|
-
},
|
|
425
|
+
}, _callee5, this);
|
|
365
426
|
}));
|
|
366
427
|
function isAnyPublicClusterReachable() {
|
|
367
428
|
return _isAnyPublicClusterReachable.apply(this, arguments);
|
|
@@ -382,16 +443,16 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
382
443
|
}, {
|
|
383
444
|
key: "isWebexMediaBackendUnreachable",
|
|
384
445
|
value: (function () {
|
|
385
|
-
var _isWebexMediaBackendUnreachable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
446
|
+
var _isWebexMediaBackendUnreachable = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
|
|
386
447
|
var unreachable, reachabilityData, reachabilityResults, protocols;
|
|
387
|
-
return _regenerator.default.wrap(function
|
|
388
|
-
while (1) switch (
|
|
448
|
+
return _regenerator.default.wrap(function _callee6$(_context6) {
|
|
449
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
389
450
|
case 0:
|
|
390
451
|
unreachable = false; // @ts-ignore
|
|
391
|
-
|
|
452
|
+
_context6.next = 3;
|
|
392
453
|
return this.webex.boundedStorage.get(this.namespace, _constants.REACHABILITY.localStorageResult).catch(function () {});
|
|
393
454
|
case 3:
|
|
394
|
-
reachabilityData =
|
|
455
|
+
reachabilityData = _context6.sent;
|
|
395
456
|
if (reachabilityData) {
|
|
396
457
|
try {
|
|
397
458
|
reachabilityResults = JSON.parse(reachabilityData);
|
|
@@ -429,12 +490,12 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
429
490
|
_loggerProxy.default.logger.error("Roap:request#attachReachabilityData --> Error in parsing reachability data: ".concat(e));
|
|
430
491
|
}
|
|
431
492
|
}
|
|
432
|
-
return
|
|
493
|
+
return _context6.abrupt("return", unreachable);
|
|
433
494
|
case 6:
|
|
434
495
|
case "end":
|
|
435
|
-
return
|
|
496
|
+
return _context6.stop();
|
|
436
497
|
}
|
|
437
|
-
},
|
|
498
|
+
}, _callee6, this);
|
|
438
499
|
}));
|
|
439
500
|
function isWebexMediaBackendUnreachable() {
|
|
440
501
|
return _isWebexMediaBackendUnreachable.apply(this, arguments);
|
|
@@ -591,10 +652,10 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
591
652
|
}, {
|
|
592
653
|
key: "sendMetric",
|
|
593
654
|
value: (function () {
|
|
594
|
-
var _sendMetric = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
655
|
+
var _sendMetric = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
|
|
595
656
|
var results, stats;
|
|
596
|
-
return _regenerator.default.wrap(function
|
|
597
|
-
while (1) switch (
|
|
657
|
+
return _regenerator.default.wrap(function _callee7$(_context7) {
|
|
658
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
598
659
|
case 0:
|
|
599
660
|
results = [];
|
|
600
661
|
(0, _values.default)(this.clusterReachability).forEach(function (clusterReachability) {
|
|
@@ -610,14 +671,25 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
610
671
|
udp: this.getStatistics(results, 'udp', false),
|
|
611
672
|
tcp: this.getStatistics(results, 'tcp', false),
|
|
612
673
|
xtls: this.getStatistics(results, 'xtls', false)
|
|
613
|
-
}
|
|
674
|
+
},
|
|
675
|
+
ipver: {
|
|
676
|
+
// @ts-ignore
|
|
677
|
+
firstIpV4: this.webex.internal.device.ipNetworkDetector.firstIpV4,
|
|
678
|
+
// @ts-ignore
|
|
679
|
+
firstIpV6: this.webex.internal.device.ipNetworkDetector.firstIpV6,
|
|
680
|
+
// @ts-ignore
|
|
681
|
+
firstMdns: this.webex.internal.device.ipNetworkDetector.firstMdns,
|
|
682
|
+
// @ts-ignore
|
|
683
|
+
totalTime: this.webex.internal.device.ipNetworkDetector.totalTime
|
|
684
|
+
},
|
|
685
|
+
trigger: this.lastTrigger
|
|
614
686
|
};
|
|
615
687
|
_metrics.default.sendBehavioralMetric(_constants2.default.REACHABILITY_COMPLETED, _metrics.default.prepareMetricFields(stats));
|
|
616
688
|
case 4:
|
|
617
689
|
case "end":
|
|
618
|
-
return
|
|
690
|
+
return _context7.stop();
|
|
619
691
|
}
|
|
620
|
-
},
|
|
692
|
+
}, _callee7, this);
|
|
621
693
|
}));
|
|
622
694
|
function sendMetric() {
|
|
623
695
|
return _sendMetric.apply(this, arguments);
|
|
@@ -671,19 +743,19 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
671
743
|
}, {
|
|
672
744
|
key: "storeResults",
|
|
673
745
|
value: (function () {
|
|
674
|
-
var _storeResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
675
|
-
return _regenerator.default.wrap(function
|
|
676
|
-
while (1) switch (
|
|
746
|
+
var _storeResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(results) {
|
|
747
|
+
return _regenerator.default.wrap(function _callee8$(_context8) {
|
|
748
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
677
749
|
case 0:
|
|
678
|
-
|
|
750
|
+
_context8.next = 2;
|
|
679
751
|
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageResult, (0, _stringify.default)(results));
|
|
680
752
|
case 2:
|
|
681
753
|
case "end":
|
|
682
|
-
return
|
|
754
|
+
return _context8.stop();
|
|
683
755
|
}
|
|
684
|
-
},
|
|
756
|
+
}, _callee8, this);
|
|
685
757
|
}));
|
|
686
|
-
function storeResults(
|
|
758
|
+
function storeResults(_x2) {
|
|
687
759
|
return _storeResults.apply(this, arguments);
|
|
688
760
|
}
|
|
689
761
|
return storeResults;
|
|
@@ -715,19 +787,19 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
715
787
|
}, {
|
|
716
788
|
key: "performReachabilityChecks",
|
|
717
789
|
value: (function () {
|
|
718
|
-
var _performReachabilityChecks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
790
|
+
var _performReachabilityChecks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(clusterList) {
|
|
719
791
|
var _this4 = this;
|
|
720
792
|
var results, isFirstResult;
|
|
721
|
-
return _regenerator.default.wrap(function
|
|
722
|
-
while (1) switch (
|
|
793
|
+
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
794
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
723
795
|
case 0:
|
|
724
796
|
results = {};
|
|
725
797
|
this.clusterReachability = {};
|
|
726
798
|
if (!(!clusterList || !(0, _keys.default)(clusterList).length)) {
|
|
727
|
-
|
|
799
|
+
_context11.next = 4;
|
|
728
800
|
break;
|
|
729
801
|
}
|
|
730
|
-
return
|
|
802
|
+
return _context11.abrupt("return");
|
|
731
803
|
case 4:
|
|
732
804
|
_loggerProxy.default.logger.log("Reachability:index#performReachabilityChecks --> doing UDP".concat(
|
|
733
805
|
// @ts-ignore
|
|
@@ -783,7 +855,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
783
855
|
tcp: true,
|
|
784
856
|
xtls: true
|
|
785
857
|
}; // save the initialized results (in case we don't get any "resultReady" events at all)
|
|
786
|
-
|
|
858
|
+
_context11.next = 11;
|
|
787
859
|
return this.storeResults(results);
|
|
788
860
|
case 11:
|
|
789
861
|
// now start the reachability on all the clusters
|
|
@@ -791,10 +863,10 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
791
863
|
var cluster = clusterList[key];
|
|
792
864
|
_this4.clusterReachability[key] = new _clusterReachability.ClusterReachability(key, cluster);
|
|
793
865
|
_this4.clusterReachability[key].on(_clusterReachability.Events.resultReady, /*#__PURE__*/function () {
|
|
794
|
-
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
866
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(data) {
|
|
795
867
|
var protocol, result, clientMediaIPs, latencyInMilliseconds, areAllResultsReady;
|
|
796
|
-
return _regenerator.default.wrap(function
|
|
797
|
-
while (1) switch (
|
|
868
|
+
return _regenerator.default.wrap(function _callee9$(_context9) {
|
|
869
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
798
870
|
case 0:
|
|
799
871
|
protocol = data.protocol, result = data.result, clientMediaIPs = data.clientMediaIPs, latencyInMilliseconds = data.latencyInMilliseconds;
|
|
800
872
|
if (isFirstResult[protocol]) {
|
|
@@ -811,7 +883,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
811
883
|
results[key][protocol].result = result;
|
|
812
884
|
results[key][protocol].clientMediaIPs = clientMediaIPs;
|
|
813
885
|
results[key][protocol].latencyInMilliseconds = latencyInMilliseconds;
|
|
814
|
-
|
|
886
|
+
_context9.next = 9;
|
|
815
887
|
return _this4.storeResults(results);
|
|
816
888
|
case 9:
|
|
817
889
|
if (areAllResultsReady) {
|
|
@@ -827,31 +899,31 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
827
899
|
}
|
|
828
900
|
case 10:
|
|
829
901
|
case "end":
|
|
830
|
-
return
|
|
902
|
+
return _context9.stop();
|
|
831
903
|
}
|
|
832
|
-
},
|
|
904
|
+
}, _callee9);
|
|
833
905
|
}));
|
|
834
|
-
return function (
|
|
906
|
+
return function (_x4) {
|
|
835
907
|
return _ref4.apply(this, arguments);
|
|
836
908
|
};
|
|
837
909
|
}());
|
|
838
910
|
|
|
839
911
|
// clientMediaIps can be updated independently from the results, so we need to listen for them too
|
|
840
912
|
_this4.clusterReachability[key].on(_clusterReachability.Events.clientMediaIpsUpdated, /*#__PURE__*/function () {
|
|
841
|
-
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
842
|
-
return _regenerator.default.wrap(function
|
|
843
|
-
while (1) switch (
|
|
913
|
+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
|
|
914
|
+
return _regenerator.default.wrap(function _callee10$(_context10) {
|
|
915
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
844
916
|
case 0:
|
|
845
917
|
results[key][data.protocol].clientMediaIPs = data.clientMediaIPs;
|
|
846
|
-
|
|
918
|
+
_context10.next = 3;
|
|
847
919
|
return _this4.storeResults(results);
|
|
848
920
|
case 3:
|
|
849
921
|
case "end":
|
|
850
|
-
return
|
|
922
|
+
return _context10.stop();
|
|
851
923
|
}
|
|
852
|
-
},
|
|
924
|
+
}, _callee10);
|
|
853
925
|
}));
|
|
854
|
-
return function (
|
|
926
|
+
return function (_x5) {
|
|
855
927
|
return _ref5.apply(this, arguments);
|
|
856
928
|
};
|
|
857
929
|
}());
|
|
@@ -859,11 +931,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
859
931
|
});
|
|
860
932
|
case 12:
|
|
861
933
|
case "end":
|
|
862
|
-
return
|
|
934
|
+
return _context11.stop();
|
|
863
935
|
}
|
|
864
|
-
},
|
|
936
|
+
}, _callee11, this);
|
|
865
937
|
}));
|
|
866
|
-
function performReachabilityChecks(
|
|
938
|
+
function performReachabilityChecks(_x3) {
|
|
867
939
|
return _performReachabilityChecks.apply(this, arguments);
|
|
868
940
|
}
|
|
869
941
|
return performReachabilityChecks;
|