@webex/plugin-meetings 3.10.0-next.3 → 3.10.0-next.30

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 (274) hide show
  1. package/dist/annotation/annotation.types.js.map +1 -1
  2. package/dist/annotation/constants.js.map +1 -1
  3. package/dist/annotation/index.js +19 -22
  4. package/dist/annotation/index.js.map +1 -1
  5. package/dist/breakouts/breakout.js +6 -6
  6. package/dist/breakouts/breakout.js.map +1 -1
  7. package/dist/breakouts/collection.js.map +1 -1
  8. package/dist/breakouts/edit-lock-error.js +9 -11
  9. package/dist/breakouts/edit-lock-error.js.map +1 -1
  10. package/dist/breakouts/events.js.map +1 -1
  11. package/dist/breakouts/index.js +126 -127
  12. package/dist/breakouts/index.js.map +1 -1
  13. package/dist/breakouts/request.js +6 -8
  14. package/dist/breakouts/request.js.map +1 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +1 -2
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js.map +1 -1
  20. package/dist/common/errors/captcha-error.js +9 -11
  21. package/dist/common/errors/captcha-error.js.map +1 -1
  22. package/dist/common/errors/intent-to-join.js +10 -12
  23. package/dist/common/errors/intent-to-join.js.map +1 -1
  24. package/dist/common/errors/join-forbidden-error.js +10 -12
  25. package/dist/common/errors/join-forbidden-error.js.map +1 -1
  26. package/dist/common/errors/join-meeting.js +10 -12
  27. package/dist/common/errors/join-meeting.js.map +1 -1
  28. package/dist/common/errors/join-webinar-error.js +9 -11
  29. package/dist/common/errors/join-webinar-error.js.map +1 -1
  30. package/dist/common/errors/media.js +9 -11
  31. package/dist/common/errors/media.js.map +1 -1
  32. package/dist/common/errors/multistream-not-supported-error.js +9 -11
  33. package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
  34. package/dist/common/errors/no-meeting-info.js +9 -11
  35. package/dist/common/errors/no-meeting-info.js.map +1 -1
  36. package/dist/common/errors/parameter.js +11 -14
  37. package/dist/common/errors/parameter.js.map +1 -1
  38. package/dist/common/errors/password-error.js +9 -11
  39. package/dist/common/errors/password-error.js.map +1 -1
  40. package/dist/common/errors/permission.js +9 -11
  41. package/dist/common/errors/permission.js.map +1 -1
  42. package/dist/common/errors/reclaim-host-role-errors.js +32 -38
  43. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  44. package/dist/common/errors/reconnection-not-started.js +5 -6
  45. package/dist/common/errors/reconnection-not-started.js.map +1 -1
  46. package/dist/common/errors/reconnection.js +9 -11
  47. package/dist/common/errors/reconnection.js.map +1 -1
  48. package/dist/common/errors/stats.js +9 -11
  49. package/dist/common/errors/stats.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +20 -29
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/common/errors/webex-meetings-error.js +9 -12
  53. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  54. package/dist/common/events/events-scope.js +9 -10
  55. package/dist/common/events/events-scope.js.map +1 -1
  56. package/dist/common/events/events.js +9 -10
  57. package/dist/common/events/events.js.map +1 -1
  58. package/dist/common/events/trigger-proxy.js.map +1 -1
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.js.map +1 -1
  61. package/dist/common/logs/logger-proxy.js.map +1 -1
  62. package/dist/common/logs/request.js +17 -17
  63. package/dist/common/logs/request.js.map +1 -1
  64. package/dist/common/queue.js +1 -2
  65. package/dist/common/queue.js.map +1 -1
  66. package/dist/config.js +2 -2
  67. package/dist/config.js.map +1 -1
  68. package/dist/constants.js +11 -8
  69. package/dist/constants.js.map +1 -1
  70. package/dist/controls-options-manager/constants.js.map +1 -1
  71. package/dist/controls-options-manager/enums.js.map +1 -1
  72. package/dist/controls-options-manager/index.js +1 -2
  73. package/dist/controls-options-manager/index.js.map +1 -1
  74. package/dist/controls-options-manager/types.js.map +1 -1
  75. package/dist/controls-options-manager/util.js +1 -2
  76. package/dist/controls-options-manager/util.js.map +1 -1
  77. package/dist/hashTree/constants.js +20 -0
  78. package/dist/hashTree/constants.js.map +1 -0
  79. package/dist/hashTree/hashTree.js +515 -0
  80. package/dist/hashTree/hashTree.js.map +1 -0
  81. package/dist/hashTree/hashTreeParser.js +1250 -0
  82. package/dist/hashTree/hashTreeParser.js.map +1 -0
  83. package/dist/hashTree/types.js +23 -0
  84. package/dist/hashTree/types.js.map +1 -0
  85. package/dist/hashTree/utils.js +59 -0
  86. package/dist/hashTree/utils.js.map +1 -0
  87. package/dist/index.js +1 -2
  88. package/dist/index.js.map +1 -1
  89. package/dist/interceptors/index.js.map +1 -1
  90. package/dist/interceptors/locusRetry.js +6 -8
  91. package/dist/interceptors/locusRetry.js.map +1 -1
  92. package/dist/interceptors/locusRouteToken.js +26 -12
  93. package/dist/interceptors/locusRouteToken.js.map +1 -1
  94. package/dist/interpretation/collection.js.map +1 -1
  95. package/dist/interpretation/index.js +1 -2
  96. package/dist/interpretation/index.js.map +1 -1
  97. package/dist/interpretation/siLanguage.js +1 -1
  98. package/dist/interpretation/siLanguage.js.map +1 -1
  99. package/dist/locus-info/controlsUtils.js.map +1 -1
  100. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  101. package/dist/locus-info/fullState.js.map +1 -1
  102. package/dist/locus-info/hostUtils.js.map +1 -1
  103. package/dist/locus-info/index.js +609 -177
  104. package/dist/locus-info/index.js.map +1 -1
  105. package/dist/locus-info/infoUtils.js.map +1 -1
  106. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  107. package/dist/locus-info/parser.js +3 -4
  108. package/dist/locus-info/parser.js.map +1 -1
  109. package/dist/locus-info/selfUtils.js.map +1 -1
  110. package/dist/locus-info/types.js +7 -0
  111. package/dist/locus-info/types.js.map +1 -0
  112. package/dist/media/MediaConnectionAwaiter.js +1 -2
  113. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  114. package/dist/media/index.js +0 -2
  115. package/dist/media/index.js.map +1 -1
  116. package/dist/media/properties.js +15 -17
  117. package/dist/media/properties.js.map +1 -1
  118. package/dist/media/util.js.map +1 -1
  119. package/dist/meeting/brbState.js +8 -9
  120. package/dist/meeting/brbState.js.map +1 -1
  121. package/dist/meeting/connectionStateHandler.js +10 -13
  122. package/dist/meeting/connectionStateHandler.js.map +1 -1
  123. package/dist/meeting/in-meeting-actions.js.map +1 -1
  124. package/dist/meeting/index.js +1576 -1533
  125. package/dist/meeting/index.js.map +1 -1
  126. package/dist/meeting/locusMediaRequest.js +13 -17
  127. package/dist/meeting/locusMediaRequest.js.map +1 -1
  128. package/dist/meeting/muteState.js +11 -12
  129. package/dist/meeting/muteState.js.map +1 -1
  130. package/dist/meeting/request.js +101 -104
  131. package/dist/meeting/request.js.map +1 -1
  132. package/dist/meeting/request.type.js.map +1 -1
  133. package/dist/meeting/state.js.map +1 -1
  134. package/dist/meeting/type.js.map +1 -1
  135. package/dist/meeting/util.js +24 -23
  136. package/dist/meeting/util.js.map +1 -1
  137. package/dist/meeting/voicea-meeting.js +3 -3
  138. package/dist/meeting/voicea-meeting.js.map +1 -1
  139. package/dist/meeting-info/collection.js +7 -10
  140. package/dist/meeting-info/collection.js.map +1 -1
  141. package/dist/meeting-info/index.js +1 -2
  142. package/dist/meeting-info/index.js.map +1 -1
  143. package/dist/meeting-info/meeting-info-v2.js +135 -146
  144. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  145. package/dist/meeting-info/request.js +1 -2
  146. package/dist/meeting-info/request.js.map +1 -1
  147. package/dist/meeting-info/util.js +36 -37
  148. package/dist/meeting-info/util.js.map +1 -1
  149. package/dist/meeting-info/utilv2.js +30 -31
  150. package/dist/meeting-info/utilv2.js.map +1 -1
  151. package/dist/meetings/collection.js +6 -8
  152. package/dist/meetings/collection.js.map +1 -1
  153. package/dist/meetings/index.js +200 -148
  154. package/dist/meetings/index.js.map +1 -1
  155. package/dist/meetings/meetings.types.js.map +1 -1
  156. package/dist/meetings/request.js +6 -8
  157. package/dist/meetings/request.js.map +1 -1
  158. package/dist/meetings/util.js +36 -30
  159. package/dist/meetings/util.js.map +1 -1
  160. package/dist/member/index.js +1 -2
  161. package/dist/member/index.js.map +1 -1
  162. package/dist/member/types.js +6 -3
  163. package/dist/member/types.js.map +1 -1
  164. package/dist/member/util.js.map +1 -1
  165. package/dist/members/collection.js +1 -2
  166. package/dist/members/collection.js.map +1 -1
  167. package/dist/members/index.js +18 -21
  168. package/dist/members/index.js.map +1 -1
  169. package/dist/members/request.js +8 -11
  170. package/dist/members/request.js.map +1 -1
  171. package/dist/members/types.js.map +1 -1
  172. package/dist/members/util.js.map +1 -1
  173. package/dist/metrics/constants.js +3 -1
  174. package/dist/metrics/constants.js.map +1 -1
  175. package/dist/metrics/index.js +3 -4
  176. package/dist/metrics/index.js.map +1 -1
  177. package/dist/multistream/mediaRequestManager.js +1 -2
  178. package/dist/multistream/mediaRequestManager.js.map +1 -1
  179. package/dist/multistream/receiveSlot.js +34 -45
  180. package/dist/multistream/receiveSlot.js.map +1 -1
  181. package/dist/multistream/receiveSlotManager.js +8 -9
  182. package/dist/multistream/receiveSlotManager.js.map +1 -1
  183. package/dist/multistream/remoteMedia.js +12 -15
  184. package/dist/multistream/remoteMedia.js.map +1 -1
  185. package/dist/multistream/remoteMediaGroup.js +1 -2
  186. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  187. package/dist/multistream/remoteMediaManager.js +122 -123
  188. package/dist/multistream/remoteMediaManager.js.map +1 -1
  189. package/dist/multistream/sendSlotManager.js +29 -30
  190. package/dist/multistream/sendSlotManager.js.map +1 -1
  191. package/dist/personal-meeting-room/index.js +16 -19
  192. package/dist/personal-meeting-room/index.js.map +1 -1
  193. package/dist/personal-meeting-room/request.js +7 -10
  194. package/dist/personal-meeting-room/request.js.map +1 -1
  195. package/dist/personal-meeting-room/util.js.map +1 -1
  196. package/dist/reachability/clusterReachability.js +188 -352
  197. package/dist/reachability/clusterReachability.js.map +1 -1
  198. package/dist/reachability/index.js +206 -206
  199. package/dist/reachability/index.js.map +1 -1
  200. package/dist/reachability/reachability.types.js +14 -1
  201. package/dist/reachability/reachability.types.js.map +1 -1
  202. package/dist/reachability/reachabilityPeerConnection.js +445 -0
  203. package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
  204. package/dist/reachability/request.js.map +1 -1
  205. package/dist/reachability/util.js.map +1 -1
  206. package/dist/reactions/constants.js.map +1 -1
  207. package/dist/reactions/reactions.js.map +1 -1
  208. package/dist/reactions/reactions.type.js.map +1 -1
  209. package/dist/reconnection-manager/index.js +178 -176
  210. package/dist/reconnection-manager/index.js.map +1 -1
  211. package/dist/recording-controller/enums.js.map +1 -1
  212. package/dist/recording-controller/index.js +1 -2
  213. package/dist/recording-controller/index.js.map +1 -1
  214. package/dist/recording-controller/util.js.map +1 -1
  215. package/dist/roap/index.js +12 -15
  216. package/dist/roap/index.js.map +1 -1
  217. package/dist/roap/request.js +24 -26
  218. package/dist/roap/request.js.map +1 -1
  219. package/dist/roap/turnDiscovery.js +75 -76
  220. package/dist/roap/turnDiscovery.js.map +1 -1
  221. package/dist/roap/types.js.map +1 -1
  222. package/dist/transcription/index.js +4 -5
  223. package/dist/transcription/index.js.map +1 -1
  224. package/dist/types/config.d.ts +1 -0
  225. package/dist/types/constants.d.ts +26 -21
  226. package/dist/types/hashTree/constants.d.ts +8 -0
  227. package/dist/types/hashTree/hashTree.d.ts +129 -0
  228. package/dist/types/hashTree/hashTreeParser.d.ts +250 -0
  229. package/dist/types/hashTree/types.d.ts +33 -0
  230. package/dist/types/hashTree/utils.d.ts +16 -0
  231. package/dist/types/interceptors/locusRouteToken.d.ts +1 -0
  232. package/dist/types/locus-info/index.d.ts +98 -80
  233. package/dist/types/locus-info/types.d.ts +54 -0
  234. package/dist/types/meeting/index.d.ts +22 -9
  235. package/dist/types/meetings/index.d.ts +9 -2
  236. package/dist/types/metrics/constants.d.ts +2 -0
  237. package/dist/types/reachability/clusterReachability.d.ts +33 -84
  238. package/dist/types/reachability/reachability.types.d.ts +12 -1
  239. package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
  240. package/dist/webinar/collection.js +1 -2
  241. package/dist/webinar/collection.js.map +1 -1
  242. package/dist/webinar/index.js +148 -158
  243. package/dist/webinar/index.js.map +1 -1
  244. package/package.json +23 -22
  245. package/src/config.ts +1 -0
  246. package/src/constants.ts +13 -1
  247. package/src/hashTree/constants.ts +9 -0
  248. package/src/hashTree/hashTree.ts +463 -0
  249. package/src/hashTree/hashTreeParser.ts +1143 -0
  250. package/src/hashTree/types.ts +39 -0
  251. package/src/hashTree/utils.ts +53 -0
  252. package/src/interceptors/locusRouteToken.ts +16 -4
  253. package/src/locus-info/index.ts +625 -164
  254. package/src/locus-info/types.ts +53 -0
  255. package/src/meeting/index.ts +78 -27
  256. package/src/meeting/util.ts +1 -0
  257. package/src/meetings/index.ts +119 -59
  258. package/src/meetings/util.ts +10 -9
  259. package/src/metrics/constants.ts +2 -0
  260. package/src/reachability/clusterReachability.ts +159 -330
  261. package/src/reachability/index.ts +6 -1
  262. package/src/reachability/reachability.types.ts +15 -1
  263. package/src/reachability/reachabilityPeerConnection.ts +418 -0
  264. package/test/unit/spec/hashTree/hashTree.ts +655 -0
  265. package/test/unit/spec/hashTree/hashTreeParser.ts +1524 -0
  266. package/test/unit/spec/hashTree/utils.ts +140 -0
  267. package/test/unit/spec/interceptors/locusRouteToken.ts +27 -0
  268. package/test/unit/spec/locus-info/index.js +851 -16
  269. package/test/unit/spec/meeting/index.js +120 -20
  270. package/test/unit/spec/meeting/utils.js +77 -0
  271. package/test/unit/spec/meetings/index.js +263 -27
  272. package/test/unit/spec/meetings/utils.js +51 -1
  273. package/test/unit/spec/reachability/clusterReachability.ts +404 -137
  274. package/test/unit/spec/reachability/index.ts +3 -3
