@webex/plugin-meetings 3.10.0-next.9 → 3.10.0-webex-services-ready.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 (73) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +11 -3
  4. package/dist/constants.js.map +1 -1
  5. package/dist/hashTree/constants.js +20 -0
  6. package/dist/hashTree/constants.js.map +1 -0
  7. package/dist/hashTree/hashTree.js +515 -0
  8. package/dist/hashTree/hashTree.js.map +1 -0
  9. package/dist/hashTree/hashTreeParser.js +1266 -0
  10. package/dist/hashTree/hashTreeParser.js.map +1 -0
  11. package/dist/hashTree/types.js +21 -0
  12. package/dist/hashTree/types.js.map +1 -0
  13. package/dist/hashTree/utils.js +48 -0
  14. package/dist/hashTree/utils.js.map +1 -0
  15. package/dist/interpretation/index.js +1 -1
  16. package/dist/interpretation/siLanguage.js +1 -1
  17. package/dist/locus-info/index.js +511 -48
  18. package/dist/locus-info/index.js.map +1 -1
  19. package/dist/locus-info/types.js +7 -0
  20. package/dist/locus-info/types.js.map +1 -0
  21. package/dist/meeting/index.js +41 -15
  22. package/dist/meeting/index.js.map +1 -1
  23. package/dist/meeting/util.js +1 -0
  24. package/dist/meeting/util.js.map +1 -1
  25. package/dist/meetings/index.js +112 -70
  26. package/dist/meetings/index.js.map +1 -1
  27. package/dist/metrics/constants.js +3 -1
  28. package/dist/metrics/constants.js.map +1 -1
  29. package/dist/reachability/clusterReachability.js +44 -358
  30. package/dist/reachability/clusterReachability.js.map +1 -1
  31. package/dist/reachability/reachability.types.js +14 -1
  32. package/dist/reachability/reachability.types.js.map +1 -1
  33. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  34. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  35. package/dist/types/constants.d.ts +26 -21
  36. package/dist/types/hashTree/constants.d.ts +8 -0
  37. package/dist/types/hashTree/hashTree.d.ts +129 -0
  38. package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
  39. package/dist/types/hashTree/types.d.ts +25 -0
  40. package/dist/types/hashTree/utils.d.ts +9 -0
  41. package/dist/types/locus-info/index.d.ts +91 -42
  42. package/dist/types/locus-info/types.d.ts +46 -0
  43. package/dist/types/meeting/index.d.ts +22 -9
  44. package/dist/types/meetings/index.d.ts +9 -2
  45. package/dist/types/metrics/constants.d.ts +2 -0
  46. package/dist/types/reachability/clusterReachability.d.ts +10 -88
  47. package/dist/types/reachability/reachability.types.d.ts +12 -1
  48. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  49. package/dist/webinar/index.js +1 -1
  50. package/package.json +22 -21
  51. package/src/constants.ts +13 -1
  52. package/src/hashTree/constants.ts +9 -0
  53. package/src/hashTree/hashTree.ts +463 -0
  54. package/src/hashTree/hashTreeParser.ts +1161 -0
  55. package/src/hashTree/types.ts +30 -0
  56. package/src/hashTree/utils.ts +42 -0
  57. package/src/locus-info/index.ts +556 -85
  58. package/src/locus-info/types.ts +48 -0
  59. package/src/meeting/index.ts +58 -26
  60. package/src/meeting/util.ts +1 -0
  61. package/src/meetings/index.ts +104 -51
  62. package/src/metrics/constants.ts +2 -0
  63. package/src/reachability/clusterReachability.ts +50 -347
  64. package/src/reachability/reachability.types.ts +15 -1
  65. package/src/reachability/reachabilityPeerConnection.ts +416 -0
  66. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  67. package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
  68. package/test/unit/spec/hashTree/utils.ts +103 -0
  69. package/test/unit/spec/locus-info/index.js +667 -1
  70. package/test/unit/spec/meeting/index.js +91 -20
  71. package/test/unit/spec/meeting/utils.js +77 -0
  72. package/test/unit/spec/meetings/index.js +71 -26
  73. package/test/unit/spec/reachability/clusterReachability.ts +281 -138
@@ -4,7 +4,20 @@ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/defi
4
4
  _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.NatType = void 0;
7
+ exports.ReachabilityPeerConnectionEvents = exports.NatType = void 0;
8
+ /**
9
+ * Events emitted by ReachabilityPeerConnection
10
+ */
11
+ var ReachabilityPeerConnectionEvents = exports.ReachabilityPeerConnectionEvents = {
12
+ resultReady: 'resultReady',
13
+ // emitted when successfully reached over a protocol
14
+ clientMediaIpsUpdated: 'clientMediaIpsUpdated',
15
+ // emitted when new public IPs are found
16
+ natTypeUpdated: 'natTypeUpdated',
17
+ // emitted when NAT type is determined
18
+ reachedSubnets: 'reachedSubnets' // emitted when server IP (subnet) is discovered
19
+ };
20
+
8
21
  // result for a specific transport protocol (like udp or tcp)
