@webex/plugin-meetings 3.11.0 → 3.12.0-llmrefactor.1

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 (294) 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 +58 -13
  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/events.js +29 -14
  11. package/dist/breakouts/events.js.map +1 -1
  12. package/dist/breakouts/index.js +124 -7
  13. package/dist/breakouts/index.js.map +1 -1
  14. package/dist/common/errors/webex-errors.js +49 -5
  15. package/dist/common/errors/webex-errors.js.map +1 -1
  16. package/dist/config.js +8 -3
  17. package/dist/config.js.map +1 -1
  18. package/dist/constants.js +60 -11
  19. package/dist/constants.js.map +1 -1
  20. package/dist/controls-options-manager/constants.js +11 -1
  21. package/dist/controls-options-manager/constants.js.map +1 -1
  22. package/dist/controls-options-manager/index.js +67 -29
  23. package/dist/controls-options-manager/index.js.map +1 -1
  24. package/dist/controls-options-manager/util.js +91 -0
  25. package/dist/controls-options-manager/util.js.map +1 -1
  26. package/dist/hashTree/constants.js +16 -2
  27. package/dist/hashTree/constants.js.map +1 -1
  28. package/dist/hashTree/hashTree.js +18 -0
  29. package/dist/hashTree/hashTree.js.map +1 -1
  30. package/dist/hashTree/hashTreeParser.js +1655 -538
  31. package/dist/hashTree/hashTreeParser.js.map +1 -1
  32. package/dist/hashTree/types.js +4 -2
  33. package/dist/hashTree/types.js.map +1 -1
  34. package/dist/hashTree/utils.js +52 -0
  35. package/dist/hashTree/utils.js.map +1 -1
  36. package/dist/index.js +18 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/interceptors/constant.js +12 -0
  39. package/dist/interceptors/constant.js.map +1 -0
  40. package/dist/interceptors/dataChannelAuthToken.js +332 -0
  41. package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
  42. package/dist/interceptors/index.js +7 -0
  43. package/dist/interceptors/index.js.map +1 -1
  44. package/dist/interceptors/locusRetry.js +23 -8
  45. package/dist/interceptors/locusRetry.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 +9 -4
  54. package/dist/locus-info/controlsUtils.js.map +1 -1
  55. package/dist/locus-info/index.js +914 -212
  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 +8 -7
  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 +2287 -1118
  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 -162
  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 +116 -18
  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 +12 -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.map +1 -1
  114. package/dist/reachability/index.js +139 -93
  115. package/dist/reachability/index.js.map +1 -1
  116. package/dist/reachability/reachability.types.js +2 -0
  117. package/dist/reachability/reachability.types.js.map +1 -1
  118. package/dist/reachability/util.js +45 -0
  119. package/dist/reachability/util.js.map +1 -1
  120. package/dist/reactions/reactions.type.js.map +1 -1
  121. package/dist/reconnection-manager/index.js +0 -1
  122. package/dist/reconnection-manager/index.js.map +1 -1
  123. package/dist/recording-controller/index.js +1 -3
  124. package/dist/recording-controller/index.js.map +1 -1
  125. package/dist/roap/turnDiscovery.js +8 -1
  126. package/dist/roap/turnDiscovery.js.map +1 -1
  127. package/dist/types/aiEnableRequest/index.d.ts +5 -0
  128. package/dist/types/aiEnableRequest/utils.d.ts +2 -0
  129. package/dist/types/annotation/index.d.ts +19 -0
  130. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  131. package/dist/types/config.d.ts +6 -2
  132. package/dist/types/constants.d.ts +35 -1
  133. package/dist/types/controls-options-manager/constants.d.ts +6 -1
  134. package/dist/types/controls-options-manager/index.d.ts +16 -0
  135. package/dist/types/hashTree/constants.d.ts +3 -0
  136. package/dist/types/hashTree/hashTree.d.ts +7 -0
  137. package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
  138. package/dist/types/hashTree/types.d.ts +3 -0
  139. package/dist/types/hashTree/utils.d.ts +24 -0
  140. package/dist/types/index.d.ts +4 -0
  141. package/dist/types/interceptors/constant.d.ts +5 -0
  142. package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
  143. package/dist/types/interceptors/index.d.ts +2 -1
  144. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  145. package/dist/types/interceptors/utils.d.ts +1 -0
  146. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  147. package/dist/types/locus-info/index.d.ts +126 -15
  148. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  149. package/dist/types/locus-info/types.d.ts +28 -1
  150. package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
  151. package/dist/types/media/properties.d.ts +8 -3
  152. package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
  153. package/dist/types/meeting/index.d.ts +271 -16
  154. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  155. package/dist/types/meeting/request.d.ts +17 -1
  156. package/dist/types/meeting/request.type.d.ts +5 -0
  157. package/dist/types/meeting/util.d.ts +40 -0
  158. package/dist/types/meetings/index.d.ts +42 -20
  159. package/dist/types/meetings/meetings.types.d.ts +15 -0
  160. package/dist/types/meetings/request.d.ts +14 -0
  161. package/dist/types/member/index.d.ts +2 -0
  162. package/dist/types/member/types.d.ts +1 -0
  163. package/dist/types/member/util.d.ts +14 -0
  164. package/dist/types/members/index.d.ts +15 -2
  165. package/dist/types/members/util.d.ts +1 -5
  166. package/dist/types/metrics/constants.d.ts +11 -0
  167. package/dist/types/multistream/codec/constants.d.ts +7 -0
  168. package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
  169. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  170. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  171. package/dist/types/reachability/index.d.ts +10 -3
  172. package/dist/types/reachability/reachability.types.d.ts +7 -0
  173. package/dist/types/reachability/util.d.ts +17 -0
  174. package/dist/types/reactions/reactions.type.d.ts +4 -0
  175. package/dist/types/webinar/utils.d.ts +6 -0
  176. package/dist/webinar/index.js +611 -164
  177. package/dist/webinar/index.js.map +1 -1
  178. package/dist/webinar/utils.js +25 -0
  179. package/dist/webinar/utils.js.map +1 -0
  180. package/package.json +24 -23
  181. package/src/aiEnableRequest/README.md +84 -0
  182. package/src/aiEnableRequest/index.ts +186 -0
  183. package/src/aiEnableRequest/utils.ts +25 -0
  184. package/src/annotation/index.ts +62 -12
  185. package/src/breakouts/breakout.ts +3 -1
  186. package/src/breakouts/events.ts +33 -11
  187. package/src/breakouts/index.ts +143 -3
  188. package/src/common/errors/webex-errors.ts +50 -3
  189. package/src/config.ts +6 -2
  190. package/src/constants.ts +49 -3
  191. package/src/controls-options-manager/constants.ts +14 -1
  192. package/src/controls-options-manager/index.ts +87 -28
  193. package/src/controls-options-manager/util.ts +81 -1
  194. package/src/hashTree/constants.ts +17 -0
  195. package/src/hashTree/hashTree.ts +17 -0
  196. package/src/hashTree/hashTreeParser.ts +1482 -361
  197. package/src/hashTree/types.ts +4 -0
  198. package/src/hashTree/utils.ts +45 -0
  199. package/src/index.ts +14 -1
  200. package/src/interceptors/constant.ts +6 -0
  201. package/src/interceptors/dataChannelAuthToken.ts +217 -0
  202. package/src/interceptors/index.ts +2 -1
  203. package/src/interceptors/locusRetry.ts +25 -4
  204. package/src/interceptors/utils.ts +16 -0
  205. package/src/interpretation/index.ts +29 -11
  206. package/src/interpretation/interpretation.types.ts +11 -0
  207. package/src/locus-info/controlsUtils.ts +14 -1
  208. package/src/locus-info/index.ts +976 -203
  209. package/src/locus-info/infoUtils.ts +41 -6
  210. package/src/locus-info/selfUtils.ts +1 -0
  211. package/src/locus-info/types.ts +33 -1
  212. package/src/media/MediaConnectionAwaiter.ts +62 -5
  213. package/src/media/index.ts +10 -1
  214. package/src/media/properties.ts +11 -4
  215. package/src/meeting/in-meeting-actions.ts +20 -0
  216. package/src/meeting/index.ts +1258 -222
  217. package/src/meeting/locusMediaRequest.ts +106 -6
  218. package/src/meeting/muteState.ts +10 -1
  219. package/src/meeting/request.ts +53 -0
  220. package/src/meeting/request.type.ts +6 -0
  221. package/src/meeting/util.ts +207 -7
  222. package/src/meeting-info/meeting-info-v2.ts +4 -2
  223. package/src/meetings/index.ts +319 -117
  224. package/src/meetings/meetings.types.ts +19 -0
  225. package/src/meetings/request.ts +43 -0
  226. package/src/meetings/util.ts +117 -4
  227. package/src/member/index.ts +20 -0
  228. package/src/member/types.ts +1 -0
  229. package/src/member/util.ts +41 -0
  230. package/src/members/index.ts +70 -7
  231. package/src/members/util.ts +12 -4
  232. package/src/metrics/constants.ts +12 -0
  233. package/src/multistream/codec/constants.ts +58 -0
  234. package/src/multistream/mediaRequestManager.ts +117 -76
  235. package/src/multistream/receiveSlot.ts +18 -0
  236. package/src/multistream/remoteMediaManager.ts +13 -0
  237. package/src/multistream/sendSlotManager.ts +97 -3
  238. package/src/reachability/clusterReachability.ts +3 -2
  239. package/src/reachability/index.ts +56 -16
  240. package/src/reachability/reachability.types.ts +11 -0
  241. package/src/reachability/util.ts +36 -0
  242. package/src/reactions/reactions.type.ts +4 -0
  243. package/src/reconnection-manager/index.ts +0 -1
  244. package/src/recording-controller/index.ts +1 -2
  245. package/src/roap/turnDiscovery.ts +9 -1
  246. package/src/webinar/index.ts +415 -11
  247. package/src/webinar/utils.ts +16 -0
  248. package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
  249. package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
  250. package/test/unit/spec/annotation/index.ts +228 -134
  251. package/test/unit/spec/breakouts/breakout.ts +9 -3
  252. package/test/unit/spec/breakouts/events.ts +120 -2
  253. package/test/unit/spec/breakouts/index.ts +305 -18
  254. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  255. package/test/unit/spec/controls-options-manager/index.js +244 -29
  256. package/test/unit/spec/controls-options-manager/util.js +165 -0
  257. package/test/unit/spec/hashTree/hashTree.ts +66 -0
  258. package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
  259. package/test/unit/spec/hashTree/utils.ts +125 -1
  260. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +388 -0
  261. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  262. package/test/unit/spec/interceptors/utils.ts +75 -0
  263. package/test/unit/spec/interpretation/index.ts +26 -4
  264. package/test/unit/spec/locus-info/controlsUtils.js +200 -56
  265. package/test/unit/spec/locus-info/index.js +1861 -149
  266. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  267. package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
  268. package/test/unit/spec/media/index.ts +92 -0
  269. package/test/unit/spec/media/properties.ts +35 -26
  270. package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
  271. package/test/unit/spec/meeting/index.js +3694 -450
  272. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  273. package/test/unit/spec/meeting/muteState.js +81 -0
  274. package/test/unit/spec/meeting/request.js +82 -0
  275. package/test/unit/spec/meeting/utils.js +595 -27
  276. package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
  277. package/test/unit/spec/meetings/index.js +1138 -86
  278. package/test/unit/spec/meetings/request.js +141 -0
  279. package/test/unit/spec/meetings/utils.js +402 -51
  280. package/test/unit/spec/member/index.js +35 -4
  281. package/test/unit/spec/member/util.js +154 -27
  282. package/test/unit/spec/members/index.js +216 -0
  283. package/test/unit/spec/members/request.js +37 -1
  284. package/test/unit/spec/members/utils.js +63 -0
  285. package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
  286. package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
  287. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  288. package/test/unit/spec/reachability/index.ts +151 -46
  289. package/test/unit/spec/reachability/util.ts +31 -0
  290. package/test/unit/spec/reconnection-manager/index.js +4 -8
  291. package/test/unit/spec/recording-controller/index.js +9 -8
  292. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  293. package/test/unit/spec/webinar/index.ts +1087 -167
  294. 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,7 +1184,7 @@ 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
 
