@webex/plugin-meetings 3.10.0 → 3.11.0
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/annotation/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +38 -27
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +13 -8
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +20 -0
- package/dist/hashTree/constants.js.map +1 -0
- package/dist/hashTree/hashTree.js +515 -0
- package/dist/hashTree/hashTree.js.map +1 -0
- package/dist/hashTree/hashTreeParser.js +1250 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +23 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/hashTree/utils.js +59 -0
- package/dist/hashTree/utils.js.map +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +33 -13
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +5 -3
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +619 -177
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/media/MediaConnectionAwaiter.js +1 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +5 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +15 -17
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1632 -1535
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +24 -23
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +200 -148
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +36 -30
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +188 -352
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +206 -206
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +445 -0
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +27 -21
- package/dist/types/hashTree/constants.d.ts +8 -0
- package/dist/types/hashTree/hashTree.d.ts +129 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +250 -0
- package/dist/types/hashTree/types.d.ts +33 -0
- package/dist/types/hashTree/utils.d.ts +16 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +98 -80
- package/dist/types/locus-info/types.d.ts +54 -0
- package/dist/types/meeting/index.d.ts +35 -9
- package/dist/types/meetings/index.d.ts +9 -2
- package/dist/types/metrics/constants.d.ts +3 -0
- package/dist/types/reachability/clusterReachability.d.ts +33 -84
- package/dist/types/reachability/reachability.types.d.ts +12 -1
- package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +148 -158
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/common/errors/webex-errors.ts +19 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +15 -2
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTree.ts +463 -0
- package/src/hashTree/hashTreeParser.ts +1143 -0
- package/src/hashTree/types.ts +39 -0
- package/src/hashTree/utils.ts +53 -0
- package/src/index.ts +2 -0
- package/src/interceptors/locusRouteToken.ts +22 -5
- package/src/locus-info/controlsUtils.ts +6 -0
- package/src/locus-info/index.ts +641 -164
- package/src/locus-info/types.ts +53 -0
- package/src/media/index.ts +6 -0
- package/src/meeting/index.ts +137 -28
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +119 -59
- package/src/meetings/util.ts +10 -9
- package/src/metrics/constants.ts +3 -0
- package/src/reachability/clusterReachability.ts +159 -330
- package/src/reachability/index.ts +6 -1
- package/src/reachability/reachability.types.ts +15 -1
- package/src/reachability/reachabilityPeerConnection.ts +418 -0
- package/test/unit/spec/hashTree/hashTree.ts +655 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1524 -0
- package/test/unit/spec/hashTree/utils.ts +140 -0
- package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +27 -1
- package/test/unit/spec/locus-info/index.js +879 -16
- package/test/unit/spec/media/index.ts +140 -9
- package/test/unit/spec/meeting/index.js +299 -94
- package/test/unit/spec/meeting/utils.js +78 -1
- package/test/unit/spec/meetings/index.js +263 -29
- package/test/unit/spec/meetings/utils.js +51 -1
- package/test/unit/spec/reachability/clusterReachability.ts +404 -137
- package/test/unit/spec/reachability/index.ts +3 -3
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
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");
|
|
9
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
10
9
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
11
10
|
_Object$defineProperty(exports, "__esModule", {
|
|
@@ -14,27 +13,23 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
14
13
|
exports.Events = exports.ClusterReachability = void 0;
|
|
15
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
16
15
|
var _set = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/set"));
|
|
17
|
-
var
|
|
16
|
+
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
18
17
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
19
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
|
|
20
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
21
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
22
19
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
23
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
25
20
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
26
21
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
22
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
27
23
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
28
|
-
var _common = require("@webex/common");
|
|
29
|
-
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
30
|
-
var _util = require("./util");
|
|
31
24
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
32
|
-
var
|
|
25
|
+
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
33
26
|
var _reachability = require("./reachability.types");
|
|
34
|
-
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function
|
|
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; }
|
|
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)); }
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
38
33
|
// data for the Events.resultReady event
|
|
39
34
|
|
|
40
35
|
// data for the Events.clientMediaIpsUpdated event
|
|
@@ -48,392 +43,233 @@ var Events = exports.Events = {
|
|
|
48
43
|
};
|
|
49
44
|
/**
|
|
50
45
|
* A class that handles reachability checks for a single cluster.
|
|
51
|
-
*
|
|
46
|
+
* Creates and orchestrates ReachabilityPeerConnection instance(s).
|
|
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
|
|
52
54
|
*/
|
|
53
55
|
var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_EventsScope) {
|
|
54
|
-
(0, _inherits2.default)(ClusterReachability, _EventsScope);
|
|
55
|
-
var _super = _createSuper(ClusterReachability);
|
|
56
56
|
/**
|
|
57
57
|
* Constructor for ClusterReachability
|
|
58
58
|
* @param {string} name cluster name
|
|
59
59
|
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
60
|
+
* @param {boolean} enablePerUdpUrlReachability whether to create separate peer connections per UDP URL
|
|
60
61
|
*/
|
|
61
62
|
function ClusterReachability(name, clusterInfo) {
|
|
62
63
|
var _this;
|
|
64
|
+
var enablePerUdpUrlReachability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
63
65
|
(0, _classCallCheck2.default)(this, ClusterReachability);
|
|
64
|
-
_this =
|
|
65
|
-
(0, _defineProperty2.default)(
|
|
66
|
-
(0, _defineProperty2.default)(
|
|
67
|
-
(0, _defineProperty2.default)(
|
|
68
|
-
(0, _defineProperty2.default)(
|
|
69
|
-
(0, _defineProperty2.default)(
|
|
70
|
-
(0, _defineProperty2.default)(
|
|
71
|
-
|
|
72
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "startTimestamp", void 0);
|
|
73
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "srflxIceCandidates", []);
|
|
74
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isVideoMesh", void 0);
|
|
75
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "name", void 0);
|
|
76
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "reachedSubnets", new _set.default());
|
|
66
|
+
_this = _callSuper(this, ClusterReachability);
|
|
67
|
+
(0, _defineProperty2.default)(_this, "reachabilityPeerConnection", null);
|
|
68
|
+
(0, _defineProperty2.default)(_this, "reachabilityPeerConnectionsForUdp", []);
|
|
69
|
+
(0, _defineProperty2.default)(_this, "isVideoMesh", void 0);
|
|
70
|
+
(0, _defineProperty2.default)(_this, "name", void 0);
|
|
71
|
+
(0, _defineProperty2.default)(_this, "reachedSubnets", new _set.default());
|
|
72
|
+
(0, _defineProperty2.default)(_this, "enablePerUdpUrlReachability", void 0);
|
|
73
|
+
(0, _defineProperty2.default)(_this, "udpResultEmitted", false);
|
|
77
74
|
_this.name = name;
|
|
78
75
|
_this.isVideoMesh = clusterInfo.isVideoMesh;
|
|
79
|
-
_this.
|
|
80
|
-
_this.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
udp: {
|
|
86
|
-
result: 'untested'
|
|
87
|
-
},
|
|
88
|
-
tcp: {
|
|
89
|
-
result: 'untested'
|
|
90
|
-
},
|
|
91
|
-
xtls: {
|
|
92
|
-
result: 'untested'
|
|
93
|
-
}
|
|
94
|
-
};
|
|
76
|
+
_this.enablePerUdpUrlReachability = enablePerUdpUrlReachability;
|
|
77
|
+
if (_this.enablePerUdpUrlReachability) {
|
|
78
|
+
_this.initializePerUdpUrlReachabilityCheck(clusterInfo);
|
|
79
|
+
} else {
|
|
80
|
+
_this.initializeSingleReachabilityPeerConnection(clusterInfo);
|
|
81
|
+
}
|
|
95
82
|
return _this;
|
|
96
83
|
}
|
|
97
84
|
|
|
98
85
|
/**
|
|
99
|
-
*
|
|
100
|
-
* @
|
|
86
|
+
* Initializes a single ReachabilityPeerConnection for all protocols
|
|
87
|
+
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
88
|
+
* @returns {void}
|
|
101
89
|
*/
|
|
102
|
-
(0,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Generate peerConnection config settings
|
|
110
|
-
* @param {ClusterNode} cluster
|
|
111
|
-
* @returns {RTCConfiguration} peerConnectionConfig
|
|
112
|
-
*/
|
|
113
|
-
}, {
|
|
114
|
-
key: "buildPeerConnectionConfig",
|
|
115
|
-
value: function buildPeerConnectionConfig(cluster) {
|
|
116
|
-
var udpIceServers = cluster.udp.map(function (url) {
|
|
117
|
-
return {
|
|
118
|
-
username: '',
|
|
119
|
-
credential: '',
|
|
120
|
-
urls: [url]
|
|
121
|
-
};
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// STUN servers are contacted only using UDP, so in order to test TCP reachability
|
|
125
|
-
// we pretend that Linus is a TURN server, because we can explicitly say "transport=tcp" in TURN urls.
|
|
126
|
-
// We then check for relay candidates to know if TURN-TCP worked (see registerIceCandidateListener()).
|
|
127
|
-
var tcpIceServers = cluster.tcp.map(function (urlString) {
|
|
128
|
-
return {
|
|
129
|
-
username: 'webexturnreachuser',
|
|
130
|
-
credential: 'webexturnreachpwd',
|
|
131
|
-
urls: [(0, _util.convertStunUrlToTurn)(urlString, 'tcp')]
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
var turnTlsIceServers = cluster.xtls.map(function (urlString) {
|
|
135
|
-
return {
|
|
136
|
-
username: 'webexturnreachuser',
|
|
137
|
-
credential: 'webexturnreachpwd',
|
|
138
|
-
urls: [(0, _util.convertStunUrlToTurnTls)(urlString)]
|
|
139
|
-
};
|
|
140
|
-
});
|
|
141
|
-
return {
|
|
142
|
-
iceServers: [].concat((0, _toConsumableArray2.default)(udpIceServers), (0, _toConsumableArray2.default)(tcpIceServers), (0, _toConsumableArray2.default)(turnTlsIceServers)),
|
|
143
|
-
iceCandidatePoolSize: 0,
|
|
144
|
-
iceTransportPolicy: 'all'
|
|
145
|
-
};
|
|
90
|
+
(0, _inherits2.default)(ClusterReachability, _EventsScope);
|
|
91
|
+
return (0, _createClass2.default)(ClusterReachability, [{
|
|
92
|
+
key: "initializeSingleReachabilityPeerConnection",
|
|
93
|
+
value: function initializeSingleReachabilityPeerConnection(clusterInfo) {
|
|
94
|
+
this.reachabilityPeerConnection = new _reachabilityPeerConnection.ReachabilityPeerConnection(this.name, clusterInfo);
|
|
95
|
+
this.setupReachabilityPeerConnectionEventListeners(this.reachabilityPeerConnection);
|
|
146
96
|
}
|
|
147
97
|
|
|
148
98
|
/**
|
|
149
|
-
*
|
|
99
|
+
* Initializes per-URL UDP reachability checks:
|
|
100
|
+
* - One ReachabilityPeerConnection per UDP URL
|
|
101
|
+
* - One ReachabilityPeerConnection for all TCP and TLS URLs together
|
|
150
102
|
* @param {ClusterNode} clusterInfo information about the media cluster
|
|
151
|
-
* @returns {RTCPeerConnection} peerConnection
|
|
152
|
-
*/
|
|
153
|
-
}, {
|
|
154
|
-
key: "createPeerConnection",
|
|
155
|
-
value: function createPeerConnection(clusterInfo) {
|
|
156
|
-
try {
|
|
157
|
-
var config = this.buildPeerConnectionConfig(clusterInfo);
|
|
158
|
-
var peerConnection = new RTCPeerConnection(config);
|
|
159
|
-
return peerConnection;
|
|
160
|
-
} catch (peerConnectionError) {
|
|
161
|
-
_loggerProxy.default.logger.warn("Reachability:index#createPeerConnection --> Error creating peerConnection:", peerConnectionError);
|
|
162
|
-
return undefined;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @returns {ClusterReachabilityResult} reachability result for this cluster
|
|
168
|
-
*/
|
|
169
|
-
}, {
|
|
170
|
-
key: "getResult",
|
|
171
|
-
value: function getResult() {
|
|
172
|
-
return this.result;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Closes the peerConnection
|
|
177
|
-
*
|
|
178
103
|
* @returns {void}
|
|
179
104
|
*/
|
|
180
105
|
}, {
|
|
181
|
-
key: "
|
|
182
|
-
value: function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.pc.onicegatheringstatechange = null;
|
|
186
|
-
this.pc.close();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
106
|
+
key: "initializePerUdpUrlReachabilityCheck",
|
|
107
|
+
value: function initializePerUdpUrlReachabilityCheck(clusterInfo) {
|
|
108
|
+
var _this2 = this;
|
|
109
|
+
_loggerProxy.default.logger.log("ClusterReachability#initializePerUdpUrlReachabilityCheck --> cluster: ".concat(this.name, ", performing per-URL UDP reachability for ").concat(clusterInfo.udp.length, " URLs"));
|
|
189
110
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
+
});
|
|
200
123
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
this.closePeerConnection();
|
|
212
|
-
this.finishReachabilityCheck();
|
|
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);
|
|
213
134
|
}
|
|
214
135
|
}
|
|
215
136
|
|
|
216
137
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @param {
|
|
219
|
-
* @param {
|
|
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
|
|
220
141
|
* @returns {void}
|
|
221
142
|
*/
|
|
222
143
|
}, {
|
|
223
|
-
key: "
|
|
224
|
-
value: function
|
|
225
|
-
var
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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;
|
|
232
156
|
}
|
|
233
|
-
} else {
|
|
234
|
-
result.clientMediaIPs = [publicIP];
|
|
235
|
-
ipAdded = true;
|
|
236
157
|
}
|
|
237
|
-
|
|
158
|
+
_this3.emit({
|
|
238
159
|
file: 'clusterReachability',
|
|
239
|
-
function: '
|
|
240
|
-
}, Events.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Registers a listener for the iceGatheringStateChange event
|
|
249
|
-
*
|
|
250
|
-
* @returns {void}
|
|
251
|
-
*/
|
|
252
|
-
}, {
|
|
253
|
-
key: "registerIceGatheringStateChangeListener",
|
|
254
|
-
value: function registerIceGatheringStateChangeListener() {
|
|
255
|
-
var _this2 = this;
|
|
256
|
-
this.pc.onicegatheringstatechange = function () {
|
|
257
|
-
if (_this2.pc.iceGatheringState === _constants.ICE_GATHERING_STATE.COMPLETE) {
|
|
258
|
-
_this2.closePeerConnection();
|
|
259
|
-
_this2.finishReachabilityCheck();
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Saves the latency in the result for the given protocol and marks it as reachable,
|
|
266
|
-
* emits the "resultReady" event if this is the first result for that protocol,
|
|
267
|
-
* emits the "clientMediaIpsUpdated" event if we already had a result and only found
|
|
268
|
-
* a new client IP
|
|
269
|
-
*
|
|
270
|
-
* @param {string} protocol
|
|
271
|
-
* @param {number} latency
|
|
272
|
-
* @param {string|null} [publicIp]
|
|
273
|
-
* @param {string|null} [serverIp]
|
|
274
|
-
* @returns {void}
|
|
275
|
-
*/
|
|
276
|
-
}, {
|
|
277
|
-
key: "saveResult",
|
|
278
|
-
value: function saveResult(protocol, latency, publicIp, serverIp) {
|
|
279
|
-
var result = this.result[protocol];
|
|
280
|
-
if (result.latencyInMilliseconds === undefined) {
|
|
281
|
-
_loggerProxy.default.logger.log( // @ts-ignore
|
|
282
|
-
"Reachability:index#saveResult --> Successfully reached ".concat(this.name, " over ").concat(protocol, ": ").concat(latency, "ms"));
|
|
283
|
-
result.latencyInMilliseconds = latency;
|
|
284
|
-
result.result = 'reachable';
|
|
285
|
-
if (publicIp) {
|
|
286
|
-
result.clientMediaIPs = [publicIp];
|
|
287
|
-
}
|
|
288
|
-
this.emit({
|
|
160
|
+
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
161
|
+
}, Events.resultReady, data);
|
|
162
|
+
});
|
|
163
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.clientMediaIpsUpdated, function (data) {
|
|
164
|
+
_this3.emit({
|
|
289
165
|
file: 'clusterReachability',
|
|
290
|
-
function: '
|
|
291
|
-
}, Events.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
166
|
+
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
167
|
+
}, Events.clientMediaIpsUpdated, data);
|
|
168
|
+
});
|
|
169
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.natTypeUpdated, function (data) {
|
|
170
|
+
_this3.emit({
|
|
171
|
+
file: 'clusterReachability',
|
|
172
|
+
function: 'setupReachabilityPeerConnectionEventListeners'
|
|
173
|
+
}, Events.natTypeUpdated, data);
|
|
174
|
+
});
|
|
175
|
+
rpc.on(_reachability.ReachabilityPeerConnectionEvents.reachedSubnets, function (data) {
|
|
176
|
+
data.subnets.forEach(function (subnet) {
|
|
177
|
+
_this3.reachedSubnets.add(subnet);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
300
180
|
}
|
|
301
181
|
|
|
302
182
|
/**
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
* @param {RTCIceCandidate} candidate
|
|
306
|
-
* @returns {void}
|
|
183
|
+
* Gets the aggregated reachability result for this cluster.
|
|
184
|
+
* @returns {ClusterReachabilityResult} reachability result for this cluster
|
|
307
185
|
*/
|
|
308
186
|
}, {
|
|
309
|
-
key: "
|
|
310
|
-
value: function
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
(0, _entries.default)(portsFound).forEach(function (_ref) {
|
|
323
|
-
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
324
|
-
ports = _ref2[1];
|
|
325
|
-
if (ports.size > 1) {
|
|
326
|
-
// Found candidates with the same address and relatedPort, but different ports
|
|
327
|
-
_this3.emit({
|
|
328
|
-
file: 'clusterReachability',
|
|
329
|
-
function: 'determineNatType'
|
|
330
|
-
}, Events.natTypeUpdated, {
|
|
331
|
-
natType: _reachability.NatType.SymmetricNat
|
|
332
|
-
});
|
|
187
|
+
key: "getResult",
|
|
188
|
+
value: function getResult() {
|
|
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'
|
|
333
200
|
}
|
|
334
|
-
}
|
|
201
|
+
};
|
|
335
202
|
}
|
|
336
|
-
|
|
203
|
+
var result = {
|
|
204
|
+
udp: {
|
|
205
|
+
result: 'untested'
|
|
206
|
+
},
|
|
207
|
+
tcp: {
|
|
208
|
+
result: 'untested'
|
|
209
|
+
},
|
|
210
|
+
xtls: {
|
|
211
|
+
result: 'untested'
|
|
212
|
+
}
|
|
213
|
+
};
|
|
337
214
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
var TURN_TLS_PORT = 443;
|
|
349
|
-
var CANDIDATE_TYPES = {
|
|
350
|
-
SERVER_REFLEXIVE: 'srflx',
|
|
351
|
-
RELAY: 'relay'
|
|
352
|
-
};
|
|
353
|
-
var latencyInMilliseconds = _this4.getElapsedTime();
|
|
354
|
-
if (e.candidate) {
|
|
355
|
-
if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {
|
|
356
|
-
var serverIp = null;
|
|
357
|
-
if ('url' in e.candidate) {
|
|
358
|
-
var stunServerUrlRegex = /stun:([\d.]+):\d+/;
|
|
359
|
-
var match = e.candidate.url.match(stunServerUrlRegex);
|
|
360
|
-
if (match) {
|
|
361
|
-
// eslint-disable-next-line prefer-destructuring
|
|
362
|
-
serverIp = match[1];
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
_this4.saveResult('udp', latencyInMilliseconds, e.candidate.address, serverIp);
|
|
366
|
-
_this4.determineNatType(e.candidate);
|
|
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;
|
|
367
225
|
}
|
|
368
|
-
if (
|
|
369
|
-
|
|
370
|
-
_this4.saveResult(protocol, latencyInMilliseconds, null, e.candidate.address);
|
|
226
|
+
if (rpcResult.udp.result === 'unreachable' && result.udp.result === 'untested') {
|
|
227
|
+
result.udp = rpcResult.udp;
|
|
371
228
|
}
|
|
372
229
|
}
|
|
373
|
-
|
|
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;
|
|
374
243
|
}
|
|
375
244
|
|
|
376
245
|
/**
|
|
377
|
-
* Starts the process of doing UDP and
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
* @returns {Promise}
|
|
246
|
+
* Starts the process of doing UDP, TCP, and XTLS reachability checks on the media cluster.
|
|
247
|
+
* @returns {Promise<ClusterReachabilityResult>}
|
|
381
248
|
*/
|
|
382
249
|
}, {
|
|
383
250
|
key: "start",
|
|
384
251
|
value: (function () {
|
|
385
|
-
var _start = (0, _asyncToGenerator2.default)(
|
|
386
|
-
var
|
|
387
|
-
return _regenerator.default.wrap(function
|
|
252
|
+
var _start = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
253
|
+
var startPromises;
|
|
254
|
+
return _regenerator.default.wrap(function (_context) {
|
|
388
255
|
while (1) switch (_context.prev = _context.next) {
|
|
389
256
|
case 0:
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
_loggerProxy.default.logger.warn("Reachability:ClusterReachability#start --> Error: peerConnection is undefined");
|
|
395
|
-
return _context.abrupt("return", this.result);
|
|
396
|
-
case 3:
|
|
397
|
-
// Initialize this.result as saying that nothing is reachable.
|
|
398
|
-
// It will get updated as we go along and successfully gather ICE candidates.
|
|
399
|
-
this.result.udp = {
|
|
400
|
-
result: this.numUdpUrls > 0 ? 'unreachable' : 'untested'
|
|
401
|
-
};
|
|
402
|
-
this.result.tcp = {
|
|
403
|
-
result: this.numTcpUrls > 0 ? 'unreachable' : 'untested'
|
|
404
|
-
};
|
|
405
|
-
this.result.xtls = {
|
|
406
|
-
result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested'
|
|
407
|
-
};
|
|
408
|
-
_context.prev = 6;
|
|
409
|
-
_context.next = 9;
|
|
410
|
-
return this.pc.createOffer({
|
|
411
|
-
offerToReceiveAudio: true
|
|
257
|
+
startPromises = [];
|
|
258
|
+
this.reachabilityPeerConnectionsForUdp.forEach(function (rpc) {
|
|
259
|
+
startPromises.push(rpc.start());
|
|
412
260
|
});
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
_context.next = 15;
|
|
422
|
-
return gatherIceCandidatePromise;
|
|
423
|
-
case 15:
|
|
424
|
-
_context.next = 20;
|
|
425
|
-
break;
|
|
426
|
-
case 17:
|
|
427
|
-
_context.prev = 17;
|
|
428
|
-
_context.t0 = _context["catch"](6);
|
|
429
|
-
_loggerProxy.default.logger.warn("Reachability:ClusterReachability#start --> Error: ", _context.t0);
|
|
430
|
-
case 20:
|
|
431
|
-
return _context.abrupt("return", this.result);
|
|
432
|
-
case 21:
|
|
261
|
+
if (this.reachabilityPeerConnection) {
|
|
262
|
+
startPromises.push(this.reachabilityPeerConnection.start());
|
|
263
|
+
}
|
|
264
|
+
_context.next = 1;
|
|
265
|
+
return _promise.default.all(startPromises);
|
|
266
|
+
case 1:
|
|
267
|
+
return _context.abrupt("return", this.getResult());
|
|
268
|
+
case 2:
|
|
433
269
|
case "end":
|
|
434
270
|
return _context.stop();
|
|
435
271
|
}
|
|
436
|
-
}, _callee, this
|
|
272
|
+
}, _callee, this);
|
|
437
273
|
}));
|
|
438
274
|
function start() {
|
|
439
275
|
return _start.apply(this, arguments);
|
|
@@ -441,19 +277,19 @@ var ClusterReachability = exports.ClusterReachability = /*#__PURE__*/function (_
|
|
|
441
277
|
return start;
|
|
442
278
|
}()
|
|
443
279
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached
|
|
280
|
+
* Aborts the cluster reachability checks
|
|
281
|
+
* @returns {void}
|
|
447
282
|
*/
|
|
448
283
|
)
|
|
449
284
|
}, {
|
|
450
|
-
key: "
|
|
451
|
-
value: function
|
|
452
|
-
|
|
453
|
-
this.
|
|
454
|
-
|
|
285
|
+
key: "abort",
|
|
286
|
+
value: function abort() {
|
|
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();
|
|
455
292
|
}
|
|
456
293
|
}]);
|
|
457
|
-
return ClusterReachability;
|
|
458
294
|
}(_eventsScope.default);
|
|
459
295
|
//# sourceMappingURL=clusterReachability.js.map
|