@webex/plugin-meetings 2.60.0-next.9 → 2.60.1-next.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 (55) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/config.d.ts +1 -0
  4. package/dist/config.js +2 -1
  5. package/dist/config.js.map +1 -1
  6. package/dist/index.js +5 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/interceptors/index.d.ts +2 -0
  9. package/dist/interceptors/index.js +15 -0
  10. package/dist/interceptors/index.js.map +1 -0
  11. package/dist/interceptors/locusRetry.d.ts +27 -0
  12. package/dist/interceptors/locusRetry.js +94 -0
  13. package/dist/interceptors/locusRetry.js.map +1 -0
  14. package/dist/interpretation/index.js +1 -1
  15. package/dist/interpretation/siLanguage.js +1 -1
  16. package/dist/meeting/index.js +6 -2
  17. package/dist/meeting/index.js.map +1 -1
  18. package/dist/meetings/index.d.ts +1 -11
  19. package/dist/meetings/index.js +4 -3
  20. package/dist/meetings/index.js.map +1 -1
  21. package/dist/reachability/clusterReachability.d.ts +109 -0
  22. package/dist/reachability/clusterReachability.js +357 -0
  23. package/dist/reachability/clusterReachability.js.map +1 -0
  24. package/dist/reachability/index.d.ts +32 -121
  25. package/dist/reachability/index.js +173 -459
  26. package/dist/reachability/index.js.map +1 -1
  27. package/dist/reachability/util.d.ts +8 -0
  28. package/dist/reachability/util.js +29 -0
  29. package/dist/reachability/util.js.map +1 -0
  30. package/dist/statsAnalyzer/index.d.ts +22 -0
  31. package/dist/statsAnalyzer/index.js +60 -0
  32. package/dist/statsAnalyzer/index.js.map +1 -1
  33. package/dist/statsAnalyzer/mqaUtil.js +4 -0
  34. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  35. package/dist/webinar/index.js +1 -1
  36. package/package.json +25 -22
  37. package/src/config.ts +1 -0
  38. package/src/index.ts +4 -0
  39. package/src/interceptors/index.ts +3 -0
  40. package/src/interceptors/locusRetry.ts +67 -0
  41. package/src/meeting/index.ts +10 -2
  42. package/src/meetings/index.ts +4 -3
  43. package/src/reachability/clusterReachability.ts +320 -0
  44. package/src/reachability/index.ts +124 -421
  45. package/src/reachability/util.ts +24 -0
  46. package/src/statsAnalyzer/index.ts +64 -1
  47. package/src/statsAnalyzer/mqaUtil.ts +4 -0
  48. package/test/unit/spec/interceptors/locusRetry.ts +131 -0
  49. package/test/unit/spec/meeting/index.js +8 -1
  50. package/test/unit/spec/meetings/index.js +28 -25
  51. package/test/unit/spec/reachability/clusterReachability.ts +279 -0
  52. package/test/unit/spec/reachability/index.ts +159 -226
  53. package/test/unit/spec/reachability/util.ts +40 -0
  54. package/test/unit/spec/roap/request.ts +26 -3
  55. package/test/unit/spec/stats-analyzer/index.js +100 -20
