@webex/plugin-meetings 3.12.0-next.14 → 3.12.0-next.141

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 (236) hide show
  1. package/AGENTS.md +9 -0
  2. package/dist/aiEnableRequest/index.js +15 -2
  3. package/dist/aiEnableRequest/index.js.map +1 -1
  4. package/dist/annotation/index.js +2 -2
  5. package/dist/annotation/index.js.map +1 -1
  6. package/dist/breakouts/breakout.js +8 -3
  7. package/dist/breakouts/breakout.js.map +1 -1
  8. package/dist/breakouts/events.js +29 -14
  9. package/dist/breakouts/events.js.map +1 -1
  10. package/dist/breakouts/index.js +99 -4
  11. package/dist/breakouts/index.js.map +1 -1
  12. package/dist/common/errors/webex-errors.js +49 -5
  13. package/dist/common/errors/webex-errors.js.map +1 -1
  14. package/dist/config.js +2 -2
  15. package/dist/config.js.map +1 -1
  16. package/dist/constants.js +37 -10
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controls-options-manager/index.js +46 -10
  19. package/dist/controls-options-manager/index.js.map +1 -1
  20. package/dist/hashTree/constants.js +4 -1
  21. package/dist/hashTree/constants.js.map +1 -1
  22. package/dist/hashTree/hashTreeParser.js +1096 -391
  23. package/dist/hashTree/hashTreeParser.js.map +1 -1
  24. package/dist/hashTree/utils.js +20 -0
  25. package/dist/hashTree/utils.js.map +1 -1
  26. package/dist/index.js +7 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  29. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  30. package/dist/interceptors/locusRetry.js +23 -8
  31. package/dist/interceptors/locusRetry.js.map +1 -1
  32. package/dist/interpretation/index.js +10 -1
  33. package/dist/interpretation/index.js.map +1 -1
  34. package/dist/interpretation/interpretation.types.js +7 -0
  35. package/dist/interpretation/interpretation.types.js.map +1 -0
  36. package/dist/interpretation/siLanguage.js +1 -1
  37. package/dist/locus-info/controlsUtils.js +4 -1
  38. package/dist/locus-info/controlsUtils.js.map +1 -1
  39. package/dist/locus-info/index.js +615 -176
  40. package/dist/locus-info/index.js.map +1 -1
  41. package/dist/locus-info/infoUtils.js +36 -5
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/types.js +20 -0
  44. package/dist/locus-info/types.js.map +1 -1
  45. package/dist/media/MediaConnectionAwaiter.js +15 -2
  46. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  47. package/dist/media/index.js +8 -2
  48. package/dist/media/index.js.map +1 -1
  49. package/dist/media/properties.js +4 -5
  50. package/dist/media/properties.js.map +1 -1
  51. package/dist/meeting/in-meeting-actions.js +5 -1
  52. package/dist/meeting/in-meeting-actions.js.map +1 -1
  53. package/dist/meeting/index.js +1680 -835
  54. package/dist/meeting/index.js.map +1 -1
  55. package/dist/meeting/locusMediaRequest.js +229 -82
  56. package/dist/meeting/locusMediaRequest.js.map +1 -1
  57. package/dist/meeting/muteState.js +10 -1
  58. package/dist/meeting/muteState.js.map +1 -1
  59. package/dist/meeting/request.js +5 -2
  60. package/dist/meeting/request.js.map +1 -1
  61. package/dist/meeting/util.js +34 -2
  62. package/dist/meeting/util.js.map +1 -1
  63. package/dist/meeting/voicea-meeting.js +2 -1
  64. package/dist/meeting/voicea-meeting.js.map +1 -1
  65. package/dist/meeting-info/meeting-info-v2.js +9 -3
  66. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  67. package/dist/meetings/index.js +293 -124
  68. package/dist/meetings/index.js.map +1 -1
  69. package/dist/meetings/meetings.types.js +6 -1
  70. package/dist/meetings/meetings.types.js.map +1 -1
  71. package/dist/meetings/request.js +39 -0
  72. package/dist/meetings/request.js.map +1 -1
  73. package/dist/meetings/util.js +116 -18
  74. package/dist/meetings/util.js.map +1 -1
  75. package/dist/member/index.js +10 -0
  76. package/dist/member/index.js.map +1 -1
  77. package/dist/member/types.js.map +1 -1
  78. package/dist/member/util.js +30 -0
  79. package/dist/member/util.js.map +1 -1
  80. package/dist/members/index.js +101 -43
  81. package/dist/members/index.js.map +1 -1
  82. package/dist/members/util.js +8 -1
  83. package/dist/members/util.js.map +1 -1
  84. package/dist/metrics/constants.js +7 -1
  85. package/dist/metrics/constants.js.map +1 -1
  86. package/dist/multistream/codec/constants.js +63 -0
  87. package/dist/multistream/codec/constants.js.map +1 -0
  88. package/dist/multistream/mediaRequestManager.js +62 -15
  89. package/dist/multistream/mediaRequestManager.js.map +1 -1
  90. package/dist/multistream/receiveSlot.js +9 -0
  91. package/dist/multistream/receiveSlot.js.map +1 -1
  92. package/dist/reachability/clusterReachability.js.map +1 -1
  93. package/dist/reachability/index.js +121 -83
  94. package/dist/reachability/index.js.map +1 -1
  95. package/dist/reachability/reachability.types.js +2 -0
  96. package/dist/reachability/reachability.types.js.map +1 -1
  97. package/dist/reachability/util.js +45 -0
  98. package/dist/reachability/util.js.map +1 -1
  99. package/dist/reactions/reactions.type.js.map +1 -1
  100. package/dist/recording-controller/index.js +1 -3
  101. package/dist/recording-controller/index.js.map +1 -1
  102. package/dist/roap/turnDiscovery.js +8 -1
  103. package/dist/roap/turnDiscovery.js.map +1 -1
  104. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  105. package/dist/types/config.d.ts +2 -2
  106. package/dist/types/constants.d.ts +13 -1
  107. package/dist/types/controls-options-manager/index.d.ts +16 -0
  108. package/dist/types/hashTree/constants.d.ts +1 -0
  109. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  110. package/dist/types/hashTree/utils.d.ts +7 -0
  111. package/dist/types/index.d.ts +3 -0
  112. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  113. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  114. package/dist/types/locus-info/index.d.ts +106 -8
  115. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  116. package/dist/types/locus-info/types.d.ts +22 -1
  117. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  118. package/dist/types/media/properties.d.ts +6 -2
  119. package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
  120. package/dist/types/meeting/index.d.ts +176 -11
  121. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  122. package/dist/types/meeting/request.d.ts +1 -0
  123. package/dist/types/meeting/util.d.ts +9 -0
  124. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  125. package/dist/types/meetings/index.d.ts +40 -19
  126. package/dist/types/meetings/meetings.types.d.ts +15 -0
  127. package/dist/types/meetings/request.d.ts +14 -0
  128. package/dist/types/member/index.d.ts +1 -0
  129. package/dist/types/member/types.d.ts +1 -0
  130. package/dist/types/member/util.d.ts +9 -0
  131. package/dist/types/members/index.d.ts +15 -2
  132. package/dist/types/members/util.d.ts +1 -5
  133. package/dist/types/metrics/constants.d.ts +6 -0
  134. package/dist/types/multistream/codec/constants.d.ts +7 -0
  135. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  136. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  137. package/dist/types/reachability/index.d.ts +10 -3
  138. package/dist/types/reachability/reachability.types.d.ts +7 -0
  139. package/dist/types/reachability/util.d.ts +17 -0
  140. package/dist/types/reactions/reactions.type.d.ts +3 -0
  141. package/dist/webinar/index.js +307 -161
  142. package/dist/webinar/index.js.map +1 -1
  143. package/package.json +23 -23
  144. package/src/aiEnableRequest/index.ts +16 -0
  145. package/src/annotation/index.ts +6 -4
  146. package/src/breakouts/breakout.ts +3 -1
  147. package/src/breakouts/events.ts +33 -11
  148. package/src/breakouts/index.ts +122 -2
  149. package/src/common/errors/webex-errors.ts +50 -3
  150. package/src/config.ts +2 -2
  151. package/src/constants.ts +21 -3
  152. package/src/controls-options-manager/index.ts +62 -10
  153. package/src/hashTree/constants.ts +7 -0
  154. package/src/hashTree/hashTreeParser.ts +861 -193
  155. package/src/hashTree/utils.ts +19 -0
  156. package/src/index.ts +6 -0
  157. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  158. package/src/interceptors/locusRetry.ts +25 -4
  159. package/src/interpretation/index.ts +27 -9
  160. package/src/interpretation/interpretation.types.ts +11 -0
  161. package/src/locus-info/controlsUtils.ts +3 -1
  162. package/src/locus-info/index.ts +566 -164
  163. package/src/locus-info/infoUtils.ts +41 -6
  164. package/src/locus-info/types.ts +26 -1
  165. package/src/media/MediaConnectionAwaiter.ts +21 -4
  166. package/src/media/index.ts +10 -1
  167. package/src/media/properties.ts +8 -3
  168. package/src/meeting/in-meeting-actions.ts +8 -0
  169. package/src/meeting/index.ts +933 -119
  170. package/src/meeting/locusMediaRequest.ts +106 -6
  171. package/src/meeting/muteState.ts +10 -1
  172. package/src/meeting/request.ts +11 -0
  173. package/src/meeting/util.ts +46 -5
  174. package/src/meeting/voicea-meeting.ts +1 -1
  175. package/src/meeting-info/meeting-info-v2.ts +10 -4
  176. package/src/meetings/index.ts +197 -80
  177. package/src/meetings/meetings.types.ts +19 -0
  178. package/src/meetings/request.ts +43 -0
  179. package/src/meetings/util.ts +117 -4
  180. package/src/member/index.ts +10 -0
  181. package/src/member/types.ts +1 -0
  182. package/src/member/util.ts +29 -0
  183. package/src/members/index.ts +70 -7
  184. package/src/members/util.ts +12 -4
  185. package/src/metrics/constants.ts +6 -0
  186. package/src/multistream/codec/constants.ts +58 -0
  187. package/src/multistream/mediaRequestManager.ts +119 -28
  188. package/src/multistream/receiveSlot.ts +18 -0
  189. package/src/reachability/clusterReachability.ts +3 -2
  190. package/src/reachability/index.ts +47 -16
  191. package/src/reachability/reachability.types.ts +11 -0
  192. package/src/reachability/util.ts +36 -0
  193. package/src/reactions/reactions.type.ts +3 -0
  194. package/src/recording-controller/index.ts +1 -2
  195. package/src/roap/turnDiscovery.ts +9 -1
  196. package/src/webinar/index.ts +216 -38
  197. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  198. package/test/unit/spec/annotation/index.ts +3 -3
  199. package/test/unit/spec/breakouts/breakout.ts +9 -3
  200. package/test/unit/spec/breakouts/events.ts +120 -2
  201. package/test/unit/spec/breakouts/index.ts +223 -3
  202. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  203. package/test/unit/spec/controls-options-manager/index.js +139 -32
  204. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  205. package/test/unit/spec/hashTree/utils.ts +37 -0
  206. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  207. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  208. package/test/unit/spec/interpretation/index.ts +26 -4
  209. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  210. package/test/unit/spec/locus-info/index.js +1014 -58
  211. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  212. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  213. package/test/unit/spec/media/index.ts +92 -0
  214. package/test/unit/spec/media/properties.ts +23 -23
  215. package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
  216. package/test/unit/spec/meeting/index.js +2805 -116
  217. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  218. package/test/unit/spec/meeting/muteState.js +81 -0
  219. package/test/unit/spec/meeting/request.js +12 -0
  220. package/test/unit/spec/meeting/utils.js +153 -1
  221. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  222. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  223. package/test/unit/spec/meetings/index.js +533 -49
  224. package/test/unit/spec/meetings/request.js +141 -0
  225. package/test/unit/spec/meetings/utils.js +402 -51
  226. package/test/unit/spec/member/index.js +7 -0
  227. package/test/unit/spec/member/util.js +89 -0
  228. package/test/unit/spec/members/index.js +216 -0
  229. package/test/unit/spec/members/request.js +37 -1
  230. package/test/unit/spec/members/utils.js +63 -0
  231. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  232. package/test/unit/spec/reachability/index.ts +128 -46
  233. package/test/unit/spec/reachability/util.ts +31 -0
  234. package/test/unit/spec/recording-controller/index.js +9 -8
  235. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  236. package/test/unit/spec/webinar/index.ts +332 -31
