@webex/plugin-meetings 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +197 -0
  3. package/dist/aiEnableRequest/index.js.map +1 -0
  4. package/dist/aiEnableRequest/utils.js +36 -0
  5. package/dist/aiEnableRequest/utils.js.map +1 -0
  6. package/dist/annotation/index.js +14 -5
  7. package/dist/annotation/index.js.map +1 -1
  8. package/dist/breakouts/breakout.js +8 -3
  9. package/dist/breakouts/breakout.js.map +1 -1
  10. package/dist/breakouts/index.js +26 -2
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +9 -3
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +59 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/constants.js +11 -1
  19. package/dist/controls-options-manager/constants.js.map +1 -1
  20. package/dist/controls-options-manager/index.js +67 -29
  21. package/dist/controls-options-manager/index.js.map +1 -1
  22. package/dist/controls-options-manager/util.js +91 -0
  23. package/dist/controls-options-manager/util.js.map +1 -1
  24. package/dist/hashTree/constants.js +34 -0
  25. package/dist/hashTree/constants.js.map +1 -0
  26. package/dist/hashTree/hashTree.js +533 -0
  27. package/dist/hashTree/hashTree.js.map +1 -0
  28. package/dist/hashTree/hashTreeParser.js +2068 -36
  29. package/dist/hashTree/hashTreeParser.js.map +1 -1
  30. package/dist/hashTree/types.js +13 -3
  31. package/dist/hashTree/types.js.map +1 -1
  32. package/dist/hashTree/utils.js +111 -0
  33. package/dist/hashTree/utils.js.map +1 -0
  34. package/dist/index.js +18 -2
  35. package/dist/index.js.map +1 -1
  36. package/dist/interceptors/constant.js +12 -0
  37. package/dist/interceptors/constant.js.map +1 -0
  38. package/dist/interceptors/dataChannelAuthToken.js +350 -0
  39. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  40. package/dist/interceptors/index.js +7 -0
  41. package/dist/interceptors/index.js.map +1 -1
  42. package/dist/interceptors/locusRetry.js +23 -8
  43. package/dist/interceptors/locusRetry.js.map +1 -1
  44. package/dist/interceptors/locusRouteToken.js +27 -5
  45. package/dist/interceptors/locusRouteToken.js.map +1 -1
  46. package/dist/interceptors/utils.js +27 -0
  47. package/dist/interceptors/utils.js.map +1 -0
  48. package/dist/interpretation/index.js +11 -2
  49. package/dist/interpretation/index.js.map +1 -1
  50. package/dist/interpretation/interpretation.types.js +7 -0
  51. package/dist/interpretation/interpretation.types.js.map +1 -0
  52. package/dist/interpretation/siLanguage.js +1 -1
  53. package/dist/locus-info/controlsUtils.js +11 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +896 -277
  56. package/dist/locus-info/index.js.map +1 -1
  57. package/dist/locus-info/infoUtils.js +36 -5
  58. package/dist/locus-info/infoUtils.js.map +1 -1
  59. package/dist/locus-info/selfUtils.js +1 -0
  60. package/dist/locus-info/selfUtils.js.map +1 -1
  61. package/dist/locus-info/types.js +19 -0
  62. package/dist/locus-info/types.js.map +1 -1
  63. package/dist/media/MediaConnectionAwaiter.js +72 -3
  64. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  65. package/dist/media/index.js +8 -2
  66. package/dist/media/index.js.map +1 -1
  67. package/dist/media/properties.js +5 -2
  68. package/dist/media/properties.js.map +1 -1
  69. package/dist/meeting/in-meeting-actions.js +11 -1
  70. package/dist/meeting/in-meeting-actions.js.map +1 -1
  71. package/dist/meeting/index.js +2075 -1096
  72. package/dist/meeting/index.js.map +1 -1
  73. package/dist/meeting/locusMediaRequest.js +229 -82
  74. package/dist/meeting/locusMediaRequest.js.map +1 -1
  75. package/dist/meeting/muteState.js +10 -1
  76. package/dist/meeting/muteState.js.map +1 -1
  77. package/dist/meeting/request.js +55 -2
  78. package/dist/meeting/request.js.map +1 -1
  79. package/dist/meeting/request.type.js.map +1 -1
  80. package/dist/meeting/util.js +168 -5
  81. package/dist/meeting/util.js.map +1 -1
  82. package/dist/meeting-info/meeting-info-v2.js +2 -2
  83. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  84. package/dist/meetings/index.js +369 -173
  85. package/dist/meetings/index.js.map +1 -1
  86. package/dist/meetings/meetings.types.js +6 -1
  87. package/dist/meetings/meetings.types.js.map +1 -1
  88. package/dist/meetings/request.js +39 -0
  89. package/dist/meetings/request.js.map +1 -1
  90. package/dist/meetings/util.js +127 -25
  91. package/dist/meetings/util.js.map +1 -1
  92. package/dist/member/index.js +20 -0
  93. package/dist/member/index.js.map +1 -1
  94. package/dist/member/types.js.map +1 -1
  95. package/dist/member/util.js +40 -0
  96. package/dist/member/util.js.map +1 -1
  97. package/dist/members/index.js +101 -43
  98. package/dist/members/index.js.map +1 -1
  99. package/dist/members/util.js +8 -1
  100. package/dist/members/util.js.map +1 -1
  101. package/dist/metrics/constants.js +11 -1
  102. package/dist/metrics/constants.js.map +1 -1
  103. package/dist/multistream/codec/constants.js +63 -0
  104. package/dist/multistream/codec/constants.js.map +1 -0
  105. package/dist/multistream/mediaRequestManager.js +64 -68
  106. package/dist/multistream/mediaRequestManager.js.map +1 -1
  107. package/dist/multistream/receiveSlot.js +9 -0
  108. package/dist/multistream/receiveSlot.js.map +1 -1
  109. package/dist/multistream/remoteMediaManager.js +11 -0
  110. package/dist/multistream/remoteMediaManager.js.map +1 -1
  111. package/dist/multistream/sendSlotManager.js +116 -2
  112. package/dist/multistream/sendSlotManager.js.map +1 -1
  113. package/dist/reachability/clusterReachability.js +171 -18
  114. package/dist/reachability/clusterReachability.js.map +1 -1
  115. package/dist/reachability/index.js +142 -94
  116. package/dist/reachability/index.js.map +1 -1
  117. package/dist/reachability/reachability.types.js +2 -0
  118. package/dist/reachability/reachability.types.js.map +1 -1
  119. package/dist/reachability/reachabilityPeerConnection.js +1 -1
  120. package/dist/reachability/reachabilityPeerConnection.js.map +1 -1
  121. package/dist/reachability/util.js +45 -0
  122. package/dist/reachability/util.js.map +1 -1
  123. package/dist/reactions/reactions.type.js.map +1 -1
  124. package/dist/reconnection-manager/index.js +0 -1
  125. package/dist/reconnection-manager/index.js.map +1 -1
  126. package/dist/recording-controller/index.js +1 -3
  127. package/dist/recording-controller/index.js.map +1 -1
  128. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  129. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  130. package/dist/types/common/browser-detection.d.ts +1 -0
  131. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  132. package/dist/types/common/events/events-scope.d.ts +1 -0
  133. package/dist/types/common/events/events.d.ts +1 -0
  134. package/dist/types/config.d.ts +7 -2
  135. package/dist/types/constants.d.ts +35 -1
  136. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  137. package/dist/types/controls-options-manager/index.d.ts +16 -0
  138. package/dist/types/hashTree/constants.d.ts +11 -0
  139. package/dist/types/hashTree/hashTree.d.ts +136 -0
  140. package/dist/types/hashTree/hashTreeParser.d.ts +392 -14
  141. package/dist/types/hashTree/types.d.ts +20 -0
  142. package/dist/types/hashTree/utils.d.ts +40 -0
  143. package/dist/types/index.d.ts +4 -0
  144. package/dist/types/interceptors/constant.d.ts +5 -0
  145. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  146. package/dist/types/interceptors/index.d.ts +2 -1
  147. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  148. package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
  149. package/dist/types/interceptors/utils.d.ts +1 -0
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +116 -51
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +48 -12
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  155. package/dist/types/media/properties.d.ts +3 -1
  156. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  157. package/dist/types/meeting/index.d.ts +196 -15
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +17 -1
  160. package/dist/types/meeting/request.type.d.ts +5 -0
  161. package/dist/types/meeting/util.d.ts +40 -0
  162. package/dist/types/meeting-info/util.d.ts +1 -0
  163. package/dist/types/meeting-info/utilv2.d.ts +1 -0
  164. package/dist/types/meetings/index.d.ts +34 -20
  165. package/dist/types/meetings/meetings.types.d.ts +15 -0
  166. package/dist/types/meetings/request.d.ts +14 -0
  167. package/dist/types/member/index.d.ts +2 -0
  168. package/dist/types/member/types.d.ts +5 -4
  169. package/dist/types/member/util.d.ts +14 -0
  170. package/dist/types/members/index.d.ts +15 -2
  171. package/dist/types/members/util.d.ts +1 -5
  172. package/dist/types/metrics/constants.d.ts +10 -0
  173. package/dist/types/multistream/codec/constants.d.ts +7 -0
  174. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  175. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  176. package/dist/types/reachability/clusterReachability.d.ts +33 -6
  177. package/dist/types/reachability/index.d.ts +10 -3
  178. package/dist/types/reachability/reachability.types.d.ts +7 -0
  179. package/dist/types/reachability/util.d.ts +17 -0
  180. package/dist/types/reactions/reactions.type.d.ts +4 -0
  181. package/dist/types/recording-controller/util.d.ts +5 -5
  182. package/dist/types/roap/index.d.ts +1 -1
  183. package/dist/types/webinar/utils.d.ts +6 -0
  184. package/dist/webinar/index.js +585 -164
  185. package/dist/webinar/index.js.map +1 -1
  186. package/dist/webinar/utils.js +25 -0
  187. package/dist/webinar/utils.js.map +1 -0
  188. package/package.json +26 -24
  189. package/src/aiEnableRequest/README.md +84 -0
  190. package/src/aiEnableRequest/index.ts +186 -0
  191. package/src/aiEnableRequest/utils.ts +25 -0
  192. package/src/annotation/index.ts +27 -7
  193. package/src/breakouts/breakout.ts +3 -1
  194. package/src/breakouts/index.ts +31 -0
  195. package/src/common/errors/webex-errors.ts +50 -3
  196. package/src/config.ts +7 -2
  197. package/src/constants.ts +49 -3
  198. package/src/controls-options-manager/constants.ts +14 -1
  199. package/src/controls-options-manager/index.ts +87 -28
  200. package/src/controls-options-manager/util.ts +81 -1
  201. package/src/hashTree/constants.ts +26 -0
  202. package/src/hashTree/hashTree.ts +480 -0
  203. package/src/hashTree/hashTreeParser.ts +1911 -29
  204. package/src/hashTree/types.ts +24 -1
  205. package/src/hashTree/utils.ts +98 -0
  206. package/src/index.ts +14 -1
  207. package/src/interceptors/constant.ts +6 -0
  208. package/src/interceptors/dataChannelAuthToken.ts +246 -0
  209. package/src/interceptors/index.ts +2 -1
  210. package/src/interceptors/locusRetry.ts +25 -4
  211. package/src/interceptors/locusRouteToken.ts +22 -5
  212. package/src/interceptors/utils.ts +16 -0
  213. package/src/interpretation/index.ts +29 -11
  214. package/src/interpretation/interpretation.types.ts +11 -0
  215. package/src/locus-info/controlsUtils.ts +20 -1
  216. package/src/locus-info/index.ts +958 -250
  217. package/src/locus-info/infoUtils.ts +41 -6
  218. package/src/locus-info/selfUtils.ts +1 -0
  219. package/src/locus-info/types.ts +51 -12
  220. package/src/media/MediaConnectionAwaiter.ts +62 -5
  221. package/src/media/index.ts +10 -1
  222. package/src/media/properties.ts +4 -1
  223. package/src/meeting/in-meeting-actions.ts +20 -0
  224. package/src/meeting/index.ts +1025 -146
  225. package/src/meeting/locusMediaRequest.ts +106 -6
  226. package/src/meeting/muteState.ts +10 -1
  227. package/src/meeting/request.ts +53 -0
  228. package/src/meeting/request.type.ts +6 -0
  229. package/src/meeting/util.ts +207 -7
  230. package/src/meeting-info/meeting-info-v2.ts +4 -2
  231. package/src/meetings/index.ts +307 -132
  232. package/src/meetings/meetings.types.ts +19 -0
  233. package/src/meetings/request.ts +43 -0
  234. package/src/meetings/util.ts +127 -13
  235. package/src/member/index.ts +20 -0
  236. package/src/member/types.ts +1 -0
  237. package/src/member/util.ts +41 -0
  238. package/src/members/index.ts +70 -7
  239. package/src/members/util.ts +12 -4
  240. package/src/metrics/constants.ts +11 -0
  241. package/src/multistream/codec/constants.ts +58 -0
  242. package/src/multistream/mediaRequestManager.ts +117 -76
  243. package/src/multistream/receiveSlot.ts +18 -0
  244. package/src/multistream/remoteMediaManager.ts +13 -0
  245. package/src/multistream/sendSlotManager.ts +97 -3
  246. package/src/reachability/clusterReachability.ts +156 -29
  247. package/src/reachability/index.ts +62 -17
  248. package/src/reachability/reachability.types.ts +11 -0
  249. package/src/reachability/reachabilityPeerConnection.ts +3 -1
  250. package/src/reachability/util.ts +36 -0
  251. package/src/reactions/reactions.type.ts +4 -0
  252. package/src/reconnection-manager/index.ts +0 -1
  253. package/src/recording-controller/index.ts +1 -2
  254. package/src/webinar/index.ts +448 -11
  255. package/src/webinar/utils.ts +16 -0
  256. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  257. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  258. package/test/unit/spec/annotation/index.ts +69 -7
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/index.ts +49 -0
  261. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  262. package/test/unit/spec/controls-options-manager/index.js +244 -29
  263. package/test/unit/spec/controls-options-manager/util.js +165 -0
  264. package/test/unit/spec/hashTree/hashTree.ts +721 -0
  265. package/test/unit/spec/hashTree/hashTreeParser.ts +5328 -0
  266. package/test/unit/spec/hashTree/utils.ts +264 -0
  267. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +406 -0
  268. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  269. package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
  270. package/test/unit/spec/interceptors/utils.ts +75 -0
  271. package/test/unit/spec/interpretation/index.ts +26 -4
  272. package/test/unit/spec/locus-info/controlsUtils.js +222 -52
  273. package/test/unit/spec/locus-info/index.js +2000 -171
  274. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  275. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  276. package/test/unit/spec/media/index.ts +92 -0
  277. package/test/unit/spec/media/properties.ts +12 -3
  278. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  279. package/test/unit/spec/meeting/index.js +2925 -209
  280. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  281. package/test/unit/spec/meeting/muteState.js +81 -0
  282. package/test/unit/spec/meeting/request.js +82 -0
  283. package/test/unit/spec/meeting/utils.js +595 -27
  284. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  285. package/test/unit/spec/meetings/index.js +1214 -75
  286. package/test/unit/spec/meetings/request.js +141 -0
  287. package/test/unit/spec/meetings/utils.js +453 -52
  288. package/test/unit/spec/member/index.js +35 -4
  289. package/test/unit/spec/member/util.js +154 -27
  290. package/test/unit/spec/members/index.js +216 -0
  291. package/test/unit/spec/members/request.js +37 -1
  292. package/test/unit/spec/members/utils.js +63 -0
  293. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  294. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  295. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  296. package/test/unit/spec/reachability/clusterReachability.ts +125 -1
  297. package/test/unit/spec/reachability/index.ts +154 -49
  298. package/test/unit/spec/reachability/util.ts +31 -0
  299. package/test/unit/spec/reconnection-manager/index.js +4 -8
  300. package/test/unit/spec/recording-controller/index.js +9 -8
  301. package/test/unit/spec/webinar/index.ts +837 -39
  302. package/test/unit/spec/webinar/utils.ts +39 -0