@@ -1,6 +1,8 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
+ import ReachabilityRequest from './request';
5
+ import { ClusterReachability, ClusterReachabilityResult } from './clusterReachability';
4
6
  export type ReachabilityMetrics = {
5
7
  reachability_public_udp_success: number;
6
8
  reachability_public_udp_failed: number;
@@ -11,29 +13,25 @@ export type ReachabilityMetrics = {
11
13
  reachability_vmn_tcp_success: number;
12
14
  reachability_vmn_tcp_failed: number;
13
15
  };
14
- export type TransportResult = {
16
+ /**
17
+ * This is the type that matches what backend expects us to send to them. It is a bit weird, because
18
+ * it uses strings instead of booleans and numbers, but that's what they require.
19
+ */
20
+ export type TransportResultForBackend = {
15
21
  reachable?: 'true' | 'false';
16
22
  latencyInMilliseconds?: string;
17
23
  clientMediaIPs?: string[];
18
24
  untested?: 'true';
19
25
  };
20
- type ReachabilityResult = {
21
- udp: TransportResult;
22
- tcp: TransportResult;
23
- xtls: {
24
- untested: 'true';
25
- };
26
+ export type ReachabilityResultForBackend = {
27
+ udp: TransportResultForBackend;
28
+ tcp: TransportResultForBackend;
29
+ xtls: TransportResultForBackend;
26
30
  };
27
- export type ReachabilityResults = Record<string, ReachabilityResult>;
28
- type InternalReachabilityResults = Record<string, ReachabilityResult & {
31
+ export type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;
32
+ export type ReachabilityResults = Record<string, ClusterReachabilityResult & {
29
33
  isVideoMesh?: boolean;
30
34
  }>;
31
- export type ICECandidateResult = {
32
- clusterId: string;
33
- isVideoMesh: boolean;
34
- elapsed?: string | null;
35
- publicIPs?: string[];
36
- };
37
35
  /**
38
36
  * @class Reachability
39
37
  * @export
@@ -41,8 +39,10 @@ export type ICECandidateResult = {
41
39
  export default class Reachability {
42
40
  namespace: string;
43
41
  webex: object;
44
- reachabilityRequest: any;
45
- clusterLatencyResults: any;
42
+ reachabilityRequest: ReachabilityRequest;
43
+ clusterReachability: {
44
+ [key: string]: ClusterReachability;
45
+ };
46
46
  /**
47
47
  * Creates an instance of Reachability.
48
48
  * @param {object} webex
@@ -50,13 +50,12 @@ export default class Reachability {
50
50
  */
51
51
  constructor(webex: object);
52
52
  /**
53
- * fetches reachability data
54
- * @returns {Object} reachability data
53
+ * Gets a list of media clusters from the backend and performs reachability checks on all the clusters
54
+ * @returns {Promise<ReachabilityResults>} reachability results
55
55
  * @public
56
- * @async
57
56
  * @memberof Reachability
58
57
  */
59
- gatherReachability(): Promise<InternalReachabilityResults>;
58
+ gatherReachability(): Promise<ReachabilityResults>;
60
59
  /**
61
60
  * Returns statistics about last reachability results. The returned value is an object
62
61
  * with a flat list of properties so that it can be easily sent with metrics
@@ -64,12 +63,18 @@ export default class Reachability {
64
63
  * @returns {Promise} Promise with metrics values, it never rejects/throws.
65
64
  */
66
65
  getReachabilityMetrics(): Promise<ReachabilityMetrics>;
66
+ /**
67
+ * Maps our internal transport result to the format that backend expects
68
+ * @param {TransportResult} transportResult
69
+ * @returns {TransportResultForBackend}
70
+ */
71
+ private mapTransportResultToBackendDataFormat;
67
72
  /**
68
73
  * Reachability results as an object in the format that backend expects
69
74
  *
70
75
  * @returns {any} reachability results that need to be sent to the backend
71
76
  */
72
- getReachabilityResults(): Promise<ReachabilityResults | undefined>;
77
+ getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined>;
73
78
  /**
74
79
  * fetches reachability data and checks for cluster reachability
75
80
  * @returns {boolean}
@@ -77,73 +82,13 @@ export default class Reachability {
77
82
  * @memberof Reachability
78
83
  */
79
84
  isAnyPublicClusterReachable(): Promise<boolean>;
80
- /**
81
- * Generate peerConnection config settings
82
- * @param {object} cluster
83
- * @returns {object} peerConnectionConfig
84
- * @private
85
- * @memberof Reachability
86
- */
87
- private buildPeerConnectionConfig;
88
- /**
89
- * Creates an RTCPeerConnection
90
- * @param {object} cluster
91
- * @returns {RTCPeerConnection} peerConnection
92
- * @private
93
- * @memberof Reachability
94
- */
95
- private createPeerConnection;
96
- /**
97
- * Gets total elapsed time
98
- * @param {RTCPeerConnection} peerConnection
99
- * @returns {Number} Milliseconds
100
- * @private
101
- * @memberof Reachability
102
- */
103
- private getElapsedTime;
104
- /**
105
- * creates offer and generates localSDP
106
- * @param {object} clusterList cluster List
107
- * @returns {Promise} Reachability latency results
108
- * @private
109
- * @memberof Reachability
110
- */
111
- private getLocalSDPForClusters;
112
85
  /**
113
86
  * Get list of all unreachable clusters
114
87
  * @returns {array} Unreachable clusters
115
88
  * @private
116
89
  * @memberof Reachability
117
90
  */
118
- private getUnreachablClusters;
119
- /**
120
- * Attach an event handler for the icegatheringstatechange
121
- * event and measure latency.
122
- * @param {RTCPeerConnection} peerConnection
123
- * @returns {undefined}
124
- * @private
125
- * @memberof Reachability
126
- */
127
- private handleIceGatheringStateChange;
128
- /**
129
- * Attach an event handler for the icecandidate
130
- * event and measure latency.
131
- * @param {RTCPeerConnection} peerConnection
132
- * @returns {undefined}
133
- * @private
134
- * @memberof Reachability
135
- */
136
- private handleOnIceCandidate;
137
- /**
138
- * An event handler on an RTCPeerConnection when the state of the ICE
139
- * candidate gathering process changes. Used to measure connection
140
- * speed.
141
- * @private
142
- * @param {RTCPeerConnection} peerConnection
143
- * @param {boolean} isVideoMesh
144
- * @returns {Promise}
145
- */
146
- private iceGatheringState;
91
+ private getUnreachableClusters;
147
92
  /**
148
93
  * Make a log of unreachable clusters.
149
94
  * @returns {undefined}
@@ -152,43 +97,9 @@ export default class Reachability {
152
97
  */
153
98
  private logUnreachableClusters;
154
99
  /**
155
- * Calculates time to establish connection
156
- * @param {Array<ICECandidateResult>} iceResults iceResults
157
- * @returns {object} reachabilityMap
158
- * @protected
159
- * @memberof Reachability
160
- */
161
- protected parseIceResultsToInternalReachabilityResults(iceResults: Array<ICECandidateResult>): InternalReachabilityResults;
162
- /**
163
- * fetches reachability data
164
- * @param {object} clusterList
165
- * @returns {Promise<InternalReachabilityResults>} reachability check results
166
- * @private
167
- * @memberof Reachability
168
- */
169
- private performReachabilityCheck;
170
- /**
171
- * Adds public IP (client media IPs)
172
- * @param {RTCPeerConnection} peerConnection
173
- * @param {string} publicIP
174
- * @returns {void}
175
- */
176
- protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null): void;
177
- /**
178
- * Records latency and closes the peerConnection
179
- * @param {RTCPeerConnection} peerConnection
180
- * @param {number} elapsed Latency in milliseconds
181
- * @returns {undefined}
182
- * @private
183
- * @memberof Reachability
184
- */
185
- private setLatencyAndClose;
186
- /**
187
- * utility function
188
- * @returns {undefined}
189
- * @private
190
- * @memberof Reachability
100
+ * Performs reachability checks for all clusters
101
+ * @param {ClusterList} clusterList
102
+ * @returns {Promise<ReachabilityResults>} reachability check results
191
103
  */
192
- private setup;
104
+ private performReachabilityChecks;
193
105
  }
194
- export {};