9
22
  var NatType = exports.NatType = /*#__PURE__*/function (NatType) {
10
23
  NatType["Unknown"] = "unknown";
@@ -1 +1 @@
1
- {"version":3,"names":["NatType","exports"],"sources":["reachability.types.ts"],"sourcesContent":["import {IP_VERSION} from '../constants';\n\n// result for a specific transport protocol (like udp or tcp)\nexport type TransportResult = {\n result: 'reachable' | 'unreachable' | 'untested';\n latencyInMilliseconds?: number; // amount of time it took to get the first ICE candidate\n clientMediaIPs?: string[];\n};\n\nexport enum NatType {\n Unknown = 'unknown',\n SymmetricNat = 'symmetric-nat',\n}\n\n// reachability result for a specific media cluster\nexport type ClusterReachabilityResult = {\n udp: TransportResult;\n tcp: TransportResult;\n xtls: TransportResult;\n};\n\nexport type ReachabilityMetrics = {\n reachability_public_udp_success: number;\n reachability_public_udp_failed: number;\n reachability_public_tcp_success: number;\n reachability_public_tcp_failed: number;\n reachability_public_xtls_success: number;\n reachability_public_xtls_failed: number;\n reachability_vmn_udp_success: number;\n reachability_vmn_udp_failed: number;\n reachability_vmn_tcp_success: number;\n reachability_vmn_tcp_failed: number;\n reachability_vmn_xtls_success: number;\n reachability_vmn_xtls_failed: number;\n natType: NatType;\n};\n\n/**\n * This is the type that matches what backend expects us to send to them. It is a bit weird, because\n * it uses strings instead of booleans and numbers, but that's what they require.\n */\nexport type TransportResultForBackend = {\n reachable?: 'true' | 'false';\n latencyInMilliseconds?: string;\n clientMediaIPs?: string[];\n untested?: 'true';\n};\n\nexport type ReachabilityResultForBackend = {\n udp: TransportResultForBackend;\n tcp: TransportResultForBackend;\n xtls: TransportResultForBackend;\n};\n\n// this is the type that is required by the backend when we send them reachability results\nexport type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;\n\n// this is the type used by Reachability class internally and stored in local storage\nexport type ReachabilityResults = Record<\n string,\n ClusterReachabilityResult & {\n isVideoMesh?: boolean;\n }\n>;\n\nexport type ReachabilityReportV0 = ReachabilityResultsForBackend;\n\nexport type ReachabilityReportV1 = {\n version: 1;\n result: {\n usedDiscoveryOptions: {\n 'early-call-min-clusters': number;\n // there are more options, but we don't support them yet\n };\n metrics: {\n 'total-duration-ms': number;\n // there are more metrics, but we don't support them yet\n };\n tests: Record<string, ReachabilityResultForBackend>;\n };\n};\n\nexport interface ClientMediaPreferences {\n ipver: IP_VERSION;\n joinCookie: any;\n preferTranscoding: boolean;\n reachability?: ReachabilityReportV1; // only present when using Orpheus API version 1\n}\n\n/* Orpheus API supports more triggers, but we don't use them yet */\nexport type GetClustersTrigger = 'startup' | 'early-call/no-min-reached';\n"],"mappings":";;;;;;;AAEA;AAAA,IAOYA,OAAO,GAAAC,OAAA,CAAAD,OAAA,0BAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAA,OAAPA,OAAO;AAAA,OAKnB;AAuBA;AACA;AACA;AACA;AAcA;AAGA;AAgCA","ignoreList":[]}
1
+ {"version":3,"names":["ReachabilityPeerConnectionEvents","exports","resultReady","clientMediaIpsUpdated","natTypeUpdated","reachedSubnets","NatType"],"sources":["reachability.types.ts"],"sourcesContent":["import {IP_VERSION, Enum} from '../constants';\n\nexport type Protocol = 'udp' | 'tcp' | 'xtls';\n\n/**\n * Events emitted by ReachabilityPeerConnection\n */\nexport const ReachabilityPeerConnectionEvents = {\n resultReady: 'resultReady', // emitted when successfully reached over a protocol\n clientMediaIpsUpdated: 'clientMediaIpsUpdated', // emitted when new public IPs are found\n natTypeUpdated: 'natTypeUpdated', // emitted when NAT type is determined\n reachedSubnets: 'reachedSubnets', // emitted when server IP (subnet) is discovered\n} as const;\n\nexport type ReachabilityPeerConnectionEvents = Enum<typeof ReachabilityPeerConnectionEvents>;\n\n// result for a specific transport protocol (like udp or tcp)\nexport type TransportResult = {\n result: 'reachable' | 'unreachable' | 'untested';\n latencyInMilliseconds?: number; // amount of time it took to get the first ICE candidate\n clientMediaIPs?: string[];\n};\n\nexport enum NatType {\n Unknown = 'unknown',\n SymmetricNat = 'symmetric-nat',\n}\n\n// reachability result for a specific media cluster\nexport type ClusterReachabilityResult = {\n udp: TransportResult;\n tcp: TransportResult;\n xtls: TransportResult;\n};\n\nexport type ReachabilityMetrics = {\n reachability_public_udp_success: number;\n reachability_public_udp_failed: number;\n reachability_public_tcp_success: number;\n reachability_public_tcp_failed: number;\n reachability_public_xtls_success: number;\n reachability_public_xtls_failed: number;\n reachability_vmn_udp_success: number;\n reachability_vmn_udp_failed: number;\n reachability_vmn_tcp_success: number;\n reachability_vmn_tcp_failed: number;\n reachability_vmn_xtls_success: number;\n reachability_vmn_xtls_failed: number;\n natType: NatType;\n};\n\n/**\n * This is the type that matches what backend expects us to send to them. It is a bit weird, because\n * it uses strings instead of booleans and numbers, but that's what they require.\n */\nexport type TransportResultForBackend = {\n reachable?: 'true' | 'false';\n latencyInMilliseconds?: string;\n clientMediaIPs?: string[];\n untested?: 'true';\n};\n\nexport type ReachabilityResultForBackend = {\n udp: TransportResultForBackend;\n tcp: TransportResultForBackend;\n xtls: TransportResultForBackend;\n};\n\n// this is the type that is required by the backend when we send them reachability results\nexport type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;\n\n// this is the type used by Reachability class internally and stored in local storage\nexport type ReachabilityResults = Record<\n string,\n ClusterReachabilityResult & {\n isVideoMesh?: boolean;\n }\n>;\n\nexport type ReachabilityReportV0 = ReachabilityResultsForBackend;\n\nexport type ReachabilityReportV1 = {\n version: 1;\n result: {\n usedDiscoveryOptions: {\n 'early-call-min-clusters': number;\n // there are more options, but we don't support them yet\n };\n metrics: {\n 'total-duration-ms': number;\n // there are more metrics, but we don't support them yet\n };\n tests: Record<string, ReachabilityResultForBackend>;\n };\n};\n\nexport interface ClientMediaPreferences {\n ipver: IP_VERSION;\n joinCookie: any;\n preferTranscoding: boolean;\n reachability?: ReachabilityReportV1; // only present when using Orpheus API version 1\n}\n\n/* Orpheus API supports more triggers, but we don't use them yet */\nexport type GetClustersTrigger = 'startup' | 'early-call/no-min-reached';\n"],"mappings":";;;;;;;AAIA;AACA;AACA;AACO,IAAMA,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAAG;EAC9CE,WAAW,EAAE,aAAa;EAAE;EAC5BC,qBAAqB,EAAE,uBAAuB;EAAE;EAChDC,cAAc,EAAE,gBAAgB;EAAE;EAClCC,cAAc,EAAE,gBAAgB,CAAE;AACpC,CAAU;;AAIV;AAAA,IAOYC,OAAO,GAAAL,OAAA,CAAAK,OAAA,0BAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAA,OAAPA,OAAO;AAAA,OAKnB;AAuBA;AACA;AACA;AACA;AAcA;AAGA;AAgCA","ignoreList":[]}
@@ -0,0 +1,445 @@
1
+ "use strict";
2
+
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");
9
+ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
10
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
11
+ _Object$defineProperty(exports, "__esModule", {
12
+ value: true
13
+ });
14
+ exports.ReachabilityPeerConnection = void 0;
15
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
16
+ var _set = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/set"));
17
+ var _entries = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/entries"));
18
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
19
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
20
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
21
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
22
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
23
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
24
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
25
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
26
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
27
+ var _common = require("@webex/common");
28
+ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
29
+ var _util = require("./util");
30
+ var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
31
+ var _constants = require("../constants");
32
+ var _reachability = require("./reachability.types");
33
+ 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; }
34
+ 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; }
35
+ 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)); }
36
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
37
+ /**
38
+ * A class to handle RTCPeerConnection lifecycle and ICE candidate gathering for reachability checks.
39
+ * It will do all the work like PeerConnection lifecycle, candidate processing, result management, and event emission.
40
+ */
41
+ var ReachabilityPeerConnection = exports.ReachabilityPeerConnection = /*#__PURE__*/function (_EventsScope) {
42
+ /**
43
+ * Constructor for ReachabilityPeerConnection
44
+ * @param {string} clusterName name of the cluster
45
+ * @param {ClusterNode} clusterInfo information about the media cluster
46
+ */
47
+ function ReachabilityPeerConnection(clusterName, clusterInfo) {
48
+ var _this;
49
+ (0, _classCallCheck2.default)(this, ReachabilityPeerConnection);
50
+ _this = _callSuper(this, ReachabilityPeerConnection);
51
+ (0, _defineProperty2.default)(_this, "numUdpUrls", void 0);
52
+ (0, _defineProperty2.default)(_this, "numTcpUrls", void 0);
53
+ (0, _defineProperty2.default)(_this, "numXTlsUrls", void 0);
54
+ (0, _defineProperty2.default)(_this, "pc", void 0);
55
+ (0, _defineProperty2.default)(_this, "defer", void 0);
56
+ (0, _defineProperty2.default)(_this, "startTimestamp", void 0);
57
+ (0, _defineProperty2.default)(_this, "srflxIceCandidates", []);
58
+ (0, _defineProperty2.default)(_this, "clusterName", void 0);
59
+ (0, _defineProperty2.default)(_this, "result", void 0);
60
+ (0, _defineProperty2.default)(_this, "emittedSubnets", new _set.default());
61
+ _this.clusterName = clusterName;
62
+ _this.numUdpUrls = clusterInfo.udp.length;
63
+ _this.numTcpUrls = clusterInfo.tcp.length;
64
+ _this.numXTlsUrls = clusterInfo.xtls.length;
65
+ _this.pc = _this.createPeerConnection(clusterInfo);
66
+ _this.defer = new _common.Defer();
67
+ _this.result = {
68
+ udp: {
69
+ result: 'untested'
70
+ },
71
+ tcp: {
72
+ result: 'untested'
73
+ },
74
+ xtls: {
75
+ result: 'untested'
76
+ }
77
+ };
78
+ return _this;
79
+ }
80
+
81
+ /**
82
+ * Gets total elapsed time, can be called only after start() is called
83
+ * @returns {number} Milliseconds
84
+ */
85
+ (0, _inherits2.default)(ReachabilityPeerConnection, _EventsScope);
86
+ return (0, _createClass2.default)(ReachabilityPeerConnection, [{
87
+ key: "getElapsedTime",
88
+ value: function getElapsedTime() {
89
+ return Math.round(performance.now() - this.startTimestamp);
90
+ }
91
+
92
+ /**
93
+ * Generate peerConnection config settings
94
+ * @param {ClusterNode} cluster
95
+ * @returns {RTCConfiguration} peerConnectionConfig
96
+ */
97
+ }, {
98
+ key: "createPeerConnection",
99
+ value:
100
+ /**
101
+ * Creates an RTCPeerConnection
102
+ * @param {ClusterNode} clusterInfo information about the media cluster
103
+ * @returns {RTCPeerConnection|null} peerConnection
104
+ */
105
+ function createPeerConnection(clusterInfo) {
106
+ try {
107
+ var config = ReachabilityPeerConnection.buildPeerConnectionConfig(clusterInfo);
108
+ var peerConnection = new RTCPeerConnection(config);
109
+ return peerConnection;
110
+ } catch (peerConnectionError) {
111
+ _loggerProxy.default.logger.warn("Reachability:ReachabilityPeerConnection#createPeerConnection --> Error creating peerConnection:", peerConnectionError);
112
+ return null;
113
+ }
114
+ }
115
+
116
+ /**
117
+ * @returns {ClusterReachabilityResult} reachability result for this instance
118
+ */
119
+ }, {
120
+ key: "getResult",
121
+ value: function getResult() {
122
+ return this.result;
123
+ }
124
+
125
+ /**
126
+ * Closes the peerConnection
127
+ * @returns {void}
128
+ */
129
+ }, {
130
+ key: "closePeerConnection",
131
+ value: function closePeerConnection() {
132
+ if (this.pc) {
133
+ this.pc.onicecandidate = null;
134
+ this.pc.onicegatheringstatechange = null;
135
+ this.pc.close();
136
+ }
137
+ }
138
+
139
+ /**
140
+ * Resolves the defer, indicating that reachability checks for this cluster are completed
141
+ *
142
+ * @returns {void}
143
+ */
144
+ }, {
145
+ key: "finishReachabilityCheck",
146
+ value: function finishReachabilityCheck() {
147
+ this.defer.resolve();
148
+ }
149
+
150
+ /**
151
+ * Aborts the cluster reachability checks by closing the peer connection
152
+ *
153
+ * @returns {void}
154
+ */
155
+ }, {
156
+ key: "abort",
157
+ value: function abort() {
158
+ var CLOSED = _constants.CONNECTION_STATE.CLOSED;
159
+ if (this.pc && this.pc.connectionState !== CLOSED) {
160
+ this.closePeerConnection();
161
+ this.finishReachabilityCheck();
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Adds public IP (client media IPs)
167
+ * @param {string} protocol
168
+ * @param {string} publicIp
169
+ * @returns {void}
170
+ */
171
+ }, {
172
+ key: "addPublicIp",
173
+ value: function addPublicIp(protocol, publicIp) {
174
+ if (!publicIp) {
175
+ return;
176
+ }
177
+ var result = this.result[protocol];
178
+ var ipAdded = false;
179
+ if (result.clientMediaIPs) {
180
+ if (!result.clientMediaIPs.includes(publicIp)) {
181
+ result.clientMediaIPs.push(publicIp);
182
+ ipAdded = true;
183
+ }
184
+ } else {
185
+ result.clientMediaIPs = [publicIp];
186
+ ipAdded = true;
187
+ }
188
+ if (ipAdded) {
189
+ this.emit({
190
+ file: 'reachabilityPeerConnection',
191
+ function: 'addPublicIp'
192
+ }, _reachability.ReachabilityPeerConnectionEvents.clientMediaIpsUpdated, {
193
+ protocol: protocol,
194
+ clientMediaIPs: result.clientMediaIPs
195
+ });
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Registers a listener for the iceGatheringStateChange event
201
+ *
202
+ * @returns {void}
203
+ */
204
+ }, {
205
+ key: "registerIceGatheringStateChangeListener",
206
+ value: function registerIceGatheringStateChangeListener() {
207
+ var _this2 = this;
208
+ this.pc.onicegatheringstatechange = function () {
209
+ if (_this2.pc.iceGatheringState === _constants.ICE_GATHERING_STATE.COMPLETE) {
210
+ _this2.closePeerConnection();
211
+ _this2.defer.resolve();
212
+ }
213
+ };
214
+ }
215
+
216
+ /**
217
+ * Saves the latency in the result for the given protocol and marks it as reachable,
218
+ * emits the "resultReady" event if this is the first result for that protocol,
219
+ * emits the "clientMediaIpsUpdated" event if we already had a result and only found
220
+ * a new client IP
221
+ *
222
+ * @param {string} protocol
223
+ * @param {number} latency
224
+ * @param {string|null} [publicIp]
225
+ * @param {string|null} [serverIp]
226
+ * @returns {void}
227
+ */
228
+ }, {
229
+ key: "saveResult",
230
+ value: function saveResult(protocol, latency, publicIp, serverIp) {
231
+ var result = this.result[protocol];
232
+ if (result.latencyInMilliseconds === undefined) {
233
+ _loggerProxy.default.logger.log(// @ts-ignore
234
+ "Reachability:ReachabilityPeerConnection#saveResult --> Successfully reached ".concat(this.clusterName, " over ").concat(protocol, ": ").concat(latency, "ms"));
235
+ result.latencyInMilliseconds = latency;
236
+ result.result = 'reachable';
237
+ if (publicIp) {
238
+ result.clientMediaIPs = [publicIp];
239
+ }
240
+ this.emit({
241
+ file: 'reachabilityPeerConnection',
242
+ function: 'saveResult'
243
+ }, _reachability.ReachabilityPeerConnectionEvents.resultReady, _objectSpread({
244
+ protocol: protocol
245
+ }, result));
246
+ } else {
247
+ this.addPublicIp(protocol, publicIp);
248
+ }
249
+ if (serverIp) {
250
+ if (!this.emittedSubnets.has(serverIp)) {
251
+ this.emittedSubnets.add(serverIp);
252
+ this.emit({
253
+ file: 'reachabilityPeerConnection',
254
+ function: 'saveResult'
255
+ }, _reachability.ReachabilityPeerConnectionEvents.reachedSubnets, {
256
+ subnets: [serverIp]
257
+ });
258
+ }
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Determines NAT type by analyzing server reflexive candidate patterns
264
+ * @param {RTCIceCandidate} candidate server reflexive candidate
265
+ * @returns {void}
266
+ */
267
+ }, {
268
+ key: "determineNatTypeForSrflxCandidate",
269
+ value: function determineNatTypeForSrflxCandidate(candidate) {
270
+ var _this3 = this;
271
+ this.srflxIceCandidates.push(candidate);
272
+ if (this.srflxIceCandidates.length > 1) {
273
+ var portsFound = {};
274
+ this.srflxIceCandidates.forEach(function (c) {
275
+ var key = "".concat(c.address, ":").concat(c.relatedPort);
276
+ if (!portsFound[key]) {
277
+ portsFound[key] = new _set.default();
278
+ }
279
+ portsFound[key].add(c.port);
280
+ });
281
+ (0, _entries.default)(portsFound).forEach(function (_ref) {
282
+ var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
283
+ ports = _ref2[1];
284
+ if (ports.size > 1) {
285
+ // Found candidates with the same address and relatedPort, but different ports
286
+ _this3.emit({
287
+ file: 'reachabilityPeerConnection',
288
+ function: 'determineNatTypeForSrflxCandidate'
289
+ }, _reachability.ReachabilityPeerConnectionEvents.natTypeUpdated, {
290
+ natType: _reachability.NatType.SymmetricNat
291
+ });
292
+ }
293
+ });
294
+ }
295
+ }
296
+
297
+ /**
298
+ * Registers a listener for the icecandidate event
299
+ *
300
+ * @returns {void}
301
+ */
302
+ }, {
303
+ key: "registerIceCandidateListener",
304
+ value: function registerIceCandidateListener() {
305
+ var _this4 = this;
306
+ this.pc.onicecandidate = function (e) {
307
+ var TURN_TLS_PORT = 443;
308
+ var CANDIDATE_TYPES = {
309
+ SERVER_REFLEXIVE: 'srflx',
310
+ RELAY: 'relay'
311
+ };
312
+ var latencyInMilliseconds = _this4.getElapsedTime();
313
+ if (e.candidate) {
314
+ if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {
315
+ var serverIp = null;
316
+ if ('url' in e.candidate) {
317
+ var stunServerUrlRegex = /stun:([\d.]+):\d+/;
318
+ var match = e.candidate.url.match(stunServerUrlRegex);
319
+ serverIp = match && match[1];
320
+ }
321
+ _this4.saveResult('udp', latencyInMilliseconds, e.candidate.address, serverIp);
322
+ _this4.determineNatTypeForSrflxCandidate(e.candidate);
323
+ }
324
+ if (e.candidate.type === CANDIDATE_TYPES.RELAY) {
325
+ var protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';
326
+ _this4.saveResult(protocol, latencyInMilliseconds, null, e.candidate.address);
327
+ }
328
+ }
329
+ };
330
+ }
331
+
332
+ /**
333
+ * Starts the process of doing UDP, TCP, and XTLS reachability checks.
334
+ * @returns {Promise<ClusterReachabilityResult>}
335
+ */
336
+ }, {
337
+ key: "start",
338
+ value: (function () {
339
+ var _start = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
340
+ var offer, gatherIceCandidatePromise, _t;
341
+ return _regenerator.default.wrap(function (_context) {
342
+ while (1) switch (_context.prev = _context.next) {
343
+ case 0:
344
+ if (this.pc) {
345
+ _context.next = 1;
346
+ break;
347
+ }
348
+ _loggerProxy.default.logger.warn("Reachability:ReachabilityPeerConnection#start --> Error: peerConnection is undefined");
349
+ return _context.abrupt("return", this.result);
350
+ case 1:
351
+ // Initialize this.result as saying that nothing is reachable.
352
+ // It will get updated as we go along and successfully gather ICE candidates.
353
+ this.result.udp = {
354
+ result: this.numUdpUrls > 0 ? 'unreachable' : 'untested'
355
+ };
356
+ this.result.tcp = {
357
+ result: this.numTcpUrls > 0 ? 'unreachable' : 'untested'
358
+ };
359
+ this.result.xtls = {
360
+ result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested'
361
+ };
362
+ _context.prev = 2;
363
+ _context.next = 3;
364
+ return this.pc.createOffer({
365
+ offerToReceiveAudio: true
366
+ });
367
+ case 3:
368
+ offer = _context.sent;
369
+ this.startTimestamp = performance.now();
370
+
371
+ // Set up the state change listeners before triggering the ICE gathering
372
+ 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
373
+ // we just need to make this call to trigger the ICE gathering process
374
+ this.pc.setLocalDescription(offer);
375
+ _context.next = 4;
376
+ return gatherIceCandidatePromise;
377
+ case 4:
378
+ _context.next = 6;
379
+ break;
380
+ case 5:
381
+ _context.prev = 5;
382
+ _t = _context["catch"](2);
383
+ _loggerProxy.default.logger.warn("Reachability:ReachabilityPeerConnection#start --> Error: ", _t);
384
+ case 6:
385
+ return _context.abrupt("return", this.result);
386
+ case 7:
387
+ case "end":
388
+ return _context.stop();
389
+ }
390
+ }, _callee, this, [[2, 5]]);
391
+ }));
392
+ function start() {
393
+ return _start.apply(this, arguments);
394
+ }
395
+ return start;
396
+ }()
397
+ /**
398
+ * Starts the process of gathering ICE candidates
399
+ * @returns {Promise} promise that's resolved once reachability checks are completed or timeout is reached
400
+ */
401
+ )
402
+ }, {
403
+ key: "gatherIceCandidates",
404
+ value: function gatherIceCandidates() {
405
+ this.registerIceGatheringStateChangeListener();
406
+ this.registerIceCandidateListener();
407
+ return this.defer.promise;
408
+ }
409
+ }], [{
410
+ key: "buildPeerConnectionConfig",
411
+ value: function buildPeerConnectionConfig(cluster) {
412
+ var udpIceServers = cluster.udp.map(function (url) {
413
+ return {
414
+ username: '',
415
+ credential: '',
416
+ urls: [url]
417
+ };
418
+ });
419
+
420
+ // STUN servers are contacted only using UDP, so in order to test TCP reachability
421
+ // we pretend that Linus is a TURN server, because we can explicitly say "transport=tcp" in TURN urls.
422
+ // We then check for relay candidates to know if TURN-TCP worked (see registerIceCandidateListener()).
423
+ var tcpIceServers = cluster.tcp.map(function (urlString) {
424
+ return {
425
+ username: 'webexturnreachuser',
426
+ credential: 'webexturnreachpwd',
427
+ urls: [(0, _util.convertStunUrlToTurn)(urlString, 'tcp')]
428
+ };
429
+ });
430
+ var turnTlsIceServers = cluster.xtls.map(function (urlString) {
431
+ return {
432
+ username: 'webexturnreachuser',
433
+ credential: 'webexturnreachpwd',
434
+ urls: [(0, _util.convertStunUrlToTurnTls)(urlString)]
435
+ };
436
+ });
437
+ return {
438
+ iceServers: [].concat((0, _toConsumableArray2.default)(udpIceServers), (0, _toConsumableArray2.default)(tcpIceServers), (0, _toConsumableArray2.default)(turnTlsIceServers)),
439
+ iceCandidatePoolSize: 0,
440
+ iceTransportPolicy: 'all'
441
+ };
442
+ }
443
+ }]);
444
+ }(_eventsScope.default);
445
+ //# sourceMappingURL=reachabilityPeerConnection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_common","require","_loggerProxy","_interopRequireDefault","_util","_eventsScope","_constants","_reachability","ownKeys","e","r","t","_Object$keys","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","_callSuper","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","Boolean","prototype","valueOf","call","ReachabilityPeerConnection","exports","_EventsScope","clusterName","clusterInfo","_this","_classCallCheck2","_set","numUdpUrls","udp","numTcpUrls","tcp","numXTlsUrls","xtls","pc","createPeerConnection","defer","Defer","result","_inherits2","_createClass2","key","value","getElapsedTime","Math","round","performance","now","startTimestamp","config","buildPeerConnectionConfig","peerConnection","RTCPeerConnection","peerConnectionError","LoggerProxy","logger","warn","getResult","closePeerConnection","onicecandidate","onicegatheringstatechange","close","finishReachabilityCheck","resolve","abort","CLOSED","CONNECTION_STATE","connectionState","addPublicIp","protocol","publicIp","ipAdded","clientMediaIPs","includes","emit","file","function","ReachabilityPeerConnectionEvents","clientMediaIpsUpdated","registerIceGatheringStateChangeListener","_this2","iceGatheringState","ICE_GATHERING_STATE","COMPLETE","saveResult","latency","serverIp","latencyInMilliseconds","undefined","log","concat","resultReady","emittedSubnets","has","add","reachedSubnets","subnets","determineNatTypeForSrflxCandidate","candidate","_this3","srflxIceCandidates","portsFound","c","address","relatedPort","port","_entries","_ref","_ref2","_slicedToArray2","ports","size","natTypeUpdated","natType","NatType","SymmetricNat","registerIceCandidateListener","_this4","TURN_TLS_PORT","CANDIDATE_TYPES","SERVER_REFLEXIVE","RELAY","type","stunServerUrlRegex","match","url","_start","_asyncToGenerator2","_regenerator","mark","_callee","offer","gatherIceCandidatePromise","_t","wrap","_context","prev","next","abrupt","createOffer","offerToReceiveAudio","sent","gatherIceCandidates","setLocalDescription","stop","start","promise","cluster","udpIceServers","map","username","credential","urls","tcpIceServers","urlString","convertStunUrlToTurn","turnTlsIceServers","convertStunUrlToTurnTls","iceServers","_toConsumableArray2","iceCandidatePoolSize","iceTransportPolicy","EventsScope"],"sources":["reachabilityPeerConnection.ts"],"sourcesContent":["import {Defer} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {ClusterNode} from './request';\nimport {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';\nimport EventsScope from '../common/events/events-scope';\n\nimport {CONNECTION_STATE, ICE_GATHERING_STATE} from '../constants';\nimport {\n ClusterReachabilityResult,\n NatType,\n Protocol,\n ReachabilityPeerConnectionEvents,\n} from './reachability.types';\n\n/**\n * A class to handle RTCPeerConnection lifecycle and ICE candidate gathering for reachability checks.\n * It will do all the work like PeerConnection lifecycle, candidate processing, result management, and event emission.\n */\nexport class ReachabilityPeerConnection extends EventsScope {\n public numUdpUrls: number;\n public numTcpUrls: number;\n public numXTlsUrls: number;\n private pc: RTCPeerConnection | null;\n private defer: Defer;\n private startTimestamp: number;\n private srflxIceCandidates: RTCIceCandidate[] = [];\n private clusterName: string;\n private result: ClusterReachabilityResult;\n private emittedSubnets: Set<string> = new Set();\n\n /**\n * Constructor for ReachabilityPeerConnection\n * @param {string} clusterName name of the cluster\n * @param {ClusterNode} clusterInfo information about the media cluster\n */\n constructor(clusterName: string, clusterInfo: ClusterNode) {\n super();\n this.clusterName = clusterName;\n this.numUdpUrls = clusterInfo.udp.length;\n this.numTcpUrls = clusterInfo.tcp.length;\n this.numXTlsUrls = clusterInfo.xtls.length;\n\n this.pc = this.createPeerConnection(clusterInfo);\n\n this.defer = new Defer();\n this.result = {\n udp: {\n result: 'untested',\n },\n tcp: {\n result: 'untested',\n },\n xtls: {\n result: 'untested',\n },\n };\n }\n\n /**\n * Gets total elapsed time, can be called only after start() is called\n * @returns {number} Milliseconds\n */\n private getElapsedTime() {\n return Math.round(performance.now() - this.startTimestamp);\n }\n\n /**\n * Generate peerConnection config settings\n * @param {ClusterNode} cluster\n * @returns {RTCConfiguration} peerConnectionConfig\n */\n private static buildPeerConnectionConfig(cluster: ClusterNode): RTCConfiguration {\n const udpIceServers = cluster.udp.map((url) => ({\n username: '',\n credential: '',\n urls: [url],\n }));\n\n // STUN servers are contacted only using UDP, so in order to test TCP reachability\n // we pretend that Linus is a TURN server, because we can explicitly say \"transport=tcp\" in TURN urls.\n // We then check for relay candidates to know if TURN-TCP worked (see registerIceCandidateListener()).\n const tcpIceServers = cluster.tcp.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurn(urlString, 'tcp')],\n };\n });\n\n const turnTlsIceServers = cluster.xtls.map((urlString: string) => {\n return {\n username: 'webexturnreachuser',\n credential: 'webexturnreachpwd',\n urls: [convertStunUrlToTurnTls(urlString)],\n };\n });\n\n return {\n iceServers: [...udpIceServers, ...tcpIceServers, ...turnTlsIceServers],\n iceCandidatePoolSize: 0,\n iceTransportPolicy: 'all',\n };\n }\n\n /**\n * Creates an RTCPeerConnection\n * @param {ClusterNode} clusterInfo information about the media cluster\n * @returns {RTCPeerConnection|null} peerConnection\n */\n private createPeerConnection(clusterInfo: ClusterNode): RTCPeerConnection | null {\n try {\n const config = ReachabilityPeerConnection.buildPeerConnectionConfig(clusterInfo);\n\n const peerConnection = new RTCPeerConnection(config);\n\n return peerConnection;\n } catch (peerConnectionError) {\n LoggerProxy.logger.warn(\n `Reachability:ReachabilityPeerConnection#createPeerConnection --> Error creating peerConnection:`,\n peerConnectionError\n );\n\n return null;\n }\n }\n\n /**\n * @returns {ClusterReachabilityResult} reachability result for this instance\n */\n getResult() {\n return this.result;\n }\n\n /**\n * Closes the peerConnection\n * @returns {void}\n */\n private closePeerConnection() {\n if (this.pc) {\n this.pc.onicecandidate = null;\n this.pc.onicegatheringstatechange = null;\n this.pc.close();\n }\n }\n\n /**\n * Resolves the defer, indicating that reachability checks for this cluster are completed\n *\n * @returns {void}\n */\n private finishReachabilityCheck() {\n this.defer.resolve();\n }\n\n /**\n * Aborts the cluster reachability checks by closing the peer connection\n *\n * @returns {void}\n */\n public abort() {\n const {CLOSED} = CONNECTION_STATE;\n\n if (this.pc && this.pc.connectionState !== CLOSED) {\n this.closePeerConnection();\n this.finishReachabilityCheck();\n }\n }\n\n /**\n * Adds public IP (client media IPs)\n * @param {string} protocol\n * @param {string} publicIp\n * @returns {void}\n */\n private addPublicIp(protocol: Protocol, publicIp?: string | null) {\n if (!publicIp) {\n return;\n }\n\n const result = this.result[protocol];\n let ipAdded = false;\n\n if (result.clientMediaIPs) {\n if (!result.clientMediaIPs.includes(publicIp)) {\n result.clientMediaIPs.push(publicIp);\n ipAdded = true;\n }\n } else {\n result.clientMediaIPs = [publicIp];\n ipAdded = true;\n }\n\n if (ipAdded) {\n this.emit(\n {\n file: 'reachabilityPeerConnection',\n function: 'addPublicIp',\n },\n ReachabilityPeerConnectionEvents.clientMediaIpsUpdated,\n {\n protocol,\n clientMediaIPs: result.clientMediaIPs,\n }\n );\n }\n }\n\n /**\n * Registers a listener for the iceGatheringStateChange event\n *\n * @returns {void}\n */\n private registerIceGatheringStateChangeListener() {\n this.pc.onicegatheringstatechange = () => {\n if (this.pc.iceGatheringState === ICE_GATHERING_STATE.COMPLETE) {\n this.closePeerConnection();\n this.defer.resolve();\n }\n };\n }\n\n /**\n * Saves the latency in the result for the given protocol and marks it as reachable,\n * emits the \"resultReady\" event if this is the first result for that protocol,\n * emits the \"clientMediaIpsUpdated\" event if we already had a result and only found\n * a new client IP\n *\n * @param {string} protocol\n * @param {number} latency\n * @param {string|null} [publicIp]\n * @param {string|null} [serverIp]\n * @returns {void}\n */\n private saveResult(\n protocol: Protocol,\n latency: number,\n publicIp?: string | null,\n serverIp?: string | null\n ) {\n const result = this.result[protocol];\n\n if (result.latencyInMilliseconds === undefined) {\n LoggerProxy.logger.log(\n // @ts-ignore\n `Reachability:ReachabilityPeerConnection#saveResult --> Successfully reached ${this.clusterName} over ${protocol}: ${latency}ms`\n );\n result.latencyInMilliseconds = latency;\n result.result = 'reachable';\n if (publicIp) {\n result.clientMediaIPs = [publicIp];\n }\n\n this.emit(\n {\n file: 'reachabilityPeerConnection',\n function: 'saveResult',\n },\n ReachabilityPeerConnectionEvents.resultReady,\n {\n protocol,\n ...result,\n }\n );\n } else {\n this.addPublicIp(protocol, publicIp);\n }\n\n if (serverIp) {\n if (!this.emittedSubnets.has(serverIp)) {\n this.emittedSubnets.add(serverIp);\n this.emit(\n {\n file: 'reachabilityPeerConnection',\n function: 'saveResult',\n },\n ReachabilityPeerConnectionEvents.reachedSubnets,\n {\n subnets: [serverIp],\n }\n );\n }\n }\n }\n\n /**\n * Determines NAT type by analyzing server reflexive candidate patterns\n * @param {RTCIceCandidate} candidate server reflexive candidate\n * @returns {void}\n */\n private determineNatTypeForSrflxCandidate(candidate: RTCIceCandidate) {\n this.srflxIceCandidates.push(candidate);\n\n if (this.srflxIceCandidates.length > 1) {\n const portsFound: Record<string, Set<number>> = {};\n\n this.srflxIceCandidates.forEach((c) => {\n const key = `${c.address}:${c.relatedPort}`;\n if (!portsFound[key]) {\n portsFound[key] = new Set();\n }\n portsFound[key].add(c.port);\n });\n\n Object.entries(portsFound).forEach(([, ports]) => {\n if (ports.size > 1) {\n // Found candidates with the same address and relatedPort, but different ports\n this.emit(\n {\n file: 'reachabilityPeerConnection',\n function: 'determineNatTypeForSrflxCandidate',\n },\n ReachabilityPeerConnectionEvents.natTypeUpdated,\n {\n natType: NatType.SymmetricNat,\n }\n );\n }\n });\n }\n }\n\n /**\n * Registers a listener for the icecandidate event\n *\n * @returns {void}\n */\n private registerIceCandidateListener() {\n this.pc.onicecandidate = (e) => {\n const TURN_TLS_PORT = 443;\n const CANDIDATE_TYPES = {\n SERVER_REFLEXIVE: 'srflx',\n RELAY: 'relay',\n };\n\n const latencyInMilliseconds = this.getElapsedTime();\n\n if (e.candidate) {\n if (e.candidate.type === CANDIDATE_TYPES.SERVER_REFLEXIVE) {\n let serverIp = null;\n if ('url' in e.candidate) {\n const stunServerUrlRegex = /stun:([\\d.]+):\\d+/;\n\n const match = (e.candidate as any).url.match(stunServerUrlRegex);\n serverIp = match && match[1];\n }\n\n this.saveResult('udp', latencyInMilliseconds, e.candidate.address, serverIp);\n\n this.determineNatTypeForSrflxCandidate(e.candidate);\n }\n\n if (e.candidate.type === CANDIDATE_TYPES.RELAY) {\n const protocol = e.candidate.port === TURN_TLS_PORT ? 'xtls' : 'tcp';\n this.saveResult(protocol, latencyInMilliseconds, null, e.candidate.address);\n }\n }\n };\n }\n\n /**\n * Starts the process of doing UDP, TCP, and XTLS reachability checks.\n * @returns {Promise<ClusterReachabilityResult>}\n */\n async start(): Promise<ClusterReachabilityResult> {\n if (!this.pc) {\n LoggerProxy.logger.warn(\n `Reachability:ReachabilityPeerConnection#start --> Error: peerConnection is undefined`\n );\n\n return this.result;\n }\n\n // Initialize this.result as saying that nothing is reachable.\n // It will get updated as we go along and successfully gather ICE candidates.\n this.result.udp = {\n result: this.numUdpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.tcp = {\n result: this.numTcpUrls > 0 ? 'unreachable' : 'untested',\n };\n this.result.xtls = {\n result: this.numXTlsUrls > 0 ? 'unreachable' : 'untested',\n };\n\n try {\n const offer = await this.pc.createOffer({offerToReceiveAudio: true});\n\n this.startTimestamp = performance.now();\n\n // Set up the state change listeners before triggering the ICE gathering\n const gatherIceCandidatePromise = this.gatherIceCandidates();\n\n // not awaiting the next call on purpose, because we're not sending the offer anywhere and there won't be any answer\n // we just need to make this call to trigger the ICE gathering process\n this.pc.setLocalDescription(offer);\n\n await gatherIceCandidatePromise;\n } catch (error) {\n LoggerProxy.logger.warn(`Reachability:ReachabilityPeerConnection#start --> Error: `, error);\n }\n\n return this.result;\n }\n\n /**\n * Starts the process of gathering ICE candidates\n * @returns {Promise} promise that's resolved once reachability checks are completed or timeout is reached\n */\n private gatherIceCandidates() {\n this.registerIceGatheringStateChangeListener();\n this.registerIceCandidateListener();\n\n return this.defer.promise;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAK8B,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAe,MAAA,CAAAZ,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,CAAAC,OAAA,EAAAjB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAiB,iCAAA,GAAAC,wBAAA,CAAAnB,CA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,CAAC,CAAC;MAEF,IAAME,iBAAiB,GAAGT,OAAO,CAAClH,IAAI,CAACoH,GAAG,CAAC,UAACK,SAAiB,EAAK;QAChE,OAAO;UACLJ,QAAQ,EAAE,oBAAoB;UAC9BC,UAAU,EAAE,mBAAmB;UAC/BC,IAAI,EAAE,CAAC,IAAAK,6BAAuB,EAACH,SAAS,CAAC;QAC3C,CAAC;MACH,CAAC,CAAC;MAEF,OAAO;QACLI,UAAU,KAAApE,MAAA,KAAAqE,mBAAA,CAAAzJ,OAAA,EAAM8I,aAAa,OAAAW,mBAAA,CAAAzJ,OAAA,EAAKmJ,aAAa,OAAAM,mBAAA,CAAAzJ,OAAA,EAAKsJ,iBAAiB,EAAC;QACtEI,oBAAoB,EAAE,CAAC;QACvBC,kBAAkB,EAAE;MACtB,CAAC;IACH;EAAC;AAAA,EApF6CC,oBAAW","ignoreList":[]}
@@ -622,28 +622,33 @@ export declare const LOCUSINFO: {
622
622
  };
623
623
  };
624
624
  export declare const LOCUSEVENT: {
625
- LOCUS_MERCURY: string;
626
- CONTROLS_UPDATED: string;
627
- DIFFERENCE: string;
628
- BREAKOUT_ROSTER: string;
629
- FLOOR_GRANTED: string;
630
- FLOOR_RELEASED: string;
631
- MESSAGE_ROAP: string;
632
- PARTICIPANT_JOIN: string;
633
- PARTICIPANT_LEFT: string;
634
- PARTICIPANT_DECLINED: string;
635
- PARTICIPANT_UPDATED: string;
636
- PARTICIPANT_CONTROLS_UPDATED: string;
637
- PARTICIPANT_ROLES_UPDATED: string;
638
- PARTICIPANT_AUDIO_MUTED: string;
639
- PARTICIPANT_AUDIO_UNMUTED: string;
640
- PARTICIPANT_VIDEO_MUTED: string;
641
- PARTICIPANT_VIDEO_UNMUTED: string;
642
- RECORDING_STARTED: string;
643
- RECORDING_START_FAILED: string;
644
- RECORDING_STOPPED: string;
645
- SELF_CHANGED: string;
625
+ readonly LOCUS_MERCURY: "event:locus";
626
+ readonly CONTROLS_UPDATED: "locus.controls_updated";
627
+ readonly DIFFERENCE: "locus.difference";
628
+ readonly BREAKOUT_ROSTER: "breakout.roster";
629
+ readonly FLOOR_GRANTED: "locus.floor_granted";
630
+ readonly FLOOR_RELEASED: "locus.floor_released";
631
+ readonly MESSAGE_ROAP: "locus.message.roap";
632
+ readonly PARTICIPANT_JOIN: "locus.participant_joined";
633
+ readonly PARTICIPANT_LEFT: "locus.participant_left";
634
+ readonly PARTICIPANT_DECLINED: "locus.participant_declined";
635
+ readonly PARTICIPANT_UPDATED: "locus.participant_updated";
636
+ readonly PARTICIPANT_CONTROLS_UPDATED: "locus.participant_controls_updated";
637
+ readonly PARTICIPANT_ROLES_UPDATED: "locus.participant_roles_updated";
638
+ readonly PARTICIPANT_AUDIO_MUTED: "locus.participant_audio_muted";
639
+ readonly PARTICIPANT_AUDIO_UNMUTED: "locus.participant_audio_unmuted";
640
+ readonly PARTICIPANT_VIDEO_MUTED: "locus.participant_video_muted";
641
+ readonly PARTICIPANT_VIDEO_UNMUTED: "locus.participant_video_unmuted";
642
+ readonly RECORDING_STARTED: "locus.recording_started";
643
+ readonly RECORDING_START_FAILED: "locus.recording_start_failed";
644
+ readonly RECORDING_STOPPED: "locus.recording_stopped";
645
+ readonly SELF_CHANGED: "locus.self_changed";
646
+ readonly HASH_TREE_DATA_UPDATED: "locus.state_message";
647
+ readonly SDK_LOCUS_FROM_SYNC_MEETINGS: "jsSdk.locus_from_sync_meetings";
648
+ readonly SDK_NO_EVENT: "jsSdk.no_event";
646
649
  };
650
+ export type LOCUSEVENT = Enum<typeof LOCUSEVENT>;
651
+ export declare const LOCUS_LLM_EVENT: string;
647
652
  export declare const MEDIA_TRACK_CONSTRAINT: {
648
653
  CURSOR: {
649
654
  AWLAYS: string;
@@ -0,0 +1,8 @@
1
+ export declare const EMPTY_HASH = "99aa06d3014798d86001c324468d497f";
2
+ export declare const DataSetNames: {
3
+ MAIN: string;
4
+ ATTENDEES: string;
5
+ ATD_ACTIVE: string;
6
+ ATD_UNMUTED: string;
7
+ SELF: string;
8
+ };