@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.100
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.
- package/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/index.js +26 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +35 -9
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +13 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +898 -391
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +42 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +10 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +401 -115
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +1 -0
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1444 -772
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +35 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +231 -118
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +12 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +2 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +146 -17
- package/dist/types/hashTree/utils.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +59 -6
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +21 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +1 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +143 -9
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meetings/index.d.ts +30 -18
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +9 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +485 -234
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/index.ts +31 -0
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +20 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +16 -0
- package/src/hashTree/hashTreeParser.ts +596 -204
- package/src/hashTree/utils.ts +36 -0
- package/src/index.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/index.ts +27 -9
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +415 -136
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +25 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +1 -0
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +790 -136
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +47 -5
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +133 -78
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +330 -50
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/index.ts +49 -0
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1911 -143
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +645 -80
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +2261 -109
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +157 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +366 -39
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +516 -30
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
MultistreamRoapMediaConnection,
|
|
6
6
|
NamedMediaGroup,
|
|
7
7
|
StreamState,
|
|
8
|
+
MediaCodecMimeType,
|
|
9
|
+
CodecParameters,
|
|
8
10
|
} from '@webex/internal-media-core';
|
|
11
|
+
import Metrics from '../metrics';
|
|
12
|
+
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
9
13
|
|
|
10
14
|
/**
|
|
11
15
|
* This class is used to manage the sendSlots for the given media types.
|
|
@@ -206,6 +210,8 @@ export default class SendSlotManager {
|
|
|
206
210
|
}
|
|
207
211
|
|
|
208
212
|
/**
|
|
213
|
+
* @deprecated Use {@link setCustomCodecParameters} instead, which requires specifying the codec MIME type.
|
|
214
|
+
*
|
|
209
215
|
* This method is used to set the codec parameters for the sendSlot of the given mediaType
|
|
210
216
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
211
217
|
* @param {Object} codecParameters
|
|
@@ -226,12 +232,19 @@ export default class SendSlotManager {
|
|
|
226
232
|
|
|
227
233
|
await slot.setCodecParameters(codecParameters);
|
|
228
234
|
|
|
229
|
-
this.LoggerProxy.logger.
|
|
230
|
-
|
|
235
|
+
this.LoggerProxy.logger.warn(
|
|
236
|
+
'SendSlotsManager->setCodecParameters --> [DEPRECATION WARNING]: setCodecParameters has been deprecated, use setCustomCodecParameters instead'
|
|
231
237
|
);
|
|
238
|
+
|
|
239
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_SET_CODEC_PARAMETERS_USED, {
|
|
240
|
+
mediaType,
|
|
241
|
+
codecParameters,
|
|
242
|
+
});
|
|
232
243
|
}
|
|
233
244
|
|
|
234
245
|
/**
|
|
246
|
+
* @deprecated Use {@link markCustomCodecParametersForDeletion} instead, which requires specifying the codec MIME type.
|
|
247
|
+
*
|
|
235
248
|
* This method is used to delete the codec parameters for the sendSlot of the given mediaType
|
|
236
249
|
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
|
237
250
|
* @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
|
|
@@ -246,8 +259,89 @@ export default class SendSlotManager {
|
|
|
246
259
|
|
|
247
260
|
await slot.deleteCodecParameters(parameters);
|
|
248
261
|
|
|
262
|
+
this.LoggerProxy.logger.warn(
|
|
263
|
+
'SendSlotsManager->deleteCodecParameters --> [DEPRECATION WARNING]: deleteCodecParameters has been deprecated, use markCustomCodecParametersForDeletion instead'
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.DEPRECATED_DELETE_CODEC_PARAMETERS_USED, {
|
|
267
|
+
mediaType,
|
|
268
|
+
parameters,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Sets custom codec parameters for the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
274
|
+
* Delegates to WCME's setCustomCodecParameters API.
|
|
275
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
276
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type to apply parameters to (e.g. OPUS, H264, AV1)
|
|
277
|
+
* @param {CodecParameters} parameters Key-value pairs of codec parameters to set
|
|
278
|
+
* @returns {Promise<void>}
|
|
279
|
+
*/
|
|
280
|
+
public async setCustomCodecParameters(
|
|
281
|
+
mediaType: MediaType,
|
|
282
|
+
codecMimeType: MediaCodecMimeType,
|
|
283
|
+
parameters: CodecParameters
|
|
284
|
+
): Promise<void> {
|
|
285
|
+
const slot = this.slots.get(mediaType);
|
|
286
|
+
|
|
287
|
+
if (!slot) {
|
|
288
|
+
throw new Error(`Slot for ${mediaType} does not exist`);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
try {
|
|
292
|
+
await slot.setCustomCodecParameters(codecMimeType, parameters);
|
|
293
|
+
|
|
294
|
+
this.LoggerProxy.logger.info(
|
|
295
|
+
`SendSlotsManager->setCustomCodecParameters#Set custom codec parameters for ${mediaType} (codec: ${codecMimeType}) to ${JSON.stringify(
|
|
296
|
+
parameters
|
|
297
|
+
)}`
|
|
298
|
+
);
|
|
299
|
+
} catch (error) {
|
|
300
|
+
this.LoggerProxy.logger.error(
|
|
301
|
+
`SendSlotsManager->setCustomCodecParameters#Failed to set custom codec parameters for ${mediaType} (codec: ${codecMimeType}): ${error}`
|
|
302
|
+
);
|
|
303
|
+
throw error;
|
|
304
|
+
} finally {
|
|
305
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.SET_CUSTOM_CODEC_PARAMETERS_USED, {
|
|
306
|
+
mediaType,
|
|
307
|
+
codecMimeType,
|
|
308
|
+
parameters,
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Marks custom codec parameters for deletion on the sendSlot of the given mediaType, scoped to a specific codec MIME type.
|
|
315
|
+
* Delegates to WCME's markCustomCodecParametersForDeletion API.
|
|
316
|
+
* @param {MediaType} mediaType MediaType of the sendSlot
|
|
317
|
+
* @param {MediaCodecMimeType} codecMimeType The codec MIME type whose parameters should be deleted (e.g. OPUS, H264, AV1)
|
|
318
|
+
* @param {string[]} parameters Array of parameter keys to delete
|
|
319
|
+
* @returns {Promise<void>}
|
|
320
|
+
*/
|
|
321
|
+
public async markCustomCodecParametersForDeletion(
|
|
322
|
+
mediaType: MediaType,
|
|
323
|
+
codecMimeType: MediaCodecMimeType,
|
|
324
|
+
parameters: string[]
|
|
325
|
+
): Promise<void> {
|
|
326
|
+
const slot = this.slots.get(mediaType);
|
|
327
|
+
|
|
328
|
+
if (!slot) {
|
|
329
|
+
throw new Error(`Slot for ${mediaType} does not exist`);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
await slot.markCustomCodecParametersForDeletion(codecMimeType, parameters);
|
|
333
|
+
|
|
249
334
|
this.LoggerProxy.logger.info(
|
|
250
|
-
`SendSlotsManager->
|
|
335
|
+
`SendSlotsManager->markCustomCodecParametersForDeletion#Marked codec parameters for deletion -> ${parameters} for ${mediaType} (codec: ${codecMimeType})`
|
|
336
|
+
);
|
|
337
|
+
|
|
338
|
+
Metrics.sendBehavioralMetric(
|
|
339
|
+
BEHAVIORAL_METRICS.MARK_CUSTOM_CODEC_PARAMETERS_FOR_DELETION_USED,
|
|
340
|
+
{
|
|
341
|
+
mediaType,
|
|
342
|
+
codecMimeType,
|
|
343
|
+
parameters,
|
|
344
|
+
}
|
|
251
345
|
);
|
|
252
346
|
}
|
|
253
347
|
|
|
@@ -6,13 +6,14 @@ import {Enum} from '../constants';
|
|
|
6
6
|
import {
|
|
7
7
|
ClusterReachabilityResult,
|
|
8
8
|
NatType,
|
|
9
|
+
Protocol,
|
|
9
10
|
ReachabilityPeerConnectionEvents,
|
|
10
11
|
} from './reachability.types';
|
|
11
12
|
import {ReachabilityPeerConnection} from './reachabilityPeerConnection';
|
|
12
13
|
|
|
13
14
|
// data for the Events.resultReady event
|
|
14
15
|
export type ResultEventData = {
|
|
15
|
-
protocol:
|
|
16
|
+
protocol: Protocol;
|
|
16
17
|
result: 'reachable' | 'unreachable' | 'untested';
|
|
17
18
|
latencyInMilliseconds: number; // amount of time it took to get the ICE candidate
|
|
18
19
|
clientMediaIPs?: string[];
|
|
@@ -20,7 +21,7 @@ export type ResultEventData = {
|
|
|
20
21
|
|
|
21
22
|
// data for the Events.clientMediaIpsUpdated event
|
|
22
23
|
export type ClientMediaIpsUpdatedEventData = {
|
|
23
|
-
protocol:
|
|
24
|
+
protocol: Protocol;
|
|
24
25
|
clientMediaIPs: string[];
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
TransportResultForBackend,
|
|
26
26
|
GetClustersTrigger,
|
|
27
27
|
NatType,
|
|
28
|
+
Protocol,
|
|
28
29
|
} from './reachability.types';
|
|
29
30
|
import {
|
|
30
31
|
ClientMediaIpsUpdatedEventData,
|
|
@@ -33,6 +34,7 @@ import {
|
|
|
33
34
|
NatTypeUpdatedEventData,
|
|
34
35
|
ResultEventData,
|
|
35
36
|
} from './clusterReachability';
|
|
37
|
+
import {isReachabilityEnabled, resolveReachabilityProtocols} from './util';
|
|
36
38
|
import EventsScope from '../common/events/events-scope';
|
|
37
39
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
38
40
|
import Metrics from '../metrics';
|
|
@@ -194,7 +196,7 @@ export default class Reachability extends EventsScope {
|
|
|
194
196
|
*/
|
|
195
197
|
public async gatherReachability(trigger: string): Promise<ReachabilityResults> {
|
|
196
198
|
// @ts-ignore
|
|
197
|
-
if (!this.webex.config.meetings.enableReachabilityChecks) {
|
|
199
|
+
if (!isReachabilityEnabled(this.webex.config.meetings.enableReachabilityChecks)) {
|
|
198
200
|
throw new Error('enableReachabilityChecks is disabled in config');
|
|
199
201
|
}
|
|
200
202
|
|
|
@@ -515,7 +517,7 @@ export default class Reachability extends EventsScope {
|
|
|
515
517
|
* Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none
|
|
516
518
|
* of the media clusters where reachable with any of the protocols. This is done
|
|
517
519
|
* irrespective of the config, so for example:
|
|
518
|
-
* if config.meetings.
|
|
520
|
+
* if config.meetings.enableReachabilityChecks disables TLS,
|
|
519
521
|
* it will return false, because TLS reachability won't be tested,
|
|
520
522
|
* so we can't say for sure that media backend is unreachable over TLS.
|
|
521
523
|
*
|
|
@@ -568,6 +570,32 @@ export default class Reachability extends EventsScope {
|
|
|
568
570
|
return unreachable;
|
|
569
571
|
}
|
|
570
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Checks if any cluster is reachable via the given protocol based on stored reachability results.
|
|
575
|
+
*
|
|
576
|
+
* @param {string} protocol - the protocol to check ('udp', 'tcp', or 'xtls')
|
|
577
|
+
* @returns {Promise<boolean>} true if at least one cluster has a 'reachable' result for the given protocol
|
|
578
|
+
*/
|
|
579
|
+
async isAnyClusterReachableViaProtocol(protocol: Protocol): Promise<boolean> {
|
|
580
|
+
try {
|
|
581
|
+
// @ts-ignore
|
|
582
|
+
const resultsJson = await this.webex.boundedStorage.get(
|
|
583
|
+
this.namespace,
|
|
584
|
+
REACHABILITY.localStorageResult
|
|
585
|
+
);
|
|
586
|
+
|
|
587
|
+
const results: ReachabilityResults = JSON.parse(resultsJson);
|
|
588
|
+
|
|
589
|
+
return Object.values(results).some((result) => result[protocol]?.result === 'reachable');
|
|
590
|
+
} catch (e) {
|
|
591
|
+
LoggerProxy.logger.warn(
|
|
592
|
+
`Reachability:index#isAnyClusterReachableViaProtocol --> Error reading reachability data: ${e}`
|
|
593
|
+
);
|
|
594
|
+
|
|
595
|
+
return false;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
571
599
|
/**
|
|
572
600
|
* Get list of all unreachable clusters
|
|
573
601
|
* @returns {array} Unreachable clusters
|
|
@@ -700,7 +728,7 @@ export default class Reachability extends EventsScope {
|
|
|
700
728
|
*/
|
|
701
729
|
protected getStatistics(
|
|
702
730
|
results: Array<ClusterReachabilityResult & {isVideoMesh: boolean}>,
|
|
703
|
-
protocol:
|
|
731
|
+
protocol: Protocol,
|
|
704
732
|
isVideoMesh: boolean
|
|
705
733
|
) {
|
|
706
734
|
const values = results
|
|
@@ -888,14 +916,21 @@ export default class Reachability extends EventsScope {
|
|
|
888
916
|
|
|
889
917
|
this.startTime = performance.now();
|
|
890
918
|
|
|
919
|
+
const protocols = resolveReachabilityProtocols(
|
|
920
|
+
// @ts-ignore
|
|
921
|
+
this.webex.config.meetings.enableReachabilityChecks
|
|
922
|
+
);
|
|
923
|
+
|
|
924
|
+
const enabledProtocols = [
|
|
925
|
+
protocols.udp && 'UDP',
|
|
926
|
+
protocols.tcp && 'TCP',
|
|
927
|
+
protocols.tls && 'TLS',
|
|
928
|
+
].filter(Boolean);
|
|
929
|
+
|
|
891
930
|
LoggerProxy.logger.log(
|
|
892
|
-
`Reachability:index#performReachabilityChecks --> doing
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
}${
|
|
896
|
-
// @ts-ignore
|
|
897
|
-
this.webex.config.meetings.experimental.enableTlsReachability ? ',TLS' : ''
|
|
898
|
-
} reachability checks`
|
|
931
|
+
`Reachability:index#performReachabilityChecks --> doing ${enabledProtocols.join(
|
|
932
|
+
','
|
|
933
|
+
)} reachability checks`
|
|
899
934
|
);
|
|
900
935
|
|
|
901
936
|
this.resetResultCounters();
|
|
@@ -905,18 +940,14 @@ export default class Reachability extends EventsScope {
|
|
|
905
940
|
const cluster = clusterList[key];
|
|
906
941
|
|
|
907
942
|
// Linus doesn't support TCP reachability checks on video mesh nodes
|
|
908
|
-
const includeTcpReachability =
|
|
909
|
-
// @ts-ignore
|
|
910
|
-
this.webex.config.meetings.experimental.enableTcpReachability && !cluster.isVideoMesh;
|
|
943
|
+
const includeTcpReachability = protocols.tcp && !cluster.isVideoMesh;
|
|
911
944
|
|
|
912
945
|
if (!includeTcpReachability) {
|
|
913
946
|
cluster.tcp = [];
|
|
914
947
|
}
|
|
915
948
|
|
|
916
949
|
// Linus doesn't support xTLS reachability checks on video mesh nodes
|
|
917
|
-
const includeTlsReachability =
|
|
918
|
-
// @ts-ignore
|
|
919
|
-
this.webex.config.meetings.experimental.enableTlsReachability && !cluster.isVideoMesh;
|
|
950
|
+
const includeTlsReachability = protocols.tls && !cluster.isVideoMesh;
|
|
920
951
|
|
|
921
952
|
if (!includeTlsReachability) {
|
|
922
953
|
cluster.xtls = [];
|
|
@@ -2,6 +2,17 @@ import {IP_VERSION, Enum} from '../constants';
|
|
|
2
2
|
|
|
3
3
|
export type Protocol = 'udp' | 'tcp' | 'xtls';
|
|
4
4
|
|
|
5
|
+
// Per-protocol reachability flags, fully resolved.
|
|
6
|
+
export type ResolvedReachabilityProtocols = {
|
|
7
|
+
udp: boolean;
|
|
8
|
+
tcp: boolean;
|
|
9
|
+
tls: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ReachabilityProtocolConfig = Partial<Omit<ResolvedReachabilityProtocols, 'udp'>>;
|
|
13
|
+
|
|
14
|
+
export type EnableReachabilityChecksConfig = boolean | ReachabilityProtocolConfig;
|
|
15
|
+
|
|
5
16
|
/**
|
|
6
17
|
* Events emitted by ReachabilityPeerConnection
|
|
7
18
|
*/
|
package/src/reachability/util.ts
CHANGED
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
import {EnableReachabilityChecksConfig, ResolvedReachabilityProtocols} from './reachability.types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolves `enableReachabilityChecks` into explicit per-protocol flags.
|
|
6
|
+
* Defaults to all protocols enabled when not configured.
|
|
7
|
+
* UDP is always tested unless reachability is disabled entirely (`false`).
|
|
8
|
+
*
|
|
9
|
+
* @param {EnableReachabilityChecksConfig} enabled value of config.meetings.enableReachabilityChecks
|
|
10
|
+
* @returns {ResolvedReachabilityProtocols} resolved per-protocol flags
|
|
11
|
+
*/
|
|
12
|
+
export function resolveReachabilityProtocols(
|
|
13
|
+
enabled: EnableReachabilityChecksConfig = true
|
|
14
|
+
): ResolvedReachabilityProtocols {
|
|
15
|
+
if (typeof enabled === 'object') {
|
|
16
|
+
return {
|
|
17
|
+
udp: true,
|
|
18
|
+
tcp: enabled.tcp ?? true,
|
|
19
|
+
tls: enabled.tls ?? true,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return {udp: enabled, tcp: enabled, tls: enabled};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Whether any reachability protocol is enabled.
|
|
28
|
+
*
|
|
29
|
+
* @param {EnableReachabilityChecksConfig} config value of config.meetings.enableReachabilityChecks
|
|
30
|
+
* @returns {boolean} true if any protocol is enabled
|
|
31
|
+
*/
|
|
32
|
+
export function isReachabilityEnabled(config: EnableReachabilityChecksConfig = true): boolean {
|
|
33
|
+
const {udp, tcp, tls} = resolveReachabilityProtocols(config);
|
|
34
|
+
|
|
35
|
+
return udp || tcp || tls;
|
|
36
|
+
}
|
|
37
|
+
|
|
2
38
|
/**
|
|
3
39
|
* Converts a stun url to a turn url
|
|
4
40
|
*
|
|
@@ -261,8 +261,7 @@ export default class RecordingController {
|
|
|
261
261
|
|
|
262
262
|
LoggerProxy.logger.log(`RecordingController:index#recordingControls --> ${record}`);
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
return this.request.request({
|
|
264
|
+
return this.request.locusDeltaRequest({
|
|
266
265
|
uri: `${this.locusUrl}/${CONTROLS}`,
|
|
267
266
|
body: {
|
|
268
267
|
record,
|
|
@@ -229,9 +229,17 @@ export default class TurnDiscovery {
|
|
|
229
229
|
* @returns {TurnDiscoveryResult}
|
|
230
230
|
*/
|
|
231
231
|
private handleTurnDiscoveryFailure(meeting: Meeting, error: Error): TurnDiscoveryResult {
|
|
232
|
+
// if we got a 409/403 from Locus, it means we've been dropped from the meeting,
|
|
233
|
+
// so there's no point continuing with the media connection attempt
|
|
234
|
+
if ((error as any).statusCode === 409 || (error as any).statusCode === 403) {
|
|
235
|
+
this.defer = undefined;
|
|
236
|
+
throw error;
|
|
237
|
+
}
|
|
238
|
+
|
|
232
239
|
// we catch any errors and resolve with no turn information so that the normal call join flow can continue without TURN
|
|
233
240
|
LoggerProxy.logger.info(
|
|
234
|
-
`Roap:turnDiscovery#doTurnDiscovery --> TURN discovery failed, continuing without TURN
|
|
241
|
+
`Roap:turnDiscovery#doTurnDiscovery --> TURN discovery failed, continuing without TURN:`,
|
|
242
|
+
error
|
|
235
243
|
);
|
|
236
244
|
|
|
237
245
|
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.TURN_DISCOVERY_FAILURE, {
|