@@ -5,10 +5,17 @@ import { WebexPlugin } from '@webex/webex-core';
5
5
  import { DeviceRegistrationOptions } from '@webex/internal-plugin-device';
6
6
  import * as mediaHelpersModule from '@webex/media-helpers';
7
7
  import 'webrtc-adapter';
8
- import { DESTINATION_TYPE } from '../constants';
8
+ import { LOCUSEVENT, DESTINATION_TYPE } from '../constants';
9
9
  import { CallStateForMetrics } from '../meeting';
10
10
  import Reachability from '../reachability';
11
11
  import { INoiseReductionEffect, IVirtualBackgroundEffect, MeetingRegistrationStatus } from './meetings.types';
12
+ import { HashTreeMessage } from '../hashTree/hashTreeParser';
13
+ export type LocusEvent = {
14
+ eventType: LOCUSEVENT;
15
+ locusUrl?: string;
16
+ locus?: any;
17
+ stateElementsMessage?: HashTreeMessage;
18
+ };
12
19
  /**
13
20
  * Meetings Ready Event
14
21
  * Emitted when the meetings instance on webex is ready
@@ -129,7 +136,7 @@ export default class Meetings extends WebexPlugin {
129
136
  * @private
130
137
  * @memberof Meetings
131
138
  */
