@webex/plugin-meetings 3.10.0 → 3.11.0
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/dist/annotation/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +38 -27
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +13 -8
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +20 -0
- package/dist/hashTree/constants.js.map +1 -0
- package/dist/hashTree/hashTree.js +515 -0
- package/dist/hashTree/hashTree.js.map +1 -0
- package/dist/hashTree/hashTreeParser.js +1250 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +23 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/hashTree/utils.js +59 -0
- package/dist/hashTree/utils.js.map +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +33 -13
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +5 -3
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +619 -177
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/media/MediaConnectionAwaiter.js +1 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +5 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +15 -17
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1632 -1535
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +24 -23
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +200 -148
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +36 -30
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +4 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +188 -352
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +206 -206
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +445 -0
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +27 -21
- package/dist/types/hashTree/constants.d.ts +8 -0
- package/dist/types/hashTree/hashTree.d.ts +129 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +250 -0
- package/dist/types/hashTree/types.d.ts +33 -0
- package/dist/types/hashTree/utils.d.ts +16 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +98 -80
- package/dist/types/locus-info/types.d.ts +54 -0
- package/dist/types/meeting/index.d.ts +35 -9
- package/dist/types/meetings/index.d.ts +9 -2
- package/dist/types/metrics/constants.d.ts +3 -0
- package/dist/types/reachability/clusterReachability.d.ts +33 -84
- package/dist/types/reachability/reachability.types.d.ts +12 -1
- package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +148 -158
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/common/errors/webex-errors.ts +19 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +15 -2
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTree.ts +463 -0
- package/src/hashTree/hashTreeParser.ts +1143 -0
- package/src/hashTree/types.ts +39 -0
- package/src/hashTree/utils.ts +53 -0
- package/src/index.ts +2 -0
- package/src/interceptors/locusRouteToken.ts +22 -5
- package/src/locus-info/controlsUtils.ts +6 -0
- package/src/locus-info/index.ts +641 -164
- package/src/locus-info/types.ts +53 -0
- package/src/media/index.ts +6 -0
- package/src/meeting/index.ts +137 -28
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +119 -59
- package/src/meetings/util.ts +10 -9
- package/src/metrics/constants.ts +3 -0
- package/src/reachability/clusterReachability.ts +159 -330
- package/src/reachability/index.ts +6 -1
- package/src/reachability/reachability.types.ts +15 -1
- package/src/reachability/reachabilityPeerConnection.ts +418 -0
- package/test/unit/spec/hashTree/hashTree.ts +655 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1524 -0
- package/test/unit/spec/hashTree/utils.ts +140 -0
- package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +27 -1
- package/test/unit/spec/locus-info/index.js +879 -16
- package/test/unit/spec/media/index.ts +140 -9
- package/test/unit/spec/meeting/index.js +299 -94
- package/test/unit/spec/meeting/utils.js +78 -1
- package/test/unit/spec/meetings/index.js +263 -29
- package/test/unit/spec/meetings/utils.js +51 -1
- package/test/unit/spec/reachability/clusterReachability.ts +404 -137
- package/test/unit/spec/reachability/index.ts +3 -3
|
@@ -23,6 +23,8 @@ import { LocusMediaRequest } from './locusMediaRequest';
|
|
|
23
23
|
import { BrbState } from './brbState';
|
|
24
24
|
import { SetStageOptions } from './request.type';
|
|
25
25
|
import { Invitee } from './type';
|
|
26
|
+
import { DataSet } from '../hashTree/hashTreeParser';
|
|
27
|
+
import { LocusDTO } from '../locus-info/types';
|
|
26
28
|
export type CaptionData = {
|
|
27
29
|
id: string;
|
|
28
30
|
isFinal: boolean;
|
|
@@ -488,6 +490,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
488
490
|
private uploadLogsTimer?;
|
|
489
491
|
private logUploadIntervalIndex;
|
|
490
492
|
private mediaServerIp;
|
|
493
|
+
private llmHealthCheckTimer?;
|
|
491
494
|
/**
|
|
492
495
|
* @param {Object} attrs
|
|
493
496
|
* @param {Object} options
|
|
@@ -1034,25 +1037,30 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1034
1037
|
*/
|
|
1035
1038
|
setSipUri(sipUri: string): void;
|
|
1036
1039
|
/**
|
|
1037
|
-
* Set the locus info the class instance
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
* @param {
|
|
1041
|
-
* @param {
|
|
1042
|
-
* @param {String}
|
|
1043
|
-
* @param {
|
|
1040
|
+
* Set the locus info the class instance. Should be called with the parsed locus
|
|
1041
|
+
* we got in the join response.
|
|
1042
|
+
*
|
|
1043
|
+
* @param {Object} data
|
|
1044
|
+
* @param {Array} data.mediaConnections
|
|
1045
|
+
* @param {String} data.locusUrl
|
|
1046
|
+
* @param {String} data.locusId
|
|
1047
|
+
* @param {String} data.mediaId
|
|
1048
|
+
* @param {Object} data.host
|
|
1044
1049
|
* @todo change name to genertic parser
|
|
1045
1050
|
* @returns {undefined}
|
|
1046
1051
|
* @private
|
|
1047
1052
|
* @memberof Meeting
|
|
1048
1053
|
*/
|
|
1049
|
-
setLocus(
|
|
1054
|
+
setLocus(data: {
|
|
1055
|
+
locus: LocusDTO;
|
|
1050
1056
|
mediaConnections: Array<any>;
|
|
1051
1057
|
locusUrl: string;
|
|
1052
1058
|
locusId: string;
|
|
1053
1059
|
mediaId: string;
|
|
1054
1060
|
host: object;
|
|
1055
|
-
|
|
1061
|
+
selfId: string;
|
|
1062
|
+
dataSets: DataSet[];
|
|
1063
|
+
}): void;
|
|
1056
1064
|
/**
|
|
1057
1065
|
* Upload logs for the current meeting
|
|
1058
1066
|
* @param {object} options file name and function name
|
|
@@ -1269,6 +1277,12 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1269
1277
|
startTranscription(options?: {
|
|
1270
1278
|
spokenLanguage?: string;
|
|
1271
1279
|
}): Promise<void>;
|
|
1280
|
+
/** Handles Locus LLM events
|
|
1281
|
+
*
|
|
1282
|
+
* @param {LocusLLMEvent} event - The Locus LLM event to process
|
|
1283
|
+
* @returns {void}
|
|
1284
|
+
*/
|
|
1285
|
+
private processLocusLLMEvent;
|
|
1272
1286
|
/**
|
|
1273
1287
|
* Callback called when a relay event is received from meeting LLM Connection
|
|
1274
1288
|
* @param {RelayEvent} e Event object coming from LLM Connection
|
|
@@ -1309,6 +1323,18 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
1309
1323
|
* Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
|
|
1310
1324
|
*/
|
|
1311
1325
|
join(options?: any): Promise<any>;
|
|
1326
|
+
/** starts a timer that after a few minutes checks if
|
|
1327
|
+
* the LLM connection is connected, if not it sends a metric
|
|
1328
|
+
* @private
|
|
1329
|
+
* @returns {void}
|
|
1330
|
+
*/
|
|
1331
|
+
private startLLMHealthCheckTimer;
|
|
1332
|
+
/**
|
|
1333
|
+
* Clears the LLM health check timer
|
|
1334
|
+
* @private
|
|
1335
|
+
* @returns {void}
|
|
1336
|
+
*/
|
|
1337
|
+
private clearLLMHealthCheckTimer;
|
|
1312
1338
|
/**
|
|
1313
1339
|
* Connects to low latency mercury and reconnects if the address has changed
|
|
1314
1340
|
* It will also disconnect if called when the meeting has ended
|
|
@@ -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:
|
|
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
|
|
@@ -19,6 +19,7 @@ declare const BEHAVIORAL_METRICS: {
|
|
|
19
19
|
GET_DISPLAY_MEDIA_FAILURE: string;
|
|
20
20
|
JOIN_WITH_MEDIA_FAILURE: string;
|
|
21
21
|
LLM_CONNECTION_AFTER_JOIN_FAILURE: string;
|
|
22
|
+
LLM_HEALTHCHECK_FAILURE: string;
|
|
22
23
|
RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: string;
|
|
23
24
|
DISCONNECT_DUE_TO_INACTIVITY: string;
|
|
24
25
|
MEETING_MEDIA_INACTIVE: string;
|
|
@@ -84,5 +85,7 @@ declare const BEHAVIORAL_METRICS: {
|
|
|
84
85
|
VERIFY_REGISTRATION_ID_ERROR: string;
|
|
85
86
|
JOIN_FORBIDDEN_ERROR: string;
|
|
86
87
|
MEDIA_ISSUE_DETECTED: string;
|
|
88
|
+
LOCUS_CLASSIC_VS_HASH_TREE_MISMATCH: string;
|
|
89
|
+
LOCUS_HASH_TREE_UNSUPPORTED_OPERATION: string;
|
|
87
90
|
};
|
|
88
91
|
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
|
-
*
|
|
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
|
|
30
|
-
private
|
|
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
|
-
*
|
|
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
|
|
55
|
+
private initializeSingleReachabilityPeerConnection;
|
|
73
56
|
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
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
|
|
63
|
+
private initializePerUdpUrlReachabilityCheck;
|
|
111
64
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* @param {
|
|
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
|
|
70
|
+
private setupReachabilityPeerConnectionEventListeners;
|
|
118
71
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* @returns {void}
|
|
72
|
+
* Gets the aggregated reachability result for this cluster.
|
|
73
|
+
* @returns {ClusterReachabilityResult} reachability result for this cluster
|
|
122
74
|
*/
|
|
123
|
-
|
|
75
|
+
getResult(): ClusterReachabilityResult;
|
|
124
76
|
/**
|
|
125
|
-
* Starts the process of doing UDP and
|
|
126
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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,
|
|
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":[]}
|