@@ -1149,10 +1195,10 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1149
1195
  // @ts-ignore
1150
1196
  _this4.webex.config.meetings.enablePerUdpUrlReachability);
1151
1197
  _this4.clusterReachability[key].on(_clusterReachability.Events.resultReady, /*#__PURE__*/function () {
1152
- 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) {
1153
1199
  var protocol, result, clientMediaIPs, latencyInMilliseconds, areAllResultsReady;
1154
- return _regenerator.default.wrap(function (_context10) {
1155
- while (1) switch (_context10.prev = _context10.next) {
1200
+ return _regenerator.default.wrap(function (_context11) {
1201
+ while (1) switch (_context11.prev = _context11.next) {
1156
1202
  case 0:
1157
1203
  protocol = data.protocol, result = data.result, clientMediaIPs = data.clientMediaIPs, latencyInMilliseconds = data.latencyInMilliseconds;
1158
1204
  if (isFirstResult[protocol]) {
@@ -1169,7 +1215,7 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1169
1215
  results[key][protocol].result = result;
1170
1216
  results[key][protocol].clientMediaIPs = clientMediaIPs;
1171
1217
  results[key][protocol].latencyInMilliseconds = latencyInMilliseconds;
1172
- _context10.next = 1;
1218
+ _context11.next = 1;
1173
1219
  return _this4.storeResults(results);
1174
1220
  case 1:
1175
1221
  if (areAllResultsReady) {
@@ -1184,47 +1230,47 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1184
1230
  }
1185
1231
  case 2:
1186
1232
  case "end":
1187
- return _context10.stop();
1233
+ return _context11.stop();
1188
1234
  }
1189
- }, _callee10);
1235
+ }, _callee11);
1190
1236
  }));
1191
- return function (_x6) {
1237
+ return function (_x7) {
1192
1238
  return _ref6.apply(this, arguments);
1193
1239
  };
1194
1240
  }());