132
- getCorrespondingMeetingByLocus(data: any): any;
139
+ getCorrespondingMeetingByLocus(data: LocusEvent): any;
133
140
  /**
134
141
  * handle locus events and takes meeting actions with them as they come in
135
142
  * @param {Object} data a locus event
@@ -84,5 +84,7 @@ declare const BEHAVIORAL_METRICS: {
84
84
  VERIFY_REGISTRATION_ID_ERROR: string;
85
85
  JOIN_FORBIDDEN_ERROR: string;
86
86
  MEDIA_ISSUE_DETECTED: string;
87
+ LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH: string;
88
+ LOCUS_HASH_TREE_UNSUPPORTED_OPERATION: string;
87
89
  };
88
90
  export { BEHAVIORAL_METRICS as default };
@@ -23,115 +23,64 @@ export declare const Events: {
23
23
  export type Events = Enum<typeof Events>;
24
24
  /**
25
25
  * A class that handles reachability checks for a single cluster.
26
- * It emits events from Events enum
26
+ * Creates and orchestrates ReachabilityPeerConnection instance(s).
27
+ * Listens to events and emits them to consumers.
28
+ *
29
+ * When enablePerUdpUrlReachability is true:
30
+ * - Creates one ReachabilityPeerConnection for each UDP URL
31
+ * - Creates one ReachabilityPeerConnection for all TCP and TLS URLs together
32
+ * Otherwise:
33
+ * - Creates a single ReachabilityPeerConnection for all URLs
27
34
  */
