@webex/plugin-meetings 3.8.0-next.15 → 3.8.0-next.16
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/reachability/clusterReachability.js +52 -8
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +54 -35
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/types/reachability/clusterReachability.d.ts +13 -1
- package/dist/types/reachability/index.d.ts +2 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/reachability/clusterReachability.ts +47 -1
- package/src/reachability/index.ts +11 -0
- package/src/reachability/reachability.types.ts +6 -0
- package/test/unit/spec/reachability/clusterReachability.ts +47 -1
- package/test/unit/spec/reachability/index.ts +4 -0
package/dist/breakouts/index.js
CHANGED
|
@@ -1046,7 +1046,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1046
1046
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1047
1047
|
}
|
|
1048
1048
|
},
|
|
1049
|
-
version: "3.8.0-next.
|
|
1049
|
+
version: "3.8.0-next.16"
|
|
1050
1050
|
});
|
|
1051
1051
|
var _default = exports.default = Breakouts;
|
|
1052
1052
|
//# sourceMappingURL=index.js.map
|
|
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
|
|
|
373
373
|
throw error;
|
|
374
374
|
});
|
|
375
375
|
},
|
|
376
|
-
version: "3.8.0-next.
|
|
376
|
+
version: "3.8.0-next.16"
|
|
377
377
|
});
|
|
378
378
|
var _default = exports.default = SimultaneousInterpretation;
|
|
379
379
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
|
|
|
18
18
|
languageCode: 'number',
|
|
19
19
|
languageName: 'string'
|
|
20
20
|
},
|
|
21
|
-
version: "3.8.0-next.
|
|
21
|
+
version: "3.8.0-next.16"
|
|
22
22
|
});
|
|
23
23
|
var _default = exports.default = SILanguage;
|
|
24
24
|
//# sourceMappingURL=siLanguage.js.map
|
|
@@ -13,7 +13,10 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
13
13
|
});
|
|
14
14
|
exports.Events = exports.ClusterReachability = void 0;
|
|
15
15
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
|
+
var _set = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/set"));
|
|
17
|
+
var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
|
|
16
18
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
19
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
17
20
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
18
21
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
19
22
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
@@ -27,6 +30,7 @@ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy")
|
|
|
27
30
|
var _util = require("./util");
|
|
28
31
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
29
32
|
var _constants = require("../constants");
|
|
33
|
+
var _reachability = require("./reachability.types");
|
|
30
34
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
35
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -38,7 +42,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
38
42
|
var Events = exports.Events = {
|
|
39
43
|
resultReady: 'resultReady',
|
|
40
44
|
// emitted when a cluster is reached successfully using specific protocol
|
|
41
|
-
clientMediaIpsUpdated: 'clientMediaIpsUpdated'
|
|
45
|
+
clientMediaIpsUpdated: 'clientMediaIpsUpdated',
|
|
46
|
+
// emitted when more public IPs are found after resultReady was already sent for a given protocol
|
|
47
|
+
natTypeUpdated: 'natTypeUpdated' // emitted when NAT type is determined
|
|
42
48
|
};
|
|
43
49
|
/**
|
|
44
50
|
* A class that handles reachability checks for a single cluster.
|
|
@@ -64,6 +70,7 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
64
70
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defer", void 0);
|
|
65
71
|
// this defer is resolved once reachability checks for this cluster are completed
|
|
66
72
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startTimestamp", void 0);
|
|
73
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "srflxIceCandidates", []);
|
|
67
74
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isVideoMesh", void 0);
|
|
68
75
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", void 0);
|
|
69
76
|
_this.name = name;
|
|
@@ -302,6 +309,42 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
302
309
|
}
|
|
303
310
|
}
|
|
304
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Determines NAT Type.
|
|
314
|
+
*
|
|
315
|
+
* @param {RTCIceCandidate} candidate
|
|
316
|
+
* @returns {void}
|
|
317
|
+
*/
|
|
318
|
+
}, {
|
|
319
|
+
key: "determineNatType",
|
|
320
|
+
value: function determineNatType(candidate) {
|
|
321
|
+
var _this4 = this;
|
|
322
|
+
this.srflxIceCandidates.push(candidate);
|
|
323
|
+
if (this.srflxIceCandidates.length > 1) {
|
|
324
|
+
var portsFound = {};
|
|
325
|
+
this.srflxIceCandidates.forEach(function (c) {
|
|
326
|
+
var key = "".concat(c.address, ":").concat(c.relatedPort);
|
|
327
|
+
if (!portsFound[key]) {
|
|
328
|
+
portsFound[key] = new _set.default();
|
|
329
|
+
}
|
|
330
|
+
portsFound[key].add(c.port);
|
|
331
|
+
});
|
|
332
|
+
(0, _entries.default)(portsFound).forEach(function (_ref) {
|
|
333
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
334
|
+
ports = _ref2[1];
|
|
335
|
+
if (ports.size > 1) {
|
|
336
|
+
// Found candidates with the same address and relatedPort, but different ports
|
|
337
|
+
_this4.emit({
|
|
338
|
+
file: 'clusterReachability',
|
|
339
|
+
function: 'determineNatType'
|
|
340
|
+
}, Events.natTypeUpdated, {
|
|
341
|
+
natType: _reachability.NatType.SymmetricNat
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
305
348
|
/**
|
|
306
349
|
* Registers a listener for the icecandidate event
|
|
307
350
|
*
|
|
@@ -310,28 +353,29 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
310
353
|
}, {
|
|
311
354
|
key: "registerIceCandidateListener",
|
|
312
355
|
value: function registerIceCandidateListener() {
|
|
313
|
-
var
|
|
356
|
+
var _this5 = this;
|
|
314
357
|
this.pc.onicecandidate = function (e) {
|
|
315
358
|
var TURN_TLS_PORT = 443;
|
|
316
359
|
var CANDIDATE_TYPES = {
|
|
317
360
|
SERVER_REFLEXIVE: 'srflx',
|
|
318
361
|
RELAY: 'relay'
|
|
319
362
|
};
|
|
320
|
-
var latencyInMilliseconds =
|
|
363
|
+
var latencyInMilliseconds = _this5.getElapsedTime();
|
|
321
364
|
if (e.candidate) {
|
|
322
365
|
if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {
|
|
323
|
-
|
|
366
|
+
_this5.saveResult('udp', latencyInMilliseconds, e.candidate.address);
|
|
367
|
+
_this5.determineNatType(e.candidate);
|
|
324
368
|
}
|
|
325
369
|
if (e.candidate.type === CANDIDATE_TYPES.RELAY) {
|
|
326
370
|
var protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';
|
|
327
|
-
|
|
371
|
+
_this5.saveResult(protocol, latencyInMilliseconds);
|
|
328
372
|
// we don't add public IP for TCP, because in the case of relay candidates
|
|
329
373
|
// e.candidate.address is the TURN server address, not the client's public IP
|
|
330
374
|
}
|
|
331
375
|
|
|
332
|
-
if (
|
|
333
|
-
|
|
334
|
-
|
|
376
|
+
if (_this5.haveWeGotAllResults()) {
|
|
377
|
+
_this5.closePeerConnection();
|
|
378
|
+
_this5.finishReachabilityCheck();
|
|
335
379
|
}
|
|
336
380
|
}
|
|
337
381
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_common","require","_loggerProxy","_interopRequireDefault","_util","_eventsScope","_constants","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","_Reflect$construct","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","Events","exports","resultReady","clientMediaIpsUpdated","ClusterReachability","_EventsScope","_inherits2","_super","name","clusterInfo","_this","_classCallCheck2","_assertThisInitialized2","isVideoMesh","numUdpUrls","udp","numTcpUrls","tcp","numXTlsUrls","xtls","pc","createPeerConnection","defer","Defer","_createClass2","key","value","getElapsedTime","Math","round","performance","now","startTimestamp","buildPeerConnectionConfig","cluster","udpIceServers","map","url","username","credential","urls","tcpIceServers","urlString","convertStunUrlToTurn","turnTlsIceServers","convertStunUrlToTurnTls","iceServers","concat","_toConsumableArray2","iceCandidatePoolSize","iceTransportPolicy","config","peerConnection","RTCPeerConnection","peerConnectionError","LoggerProxy","logger","warn","undefined","getResult","closePeerConnection","onicecandidate","onicegatheringstatechange","close","finishReachabilityCheck","resolve","abort","CLOSED","CONNECTION_STATE","connectionState","addPublicIP","protocol","publicIP","ipAdded","clientMediaIPs","includes","emit","file","function","registerIceGatheringStateChangeListener","_this2","COMPLETE","ICE_GATHERING_STATE","iceConnectionState","haveWeGotAllResults","_this3","every","saveResult","latency","publicIp","latencyInMilliseconds","log","registerIceCandidateListener","_this4","TURN_TLS_PORT","CANDIDATE_TYPES","SERVER_REFLEXIVE","RELAY","candidate","type","address","port","_start","_asyncToGenerator2","_regenerator","mark","_callee","offer","gatherIceCandidatePromise","wrap","_callee$","_context","prev","next","abrupt","createOffer","offerToReceiveAudio","sent","gatherIceCandidates","setLocalDescription","t0","stop","start","promise","EventsScope"],"sources":["clusterReachability.ts"],"sourcesContent":["import {Defer} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {ClusterNode} from './request';\nimport {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';\nimport EventsScope from '../common/events/events-scope';\n\nimport {CONNECTION_STATE, Enum, ICE_GATHERING_STATE} from '../constants';\nimport {ClusterReachabilityResult} from './reachability.types';\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 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} as const;\n\nexport type Events = Enum<typeof Events>;\n\n/**\n * A class that handles reachability checks for a single cluster.\n * It emits events from Events enum\n */\nexport class ClusterReachability extends EventsScope {\n private numUdpUrls: number;\n private numTcpUrls: number;\n private numXTlsUrls: number;\n private result: ClusterReachabilityResult;\n private pc?: RTCPeerConnection;\n private defer: Defer; // this defer is resolved once reachability checks for this cluster are completed\n private startTimestamp: number;\n public readonly isVideoMesh: boolean;\n public readonly name;\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 this.numUdpUrls = clusterInfo.udp.length;\n this.numTcpUrls = clusterInfo.tcp.length;\n this.numXTlsUrls = clusterInfo.xtls.length;\n\n this.pc = this.createPeerConnection(clusterInfo);\n\n this.defer = new Defer();\n this.result = {\n udp: {\n result: 'untested',\n },\n tcp: {\n result: 'untested',\n },\n xtls: {\n result: 'untested',\n },\n };\n }\n\n /**\n * Gets total elapsed time, can be called only after start() is called\n * @returns {Number} Milliseconds\n */\n private getElapsedTime() {\n return Math.round(performance.now() - this.startTimestamp);\n }\n\n /**\n * Generate peerConnection config settings\n * @param {ClusterNode} cluster\n * @returns {RTCConfiguration} peerConnectionConfig\n */\n private buildPeerConnectionConfig(cluster: ClusterNode): RTCConfiguration {\n const udpIceServers = cluster.udp.map((url) => ({\n username: '',\n credential: '',\n urls: [url],\n }));\n\n // STUN servers are contacted only using UDP, so in order to test TCP reachability\n // we pretend that Linus is a TURN server, because we can explicitly say \"transport=tcp\" in TURN urls.\n // We then check for relay candidates to know if TURN-TCP worked (see registerIceCandidateListener()).\n const tcpIceServers = cluster.tcp.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurn(urlString, 'tcp')],\n };\n });\n\n const turnTlsIceServers = cluster.xtls.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurnTls(urlString)],\n };\n });\n\n return {\n iceServers: [...udpIceServers, ...tcpIceServers, ...turnTlsIceServers],\n iceCandidatePoolSize: 0,\n iceTransportPolicy: 'all',\n };\n }\n\n /**\n * Creates an RTCPeerConnection\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @returns {RTCPeerConnection} peerConnection\n */\n private createPeerConnection(clusterInfo: ClusterNode) {\n try {\n const config = this.buildPeerConnectionConfig(clusterInfo);\n\n const peerConnection = new RTCPeerConnection(config);\n\n return peerConnection;\n } catch (peerConnectionError) {\n LoggerProxy.logger.warn(\n `Reachability:index#createPeerConnection --> Error creating peerConnection:`,\n peerConnectionError\n );\n\n return undefined;\n }\n }\n\n /**\n * @returns {ClusterReachabilityResult} reachability result for this cluster\n */\n getResult() {\n return this.result;\n }\n\n /**\n * Closes the peerConnection\n *\n * @returns {void}\n */\n private closePeerConnection() {\n if (this.pc) {\n this.pc.onicecandidate = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.close();\n }\n }\n\n /**\n * Resolves the defer, indicating that reachability checks for this cluster are completed\n *\n * @returns {void}\n */\n private finishReachabilityCheck() {\n this.defer.resolve();\n }\n\n /**\n * Aborts the cluster reachability checks by closing the peer connection\n *\n * @returns {void}\n */\n public abort() {\n const {CLOSED} = CONNECTION_STATE;\n\n if (this.pc.connectionState !== CLOSED) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n }\n\n /**\n * Adds public IP (client media IPs)\n * @param {string} protocol\n * @param {string} publicIP\n * @returns {void}\n */\n private addPublicIP(protocol: 'udp' | 'tcp' | 'xtls', publicIP?: string | null) {\n const result = this.result[protocol];\n\n if (publicIP) {\n let ipAdded = false;\n\n if (result.clientMediaIPs) {\n if (!result.clientMediaIPs.includes(publicIP)) {\n result.clientMediaIPs.push(publicIP);\n ipAdded = true;\n }\n } else {\n result.clientMediaIPs = [publicIP];\n ipAdded = true;\n }\n\n if (ipAdded)\n this.emit(\n {\n file: 'clusterReachability',\n function: 'addPublicIP',\n },\n Events.clientMediaIpsUpdated,\n {\n protocol,\n clientMediaIPs: result.clientMediaIPs,\n }\n );\n }\n }\n\n /**\n * Registers a listener for the iceGatheringStateChange event\n *\n * @returns {void}\n */\n private registerIceGatheringStateChangeListener() {\n this.pc.onicegatheringstatechange = () => {\n const {COMPLETE} = ICE_GATHERING_STATE;\n\n if (this.pc.iceConnectionState === COMPLETE) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n };\n }\n\n /**\n * Checks if we have the results for all the protocols (UDP and TCP)\n *\n * @returns {boolean} true if we have all results, false otherwise\n */\n private haveWeGotAllResults(): boolean {\n return ['udp', 'tcp', 'xtls'].every(\n (protocol) =>\n this.result[protocol].result === 'reachable' || this.result[protocol].result === 'untested'\n );\n }\n\n /**\n * Saves the latency in the result for the given protocol and marks it as reachable,\n * emits the \"resultReady\" event if this is the first result for that protocol,\n * emits the \"clientMediaIpsUpdated\" event if we already had a result and only found\n * a new client IP\n *\n * @param {string} protocol\n * @param {number} latency\n * @param {string|null} [publicIp]\n * @returns {void}\n */\n private saveResult(protocol: 'udp' | 'tcp' | 'xtls', latency: number, publicIp?: string | null) {\n const result = this.result[protocol];\n\n if (result.latencyInMilliseconds === undefined) {\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#saveResult --> Successfully reached ${this.name} over ${protocol}: ${latency}ms`\n );\n result.latencyInMilliseconds = latency;\n result.result = 'reachable';\n if (publicIp) {\n result.clientMediaIPs = [publicIp];\n }\n\n this.emit(\n {\n file: 'clusterReachability',\n function: 'saveResult',\n },\n Events.resultReady,\n {\n protocol,\n ...result,\n }\n );\n } else {\n this.addPublicIP(protocol, publicIp);\n }\n }\n\n /**\n * Registers a listener for the icecandidate event\n *\n * @returns {void}\n */\n private registerIceCandidateListener() {\n this.pc.onicecandidate = (e) => {\n const TURN_TLS_PORT = 443;\n const CANDIDATE_TYPES = {\n SERVER_REFLEXIVE: 'srflx',\n RELAY: 'relay',\n };\n\n const latencyInMilliseconds = this.getElapsedTime();\n\n if (e.candidate) {\n if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {\n this.saveResult('udp', latencyInMilliseconds, e.candidate.address);\n }\n\n if (e.candidate.type === CANDIDATE_TYPES.RELAY) {\n const protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';\n this.saveResult(protocol, latencyInMilliseconds);\n // we don't add public IP for TCP, because in the case of relay candidates\n // e.candidate.address is the TURN server address, not the client's public IP\n }\n\n if (this.haveWeGotAllResults()) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n }\n };\n }\n\n /**\n * Starts the process of doing UDP and TCP reachability checks on the media cluster.\n * XTLS reachability checking is not supported.\n *\n * @returns {Promise}\n */\n async start(): Promise<ClusterReachabilityResult> {\n if (!this.pc) {\n LoggerProxy.logger.warn(\n `Reachability:ClusterReachability#start --> Error: peerConnection is undefined`\n );\n\n return this.result;\n }\n\n // Initialize this.result as saying that nothing is reachable.\n // It will get updated as we go along and successfully gather ICE candidates.\n this.result.udp = {\n result: this.numUdpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.tcp = {\n result: this.numTcpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.xtls = {\n result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested',\n };\n\n try {\n const offer = await this.pc.createOffer({offerToReceiveAudio: true});\n\n this.startTimestamp = performance.now();\n\n // Set up the state change listeners before triggering the ICE gathering\n const gatherIceCandidatePromise = this.gatherIceCandidates();\n\n // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer\n // we just need to make this call to trigger the ICE gathering process\n this.pc.setLocalDescription(offer);\n\n await gatherIceCandidatePromise;\n } catch (error) {\n LoggerProxy.logger.warn(`Reachability:ClusterReachability#start --> Error: `, error);\n }\n\n return this.result;\n }\n\n /**\n * Starts the process of gathering ICE candidates\n *\n * @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached\n */\n private gatherIceCandidates() {\n this.registerIceGatheringStateChangeListener();\n this.registerIceCandidateListener();\n\n return this.defer.promise;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AAAyE,SAAAM,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAA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H,oBAAW"}
|
|
1
|
+
{"version":3,"names":["_common","require","_loggerProxy","_interopRequireDefault","_util","_eventsScope","_constants","_reachability","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","_Reflect$construct","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","Events","exports","resultReady","clientMediaIpsUpdated","natTypeUpdated","ClusterReachability","_EventsScope","_inherits2","_super","name","clusterInfo","_this","_classCallCheck2","_assertThisInitialized2","isVideoMesh","numUdpUrls","udp","numTcpUrls","tcp","numXTlsUrls","xtls","pc","createPeerConnection","defer","Defer","_createClass2","key","value","getElapsedTime","Math","round","performance","now","startTimestamp","buildPeerConnectionConfig","cluster","udpIceServers","map","url","username","credential","urls","tcpIceServers","urlString","convertStunUrlToTurn","turnTlsIceServers","convertStunUrlToTurnTls","iceServers","concat","_toConsumableArray2","iceCandidatePoolSize","iceTransportPolicy","config","peerConnection","RTCPeerConnection","peerConnectionError","LoggerProxy","logger","warn","undefined","getResult","closePeerConnection","onicecandidate","onicegatheringstatechange","close","finishReachabilityCheck","resolve","abort","CLOSED","CONNECTION_STATE","connectionState","addPublicIP","protocol","publicIP","ipAdded","clientMediaIPs","includes","emit","file","function","registerIceGatheringStateChangeListener","_this2","COMPLETE","ICE_GATHERING_STATE","iceConnectionState","haveWeGotAllResults","_this3","every","saveResult","latency","publicIp","latencyInMilliseconds","log","determineNatType","candidate","_this4","srflxIceCandidates","portsFound","c","address","relatedPort","_set","add","port","_entries","_ref","_ref2","_slicedToArray2","ports","size","natType","NatType","SymmetricNat","registerIceCandidateListener","_this5","TURN_TLS_PORT","CANDIDATE_TYPES","SERVER_REFLEXIVE","RELAY","type","_start","_asyncToGenerator2","_regenerator","mark","_callee","offer","gatherIceCandidatePromise","wrap","_callee$","_context","prev","next","abrupt","createOffer","offerToReceiveAudio","sent","gatherIceCandidates","setLocalDescription","t0","stop","start","promise","EventsScope"],"sources":["clusterReachability.ts"],"sourcesContent":["import {Defer} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {ClusterNode} from './request';\nimport {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';\nimport EventsScope from '../common/events/events-scope';\n\nimport {CONNECTION_STATE, Enum, ICE_GATHERING_STATE} from '../constants';\nimport {ClusterReachabilityResult, NatType} from './reachability.types';\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 * It emits events from Events enum\n */\nexport class ClusterReachability extends EventsScope {\n private numUdpUrls: number;\n private numTcpUrls: number;\n private numXTlsUrls: number;\n private result: ClusterReachabilityResult;\n private pc?: RTCPeerConnection;\n private defer: Defer; // this defer is resolved once reachability checks for this cluster are completed\n private startTimestamp: number;\n private srflxIceCandidates: RTCIceCandidate[] = [];\n public readonly isVideoMesh: boolean;\n public readonly name;\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 this.numUdpUrls = clusterInfo.udp.length;\n this.numTcpUrls = clusterInfo.tcp.length;\n this.numXTlsUrls = clusterInfo.xtls.length;\n\n this.pc = this.createPeerConnection(clusterInfo);\n\n this.defer = new Defer();\n this.result = {\n udp: {\n result: 'untested',\n },\n tcp: {\n result: 'untested',\n },\n xtls: {\n result: 'untested',\n },\n };\n }\n\n /**\n * Gets total elapsed time, can be called only after start() is called\n * @returns {Number} Milliseconds\n */\n private getElapsedTime() {\n return Math.round(performance.now() - this.startTimestamp);\n }\n\n /**\n * Generate peerConnection config settings\n * @param {ClusterNode} cluster\n * @returns {RTCConfiguration} peerConnectionConfig\n */\n private buildPeerConnectionConfig(cluster: ClusterNode): RTCConfiguration {\n const udpIceServers = cluster.udp.map((url) => ({\n username: '',\n credential: '',\n urls: [url],\n }));\n\n // STUN servers are contacted only using UDP, so in order to test TCP reachability\n // we pretend that Linus is a TURN server, because we can explicitly say \"transport=tcp\" in TURN urls.\n // We then check for relay candidates to know if TURN-TCP worked (see registerIceCandidateListener()).\n const tcpIceServers = cluster.tcp.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurn(urlString, 'tcp')],\n };\n });\n\n const turnTlsIceServers = cluster.xtls.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurnTls(urlString)],\n };\n });\n\n return {\n iceServers: [...udpIceServers, ...tcpIceServers, ...turnTlsIceServers],\n iceCandidatePoolSize: 0,\n iceTransportPolicy: 'all',\n };\n }\n\n /**\n * Creates an RTCPeerConnection\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @returns {RTCPeerConnection} peerConnection\n */\n private createPeerConnection(clusterInfo: ClusterNode) {\n try {\n const config = this.buildPeerConnectionConfig(clusterInfo);\n\n const peerConnection = new RTCPeerConnection(config);\n\n return peerConnection;\n } catch (peerConnectionError) {\n LoggerProxy.logger.warn(\n `Reachability:index#createPeerConnection --> Error creating peerConnection:`,\n peerConnectionError\n );\n\n return undefined;\n }\n }\n\n /**\n * @returns {ClusterReachabilityResult} reachability result for this cluster\n */\n getResult() {\n return this.result;\n }\n\n /**\n * Closes the peerConnection\n *\n * @returns {void}\n */\n private closePeerConnection() {\n if (this.pc) {\n this.pc.onicecandidate = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.close();\n }\n }\n\n /**\n * Resolves the defer, indicating that reachability checks for this cluster are completed\n *\n * @returns {void}\n */\n private finishReachabilityCheck() {\n this.defer.resolve();\n }\n\n /**\n * Aborts the cluster reachability checks by closing the peer connection\n *\n * @returns {void}\n */\n public abort() {\n const {CLOSED} = CONNECTION_STATE;\n\n if (this.pc.connectionState !== CLOSED) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n }\n\n /**\n * Adds public IP (client media IPs)\n * @param {string} protocol\n * @param {string} publicIP\n * @returns {void}\n */\n private addPublicIP(protocol: 'udp' | 'tcp' | 'xtls', publicIP?: string | null) {\n const result = this.result[protocol];\n\n if (publicIP) {\n let ipAdded = false;\n\n if (result.clientMediaIPs) {\n if (!result.clientMediaIPs.includes(publicIP)) {\n result.clientMediaIPs.push(publicIP);\n ipAdded = true;\n }\n } else {\n result.clientMediaIPs = [publicIP];\n ipAdded = true;\n }\n\n if (ipAdded)\n this.emit(\n {\n file: 'clusterReachability',\n function: 'addPublicIP',\n },\n Events.clientMediaIpsUpdated,\n {\n protocol,\n clientMediaIPs: result.clientMediaIPs,\n }\n );\n }\n }\n\n /**\n * Registers a listener for the iceGatheringStateChange event\n *\n * @returns {void}\n */\n private registerIceGatheringStateChangeListener() {\n this.pc.onicegatheringstatechange = () => {\n const {COMPLETE} = ICE_GATHERING_STATE;\n\n if (this.pc.iceConnectionState === COMPLETE) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n };\n }\n\n /**\n * Checks if we have the results for all the protocols (UDP and TCP)\n *\n * @returns {boolean} true if we have all results, false otherwise\n */\n private haveWeGotAllResults(): boolean {\n return ['udp', 'tcp', 'xtls'].every(\n (protocol) =>\n this.result[protocol].result === 'reachable' || this.result[protocol].result === 'untested'\n );\n }\n\n /**\n * Saves the latency in the result for the given protocol and marks it as reachable,\n * emits the \"resultReady\" event if this is the first result for that protocol,\n * emits the \"clientMediaIpsUpdated\" event if we already had a result and only found\n * a new client IP\n *\n * @param {string} protocol\n * @param {number} latency\n * @param {string|null} [publicIp]\n * @returns {void}\n */\n private saveResult(protocol: 'udp' | 'tcp' | 'xtls', latency: number, publicIp?: string | null) {\n const result = this.result[protocol];\n\n if (result.latencyInMilliseconds === undefined) {\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:index#saveResult --> Successfully reached ${this.name} over ${protocol}: ${latency}ms`\n );\n result.latencyInMilliseconds = latency;\n result.result = 'reachable';\n if (publicIp) {\n result.clientMediaIPs = [publicIp];\n }\n\n this.emit(\n {\n file: 'clusterReachability',\n function: 'saveResult',\n },\n Events.resultReady,\n {\n protocol,\n ...result,\n }\n );\n } else {\n this.addPublicIP(protocol, publicIp);\n }\n }\n\n /**\n * Determines NAT Type.\n *\n * @param {RTCIceCandidate} candidate\n * @returns {void}\n */\n private determineNatType(candidate: RTCIceCandidate) {\n this.srflxIceCandidates.push(candidate);\n\n if (this.srflxIceCandidates.length > 1) {\n const portsFound: Record<string, Set<number>> = {};\n\n this.srflxIceCandidates.forEach((c) => {\n const key = `${c.address}:${c.relatedPort}`;\n if (!portsFound[key]) {\n portsFound[key] = new Set();\n }\n portsFound[key].add(c.port);\n });\n\n Object.entries(portsFound).forEach(([, ports]) => {\n if (ports.size > 1) {\n // Found candidates with the same address and relatedPort, but different ports\n this.emit(\n {\n file: 'clusterReachability',\n function: 'determineNatType',\n },\n Events.natTypeUpdated,\n {\n natType: NatType.SymmetricNat,\n }\n );\n }\n });\n }\n }\n\n /**\n * Registers a listener for the icecandidate event\n *\n * @returns {void}\n */\n private registerIceCandidateListener() {\n this.pc.onicecandidate = (e) => {\n const TURN_TLS_PORT = 443;\n const CANDIDATE_TYPES = {\n SERVER_REFLEXIVE: 'srflx',\n RELAY: 'relay',\n };\n\n const latencyInMilliseconds = this.getElapsedTime();\n\n if (e.candidate) {\n if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {\n this.saveResult('udp', latencyInMilliseconds, e.candidate.address);\n\n this.determineNatType(e.candidate);\n }\n\n if (e.candidate.type === CANDIDATE_TYPES.RELAY) {\n const protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';\n this.saveResult(protocol, latencyInMilliseconds);\n // we don't add public IP for TCP, because in the case of relay candidates\n // e.candidate.address is the TURN server address, not the client's public IP\n }\n\n if (this.haveWeGotAllResults()) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n }\n };\n }\n\n /**\n * Starts the process of doing UDP and TCP reachability checks on the media cluster.\n * XTLS reachability checking is not supported.\n *\n * @returns {Promise}\n */\n async start(): Promise<ClusterReachabilityResult> {\n if (!this.pc) {\n LoggerProxy.logger.warn(\n `Reachability:ClusterReachability#start --> Error: peerConnection is undefined`\n );\n\n return this.result;\n }\n\n // Initialize this.result as saying that nothing is reachable.\n // It will get updated as we go along and successfully gather ICE candidates.\n this.result.udp = {\n result: this.numUdpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.tcp = {\n result: this.numTcpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.xtls = {\n result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested',\n };\n\n try {\n const offer = await this.pc.createOffer({offerToReceiveAudio: true});\n\n this.startTimestamp = performance.now();\n\n // Set up the state change listeners before triggering the ICE gathering\n const gatherIceCandidatePromise = this.gatherIceCandidates();\n\n // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer\n // we just need to make this call to trigger the ICE gathering process\n this.pc.setLocalDescription(offer);\n\n await gatherIceCandidatePromise;\n } catch (error) {\n LoggerProxy.logger.warn(`Reachability:ClusterReachability#start --> Error: `, error);\n }\n\n return this.result;\n }\n\n /**\n * Starts the process of gathering ICE candidates\n *\n * @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached\n */\n private gatherIceCandidates() {\n this.registerIceGatheringStateChangeListener();\n this.registerIceCandidateListener();\n\n return this.defer.promise;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAAwE,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAe,MAAA,CAAAZ,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAiB,iCAAA,GAAAC,wBAAA,CA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G,cAAc,GAAGF,WAAW,CAACC,GAAG,CAAC,CAAC;;cAEvC;cACM8F,yBAAyB,GAAG,IAAI,CAACU,mBAAmB,CAAC,CAAC,EAE5D;cACA;cACA,IAAI,CAACnH,EAAE,CAACoH,mBAAmB,CAACZ,KAAK,CAAC;cAACI,QAAA,CAAAE,IAAA;cAAA,OAE7BL,yBAAyB;YAAA;cAAAG,QAAA,CAAAE,IAAA;cAAA;YAAA;cAAAF,QAAA,CAAAC,IAAA;cAAAD,QAAA,CAAAS,EAAA,GAAAT,QAAA;cAE/BzE,oBAAW,CAACC,MAAM,CAACC,IAAI,uDAAAuE,QAAA,CAAAS,EAA4D,CAAC;YAAC;cAAA,OAAAT,QAAA,CAAAG,MAAA,WAGhF,IAAI,CAAChJ,MAAM;YAAA;YAAA;cAAA,OAAA6I,QAAA,CAAAU,IAAA;UAAA;QAAA,GAAAf,OAAA;MAAA,CACnB;MAAA,SAAAgB,MAAA;QAAA,OAAApB,MAAA,CAAAtJ,KAAA,OAAAE,SAAA;MAAA;MAAA,OAAAwK,KAAA;IAAA;IAED;AACF;AACA;AACA;AACA;IAJE;EAAA;IAAAlH,GAAA;IAAAC,KAAA,EAKA,SAAA6G,oBAAA,EAA8B;MAC5B,IAAI,CAACxD,uCAAuC,CAAC,CAAC;MAC9C,IAAI,CAACiC,4BAA4B,CAAC,CAAC;MAEnC,OAAO,IAAI,CAAC1F,KAAK,CAACsH,OAAO;IAC3B;EAAC;EAAA,OAAAxI,mBAAA;AAAA,EAtYsCyI,oBAAW"}
|
|
@@ -33,6 +33,7 @@ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy")
|
|
|
33
33
|
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
34
34
|
var _constants = require("../constants");
|
|
35
35
|
var _request = _interopRequireDefault(require("./request"));
|
|
36
|
+
var _reachability = require("./reachability.types");
|
|
36
37
|
var _clusterReachability = require("./clusterReachability");
|
|
37
38
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
38
39
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
@@ -96,6 +97,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
96
97
|
});
|
|
97
98
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startTime", undefined);
|
|
98
99
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "totalDuration", undefined);
|
|
100
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "natType", _reachability.NatType.Unknown);
|
|
99
101
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastTrigger", void 0);
|
|
100
102
|
_this.webex = webex;
|
|
101
103
|
|
|
@@ -424,7 +426,8 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
424
426
|
reachability_vmn_tcp_success: 0,
|
|
425
427
|
reachability_vmn_tcp_failed: 0,
|
|
426
428
|
reachability_vmn_xtls_success: 0,
|
|
427
|
-
reachability_vmn_xtls_failed: 0
|
|
429
|
+
reachability_vmn_xtls_failed: 0,
|
|
430
|
+
natType: this.natType
|
|
428
431
|
};
|
|
429
432
|
updateStats = function updateStats(clusterType, result) {
|
|
430
433
|
if (result.udp && result.udp.result !== 'untested') {
|
|
@@ -1026,11 +1029,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1026
1029
|
}, {
|
|
1027
1030
|
key: "performReachabilityChecks",
|
|
1028
1031
|
value: (function () {
|
|
1029
|
-
var _performReachabilityChecks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1032
|
+
var _performReachabilityChecks = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(clusterList) {
|
|
1030
1033
|
var _this4 = this;
|
|
1031
1034
|
var results, isFirstResult;
|
|
1032
|
-
return _regenerator.default.wrap(function
|
|
1033
|
-
while (1) switch (
|
|
1035
|
+
return _regenerator.default.wrap(function _callee15$(_context15) {
|
|
1036
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
1034
1037
|
case 0:
|
|
1035
1038
|
results = {};
|
|
1036
1039
|
this.clusterReachability = {};
|
|
@@ -1088,11 +1091,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1088
1091
|
tcp: true,
|
|
1089
1092
|
xtls: true
|
|
1090
1093
|
}; // save the initialized results (in case we don't get any "resultReady" events at all)
|
|
1091
|
-
|
|
1094
|
+
_context15.next = 9;
|
|
1092
1095
|
return this.storeResults(results);
|
|
1093
1096
|
case 9:
|
|
1094
1097
|
if (!(!clusterList || !(0, _keys.default)(clusterList).length)) {
|
|
1095
|
-
|
|
1098
|
+
_context15.next = 13;
|
|
1096
1099
|
break;
|
|
1097
1100
|
}
|
|
1098
1101
|
// nothing to do, finish immediately
|
|
@@ -1101,7 +1104,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1101
1104
|
file: 'reachability',
|
|
1102
1105
|
function: 'performReachabilityChecks'
|
|
1103
1106
|
}, 'reachability:done', {});
|
|
1104
|
-
return
|
|
1107
|
+
return _context15.abrupt("return");
|
|
1105
1108
|
case 13:
|
|
1106
1109
|
this.startTimers();
|
|
1107
1110
|
|
|
@@ -1173,13 +1176,29 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1173
1176
|
return _ref7.apply(this, arguments);
|
|
1174
1177
|
};
|
|
1175
1178
|
}());
|
|
1179
|
+
_this4.clusterReachability[key].on(_clusterReachability.Events.natTypeUpdated, /*#__PURE__*/function () {
|
|
1180
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(data) {
|
|
1181
|
+
return _regenerator.default.wrap(function _callee14$(_context14) {
|
|
1182
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1183
|
+
case 0:
|
|
1184
|
+
_this4.natType = data.natType;
|
|
1185
|
+
case 1:
|
|
1186
|
+
case "end":
|
|
1187
|
+
return _context14.stop();
|
|
1188
|
+
}
|
|
1189
|
+
}, _callee14);
|
|
1190
|
+
}));
|
|
1191
|
+
return function (_x8) {
|
|
1192
|
+
return _ref8.apply(this, arguments);
|
|
1193
|
+
};
|
|
1194
|
+
}());
|
|
1176
1195
|
_this4.clusterReachability[key].start(); // not awaiting on purpose
|
|
1177
1196
|
});
|
|
1178
1197
|
case 15:
|
|
1179
1198
|
case "end":
|
|
1180
|
-
return
|
|
1199
|
+
return _context15.stop();
|
|
1181
1200
|
}
|
|
1182
|
-
},
|
|
1201
|
+
}, _callee15, this);
|
|
1183
1202
|
}));
|
|
1184
1203
|
function performReachabilityChecks(_x5) {
|
|
1185
1204
|
return _performReachabilityChecks.apply(this, arguments);
|
|
@@ -1198,42 +1217,42 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1198
1217
|
}, {
|
|
1199
1218
|
key: "getClientMediaPreferences",
|
|
1200
1219
|
value: (function () {
|
|
1201
|
-
var _getClientMediaPreferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1220
|
+
var _getClientMediaPreferences = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16(isMultistream, ipver) {
|
|
1202
1221
|
var reachabilityReport;
|
|
1203
|
-
return _regenerator.default.wrap(function
|
|
1204
|
-
while (1) switch (
|
|
1222
|
+
return _regenerator.default.wrap(function _callee16$(_context16) {
|
|
1223
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
1205
1224
|
case 0:
|
|
1206
1225
|
if (this.orpheusApiVersion) {
|
|
1207
|
-
|
|
1226
|
+
_context16.next = 7;
|
|
1208
1227
|
break;
|
|
1209
1228
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1229
|
+
_context16.t0 = ipver;
|
|
1230
|
+
_context16.next = 4;
|
|
1212
1231
|
return this.getJoinCookie();
|
|
1213
1232
|
case 4:
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
return
|
|
1217
|
-
ipver:
|
|
1218
|
-
joinCookie:
|
|
1219
|
-
preferTranscoding:
|
|
1233
|
+
_context16.t1 = _context16.sent;
|
|
1234
|
+
_context16.t2 = !isMultistream;
|
|
1235
|
+
return _context16.abrupt("return", {
|
|
1236
|
+
ipver: _context16.t0,
|
|
1237
|
+
joinCookie: _context16.t1,
|
|
1238
|
+
preferTranscoding: _context16.t2
|
|
1220
1239
|
});
|
|
1221
1240
|
case 7:
|
|
1222
|
-
|
|
1241
|
+
_context16.next = 9;
|
|
1223
1242
|
return this.getReachabilityReport();
|
|
1224
1243
|
case 9:
|
|
1225
|
-
reachabilityReport =
|
|
1226
|
-
return
|
|
1244
|
+
reachabilityReport = _context16.sent;
|
|
1245
|
+
return _context16.abrupt("return", _objectSpread({
|
|
1227
1246
|
ipver: ipver,
|
|
1228
1247
|
preferTranscoding: !isMultistream
|
|
1229
1248
|
}, reachabilityReport));
|
|
1230
1249
|
case 11:
|
|
1231
1250
|
case "end":
|
|
1232
|
-
return
|
|
1251
|
+
return _context16.stop();
|
|
1233
1252
|
}
|
|
1234
|
-
},
|
|
1253
|
+
}, _callee16, this);
|
|
1235
1254
|
}));
|
|
1236
|
-
function getClientMediaPreferences(
|
|
1255
|
+
function getClientMediaPreferences(_x9, _x10) {
|
|
1237
1256
|
return _getClientMediaPreferences.apply(this, arguments);
|
|
1238
1257
|
}
|
|
1239
1258
|
return getClientMediaPreferences;
|
|
@@ -1249,22 +1268,22 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
|
|
|
1249
1268
|
}, {
|
|
1250
1269
|
key: "getReachabilityReportToAttachToRoap",
|
|
1251
1270
|
value: (function () {
|
|
1252
|
-
var _getReachabilityReportToAttachToRoap = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
1253
|
-
return _regenerator.default.wrap(function
|
|
1254
|
-
while (1) switch (
|
|
1271
|
+
var _getReachabilityReportToAttachToRoap = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
|
|
1272
|
+
return _regenerator.default.wrap(function _callee17$(_context17) {
|
|
1273
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
1255
1274
|
case 0:
|
|
1256
1275
|
if (this.orpheusApiVersion) {
|
|
1257
|
-
|
|
1276
|
+
_context17.next = 2;
|
|
1258
1277
|
break;
|
|
1259
1278
|
}
|
|
1260
|
-
return
|
|
1279
|
+
return _context17.abrupt("return", this.getReachabilityResults());
|
|
1261
1280
|
case 2:
|
|
1262
|
-
return
|
|
1281
|
+
return _context17.abrupt("return", undefined);
|
|
1263
1282
|
case 3:
|
|
1264
1283
|
case "end":
|
|
1265
|
-
return
|
|
1284
|
+
return _context17.stop();
|
|
1266
1285
|
}
|
|
1267
|
-
},
|
|
1286
|
+
}, _callee17, this);
|
|
1268
1287
|
}));
|
|
1269
1288
|
function getReachabilityReportToAttachToRoap() {
|
|
1270
1289
|
return _getReachabilityReportToAttachToRoap.apply(this, arguments);
|