@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.
Files changed (283) hide show
  1. package/dist/annotation/annotation.types.js.map +1 -1
  2. package/dist/annotation/constants.js.map +1 -1
  3. package/dist/annotation/index.js +19 -22
  4. package/dist/annotation/index.js.map +1 -1
  5. package/dist/breakouts/breakout.js +6 -6
  6. package/dist/breakouts/breakout.js.map +1 -1
  7. package/dist/breakouts/collection.js.map +1 -1
  8. package/dist/breakouts/edit-lock-error.js +9 -11
  9. package/dist/breakouts/edit-lock-error.js.map +1 -1
  10. package/dist/breakouts/events.js.map +1 -1
  11. package/dist/breakouts/index.js +126 -127
  12. package/dist/breakouts/index.js.map +1 -1
  13. package/dist/breakouts/request.js +6 -8
  14. package/dist/breakouts/request.js.map +1 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +1 -2
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js.map +1 -1
  20. package/dist/common/errors/captcha-error.js +9 -11
  21. package/dist/common/errors/captcha-error.js.map +1 -1
  22. package/dist/common/errors/intent-to-join.js +10 -12
  23. package/dist/common/errors/intent-to-join.js.map +1 -1
  24. package/dist/common/errors/join-forbidden-error.js +10 -12
  25. package/dist/common/errors/join-forbidden-error.js.map +1 -1
  26. package/dist/common/errors/join-meeting.js +10 -12
  27. package/dist/common/errors/join-meeting.js.map +1 -1
  28. package/dist/common/errors/join-webinar-error.js +9 -11
  29. package/dist/common/errors/join-webinar-error.js.map +1 -1
  30. package/dist/common/errors/media.js +9 -11
  31. package/dist/common/errors/media.js.map +1 -1
  32. package/dist/common/errors/multistream-not-supported-error.js +9 -11
  33. package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
  34. package/dist/common/errors/no-meeting-info.js +9 -11
  35. package/dist/common/errors/no-meeting-info.js.map +1 -1
  36. package/dist/common/errors/parameter.js +11 -14
  37. package/dist/common/errors/parameter.js.map +1 -1
  38. package/dist/common/errors/password-error.js +9 -11
  39. package/dist/common/errors/password-error.js.map +1 -1
  40. package/dist/common/errors/permission.js +9 -11
  41. package/dist/common/errors/permission.js.map +1 -1
  42. package/dist/common/errors/reclaim-host-role-errors.js +32 -38
  43. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  44. package/dist/common/errors/reconnection-not-started.js +5 -6
  45. package/dist/common/errors/reconnection-not-started.js.map +1 -1
  46. package/dist/common/errors/reconnection.js +9 -11
  47. package/dist/common/errors/reconnection.js.map +1 -1
  48. package/dist/common/errors/stats.js +9 -11
  49. package/dist/common/errors/stats.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +38 -27
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/common/errors/webex-meetings-error.js +9 -12
  53. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  54. package/dist/common/events/events-scope.js +9 -10
  55. package/dist/common/events/events-scope.js.map +1 -1
  56. package/dist/common/events/events.js +9 -10
  57. package/dist/common/events/events.js.map +1 -1
  58. package/dist/common/events/trigger-proxy.js.map +1 -1
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.js.map +1 -1
  61. package/dist/common/logs/logger-proxy.js.map +1 -1
  62. package/dist/common/logs/request.js +17 -17
  63. package/dist/common/logs/request.js.map +1 -1
  64. package/dist/common/queue.js +1 -2
  65. package/dist/common/queue.js.map +1 -1
  66. package/dist/config.js +2 -2
  67. package/dist/config.js.map +1 -1
  68. package/dist/constants.js +13 -8
  69. package/dist/constants.js.map +1 -1
  70. package/dist/controls-options-manager/constants.js.map +1 -1
  71. package/dist/controls-options-manager/enums.js.map +1 -1
  72. package/dist/controls-options-manager/index.js +1 -2
  73. package/dist/controls-options-manager/index.js.map +1 -1
  74. package/dist/controls-options-manager/types.js.map +1 -1
  75. package/dist/controls-options-manager/util.js +1 -2
  76. package/dist/controls-options-manager/util.js.map +1 -1
  77. package/dist/hashTree/constants.js +20 -0
  78. package/dist/hashTree/constants.js.map +1 -0
  79. package/dist/hashTree/hashTree.js +515 -0
  80. package/dist/hashTree/hashTree.js.map +1 -0
  81. package/dist/hashTree/hashTreeParser.js +1250 -0
  82. package/dist/hashTree/hashTreeParser.js.map +1 -0
  83. package/dist/hashTree/types.js +23 -0
  84. package/dist/hashTree/types.js.map +1 -0
  85. package/dist/hashTree/utils.js +59 -0
  86. package/dist/hashTree/utils.js.map +1 -0
  87. package/dist/index.js +8 -2
  88. package/dist/index.js.map +1 -1
  89. package/dist/interceptors/index.js.map +1 -1
  90. package/dist/interceptors/locusRetry.js +6 -8
  91. package/dist/interceptors/locusRetry.js.map +1 -1
  92. package/dist/interceptors/locusRouteToken.js +33 -13
  93. package/dist/interceptors/locusRouteToken.js.map +1 -1
  94. package/dist/interpretation/collection.js.map +1 -1
  95. package/dist/interpretation/index.js +1 -2
  96. package/dist/interpretation/index.js.map +1 -1
  97. package/dist/interpretation/siLanguage.js +1 -1
  98. package/dist/interpretation/siLanguage.js.map +1 -1
  99. package/dist/locus-info/controlsUtils.js +5 -3
  100. package/dist/locus-info/controlsUtils.js.map +1 -1
  101. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  102. package/dist/locus-info/fullState.js.map +1 -1
  103. package/dist/locus-info/hostUtils.js.map +1 -1
  104. package/dist/locus-info/index.js +619 -177
  105. package/dist/locus-info/index.js.map +1 -1
  106. package/dist/locus-info/infoUtils.js.map +1 -1
  107. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  108. package/dist/locus-info/parser.js +3 -4
  109. package/dist/locus-info/parser.js.map +1 -1
  110. package/dist/locus-info/selfUtils.js.map +1 -1
  111. package/dist/locus-info/types.js +7 -0
  112. package/dist/locus-info/types.js.map +1 -0
  113. package/dist/media/MediaConnectionAwaiter.js +1 -2
  114. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  115. package/dist/media/index.js +5 -2
  116. package/dist/media/index.js.map +1 -1
  117. package/dist/media/properties.js +15 -17
  118. package/dist/media/properties.js.map +1 -1
  119. package/dist/media/util.js.map +1 -1
  120. package/dist/meeting/brbState.js +8 -9
  121. package/dist/meeting/brbState.js.map +1 -1
  122. package/dist/meeting/connectionStateHandler.js +10 -13
  123. package/dist/meeting/connectionStateHandler.js.map +1 -1
  124. package/dist/meeting/in-meeting-actions.js.map +1 -1
  125. package/dist/meeting/index.js +1632 -1535
  126. package/dist/meeting/index.js.map +1 -1
  127. package/dist/meeting/locusMediaRequest.js +13 -17
  128. package/dist/meeting/locusMediaRequest.js.map +1 -1
  129. package/dist/meeting/muteState.js +11 -12
  130. package/dist/meeting/muteState.js.map +1 -1
  131. package/dist/meeting/request.js +101 -104
  132. package/dist/meeting/request.js.map +1 -1
  133. package/dist/meeting/request.type.js.map +1 -1
  134. package/dist/meeting/state.js.map +1 -1
  135. package/dist/meeting/type.js.map +1 -1
  136. package/dist/meeting/util.js +24 -23
  137. package/dist/meeting/util.js.map +1 -1
  138. package/dist/meeting/voicea-meeting.js +3 -3
  139. package/dist/meeting/voicea-meeting.js.map +1 -1
  140. package/dist/meeting-info/collection.js +7 -10
  141. package/dist/meeting-info/collection.js.map +1 -1
  142. package/dist/meeting-info/index.js +1 -2
  143. package/dist/meeting-info/index.js.map +1 -1
  144. package/dist/meeting-info/meeting-info-v2.js +135 -146
  145. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  146. package/dist/meeting-info/request.js +1 -2
  147. package/dist/meeting-info/request.js.map +1 -1
  148. package/dist/meeting-info/util.js +36 -37
  149. package/dist/meeting-info/util.js.map +1 -1
  150. package/dist/meeting-info/utilv2.js +30 -31
  151. package/dist/meeting-info/utilv2.js.map +1 -1
  152. package/dist/meetings/collection.js +6 -8
  153. package/dist/meetings/collection.js.map +1 -1
  154. package/dist/meetings/index.js +200 -148
  155. package/dist/meetings/index.js.map +1 -1
  156. package/dist/meetings/meetings.types.js.map +1 -1
  157. package/dist/meetings/request.js +6 -8
  158. package/dist/meetings/request.js.map +1 -1
  159. package/dist/meetings/util.js +36 -30
  160. package/dist/meetings/util.js.map +1 -1
  161. package/dist/member/index.js +1 -2
  162. package/dist/member/index.js.map +1 -1
  163. package/dist/member/types.js +6 -3
  164. package/dist/member/types.js.map +1 -1
  165. package/dist/member/util.js.map +1 -1
  166. package/dist/members/collection.js +1 -2
  167. package/dist/members/collection.js.map +1 -1
  168. package/dist/members/index.js +18 -21
  169. package/dist/members/index.js.map +1 -1
  170. package/dist/members/request.js +8 -11
  171. package/dist/members/request.js.map +1 -1
  172. package/dist/members/types.js.map +1 -1
  173. package/dist/members/util.js.map +1 -1
  174. package/dist/metrics/constants.js +4 -1
  175. package/dist/metrics/constants.js.map +1 -1
  176. package/dist/metrics/index.js +3 -4
  177. package/dist/metrics/index.js.map +1 -1
  178. package/dist/multistream/mediaRequestManager.js +1 -2
  179. package/dist/multistream/mediaRequestManager.js.map +1 -1
  180. package/dist/multistream/receiveSlot.js +34 -45
  181. package/dist/multistream/receiveSlot.js.map +1 -1
  182. package/dist/multistream/receiveSlotManager.js +8 -9
  183. package/dist/multistream/receiveSlotManager.js.map +1 -1
  184. package/dist/multistream/remoteMedia.js +12 -15
  185. package/dist/multistream/remoteMedia.js.map +1 -1
  186. package/dist/multistream/remoteMediaGroup.js +1 -2
  187. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  188. package/dist/multistream/remoteMediaManager.js +122 -123
  189. package/dist/multistream/remoteMediaManager.js.map +1 -1
  190. package/dist/multistream/sendSlotManager.js +29 -30
  191. package/dist/multistream/sendSlotManager.js.map +1 -1
  192. package/dist/personal-meeting-room/index.js +16 -19
  193. package/dist/personal-meeting-room/index.js.map +1 -1
  194. package/dist/personal-meeting-room/request.js +7 -10
  195. package/dist/personal-meeting-room/request.js.map +1 -1
  196. package/dist/personal-meeting-room/util.js.map +1 -1
  197. package/dist/reachability/clusterReachability.js +188 -352
  198. package/dist/reachability/clusterReachability.js.map +1 -1
  199. package/dist/reachability/index.js +206 -206
  200. package/dist/reachability/index.js.map +1 -1
  201. package/dist/reachability/reachability.types.js +14 -1
  202. package/dist/reachability/reachability.types.js.map +1 -1
  203. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  204. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  205. package/dist/reachability/request.js.map +1 -1
  206. package/dist/reachability/util.js.map +1 -1
  207. package/dist/reactions/constants.js.map +1 -1
  208. package/dist/reactions/reactions.js.map +1 -1
  209. package/dist/reactions/reactions.type.js.map +1 -1
  210. package/dist/reconnection-manager/index.js +178 -176
  211. package/dist/reconnection-manager/index.js.map +1 -1
  212. package/dist/recording-controller/enums.js.map +1 -1
  213. package/dist/recording-controller/index.js +1 -2
  214. package/dist/recording-controller/index.js.map +1 -1
  215. package/dist/recording-controller/util.js.map +1 -1
  216. package/dist/roap/index.js +12 -15
  217. package/dist/roap/index.js.map +1 -1
  218. package/dist/roap/request.js +24 -26
  219. package/dist/roap/request.js.map +1 -1
  220. package/dist/roap/turnDiscovery.js +75 -76
  221. package/dist/roap/turnDiscovery.js.map +1 -1
  222. package/dist/roap/types.js.map +1 -1
  223. package/dist/transcription/index.js +4 -5
  224. package/dist/transcription/index.js.map +1 -1
  225. package/dist/types/common/errors/webex-errors.d.ts +12 -0
  226. package/dist/types/config.d.ts +1 -0
  227. package/dist/types/constants.d.ts +27 -21
  228. package/dist/types/hashTree/constants.d.ts +8 -0
  229. package/dist/types/hashTree/hashTree.d.ts +129 -0
  230. package/dist/types/hashTree/hashTreeParser.d.ts +250 -0
  231. package/dist/types/hashTree/types.d.ts +33 -0
  232. package/dist/types/hashTree/utils.d.ts +16 -0
  233. package/dist/types/index.d.ts +2 -1
  234. package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
  235. package/dist/types/locus-info/index.d.ts +98 -80
  236. package/dist/types/locus-info/types.d.ts +54 -0
  237. package/dist/types/meeting/index.d.ts +35 -9
  238. package/dist/types/meetings/index.d.ts +9 -2
  239. package/dist/types/metrics/constants.d.ts +3 -0
  240. package/dist/types/reachability/clusterReachability.d.ts +33 -84
  241. package/dist/types/reachability/reachability.types.d.ts +12 -1
  242. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  243. package/dist/webinar/collection.js +1 -2
  244. package/dist/webinar/collection.js.map +1 -1
  245. package/dist/webinar/index.js +148 -158
  246. package/dist/webinar/index.js.map +1 -1
  247. package/package.json +24 -23
  248. package/src/common/errors/webex-errors.ts +19 -0
  249. package/src/config.ts +1 -0
  250. package/src/constants.ts +15 -2
  251. package/src/hashTree/constants.ts +9 -0
  252. package/src/hashTree/hashTree.ts +463 -0
  253. package/src/hashTree/hashTreeParser.ts +1143 -0
  254. package/src/hashTree/types.ts +39 -0
  255. package/src/hashTree/utils.ts +53 -0
  256. package/src/index.ts +2 -0
  257. package/src/interceptors/locusRouteToken.ts +22 -5
  258. package/src/locus-info/controlsUtils.ts +6 -0
  259. package/src/locus-info/index.ts +641 -164
  260. package/src/locus-info/types.ts +53 -0
  261. package/src/media/index.ts +6 -0
  262. package/src/meeting/index.ts +137 -28
  263. package/src/meeting/util.ts +1 -0
  264. package/src/meetings/index.ts +119 -59
  265. package/src/meetings/util.ts +10 -9
  266. package/src/metrics/constants.ts +3 -0
  267. package/src/reachability/clusterReachability.ts +159 -330
  268. package/src/reachability/index.ts +6 -1
  269. package/src/reachability/reachability.types.ts +15 -1
  270. package/src/reachability/reachabilityPeerConnection.ts +418 -0
  271. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  272. package/test/unit/spec/hashTree/hashTreeParser.ts +1524 -0
  273. package/test/unit/spec/hashTree/utils.ts +140 -0
  274. package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
  275. package/test/unit/spec/locus-info/controlsUtils.js +27 -1
  276. package/test/unit/spec/locus-info/index.js +879 -16
  277. package/test/unit/spec/media/index.ts +140 -9
  278. package/test/unit/spec/meeting/index.js +299 -94
  279. package/test/unit/spec/meeting/utils.js +78 -1
  280. package/test/unit/spec/meetings/index.js +263 -29
  281. package/test/unit/spec/meetings/utils.js +51 -1
  282. package/test/unit/spec/reachability/clusterReachability.ts +404 -137
  283. 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 _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