28
35
  export declare class ClusterReachability extends EventsScope {
29
- private numUdpUrls;
30
- private numTcpUrls;
31
- private numXTlsUrls;
32
- private result;
33
- private pc?;
34
- private defer;
35
- private startTimestamp;
36
- private srflxIceCandidates;
36
+ private reachabilityPeerConnection;
37
+ private reachabilityPeerConnectionsForUdp;
37
38
  readonly isVideoMesh: boolean;
38
39
  readonly name: any;
39
40
  readonly reachedSubnets: Set<string>;
41
+ private enablePerUdpUrlReachability;
42
+ private udpResultEmitted;
40
43
  /**
41
44
  * Constructor for ClusterReachability
42
45
  * @param {string} name cluster name
43
46
  * @param {ClusterNode} clusterInfo information about the media cluster
47
+ * @param {boolean} enablePerUdpUrlReachability whether to create separate peer connections per UDP URL
44
48
  */
45
- constructor(name: string, clusterInfo: ClusterNode);
49
+ constructor(name: string, clusterInfo: ClusterNode, enablePerUdpUrlReachability?: boolean);
46
50
  /**
47
- * Gets total elapsed time, can be called only after start() is called
48
- * @returns {Number} Milliseconds
49
- */
50
- private getElapsedTime;
51
- /**
52
- * Generate peerConnection config settings
53
- * @param {ClusterNode} cluster
54
- * @returns {RTCConfiguration} peerConnectionConfig
55
- */
56
- private buildPeerConnectionConfig;
57
- /**
58
- * Creates an RTCPeerConnection
51
+ * Initializes a single ReachabilityPeerConnection for all protocols
59
52
  * @param {ClusterNode} clusterInfo information about the media cluster
60
- * @returns {RTCPeerConnection} peerConnection
61
- */
62
- private createPeerConnection;
63
- /**
64
- * @returns {ClusterReachabilityResult} reachability result for this cluster
65
- */
66
- getResult(): ClusterReachabilityResult;
67
- /**
68
- * Closes the peerConnection
69
- *
70
53
  * @returns {void}
71
54
  */
72
- private closePeerConnection;
55
+ private initializeSingleReachabilityPeerConnection;
73
56
  /**
74
- * Resolves the defer, indicating that reachability checks for this cluster are completed
75
- *
76
- * @returns {void}
77
- */
78
- private finishReachabilityCheck;
79
- /**
80
- * Aborts the cluster reachability checks by closing the peer connection
81
- *
82
- * @returns {void}
83
- */
84
- abort(): void;
85
- /**
86
- * Adds public IP (client media IPs)
87
- * @param {string} protocol
88
- * @param {string} publicIP
89
- * @returns {void}
90
- */
91
- private addPublicIP;
92
- /**
93
- * Registers a listener for the iceGatheringStateChange event
94
- *
95
- * @returns {void}
96
- */
97
- private registerIceGatheringStateChangeListener;
98
- /**
99
- * Saves the latency in the result for the given protocol and marks it as reachable,
100
- * emits the "resultReady" event if this is the first result for that protocol,
101
- * emits the "clientMediaIpsUpdated" event if we already had a result and only found
102
- * a new client IP
103
- *
104
- * @param {string} protocol
105
- * @param {number} latency
106
- * @param {string|null} [publicIp]
107
- * @param {string|null} [serverIp]
57
+ * Initializes per-URL UDP reachability checks:
58
+ * - One ReachabilityPeerConnection per UDP URL
59
+ * - One ReachabilityPeerConnection for all TCP and TLS URLs together
60
+ * @param {ClusterNode} clusterInfo information about the media cluster
108
61
  * @returns {void}
109
62
  */
110
- private saveResult;
63
+ private initializePerUdpUrlReachabilityCheck;
111
64
  /**
112
- * Determines NAT Type.
113
- *
114
- * @param {RTCIceCandidate} candidate
65
+ * Sets up event listeners for a ReachabilityPeerConnection instance
66
+ * @param {ReachabilityPeerConnection} rpc the ReachabilityPeerConnection instance
67
+ * @param {boolean} isUdpPerUrl whether this is a per-URL UDP instance
115
68
  * @returns {void}
116
69
  */
117
- private determineNatType;
70
+ private setupReachabilityPeerConnectionEventListeners;
118
71
  /**
119
- * Registers a listener for the icecandidate event
120
- *
121
- * @returns {void}
72
+ * Gets the aggregated reachability result for this cluster.
73
+ * @returns {ClusterReachabilityResult} reachability result for this cluster
122
74
  */
123
- private registerIceCandidateListener;
75
+ getResult(): ClusterReachabilityResult;
124
76
  /**
125
- * Starts the process of doing UDP and TCP reachability checks on the media cluster.
126
- * XTLS reachability checking is not supported.
127
- *
128
- * @returns {Promise}
77
+ * Starts the process of doing UDP, TCP, and XTLS reachability checks on the media cluster.
78
+ * @returns {Promise<ClusterReachabilityResult>}
129
79
  */
130
80
  start(): Promise<ClusterReachabilityResult>;
131
81
  /**
132
- * Starts the process of gathering ICE candidates
133
- *
134
- * @returns {Promise} promise that's resolved once reachability checks for this cluster are completed or timeout is reached
82
+ * Aborts the cluster reachability checks
83
+ * @returns {void}
135
84
  */
136
- private gatherIceCandidates;
85
+ abort(): void;
137
86
  }