@@ -30,12 +30,14 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/
30
30
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
31
31
  var _lodash = require("lodash");
32
32
  var _common = require("@webex/common");
33
+ var _webCapabilities = require("@webex/web-capabilities");
33
34
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
34
35
  var _util = _interopRequireDefault(require("../meeting/util"));
35
36
  var _constants = require("../constants");
36
37
  var _request = _interopRequireDefault(require("./request"));
37
38
  var _reachability = require("./reachability.types");
38
39
  var _clusterReachability = require("./clusterReachability");
40
+ var _util2 = require("./util");
39
41
  var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
40
42
  var _constants2 = _interopRequireDefault(require("../metrics/constants"));
41
43
  var _metrics = _interopRequireDefault(require("../metrics"));
@@ -226,41 +228,48 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
226
228
  return _regenerator.default.wrap(function (_context2) {
227
229
  while (1) switch (_context2.prev = _context2.next) {
228
230
  case 0:
229
- if (this.webex.config.meetings.enableReachabilityChecks) {
231
+ if ((0, _util2.isReachabilityEnabled)(this.webex.config.meetings.enableReachabilityChecks)) {
230
232
  _context2.next = 1;
231
233
  break;
232
234
  }
233
235
  throw new Error('enableReachabilityChecks is disabled in config');
234
236
  case 1:
235
- _context2.prev = 1;
237
+ if (!(_webCapabilities.WebCapabilities.supportsRTCPeerConnection() !== _webCapabilities.CapabilityState.CAPABLE)) {
238
+ _context2.next = 2;
239
+ break;
240
+ }
241
+ _loggerProxy.default.logger.warn('Reachability:index#gatherReachability --> WebRTC API is not available, skipping reachability checks');
242
+ return _context2.abrupt("return", {});
243
+ case 2:
244
+ _context2.prev = 2;
236
245
  this.lastTrigger = trigger;
237
246
 
238
247
  // kick off ip version detection. We don't await it, as we don't want to waste time
239
248
  // and if it fails, that's ok we can still carry on
240
249
  // @ts-ignore
241
250
  this.webex.internal.device.ipNetworkDetector.detect(true);
242
- _context2.next = 2;
251
+ _context2.next = 3;
243
252
  return this.getClusters('startup');
244
- case 2:
253
+ case 3:
245
254
  _yield$this$getCluste = _context2.sent;
246
255
  clusters = _yield$this$getCluste.clusters;
247
256
  this.reachabilityDefer = new _common.Defer();
248
257
 
249
258
  // Perform Reachability Check
250
- _context2.next = 3;
259
+ _context2.next = 4;
251
260
  return this.performReachabilityChecks(clusters);
252
- case 3:
253
- return _context2.abrupt("return", this.reachabilityDefer.promise);
254
261
  case 4:
255
- _context2.prev = 4;
256
- _t2 = _context2["catch"](1);
262
+ return _context2.abrupt("return", this.reachabilityDefer.promise);
263
+ case 5:
264
+ _context2.prev = 5;
265
+ _t2 = _context2["catch"](2);
257
266
  _loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error:", _t2);
258
267
  return _context2.abrupt("return", {});
259
- case 5:
268
+ case 6:
260
269
  case "end":
261
270
  return _context2.stop();
262
271
  }
263
- }, _callee2, this, [[1, 4]]);
272
+ }, _callee2, this, [[2, 5]]);
264
273
  }));