@@ -23,6 +23,14 @@ export default class Members extends StatelessWebexPlugin {
23
23
  recordingId: any;
24
24
  selfId: any;
25
25
  type: any;
26
+ /**
27
+ * Map of CSI -> memberId that previously used the CSI in a Locus update.
28
+ * Keyed by CSI so findMemberByCsi can resolve it in O(1).
29
+ * Kept here (rather than on each Member) so it survives members being removed
30
+ * and re-added (e.g. when entering/leaving a breakout session).
31
+ * @private
32
+ */
33
+ private memberIdByHistoryCsi;
26
34
  namespace: string;
27
35
  /**
28
36
  *
@@ -313,11 +321,13 @@ export default class Members extends StatelessWebexPlugin {
313
321
  * Transfers the host to another member
314
322
  * @param {String} memberId
315
323
  * @param {boolean} [moderator] default true
324
+ * @param {String} [breakoutLocusUrl] when provided, the request is sent against this locus url
325
+ * (i.e. the breakout session's locus) instead of the main session's locus url
316
326
  * @returns {Promise}
317
327
  * @public
318
328
  * @memberof Members
319
329
  */
320
- transferHostToMember(memberId: string, moderator?: boolean): any;
330
+ transferHostToMember(memberId: string, moderator?: boolean, breakoutLocusUrl?: string): any;
321
331
  /**
322
332
  * Sends DTMF tones for the PSTN member of a meeting
323
333
  * @param {String} tones a string of one or more DTMF tones to send
@@ -327,7 +337,10 @@ export default class Members extends StatelessWebexPlugin {
327
337
  * @memberof Members
328
338
  */
329
339
  sendDialPadKey(tones?: string, memberId?: string): any;
330
- /** Finds a member that has any device with a csi matching provided value
340
+ /** Finds a member that has any device with a csi matching provided value.
341
+ * Falls back to the `memberIdByHistoryCsi` map so that a CSI a member used in
342
+ * a previous Locus update can still be resolved even if it is no longer
343
+ * present in `participant.devices[].csis`.
331
344
  *
332
345
  * @param {number} csi
333
346
  * @returns {Member}
@@ -188,11 +188,7 @@ declare const MembersUtil: {
188
188
  getTransferHostToMemberRequestParams: (options: any) => {
189
189
  method: string;
190
190
  uri: string;
191
- body: {
192
- role: {
193
- moderator: any;
194
- };
195
- };
191
+ body: Record<string, any>;
196
192
  };
197
193
  genderateSendDTMFOptions: (url: any, tones: any, memberId: any, locusUrl: any) => {
198
194
  url: any;
@@ -9,6 +9,7 @@ declare const BEHAVIORAL_METRICS: {
9
9
  ADD_MEDIA_SUCCESS: string;
10
10
  ADD_MEDIA_FAILURE: string;
11
11
  ADD_MEDIA_RETRY: string;
12
+ LOCUS_MEDIA_REQUEST_RETRY: string;
12
13
  ROAP_MERCURY_EVENT_RECEIVED: string;
13
14
  CONNECTION_SUCCESS: string;
14
15
  CONNECTION_FAILURE: string;
@@ -92,5 +93,10 @@ declare const BEHAVIORAL_METRICS: {
92
93
  DEPRECATED_DELETE_CODEC_PARAMETERS_USED: string;
93
94
  SET_CUSTOM_CODEC_PARAMETERS_USED: string;
94
95
  MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED: string;
96
+ HASH_TREE_SYNC_FAILURE: string;
97
+ HASH_TREE_HEARTBEAT_WATCHDOG_EXPIRED: string;
98
+ HASH_TREE_EMPTY_LOCUS_STATE_ELEMENTS: string;
99
+ DESTROY_MEETING_WHILE_SUSPENDED: string;
100
+ WASM_RUNTIME_PERFORMANCE: string;
95
101
  };
96
102
  export { BEHAVIORAL_METRICS as default };
@@ -0,0 +1,7 @@
1
+ import { AV1EncodingParams, SupportedResolution } from '@webex/internal-media-core';
2
+ export declare const AV1_CODEC_PARAMETERS: Record<SupportedResolution, AV1EncodingParams>;
3
+ export declare const H264_CODEC_PARAMETERS: {
4
+ maxFs: number;
5
+ maxFps: number;
6
+ maxMbps: number;
7
+ };
@@ -1,4 +1,4 @@
1
- import { StreamRequest, NamedMediaGroup } from '@webex/internal-media-core';
1
+ import { StreamRequest, NamedMediaGroup, MediaType, MediaCodecMimeType } from '@webex/internal-media-core';
2
2
  import { ReceiveSlot } from './receiveSlot';
3
3
  export interface ActiveSpeakerPolicyInfo {
4
4
  policy: 'active-speaker';
@@ -36,14 +36,22 @@ type DegradationPreferences = {
36
36
  maxMacroblocksLimit: number;
37
37
  };
38
38
  type SendMediaRequestsCallback = (streamRequests: StreamRequest[]) => void;
39
- type Kind = 'audio' | 'video';
40
- type Options = {
39
+ type GetIngressPayloadTypeCallback = (mediaType: MediaType, codecMimeType: MediaCodecMimeType) => number | undefined;
40
+ type AudioMediaRequestManagerOptions = {
41
41
  degradationPreferences: DegradationPreferences;
42
- kind: Kind;
42
+ kind: 'audio';
43
43
  trimRequestsToNumOfSources: boolean;
44
44
  };
45
+ type VideoMediaRequestManagerOptions = {
46
+ degradationPreferences: DegradationPreferences;
47
+ kind: 'video';
48
+ trimRequestsToNumOfSources: boolean;
49
+ enableAv1?: boolean;
50
+ };
51
+ type Options = AudioMediaRequestManagerOptions | VideoMediaRequestManagerOptions;
45
52
  export declare class MediaRequestManager {
46
53
  private sendMediaRequestsCallback;
54
+ private getIngressPayloadTypeCallback;
47
55
  private kind;
48
56
  private counter;
49
57
  private clientRequests;
@@ -51,9 +59,10 @@ export declare class MediaRequestManager {
51
59
  private sourceUpdateListener;
52
60
  private debouncedSourceUpdateListener;
53
61
  private trimRequestsToNumOfSources;
62
+ private enableAv1;
54
63
  private numTotalSources;
55
64
  private numLiveSources;
56
- constructor(sendMediaRequestsCallback: SendMediaRequestsCallback, options: Options);
65
+ constructor(sendMediaRequestsCallback: SendMediaRequestsCallback, getIngressPayloadTypeCallback: GetIngressPayloadTypeCallback, options: Options);
57
66
  setDegradationPreferences(degradationPreferences: DegradationPreferences): void;
58
67
  private getDegradedClientRequests;
59
68
  /**
@@ -77,6 +86,14 @@ export declare class MediaRequestManager {
77
86
  * @returns {number} maxMbps
78
87
  */
79
88
  private getH264MaxMbps;
89
+ /**
90
+ * Returns the AV1 encoding parameters for a media request
91
+ * @param mediaRequest - The media request to get the AV1 encoding parameters for
92
+ * @returns {AV1EncodingParams} The AV1 encoding parameters
93
+ */
94
+ private getAv1EncodingParams;
95
+ private buildH264CodecInfo;
96
+ private buildAv1CodecInfo;
80
97
  /** Modifies the passed in clientRequests and makes sure that in total they don't ask
81
98
  * for more streams than there are available.
82
99
  *
@@ -1,15 +1,15 @@
1
1
  import { ClusterNode } from './request';
2
2
  import EventsScope from '../common/events/events-scope';
3
3
  import { Enum } from '../constants';
4
- import { ClusterReachabilityResult, NatType } from './reachability.types';
4
+ import { ClusterReachabilityResult, NatType, Protocol } from './reachability.types';
5
5
  export type ResultEventData = {
6
- protocol: 'udp' | 'tcp' | 'xtls';
6
+ protocol: Protocol;
7
7
  result: 'reachable' | 'unreachable' | 'untested';
8
8
  latencyInMilliseconds: number;
9
9
  clientMediaIPs?: string[];
10
10
  };
11
11
  export type ClientMediaIpsUpdatedEventData = {
12
- protocol: 'udp' | 'tcp' | 'xtls';
12
+ protocol: Protocol;
13
13
  clientMediaIPs: string[];
14
14
  };
15
15
  export type NatTypeUpdatedEventData = {
@@ -4,7 +4,7 @@
4
4
  import { Defer } from '@webex/common';
5
5
  import { IP_VERSION } from '../constants';
6
6
  import ReachabilityRequest, { ClusterList } from './request';
7
- import { ClusterReachabilityResult, ClientMediaPreferences, ReachabilityMetrics, ReachabilityReportV0, ReachabilityReportV1, ReachabilityResults, ReachabilityResultsForBackend, GetClustersTrigger, NatType } from './reachability.types';
7
+ import { ClusterReachabilityResult, ClientMediaPreferences, ReachabilityMetrics, ReachabilityReportV0, ReachabilityReportV1, ReachabilityResults, ReachabilityResultsForBackend, GetClustersTrigger, NatType, Protocol } from './reachability.types';
8
8
  import { ClusterReachability } from './clusterReachability';
9
9
  import EventsScope from '../common/events/events-scope';
10
10
  /**
@@ -145,13 +145,20 @@ export default class Reachability extends EventsScope {
145
145
  * Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none
146
146
  * of the media clusters where reachable with any of the protocols. This is done
147
147
  * irrespective of the config, so for example:
148
- * if config.meetings.experimental.enableTlsReachability === false,
148
+ * if config.meetings.enableReachabilityChecks disables TLS,
149
149
  * it will return false, because TLS reachability won't be tested,
150
150
  * so we can't say for sure that media backend is unreachable over TLS.
151
151
  *
152
152
  * @returns {boolean}
153
153
  */
154
154
  isWebexMediaBackendUnreachable(): Promise<boolean>;
155
+ /**
156
+ * Checks if any cluster is reachable via the given protocol based on stored reachability results.
157
+ *
158
+ * @param {string} protocol - the protocol to check ('udp', 'tcp', or 'xtls')
159
+ * @returns {Promise<boolean>} true if at least one cluster has a 'reachable' result for the given protocol
160
+ */
161
+ isAnyClusterReachableViaProtocol(protocol: Protocol): Promise<boolean>;
155
162
  /**
156
163
  * Get list of all unreachable clusters
157
164
  * @returns {array} Unreachable clusters
@@ -209,7 +216,7 @@ export default class Reachability extends EventsScope {
209
216
  */
210
217
  protected getStatistics(results: Array<ClusterReachabilityResult & {
211
218
  isVideoMesh: boolean;
212
- }>, protocol: 'udp' | 'tcp' | 'xtls', isVideoMesh: boolean): {
219
+ }>, protocol: Protocol, isVideoMesh: boolean): {
213
220
  min: number;
214
221
  max: number;
215
222
  average: number;
@@ -1,5 +1,12 @@
1
1
  import { IP_VERSION, Enum } from '../constants';
2
2
  export type Protocol = 'udp' | 'tcp' | 'xtls';
3
+ export type ResolvedReachabilityProtocols = {
4
+ udp: boolean;
5
+ tcp: boolean;
6
+ tls: boolean;
7
+ };
8
+ export type ReachabilityProtocolConfig = Partial<Omit<ResolvedReachabilityProtocols, 'udp'>>;
9
+ export type EnableReachabilityChecksConfig = boolean | ReachabilityProtocolConfig;
3
10
  /**
4
11
  * Events emitted by ReachabilityPeerConnection
5
12
  */
@@ -1,3 +1,20 @@
1
+ import { EnableReachabilityChecksConfig, ResolvedReachabilityProtocols } from './reachability.types';
2
+ /**
3
+ * Resolves `enableReachabilityChecks` into explicit per-protocol flags.
4
+ * Defaults to all protocols enabled when not configured.
5
+ * UDP is always tested unless reachability is disabled entirely (`false`).
6
+ *
7
+ * @param {EnableReachabilityChecksConfig} enabled value of config.meetings.enableReachabilityChecks
8
+ * @returns {ResolvedReachabilityProtocols} resolved per-protocol flags
9
+ */
10
+ export declare function resolveReachabilityProtocols(enabled?: EnableReachabilityChecksConfig): ResolvedReachabilityProtocols;
11
+ /**
12
+ * Whether any reachability protocol is enabled.
13
+ *
14
+ * @param {EnableReachabilityChecksConfig} config value of config.meetings.enableReachabilityChecks
15
+ * @returns {boolean} true if any protocol is enabled
16
+ */
17
+ export declare function isReachabilityEnabled(config?: EnableReachabilityChecksConfig): boolean;
1
18
  /**
2
19
  * Converts a stun url to a turn url
3
20
  *
@@ -49,5 +49,8 @@ type RelayEventData = {
49
49
  };
50
50
  export type RelayEvent = {
51
51
  data: RelayEventData;
52
+ headers?: {
53
+ route?: string;
54
+ };
52
55
  };
53
56
  export {};