@@ -1,4 +1,15 @@
1
- import { IP_VERSION } from '../constants';
1
+ import { IP_VERSION, Enum } from '../constants';
2
+ export type Protocol = 'udp' | 'tcp' | 'xtls';
3
+ /**
4
+ * Events emitted by ReachabilityPeerConnection
5
+ */
6
+ export declare const ReachabilityPeerConnectionEvents: {
7
+ readonly resultReady: "resultReady";
8
+ readonly clientMediaIpsUpdated: "clientMediaIpsUpdated";
9
+ readonly natTypeUpdated: "natTypeUpdated";
10
+ readonly reachedSubnets: "reachedSubnets";
11
+ };
12
+ export type ReachabilityPeerConnectionEvents = Enum<typeof ReachabilityPeerConnectionEvents>;
2
13
  export type TransportResult = {
3
14
  result: 'reachable' | 'unreachable' | 'untested';
4
15
  latencyInMilliseconds?: number;
@@ -0,0 +1,111 @@
1
+ import { ClusterNode } from './request';
2
+ import EventsScope from '../common/events/events-scope';
3
+ import { ClusterReachabilityResult } from './reachability.types';
4
+ /**
5
+ * A class to handle RTCPeerConnection lifecycle and ICE candidate gathering for reachability checks.
6
+ * It will do all the work like PeerConnection lifecycle, candidate processing, result management, and event emission.
7
+ */
8
+ export declare class ReachabilityPeerConnection extends EventsScope {
9
+ numUdpUrls: number;
10
+ numTcpUrls: number;
11
+ numXTlsUrls: number;
12
+ private pc;
13
+ private defer;
14
+ private startTimestamp;
15
+ private srflxIceCandidates;
16
+ private clusterName;
17
+ private result;
18
+ private emittedSubnets;
19
+ /**
20
+ * Constructor for ReachabilityPeerConnection
21
+ * @param {string} clusterName name of the cluster
22
+ * @param {ClusterNode} clusterInfo information about the media cluster
23
+ */
24
+ constructor(clusterName: string, clusterInfo: ClusterNode);
25
+ /**
26
+ * Gets total elapsed time, can be called only after start() is called
27
+ * @returns {number} Milliseconds
28
+ */
29
+ private getElapsedTime;
30
+ /**
31
+ * Generate peerConnection config settings
32
+ * @param {ClusterNode} cluster
33
+ * @returns {RTCConfiguration} peerConnectionConfig
34
+ */
35
+ private static buildPeerConnectionConfig;
36
+ /**
37
+ * Creates an RTCPeerConnection
38
+ * @param {ClusterNode} clusterInfo information about the media cluster
39
+ * @returns {RTCPeerConnection|null} peerConnection
40
+ */
41
+ private createPeerConnection;
42
+ /**
43
+ * @returns {ClusterReachabilityResult} reachability result for this instance
44
+ */
45
+ getResult(): ClusterReachabilityResult;
46
+ /**
47
+ * Closes the peerConnection
48
+ * @returns {void}
49
+ */
50
+ private closePeerConnection;
51
+ /**
52
+ * Resolves the defer, indicating that reachability checks for this cluster are completed
53
+ *
54
+ * @returns {void}
55
+ */
56
+ private finishReachabilityCheck;
57
+ /**
58
+ * Aborts the cluster reachability checks by closing the peer connection
59
+ *
60
+ * @returns {void}
61
+ */
62
+ abort(): void;
63
+ /**
64
+ * Adds public IP (client media IPs)
65
+ * @param {string} protocol
66
+ * @param {string} publicIp
67
+ * @returns {void}
68
+ */
69
+ private addPublicIp;
70
+ /**
71
+ * Registers a listener for the iceGatheringStateChange event
72
+ *
73
+ * @returns {void}
74
+ */
75
+ private registerIceGatheringStateChangeListener;
76
+ /**
77
+ * Saves the latency in the result for the given protocol and marks it as reachable,
78
+ * emits the "resultReady" event if this is the first result for that protocol,
79
+ * emits the "clientMediaIpsUpdated" event if we already had a result and only found
80
+ * a new client IP
81
+ *
82
+ * @param {string} protocol
83
+ * @param {number} latency
84
+ * @param {string|null} [publicIp]
85
+ * @param {string|null} [serverIp]
86
+ * @returns {void}
87
+ */
88
+ private saveResult;
89
+ /**
90
+ * Determines NAT type by analyzing server reflexive candidate patterns
91
+ * @param {RTCIceCandidate} candidate server reflexive candidate
92
+ * @returns {void}
93
+ */
94
+ private determineNatTypeForSrflxCandidate;
95
+ /**
96
+ * Registers a listener for the icecandidate event
97
+ *
98
+ * @returns {void}
99
+ */
100
+ private registerIceCandidateListener;
101
+ /**
102
+ * Starts the process of doing UDP, TCP, and XTLS reachability checks.
103
+ * @returns {Promise<ClusterReachabilityResult>}
104
+ */
105
+ start(): Promise<ClusterReachabilityResult>;
106
+ /**
107
+ * Starts the process of gathering ICE candidates
108
+ * @returns {Promise} promise that's resolved once reachability checks are completed or timeout is reached
109
+ */
110
+ private gatherIceCandidates;
111
+ }
@@ -21,7 +21,7 @@ var WebinarCollection = /*#__PURE__*/function () {
21
21
  (0, _defineProperty2.default)(this, "mainIndex", 'sessionId');
22
22
  this.webinarInfo = {};
23
23
  }
24
- (0, _createClass2.default)(WebinarCollection, [{
24
+ return (0, _createClass2.default)(WebinarCollection, [{
25
25
  key: "set",
26
26
  value: function set(id, info) {
27
27
  this.webinarInfo[id] = info;
@@ -37,7 +37,6 @@ var WebinarCollection = /*#__PURE__*/function () {
37
37
  return this.webinarInfo[id];
38
38
  }
39
39
  }]);
40
- return WebinarCollection;
41
40
  }();
42
41
  var _default = exports.default = WebinarCollection;
43
42
  //# sourceMappingURL=collection.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","WebinarCollection","_classCallCheck2","default","_defineProperty2","MEETINGS","webinarInfo","_createClass2","key","value","set","id","info","get","_default","exports"],"sources":["collection.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MEETINGS} from '../constants';\n\nclass WebinarCollection {\n webinarInfo: any;\n\n namespace = MEETINGS;\n\n mainIndex = 'sessionId';\n\n constructor() {\n this.webinarInfo = {};\n }\n\n set(id, info) {\n this.webinarInfo[id] = info;\n }\n\n /**\n * @param {String} id\n * @returns {Member}\n */\n get(id: string) {\n return this.webinarInfo[id];\n }\n}\n\nexport default WebinarCollection;\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAJA;AACA;AACA;AAFA,IAMMC,iBAAiB;EAOrB,SAAAA,kBAAA,EAAc;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,iBAAA;IAAA,IAAAG,gBAAA,CAAAD,OAAA;IAAA,IAAAC,gBAAA,CAAAD,OAAA,qBAJFE,mBAAQ;IAAA,IAAAD,gBAAA,CAAAD,OAAA,qBAER,WAAW;IAGrB,IAAI,CAACG,WAAW,GAAG,CAAC,CAAC;EACvB;EAAC,IAAAC,aAAA,CAAAJ,OAAA,EAAAF,iBAAA;IAAAO,GAAA;IAAAC,KAAA,EAED,SAAAC,IAAIC,EAAE,EAAEC,IAAI,EAAE;MACZ,IAAI,CAACN,WAAW,CAACK,EAAE,CAAC,GAAGC,IAAI;IAC7B;;IAEA;AACF;AACA;AACA;EAHE;IAAAJ,GAAA;IAAAC,KAAA,EAIA,SAAAI,IAAIF,EAAU,EAAE;MACd,OAAO,IAAI,CAACL,WAAW,CAACK,EAAE,CAAC;IAC7B;EAAC;EAAA,OAAAV,iBAAA;AAAA;AAAA,IAAAa,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAGYF,iBAAiB"}
1
+ {"version":3,"names":["_constants","require","WebinarCollection","_classCallCheck2","default","_defineProperty2","MEETINGS","webinarInfo","_createClass2","key","value","set","id","info","get","_default","exports"],"sources":["collection.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {MEETINGS} from '../constants';\n\nclass WebinarCollection {\n webinarInfo: any;\n\n namespace = MEETINGS;\n\n mainIndex = 'sessionId';\n\n constructor() {\n this.webinarInfo = {};\n }\n\n set(id, info) {\n this.webinarInfo[id] = info;\n }\n\n /**\n * @param {String} id\n * @returns {Member}\n */\n get(id: string) {\n return this.webinarInfo[id];\n }\n}\n\nexport default WebinarCollection;\n"],"mappings":";;;;;;;;;;;AAIA,IAAAA,UAAA,GAAAC,OAAA;AAJA;AACA;AACA;AAFA,IAMMC,iBAAiB;EAOrB,SAAAA,kBAAA,EAAc;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,iBAAA;IAAA,IAAAG,gBAAA,CAAAD,OAAA;IAAA,IAAAC,gBAAA,CAAAD,OAAA,qBAJFE,mBAAQ;IAAA,IAAAD,gBAAA,CAAAD,OAAA,qBAER,WAAW;IAGrB,IAAI,CAACG,WAAW,GAAG,CAAC,CAAC;EACvB;EAAC,WAAAC,aAAA,CAAAJ,OAAA,EAAAF,iBAAA;IAAAO,GAAA;IAAAC,KAAA,EAED,SAAAC,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAE;MACZ,IAAI,CAACN,WAAW,CAACK,EAAE,CAAC,GAAGC,IAAI;IAC7B;;IAEA;AACF;AACA;AACA;EAHE;IAAAJ,GAAA;IAAAC,KAAA,EAIA,SAAAI,GAAGA,CAACF,EAAU,EAAE;MACd,OAAO,IAAI,CAACL,WAAW,CAACK,EAAE,CAAC;IAC7B;EAAC;AAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAGYF,iBAAiB","ignoreList":[]}