265
274
  function gatherReachability(_x3) {
266
275
  return _gatherReachability.apply(this, arguments);
@@ -644,7 +653,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
644
653
  * Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none
645
654
  * of the media clusters where reachable with any of the protocols. This is done
646
655
  * irrespective of the config, so for example:
647
- * if config.meetings.experimental.enableTlsReachability === false,
656
+ * if config.meetings.enableReachabilityChecks disables TLS,
648
657
  * it will return false, because TLS reachability won't be tested,
649
658
  * so we can't say for sure that media backend is unreachable over TLS.
650
659
  *
@@ -713,6 +722,47 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
713
722
  }
714
723
  return isWebexMediaBackendUnreachable;
715
724
  }()
725
+ /**
726
+ * Checks if any cluster is reachable via the given protocol based on stored reachability results.
727
+ *
728
+ * @param {string} protocol - the protocol to check ('udp', 'tcp', or 'xtls')
729
+ * @returns {Promise<boolean>} true if at least one cluster has a 'reachable' result for the given protocol
730
+ */
731
+ )
732
+ }, {
733
+ key: "isAnyClusterReachableViaProtocol",
734
+ value: (function () {
735
+ var _isAnyClusterReachableViaProtocol = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0(protocol) {
736
+ var resultsJson, results, _t6;
737
+ return _regenerator.default.wrap(function (_context0) {
738
+ while (1) switch (_context0.prev = _context0.next) {
739
+ case 0:
740
+ _context0.prev = 0;
741
+ _context0.next = 1;
742
+ return this.webex.boundedStorage.get(this.namespace, _constants.REACHABILITY.localStorageResult);
743
+ case 1:
744
+ resultsJson = _context0.sent;
745
+ results = JSON.parse(resultsJson);
746
+ return _context0.abrupt("return", (0, _values.default)(results).some(function (result) {
747
+ var _result$protocol3;
748
+ return ((_result$protocol3 = result[protocol]) === null || _result$protocol3 === void 0 ? void 0 : _result$protocol3.result) === 'reachable';
749
+ }));
750
+ case 2:
751
+ _context0.prev = 2;
752
+ _t6 = _context0["catch"](0);
753
+ _loggerProxy.default.logger.warn("Reachability:index#isAnyClusterReachableViaProtocol --> Error reading reachability data: ".concat(_t6));
754
+ return _context0.abrupt("return", false);
755
+ case 3:
756
+ case "end":
757
+ return _context0.stop();
758
+ }
759
+ }, _callee0, this, [[0, 2]]);
760
+ }));
761
+ function isAnyClusterReachableViaProtocol(_x4) {
762
+ return _isAnyClusterReachableViaProtocol.apply(this, arguments);
763
+ }
764
+ return isAnyClusterReachableViaProtocol;
765
+ }()
716
766
  /**
717
767
  * Get list of all unreachable clusters
718
768
  * @returns {array} Unreachable clusters
@@ -892,15 +942,15 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
892
942
  }, {
893
943
  key: "sendMetric",
894
944
  value: (function () {
895
- var _sendMetric = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee0() {
945
+ var _sendMetric = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1() {
896
946
  var aborted,
897
947
  results,
898
948
  stats,
899
- _args0 = arguments;
900
- return _regenerator.default.wrap(function (_context0) {
901
- while (1) switch (_context0.prev = _context0.next) {
949
+ _args1 = arguments;
950
+ return _regenerator.default.wrap(function (_context1) {
951
+ while (1) switch (_context1.prev = _context1.next) {
902
952
  case 0:
903
- aborted = _args0.length > 0 && _args0[0] !== undefined ? _args0[0] : false;
953
+ aborted = _args1.length > 0 && _args1[0] !== undefined ? _args1[0] : false;
904
954
  results = [];
905
955
  (0, _values.default)(this.clusterReachability).forEach(function (clusterReachability) {
906
956
  results.push(_objectSpread(_objectSpread({}, clusterReachability.getResult()), {}, {
@@ -932,9 +982,9 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
932
982
  _metrics.default.sendBehavioralMetric(_constants2.default.REACHABILITY_COMPLETED, _metrics.default.prepareMetricFields(stats));
933
983
  case 1:
934
984
  case "end":
935
- return _context0.stop();
985
+ return _context1.stop();
936
986
  }
937
- }, _callee0, this);
987
+ }, _callee1, this);
938
988
  }));
939
989
  function sendMetric() {
940
990
  return _sendMetric.apply(this, arguments);
@@ -990,19 +1040,19 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
990
1040
  }, {
991
1041
  key: "storeResults",
992
1042
  value: (function () {
993
- var _storeResults = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee1(results) {
994
- return _regenerator.default.wrap(function (_context1) {
995
- while (1) switch (_context1.prev = _context1.next) {
1043
+ var _storeResults = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(results) {
1044
+ return _regenerator.default.wrap(function (_context10) {
1045
+ while (1) switch (_context10.prev = _context10.next) {
996
1046
  case 0:
997
- _context1.next = 1;
1047
+ _context10.next = 1;
998
1048
  return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageResult, (0, _stringify.default)(results));
999
1049
  case 1:
1000
1050
  case "end":
1001
- return _context1.stop();
1051
+ return _context10.stop();
1002
1052
  }
1003
- }, _callee1, this);
1053
+ }, _callee10, this);
1004
1054
  }));
1005
- function storeResults(_x4) {
1055
+ function storeResults(_x5) {
1006
1056
  return _storeResults.apply(this, arguments);
1007
1057
  }
1008
1058
  return storeResults;
@@ -1063,20 +1113,20 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1063
1113
  }, {
1064
1114
  key: "performReachabilityChecks",
1065
1115
  value: (function () {
1066
- var _performReachabilityChecks = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(clusterList) {
1116
+ var _performReachabilityChecks = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(clusterList) {
1067
1117
  var _this4 = this;
1068
- var results, isFirstResult;
1069
- return _regenerator.default.wrap(function (_context13) {
1070
- while (1) switch (_context13.prev = _context13.next) {
1118
+ var results, protocols, enabledProtocols, isFirstResult;
1119
+ return _regenerator.default.wrap(function (_context14) {
1120
+ while (1) switch (_context14.prev = _context14.next) {
1071
1121
  case 0:
1072
1122
  results = {};
1073
1123
  this.clusterReachability = {};
1074
1124
  this.startTime = performance.now();
1075
- _loggerProxy.default.logger.log("Reachability:index#performReachabilityChecks --> doing UDP".concat(
1076
- // @ts-ignore
1077
- this.webex.config.meetings.experimental.enableTcpReachability ? ',TCP' : '').concat(
1125
+ protocols = (0, _util2.resolveReachabilityProtocols)(
1078
1126
  // @ts-ignore
1079
- this.webex.config.meetings.experimental.enableTlsReachability ? ',TLS' : '', " reachability checks"));
1127
+ this.webex.config.meetings.enableReachabilityChecks);
1128
+ enabledProtocols = [protocols.udp && 'UDP', protocols.tcp && 'TCP', protocols.tls && 'TLS'].filter(Boolean);
1129
+ _loggerProxy.default.logger.log("Reachability:index#performReachabilityChecks --> doing ".concat(enabledProtocols.join(','), " reachability checks"));
1080
1130
  this.resetResultCounters();
1081
1131
 
1082
1132
  // sanitize the urls in the clusterList
@@ -1084,17 +1134,13 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1084
1134
  var cluster = clusterList[key];
1085
1135
 
1086
1136
  // Linus doesn't support TCP reachability checks on video mesh nodes
1087
- var includeTcpReachability =
1088
- // @ts-ignore
1089
- _this4.webex.config.meetings.experimental.enableTcpReachability && !cluster.isVideoMesh;
1137
+ var includeTcpReachability = protocols.tcp && !cluster.isVideoMesh;
1090
1138
  if (!includeTcpReachability) {
1091
1139
  cluster.tcp = [];
1092
1140
  }
1093
1141
 
1094
1142
  // Linus doesn't support xTLS reachability checks on video mesh nodes
1095
- var includeTlsReachability =
1096
- // @ts-ignore
1097
- _this4.webex.config.meetings.experimental.enableTlsReachability && !cluster.isVideoMesh;
1143
+ var includeTlsReachability = protocols.tls && !cluster.isVideoMesh;
1098
1144
  if (!includeTlsReachability) {
1099
1145
  cluster.xtls = [];
1100
1146
  }
@@ -1125,11 +1171,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1125
1171
  tcp: true,
1126
1172
  xtls: true
1127
1173
  }; // save the initialized results (in case we don't get any "resultReady" events at all)
1128
- _context13.next = 1;
1174
+ _context14.next = 1;
1129
1175
  return this.storeResults(results);
1130
1176
  case 1:
1131
1177
  if (!(!clusterList || !(0, _keys.default)(clusterList).length)) {
1132
- _context13.next = 2;
1178
+ _context14.next = 2;
1133
1179
  break;
1134
1180
  }
1135
1181
  // nothing to do, finish immediately
@@ -1138,19 +1184,21 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1138
1184
  file: 'reachability',
1139
1185
  function: 'performReachabilityChecks'
1140
1186
  }, 'reachability:done', {});
1141
- return _context13.abrupt("return");
1187
+ return _context14.abrupt("return");
1142
1188
  case 2:
1143
1189
  this.startTimers();
1144
1190
 
1145
1191
  // now start the reachability on all the clusters
1146
1192
  (0, _keys.default)(clusterList).forEach(function (key) {
1147
1193
  var cluster = clusterList[key];
1148
- _this4.clusterReachability[key] = new _clusterReachability.ClusterReachability(key, cluster);
1194
+ _this4.clusterReachability[key] = new _clusterReachability.ClusterReachability(key, cluster,
1195
+ // @ts-ignore
1196
+ _this4.webex.config.meetings.enablePerUdpUrlReachability);
1149
1197
  _this4.clusterReachability[key].on(_clusterReachability.Events.resultReady, /*#__PURE__*/function () {
1150
- var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
1198
+ var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(data) {
1151
1199
  var protocol, result, clientMediaIPs, latencyInMilliseconds, areAllResultsReady;
1152
- return _regenerator.default.wrap(function (_context10) {
1153
- while (1) switch (_context10.prev = _context10.next) {
1200
+ return _regenerator.default.wrap(function (_context11) {
1201
+ while (1) switch (_context11.prev = _context11.next) {
1154
1202
  case 0:
1155
1203
  protocol = data.protocol, result = data.result, clientMediaIPs = data.clientMediaIPs, latencyInMilliseconds = data.latencyInMilliseconds;
1156
1204
  if (isFirstResult[protocol]) {
@@ -1167,7 +1215,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1167
1215
  results[key][protocol].result = result;
1168
1216
  results[key][protocol].clientMediaIPs = clientMediaIPs;
1169
1217
  results[key][protocol].latencyInMilliseconds = latencyInMilliseconds;
1170
- _context10.next = 1;
1218
+ _context11.next = 1;
1171
1219
  return _this4.storeResults(results);
1172
1220
  case 1:
1173
1221
  if (areAllResultsReady) {
@@ -1182,47 +1230,47 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1182
1230
  }
1183
1231
  case 2:
1184
1232
  case "end":
1185
- return _context10.stop();
1233
+ return _context11.stop();
1186
1234
  }
1187
- }, _callee10);
1235
+ }, _callee11);
1188
1236
  }));
1189
- return function (_x6) {
1237
+ return function (_x7) {
1190
1238
  return _ref6.apply(this, arguments);
1191
1239
  };
1192
1240
  }());