5
- var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
6
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
7
- var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
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 _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
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 _constants = require("../constants");
25
+ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
33
26
  var _reachability = require("./reachability.types");
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; }
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; }
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); }; }
37
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
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
- * It emits events from Events enum
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 = _super.call(this);
65
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "numUdpUrls", void 0);
66
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "numTcpUrls", void 0);
67
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "numXTlsUrls", void 0);
68
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "result", void 0);
69
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "pc", void 0);
70
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "defer", void 0);
71
- // this defer is resolved once reachability checks for this cluster are completed
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.numUdpUrls = clusterInfo.udp.length;
80
- _this.numTcpUrls = clusterInfo.tcp.length;
81
- _this.numXTlsUrls = clusterInfo.xtls.length;
82
- _this.pc = _this.createPeerConnection(clusterInfo);
83
- _this.defer = new _common.Defer();
84
- _this.result = {
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
- * Gets total elapsed time, can be called only after start() is called
100
- * @returns {Number} Milliseconds
86
+ * Initializes a single ReachabilityPeerConnection for all protocols
87
+ * @param {ClusterNode} clusterInfo information about the media cluster
88
+ * @returns {void}
101
89
  */
102
- (0, _createClass2.default)(ClusterReachability, [{
103
- key: "getElapsedTime",
104
- value: function getElapsedTime() {
105
- return Math.round(performance.now() - this.startTimestamp);
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
- * Creates an RTCPeerConnection
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: "closePeerConnection",
182
- value: function closePeerConnection() {
183
- if (this.pc) {
184
- this.pc.onicecandidate = null;
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
- * Resolves the defer, indicating that reachability checks for this cluster are completed
192
- *
193
- * @returns {void}
194
- */
195
- }, {
196
- key: "finishReachabilityCheck",
197
- value: function finishReachabilityCheck() {
198
- this.defer.resolve();
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
- * Aborts the cluster reachability checks by closing the peer connection
203
- *
204
- * @returns {void}
205
- */
206
- }, {
207
- key: "abort",
208
- value: function abort() {
209
- var CLOSED = _constants.CONNECTION_STATE.CLOSED;
210
- if (this.pc.connectionState !== CLOSED) {
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
- * Adds public IP (client media IPs)
218
- * @param {string} protocol
219
- * @param {string} publicIP
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: "addPublicIP",
224
- value: function addPublicIP(protocol, publicIP) {
225
- var result = this.result[protocol];
226
- if (publicIP) {
227
- var ipAdded = false;
228
- if (result.clientMediaIPs) {
229
- if (!result.clientMediaIPs.includes(publicIP)) {
230
- result.clientMediaIPs.push(publicIP);
231
- ipAdded = true;
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
- if (ipAdded) this.emit({
158
+ _this3.emit({
238
159
  file: 'clusterReachability',
239
- function: 'addPublicIP'
240
- }, Events.clientMediaIpsUpdated, {
241
- protocol: protocol,
242
- clientMediaIPs: result.clientMediaIPs
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: 'saveResult'
291
- }, Events.resultReady, _objectSpread({
292
- protocol: protocol
293
- }, result));
294
- } else {
295
- this.addPublicIP(protocol, publicIp);
296
- }
297
- if (serverIp) {
298
- this.reachedSubnets.add(serverIp);
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
- * Determines NAT Type.
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: "determineNatType",
310
- value: function determineNatType(candidate) {
311
- var _this3 = this;
312
- this.srflxIceCandidates.push(candidate);
313
- if (this.srflxIceCandidates.length > 1) {
314
- var portsFound = {};
315
- this.srflxIceCandidates.forEach(function (c) {
316
- var key = "".concat(c.address, ":").concat(c.relatedPort);
317
- if (!portsFound[key]) {
318
- portsFound[key] = new _set.default();
319
- }
320
- portsFound[key].add(c.port);
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
- * Registers a listener for the icecandidate event
340
- *
341
- * @returns {void}
342
- */
343
- }, {
344
- key: "registerIceCandidateListener",
345
- value: function registerIceCandidateListener() {
346
- var _this4 = this;
347
- this.pc.onicecandidate = function (e) {
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 (e.candidate.type === CANDIDATE_TYPES.RELAY) {
369
- var protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';
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 TCP reachability checks on the media cluster.
378
- * XTLS reachability checking is not supported.
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)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
386
- var offer, gatherIceCandidatePromise;
387
- return _regenerator.default.wrap(function _callee$(_context) {
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
- if (this.pc) {
391
- _context.next = 3;
392
- break;
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
- case 9:
414
- offer = _context.sent;
415
- this.startTimestamp = performance.now();
416
-
417
- // Set up the state change listeners before triggering the ICE gathering
418
- gatherIceCandidatePromise = this.gatherIceCandidates(); // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer
419
- // we just need to make this call to trigger the ICE gathering process
420
- this.pc.setLocalDescription(offer);
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, [[6, 17]]);
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
- * Starts the process of gathering ICE candidates
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: "gatherIceCandidates",
451
- value: function gatherIceCandidates() {
452
- this.registerIceGatheringStateChangeListener();
453
- this.registerIceCandidateListener();
454
- return this.defer.promise;
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