1195
1241
 
1196
1242
  // clientMediaIps can be updated independently from the results, so we need to listen for them too
1197
1243
  _this4.clusterReachability[key].on(_clusterReachability.Events.clientMediaIpsUpdated, /*#__PURE__*/function () {
1198
- var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee11(data) {
1199
- return _regenerator.default.wrap(function (_context11) {
1200
- 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) {
1201
1247
  case 0:
1202
1248
  results[key][data.protocol].clientMediaIPs = data.clientMediaIPs;
1203
- _context11.next = 1;
1249
+ _context12.next = 1;
1204
1250
  return _this4.storeResults(results);
1205
1251
  case 1:
1206
1252
  case "end":
1207
- return _context11.stop();
1253
+ return _context12.stop();
1208
1254
  }
1209
- }, _callee11);
1255
+ }, _callee12);
1210
1256
  }));
1211
- return function (_x7) {
1257
+ return function (_x8) {
1212
1258
  return _ref7.apply(this, arguments);
1213
1259
  };
1214
1260
  }());
1215
1261
  _this4.clusterReachability[key].on(_clusterReachability.Events.natTypeUpdated, /*#__PURE__*/function () {
1216
- var _ref8 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee12(data) {
1217
- return _regenerator.default.wrap(function (_context12) {
1218
- 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) {
1219
1265
  case 0:
1220
1266
  _this4.natType = data.natType;
1221
1267
  case 1:
1222
1268
  case "end":
1223
- return _context12.stop();
1269
+ return _context13.stop();
1224
1270
  }
1225
- }, _callee12);
1271
+ }, _callee13);
1226
1272
  }));