1193
1241
 
1194
1242
  // clientMediaIps can be updated independently from the results, so we need to listen for them too
1195
1243
  _this4.clusterReachability[key].on(_clusterReachability.Events.clientMediaIpsUpdated, /*#__PURE__*/function () {
1196
- var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(data) {
1197
- return _regenerator.default.wrap(function (_context11) {
1198
- while (1) switch (_context11.prev = _context11.next) {
1244
+ var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(data) {
1245
+ return _regenerator.default.wrap(function (_context12) {
1246
+ while (1) switch (_context12.prev = _context12.next) {
1199
1247
  case 0:
1200
1248
  results[key][data.protocol].clientMediaIPs = data.clientMediaIPs;
1201
- _context11.next = 1;
1249
+ _context12.next = 1;
1202
1250
  return _this4.storeResults(results);
1203
1251
  case 1:
1204
1252
  case "end":
1205
- return _context11.stop();
1253
+ return _context12.stop();
1206
1254
  }
1207
- }, _callee11);
1255
+ }, _callee12);
1208
1256
  }));
1209
- return function (_x7) {
1257
+ return function (_x8) {
1210
1258
  return _ref7.apply(this, arguments);
1211
1259
  };
1212
1260
  }());
1213
1261
  _this4.clusterReachability[key].on(_clusterReachability.Events.natTypeUpdated, /*#__PURE__*/function () {
1214
- var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(data) {
1215
- return _regenerator.default.wrap(function (_context12) {
1216
- while (1) switch (_context12.prev = _context12.next) {
1262
+ var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee13(data) {
1263
+ return _regenerator.default.wrap(function (_context13) {
1264
+ while (1) switch (_context13.prev = _context13.next) {
1217
1265
  case 0:
1218
1266
  _this4.natType = data.natType;
1219
1267
  case 1:
1220
1268
  case "end":
1221
- return _context12.stop();
1269
+ return _context13.stop();
1222
1270
  }
1223
- }, _callee12);
1271
+ }, _callee13);
1224
1272
  }));
1225
- return function (_x8) {
1273
+ return function (_x9) {
1226
1274
  return _ref8.apply(this, arguments);
1227
1275
  };
1228
1276
  }());
@@ -1230,11 +1278,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1230
1278
  });
1231
1279
  case 3:
1232
1280
  case "end":
1233
- return _context13.stop();
1281
+ return _context14.stop();
1234
1282
  }
1235
- }, _callee13, this);
1283
+ }, _callee14, this);
1236
1284
  }));
1237
- function performReachabilityChecks(_x5) {
1285
+ function performReachabilityChecks(_x6) {
1238
1286
  return _performReachabilityChecks.apply(this, arguments);
1239
1287
  }
1240
1288
  return performReachabilityChecks;
@@ -1251,42 +1299,42 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1251
1299
  }, {
1252
1300
  key: "getClientMediaPreferences",
1253
1301
  value: (function () {
1254
- var _getClientMediaPreferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(isMultistream, ipver) {
1255
- var reachabilityReport, _t6, _t7, _t8;
1256
- return _regenerator.default.wrap(function (_context14) {
1257
- while (1) switch (_context14.prev = _context14.next) {
1302
+ var _getClientMediaPreferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15(isMultistream, ipver) {
1303
+ var reachabilityReport, _t7, _t8, _t9;
1304
+ return _regenerator.default.wrap(function (_context15) {
1305
+ while (1) switch (_context15.prev = _context15.next) {
1258
1306
  case 0:
1259
1307
  if (this.orpheusApiVersion) {
1260
- _context14.next = 2;
1308
+ _context15.next = 2;
1261
1309
  break;
1262
1310
  }
1263
- _t6 = ipver;
1264
- _context14.next = 1;
1311
+ _t7 = ipver;
1312
+ _context15.next = 1;
1265
1313
  return this.getJoinCookie();
1266
1314
  case 1:
1267
- _t7 = _context14.sent;
1268
- _t8 = !isMultistream;
1269
- return _context14.abrupt("return", {
1270
- ipver: _t6,
1271
- joinCookie: _t7,
1272
- preferTranscoding: _t8
1315
+ _t8 = _context15.sent;
1316
+ _t9 = !isMultistream;
1317
+ return _context15.abrupt("return", {
1318
+ ipver: _t7,
1319
+ joinCookie: _t8,
1320
+ preferTranscoding: _t9
1273
1321
  });
1274
1322
  case 2:
1275
- _context14.next = 3;
1323
+ _context15.next = 3;
1276
1324
  return this.getReachabilityReport();
1277
1325
  case 3:
1278
- reachabilityReport = _context14.sent;
1279
- return _context14.abrupt("return", _objectSpread({
1326
+ reachabilityReport = _context15.sent;
1327
+ return _context15.abrupt("return", _objectSpread({
1280
1328
  ipver: ipver,
1281
1329
  preferTranscoding: !isMultistream
1282
1330
  }, reachabilityReport));
1283
1331
  case 4:
1284
1332
  case "end":
1285
- return _context14.stop();
1333
+ return _context15.stop();
1286
1334
  }
1287
- }, _callee14, this);
1335
+ }, _callee15, this);
1288
1336
  }));
1289
- function getClientMediaPreferences(_x9, _x0) {
1337
+ function getClientMediaPreferences(_x0, _x1) {
1290
1338
  return _getClientMediaPreferences.apply(this, arguments);
1291
1339
  }
1292
1340
  return getClientMediaPreferences;
@@ -1302,22 +1350,22 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1302
1350
  }, {
1303
1351
  key: "getReachabilityReportToAttachToRoap",
1304
1352
  value: (function () {
1305
- var _getReachabilityReportToAttachToRoap = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
1306
- return _regenerator.default.wrap(function (_context15) {
1307
- while (1) switch (_context15.prev = _context15.next) {
1353
+ var _getReachabilityReportToAttachToRoap = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee16() {
1354
+ return _regenerator.default.wrap(function (_context16) {
1355
+ while (1) switch (_context16.prev = _context16.next) {
1308
1356
  case 0:
1309
1357
  if (this.orpheusApiVersion) {
1310
- _context15.next = 1;
1358
+ _context16.next = 1;
1311
1359
  break;
1312
1360
  }
1313
- return _context15.abrupt("return", this.getReachabilityResults());
1361
+ return _context16.abrupt("return", this.getReachabilityResults());
1314
1362
  case 1:
1315
- return _context15.abrupt("return", undefined);
1363
+ return _context16.abrupt("return", undefined);
1316
1364
  case 2:
1317
1365
  case "end":
1318
- return _context15.stop();
1366
+ return _context16.stop();
1319
1367
  }
1320
- }, _callee15, this);
1368
+ }, _callee16, this);
1321
1369
  }));
1322
1370
  function getReachabilityReportToAttachToRoap() {
1323
1371
  return _getReachabilityReportToAttachToRoap.apply(this, arguments);