1227
- return function (_x8) {
1273
+ return function (_x9) {
1228
1274
  return _ref8.apply(this, arguments);
1229
1275
  };
1230
1276
  }());
@@ -1232,11 +1278,11 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1232
1278
  });
1233
1279
  case 3:
1234
1280
  case "end":
1235
- return _context13.stop();
1281
+ return _context14.stop();
1236
1282
  }
1237
- }, _callee13, this);
1283
+ }, _callee14, this);
1238
1284
  }));
1239
- function performReachabilityChecks(_x5) {
1285
+ function performReachabilityChecks(_x6) {
1240
1286
  return _performReachabilityChecks.apply(this, arguments);
1241
1287
  }
1242
1288
  return performReachabilityChecks;
@@ -1253,42 +1299,42 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1253
1299
  }, {
1254
1300
  key: "getClientMediaPreferences",
1255
1301
  value: (function () {
1256
- var _getClientMediaPreferences = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee14(isMultistream, ipver) {
1257
- var reachabilityReport, _t6, _t7, _t8;
1258
- return _regenerator.default.wrap(function (_context14) {
1259
- 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) {
1260
1306
  case 0:
1261
1307
  if (this.orpheusApiVersion) {
1262
- _context14.next = 2;
1308
+ _context15.next = 2;
1263
1309
  break;
1264
1310
  }
1265
- _t6 = ipver;
1266
- _context14.next = 1;
1311
+ _t7 = ipver;
1312
+ _context15.next = 1;
1267
1313
  return this.getJoinCookie();
1268
1314
  case 1:
1269
- _t7 = _context14.sent;
1270
- _t8 = !isMultistream;
1271
- return _context14.abrupt("return", {
1272
- ipver: _t6,
1273
- joinCookie: _t7,
1274
- preferTranscoding: _t8
1315
+ _t8 = _context15.sent;
1316
+ _t9 = !isMultistream;
1317
+ return _context15.abrupt("return", {
1318
+ ipver: _t7,
1319
+ joinCookie: _t8,
1320
+ preferTranscoding: _t9
1275
1321
  });
1276
1322
  case 2:
1277
- _context14.next = 3;
1323
+ _context15.next = 3;
1278
1324
  return this.getReachabilityReport();
1279
1325
  case 3:
1280
- reachabilityReport = _context14.sent;
1281
- return _context14.abrupt("return", _objectSpread({
1326
+ reachabilityReport = _context15.sent;
1327
+ return _context15.abrupt("return", _objectSpread({
1282
1328
  ipver: ipver,
1283
1329
  preferTranscoding: !isMultistream
1284
1330
  }, reachabilityReport));
1285
1331
  case 4:
1286
1332
  case "end":
1287
- return _context14.stop();
1333
+ return _context15.stop();
1288
1334
  }
1289
- }, _callee14, this);
1335
+ }, _callee15, this);
1290
1336
  }));
1291
- function getClientMediaPreferences(_x9, _x0) {
1337
+ function getClientMediaPreferences(_x0, _x1) {
1292
1338
  return _getClientMediaPreferences.apply(this, arguments);
1293
1339
  }
1294
1340
  return getClientMediaPreferences;
@@ -1304,22 +1350,22 @@ var Reachability = exports.default = /*#__PURE__*/function (_EventsScope) {
1304
1350
  }, {
1305
1351
  key: "getReachabilityReportToAttachToRoap",
1306
1352
  value: (function () {
1307
- var _getReachabilityReportToAttachToRoap = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee15() {
1308
- return _regenerator.default.wrap(function (_context15) {
1309
- 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) {
1310
1356
  case 0:
1311
1357
  if (this.orpheusApiVersion) {
1312
- _context15.next = 1;
1358
+ _context16.next = 1;
1313
1359
  break;
1314
1360
  }
1315
- return _context15.abrupt("return", this.getReachabilityResults());
1361
+ return _context16.abrupt("return", this.getReachabilityResults());
1316
1362
  case 1:
1317
- return _context15.abrupt("return", undefined);
1363
+ return _context16.abrupt("return", undefined);
1318
1364
  case 2:
1319
1365
  case "end":
1320
- return _context15.stop();
1366
+ return _context16.stop();
1321
1367
  }
1322
- }, _callee15, this);
1368
+ }, _callee16, this);
1323
1369
  }));
1324
1370
  function getReachabilityReportToAttachToRoap() {
1325
1371
  return _getReachabilityReportToAttachToRoap.apply(this, arguments);