@webex/plugin-meetings 3.8.0 → 3.8.1-next.10
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/README.md +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +70 -6
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +12 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +28 -123
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +3 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +78 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +4 -4
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +37 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +92 -12
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +432 -418
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +17 -17
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +94 -6
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +9 -2
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +21 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +678 -344
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +21 -22
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +4 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +13 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +373 -68
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +5 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +136 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +14 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +55 -9
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +3 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +335 -353
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +137 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +38 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +36 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +40 -8
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +63 -27
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +107 -47
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/util.js +5 -5
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +45 -27
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js +17 -0
- package/dist/roap/types.js.map +1 -0
- package/dist/types/common/errors/webex-errors.d.ts +7 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +20 -85
- package/dist/types/controls-options-manager/enums.d.ts +4 -1
- package/dist/types/controls-options-manager/types.d.ts +10 -1
- package/dist/types/locus-info/index.d.ts +3 -3
- package/dist/types/locus-info/selfUtils.d.ts +216 -1
- package/dist/types/media/properties.d.ts +15 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/muteState.d.ts +0 -1
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
- package/dist/types/meetings/index.d.ts +57 -0
- package/dist/types/member/index.d.ts +21 -6
- package/dist/types/member/types.d.ts +73 -14
- package/dist/types/member/util.d.ts +156 -1
- package/dist/types/members/collection.d.ts +6 -5
- package/dist/types/members/index.d.ts +32 -43
- package/dist/types/members/request.d.ts +26 -0
- package/dist/types/members/util.d.ts +27 -0
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
- package/dist/types/reachability/clusterReachability.d.ts +15 -7
- package/dist/types/reachability/index.d.ts +10 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/types/roap/index.d.ts +3 -2
- package/dist/types/roap/turnDiscovery.d.ts +5 -17
- package/dist/types/roap/types.d.ts +16 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/breakouts/index.ts +69 -0
- package/src/common/errors/webex-errors.ts +8 -1
- package/src/config.ts +3 -0
- package/src/constants.ts +30 -90
- package/src/controls-options-manager/enums.ts +3 -0
- package/src/controls-options-manager/types.ts +16 -1
- package/src/controls-options-manager/util.ts +93 -0
- package/src/interpretation/index.ts +3 -3
- package/src/locus-info/controlsUtils.ts +59 -14
- package/src/locus-info/index.ts +97 -13
- package/src/locus-info/selfUtils.ts +496 -442
- package/src/media/index.ts +23 -21
- package/src/media/properties.ts +96 -0
- package/src/meeting/brbState.ts +11 -2
- package/src/meeting/in-meeting-actions.ts +40 -0
- package/src/meeting/index.ts +470 -105
- package/src/meeting/locusMediaRequest.ts +27 -22
- package/src/meeting/muteState.ts +4 -4
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +11 -2
- package/src/meeting-info/meeting-info-v2.ts +254 -8
- package/src/meeting-info/utilv2.ts +5 -0
- package/src/meetings/index.ts +148 -1
- package/src/meetings/util.ts +18 -0
- package/src/member/index.ts +68 -22
- package/src/member/types.ts +82 -16
- package/src/member/util.ts +357 -350
- package/src/members/collection.ts +4 -3
- package/src/members/index.ts +137 -18
- package/src/members/request.ts +44 -0
- package/src/members/util.ts +43 -1
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/remoteMediaManager.ts +32 -10
- package/src/reachability/clusterReachability.ts +73 -26
- package/src/reachability/index.ts +62 -1
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/src/reconnection-manager/index.ts +2 -2
- package/src/recording-controller/util.ts +17 -13
- package/src/roap/index.ts +3 -7
- package/src/roap/turnDiscovery.ts +34 -39
- package/src/roap/types.ts +23 -0
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +167 -95
- package/test/unit/spec/controls-options-manager/util.js +178 -0
- package/test/unit/spec/interpretation/index.ts +39 -1
- package/test/unit/spec/locus-info/controlsUtils.js +155 -9
- package/test/unit/spec/locus-info/index.js +209 -73
- package/test/unit/spec/locus-info/selfUtils.js +98 -24
- package/test/unit/spec/media/index.ts +150 -18
- package/test/unit/spec/media/properties.ts +130 -0
- package/test/unit/spec/meeting/brbState.ts +40 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
- package/test/unit/spec/meeting/index.js +804 -139
- package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
- package/test/unit/spec/meeting/muteState.js +73 -2
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +119 -18
- package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
- package/test/unit/spec/meeting-info/utilv2.js +19 -0
- package/test/unit/spec/meetings/index.js +146 -2
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/members/index.js +304 -78
- package/test/unit/spec/members/request.js +68 -22
- package/test/unit/spec/members/utils.js +75 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
- package/test/unit/spec/reachability/clusterReachability.ts +88 -56
- package/test/unit/spec/reachability/index.ts +97 -0
- package/test/unit/spec/reachability/request.js +47 -2
- package/test/unit/spec/reconnection-manager/index.js +4 -4
- package/test/unit/spec/roap/turnDiscovery.ts +110 -28
- package/test/unit/spec/webinar/index.ts +5 -0
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -93
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -322
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
@@ -23,11 +23,13 @@ import {
|
|
23
23
|
ReachabilityResultsForBackend,
|
24
24
|
TransportResultForBackend,
|
25
25
|
GetClustersTrigger,
|
26
|
+
NatType,
|
26
27
|
} from './reachability.types';
|
27
28
|
import {
|
28
29
|
ClientMediaIpsUpdatedEventData,
|
29
30
|
ClusterReachability,
|
30
31
|
Events,
|
32
|
+
NatTypeUpdatedEventData,
|
31
33
|
ResultEventData,
|
32
34
|
} from './clusterReachability';
|
33
35
|
import EventsScope from '../common/events/events-scope';
|
@@ -64,6 +66,7 @@ export default class Reachability extends EventsScope {
|
|
64
66
|
resultsCount = {videoMesh: {udp: 0}, public: {udp: 0, tcp: 0, xtls: 0}};
|
65
67
|
startTime = undefined;
|
66
68
|
totalDuration = undefined;
|
69
|
+
natType = NatType.Unknown;
|
67
70
|
|
68
71
|
protected lastTrigger?: string;
|
69
72
|
|
@@ -135,6 +138,52 @@ export default class Reachability extends EventsScope {
|
|
135
138
|
}
|
136
139
|
}
|
137
140
|
|
141
|
+
/**
|
142
|
+
* Checks if the given subnet is reachable
|
143
|
+
* @param {string} selectedSubnetFirstOctet - selected subnet first octet, e.g. "10" for "10.X.X.X"
|
144
|
+
* @returns {boolean | null} true if reachable, false if not reachable, null if mediaServerIp is not provided
|
145
|
+
* @public
|
146
|
+
* @memberof Reachability
|
147
|
+
*/
|
148
|
+
public isSubnetReachable(selectedSubnetFirstOctet: string): boolean | null {
|
149
|
+
LoggerProxy.logger.info(
|
150
|
+
`Reachability:index#isSubnetReachable --> Looking for subnet: ${selectedSubnetFirstOctet}.X.X.X`
|
151
|
+
);
|
152
|
+
|
153
|
+
const matchingReachedClusters = Object.values(this.clusterReachability).reduce(
|
154
|
+
(acc, cluster) => {
|
155
|
+
const reachedSubnetsArray = Array.from(cluster.reachedSubnets);
|
156
|
+
|
157
|
+
let logMessage = `Reachability:index#isSubnetReachable --> Cluster ${cluster.name} reached [`;
|
158
|
+
for (let i = 0; i < reachedSubnetsArray.length; i += 1) {
|
159
|
+
const subnet = reachedSubnetsArray[i];
|
160
|
+
const reachedSubnetFirstOctet = subnet.split('.')[0];
|
161
|
+
|
162
|
+
if (selectedSubnetFirstOctet === reachedSubnetFirstOctet) {
|
163
|
+
acc.add(cluster.name);
|
164
|
+
}
|
165
|
+
|
166
|
+
logMessage += `${subnet}`;
|
167
|
+
if (i < reachedSubnetsArray.length - 1) {
|
168
|
+
logMessage += ',';
|
169
|
+
}
|
170
|
+
}
|
171
|
+
logMessage += `]`;
|
172
|
+
|
173
|
+
LoggerProxy.logger.info(logMessage);
|
174
|
+
|
175
|
+
return acc;
|
176
|
+
},
|
177
|
+
new Set<string>()
|
178
|
+
);
|
179
|
+
|
180
|
+
LoggerProxy.logger.info(
|
181
|
+
`Reachability:index#isSubnetReachable --> Found ${matchingReachedClusters.size} clusters that use the subnet ${selectedSubnetFirstOctet}.X.X.X`
|
182
|
+
);
|
183
|
+
|
184
|
+
return matchingReachedClusters.size > 0;
|
185
|
+
}
|
186
|
+
|
138
187
|
/**
|
139
188
|
* Gets a list of media clusters from the backend and performs reachability checks on all the clusters
|
140
189
|
* @param {string} trigger - explains the reason for starting reachability
|
@@ -143,6 +192,10 @@ export default class Reachability extends EventsScope {
|
|
143
192
|
* @memberof Reachability
|
144
193
|
*/
|
145
194
|
public async gatherReachability(trigger: string): Promise<ReachabilityResults> {
|
195
|
+
// @ts-ignore
|
196
|
+
if (!this.webex.config.meetings.enableReachabilityChecks) {
|
197
|
+
throw new Error('enableReachabilityChecks is disabled in config');
|
198
|
+
}
|
146
199
|
// Fetch clusters and measure latency
|
147
200
|
try {
|
148
201
|
this.lastTrigger = trigger;
|
@@ -281,7 +334,7 @@ export default class Reachability extends EventsScope {
|
|
281
334
|
{}
|
282
335
|
);
|
283
336
|
this.sendMetric(true);
|
284
|
-
this.resolveReachabilityPromise();
|
337
|
+
this.resolveReachabilityPromise(false);
|
285
338
|
}
|
286
339
|
}
|
287
340
|
|
@@ -305,6 +358,7 @@ export default class Reachability extends EventsScope {
|
|
305
358
|
reachability_vmn_tcp_failed: 0,
|
306
359
|
reachability_vmn_xtls_success: 0,
|
307
360
|
reachability_vmn_xtls_failed: 0,
|
361
|
+
natType: this.natType,
|
308
362
|
};
|
309
363
|
|
310
364
|
const updateStats = (clusterType: 'public' | 'vmn', result: ClusterReachabilityResult) => {
|
@@ -963,6 +1017,13 @@ export default class Reachability extends EventsScope {
|
|
963
1017
|
}
|
964
1018
|
);
|
965
1019
|
|
1020
|
+
this.clusterReachability[key].on(
|
1021
|
+
Events.natTypeUpdated,
|
1022
|
+
async (data: NatTypeUpdatedEventData) => {
|
1023
|
+
this.natType = data.natType;
|
1024
|
+
}
|
1025
|
+
);
|
1026
|
+
|
966
1027
|
this.clusterReachability[key].start(); // not awaiting on purpose
|
967
1028
|
});
|
968
1029
|
}
|
@@ -7,6 +7,11 @@ export type TransportResult = {
|
|
7
7
|
clientMediaIPs?: string[];
|
8
8
|
};
|
9
9
|
|
10
|
+
export enum NatType {
|
11
|
+
Unknown = 'unknown',
|
12
|
+
SymmetricNat = 'symmetric-nat',
|
13
|
+
}
|
14
|
+
|
10
15
|
// reachability result for a specific media cluster
|
11
16
|
export type ClusterReachabilityResult = {
|
12
17
|
udp: TransportResult;
|
@@ -27,6 +32,7 @@ export type ReachabilityMetrics = {
|
|
27
32
|
reachability_vmn_tcp_failed: number;
|
28
33
|
reachability_vmn_xtls_success: number;
|
29
34
|
reachability_vmn_xtls_failed: number;
|
35
|
+
natType: NatType;
|
30
36
|
};
|
31
37
|
|
32
38
|
/**
|
@@ -45,6 +45,9 @@ class ReachabilityRequest {
|
|
45
45
|
joinCookie: any;
|
46
46
|
discoveryOptions?: Record<string, any>;
|
47
47
|
}> => {
|
48
|
+
const appType = this.webex?.config?.support?.appType;
|
49
|
+
const appVersion = this.webex?.config?.support?.appVersion;
|
50
|
+
|
48
51
|
// we only measure latency for the initial startup call, not for other triggers
|
49
52
|
const callWrapper =
|
50
53
|
trigger === 'startup'
|
@@ -67,6 +70,10 @@ class ReachabilityRequest {
|
|
67
70
|
'early-call-min-clusters': true,
|
68
71
|
},
|
69
72
|
'previous-report': previousReport,
|
73
|
+
...(appType &&
|
74
|
+
appVersion && {
|
75
|
+
'client-environment': {components: {[appType]: appVersion}},
|
76
|
+
}),
|
70
77
|
trigger,
|
71
78
|
},
|
72
79
|
timeout: this.webex.config.meetings.reachabilityGetClusterTimeout,
|
@@ -591,9 +591,9 @@ export default class ReconnectionManager {
|
|
591
591
|
|
592
592
|
const iceServers = [];
|
593
593
|
|
594
|
-
if (turnServerResult.turnServerInfo?.
|
594
|
+
if (turnServerResult.turnServerInfo?.urls.length > 0) {
|
595
595
|
iceServers.push({
|
596
|
-
urls: turnServerResult.turnServerInfo.
|
596
|
+
urls: turnServerResult.turnServerInfo.urls,
|
597
597
|
username: turnServerResult.turnServerInfo.username || '',
|
598
598
|
credential: turnServerResult.turnServerInfo.password || '',
|
599
599
|
});
|
@@ -6,33 +6,37 @@ const canUserStart = (
|
|
6
6
|
displayHints: Array<string>,
|
7
7
|
userPolicies: Record<SELF_POLICY, boolean>
|
8
8
|
): boolean =>
|
9
|
-
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_START)
|
10
|
-
|
11
|
-
|
9
|
+
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_START) &&
|
10
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_NETWORK_BASED_RECORD, userPolicies)) ||
|
11
|
+
(displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_START) &&
|
12
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_PREMISE_RECORD, userPolicies));
|
12
13
|
|
13
14
|
const canUserPause = (
|
14
15
|
displayHints: Array<string>,
|
15
16
|
userPolicies: Record<SELF_POLICY, boolean>
|
16
17
|
): boolean =>
|
17
|
-
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_PAUSE)
|
18
|
-
|
19
|
-
|
18
|
+
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_PAUSE) &&
|
19
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_NETWORK_BASED_RECORD, userPolicies)) ||
|
20
|
+
(displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_PAUSE) &&
|
21
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_PREMISE_RECORD, userPolicies));
|
20
22
|
|
21
23
|
const canUserResume = (
|
22
24
|
displayHints: Array<string>,
|
23
25
|
userPolicies: Record<SELF_POLICY, boolean>
|
24
26
|
): boolean =>
|
25
|
-
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_RESUME)
|
26
|
-
|
27
|
-
|
27
|
+
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_RESUME) &&
|
28
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_NETWORK_BASED_RECORD, userPolicies)) ||
|
29
|
+
(displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_RESUME) &&
|
30
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_PREMISE_RECORD, userPolicies));
|
28
31
|
|
29
32
|
const canUserStop = (
|
30
33
|
displayHints: Array<string>,
|
31
34
|
userPolicies: Record<SELF_POLICY, boolean>
|
32
35
|
): boolean =>
|
33
|
-
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_STOP)
|
34
|
-
|
35
|
-
|
36
|
+
(displayHints.includes(DISPLAY_HINTS.RECORDING_CONTROL_STOP) &&
|
37
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_NETWORK_BASED_RECORD, userPolicies)) ||
|
38
|
+
(displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_STOP) &&
|
39
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_PREMISE_RECORD, userPolicies));
|
36
40
|
|
37
41
|
const isPremiseRecordingEnabled = (
|
38
42
|
displayHints: Array<string>,
|
@@ -42,7 +46,7 @@ const isPremiseRecordingEnabled = (
|
|
42
46
|
displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_PAUSE) ||
|
43
47
|
displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_STOP) ||
|
44
48
|
displayHints.includes(DISPLAY_HINTS.PREMISE_RECORDING_CONTROL_RESUME)) &&
|
45
|
-
MeetingUtil.selfSupportsFeature(SELF_POLICY.
|
49
|
+
MeetingUtil.selfSupportsFeature(SELF_POLICY.SUPPORT_PREMISE_RECORD, userPolicies);
|
46
50
|
|
47
51
|
const extractLocusId = (url: string) => {
|
48
52
|
return url?.split('/').pop();
|
package/src/roap/index.ts
CHANGED
@@ -5,17 +5,13 @@ import {ROAP} from '../constants';
|
|
5
5
|
import LoggerProxy from '../common/logs/logger-proxy';
|
6
6
|
|
7
7
|
import RoapRequest from './request';
|
8
|
-
import TurnDiscovery
|
8
|
+
import TurnDiscovery from './turnDiscovery';
|
9
|
+
import {TurnDiscoveryResult} from './types';
|
9
10
|
import Meeting from '../meeting';
|
10
|
-
import MeetingUtil from '../meeting/util';
|
11
11
|
import Metrics from '../metrics';
|
12
12
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
13
13
|
|
14
|
-
export {
|
15
|
-
type TurnDiscoveryResult,
|
16
|
-
type TurnServerInfo,
|
17
|
-
type TurnDiscoverySkipReason,
|
18
|
-
} from './turnDiscovery';
|
14
|
+
export {type TurnDiscoveryResult, type TurnServerInfo, type TurnDiscoverySkipReason} from './types';
|
19
15
|
|
20
16
|
/**
|
21
17
|
* Roap options
|
@@ -4,11 +4,11 @@ import {Defer} from '@webex/common';
|
|
4
4
|
import Metrics from '../metrics';
|
5
5
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
6
6
|
import LoggerProxy from '../common/logs/logger-proxy';
|
7
|
-
import {ROAP
|
7
|
+
import {ROAP} from '../constants';
|
8
8
|
|
9
9
|
import RoapRequest from './request';
|
10
10
|
import Meeting from '../meeting';
|
11
|
-
import
|
11
|
+
import {TurnDiscoverySkipReason, TurnServerInfo, TurnDiscoveryResult} from './types';
|
12
12
|
|
13
13
|
const TURN_DISCOVERY_TIMEOUT = 10; // in seconds
|
14
14
|
|
@@ -18,28 +18,6 @@ const TURN_DISCOVERY_TIMEOUT = 10; // in seconds
|
|
18
18
|
// and do the SDP offer with seq=1
|
19
19
|
const TURN_DISCOVERY_SEQ = 0;
|
20
20
|
|
21
|
-
const TurnDiscoverySkipReason = {
|
22
|
-
missingHttpResponse: 'missing http response', // when we asked for the TURN discovery response to be in the http response, but it wasn't there
|
23
|
-
reachability: 'reachability', // when udp reachability to public clusters is ok, so we don't need TURN (this doens't apply when joinWithMedia() is used)
|
24
|
-
alreadyInProgress: 'already in progress', // when we try to start TURN discovery while it's already in progress
|
25
|
-
} as const;
|
26
|
-
|
27
|
-
export type TurnDiscoverySkipReason =
|
28
|
-
| Enum<typeof TurnDiscoverySkipReason> // this is a kind of FYI, because in practice typescript will infer the type of TurnDiscoverySkipReason as a string
|
29
|
-
| string // used in case of errors, contains the error message
|
30
|
-
| undefined; // used when TURN discovery is not skipped
|
31
|
-
|
32
|
-
export type TurnServerInfo = {
|
33
|
-
url: string;
|
34
|
-
username: string;
|
35
|
-
password: string;
|
36
|
-
};
|
37
|
-
|
38
|
-
export type TurnDiscoveryResult = {
|
39
|
-
turnServerInfo?: TurnServerInfo;
|
40
|
-
turnDiscoverySkippedReason: TurnDiscoverySkipReason;
|
41
|
-
};
|
42
|
-
|
43
21
|
/**
|
44
22
|
* Handles the process of finding out TURN server information from Linus.
|
45
23
|
* This is achieved by sending a TURN_DISCOVERY_REQUEST.
|
@@ -53,6 +31,17 @@ export default class TurnDiscovery {
|
|
53
31
|
|
54
32
|
private responseTimer?: ReturnType<typeof setTimeout>;
|
55
33
|
|
34
|
+
/** Resets the turnInfo structure to the defaults
|
35
|
+
* @returns {void}
|
36
|
+
*/
|
37
|
+
private resetTurnInfo() {
|
38
|
+
this.turnInfo = {
|
39
|
+
urls: [],
|
40
|
+
username: '',
|
41
|
+
password: '',
|
42
|
+
};
|
43
|
+
}
|
44
|
+
|
56
45
|
/**
|
57
46
|
* Constructor
|
58
47
|
*
|
@@ -60,11 +49,7 @@ export default class TurnDiscovery {
|
|
60
49
|
*/
|
61
50
|
constructor(roapRequest: RoapRequest) {
|
62
51
|
this.roapRequest = roapRequest;
|
63
|
-
this.
|
64
|
-
url: '',
|
65
|
-
username: '',
|
66
|
-
password: '',
|
67
|
-
};
|
52
|
+
this.resetTurnInfo();
|
68
53
|
}
|
69
54
|
|
70
55
|
/**
|
@@ -134,21 +119,29 @@ export default class TurnDiscovery {
|
|
134
119
|
}
|
135
120
|
|
136
121
|
const expectedHeaders = [
|
137
|
-
{headerName: 'x-cisco-turn-url', field: '
|
138
|
-
{headerName: 'x-cisco-turn-username', field: 'username'},
|
139
|
-
{headerName: 'x-cisco-turn-password', field: 'password'},
|
122
|
+
{headerName: 'x-cisco-turn-url', field: 'urls', multipleAllowed: true},
|
123
|
+
{headerName: 'x-cisco-turn-username', field: 'username', multipleAllowed: false},
|
124
|
+
{headerName: 'x-cisco-turn-password', field: 'password', multipleAllowed: false},
|
140
125
|
];
|
141
126
|
|
142
|
-
|
127
|
+
const foundHeaders = {};
|
128
|
+
|
129
|
+
this.resetTurnInfo();
|
143
130
|
|
144
131
|
headers?.forEach((receivedHeader) => {
|
145
132
|
// check if it matches any of our expected headers
|
146
133
|
expectedHeaders.forEach((expectedHeader) => {
|
147
134
|
if (receivedHeader.startsWith(`${expectedHeader.headerName}=`)) {
|
148
|
-
|
149
|
-
|
150
|
-
);
|
151
|
-
|
135
|
+
foundHeaders[expectedHeader.headerName] = true;
|
136
|
+
|
137
|
+
const headerValue = receivedHeader.substring(expectedHeader.headerName.length + 1);
|
138
|
+
|
139
|
+
if (expectedHeader.multipleAllowed) {
|
140
|
+
this.turnInfo[expectedHeader.field].push(headerValue);
|
141
|
+
} else {
|
142
|
+
// just store the last one we find
|
143
|
+
this.turnInfo[expectedHeader.field] = headerValue;
|
144
|
+
}
|
152
145
|
}
|
153
146
|
});
|
154
147
|
});
|
@@ -156,7 +149,7 @@ export default class TurnDiscovery {
|
|
156
149
|
clearTimeout(this.responseTimer);
|
157
150
|
this.responseTimer = undefined;
|
158
151
|
|
159
|
-
if (
|
152
|
+
if (expectedHeaders.some((header) => !foundHeaders[header.headerName])) {
|
160
153
|
LoggerProxy.logger.warn(
|
161
154
|
`Roap:turnDiscovery#handleTurnDiscoveryResponse --> missing some headers, received ${from}: ${JSON.stringify(
|
162
155
|
headers
|
@@ -169,9 +162,11 @@ export default class TurnDiscovery {
|
|
169
162
|
);
|
170
163
|
} else {
|
171
164
|
LoggerProxy.logger.info(
|
172
|
-
`Roap:turnDiscovery#handleTurnDiscoveryResponse --> received a valid response ${from},
|
165
|
+
`Roap:turnDiscovery#handleTurnDiscoveryResponse --> received a valid response ${from}, urls=${this.turnInfo.urls}`
|
173
166
|
);
|
174
167
|
|
168
|
+
this.turnInfo.urls = this.turnInfo.urls.filter((url) => url !== ''); // remove empty urls, we might get them if we land on video-mesh nodes (VMN)
|
169
|
+
|
175
170
|
this.defer.resolve({isOkRequired: !headers?.includes('noOkInTransaction')});
|
176
171
|
}
|
177
172
|
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import {Enum} from '../constants';
|
2
|
+
|
3
|
+
export const TurnDiscoverySkipReason = {
|
4
|
+
missingHttpResponse: 'missing http response', // when we asked for the TURN discovery response to be in the http response, but it wasn't there
|
5
|
+
reachability: 'reachability', // when udp reachability to public clusters is ok, so we don't need TURN (this doens't apply when joinWithMedia() is used)
|
6
|
+
alreadyInProgress: 'already in progress', // when we try to start TURN discovery while it's already in progress
|
7
|
+
} as const;
|
8
|
+
|
9
|
+
export type TurnDiscoverySkipReason =
|
10
|
+
| Enum<typeof TurnDiscoverySkipReason> // this is a kind of FYI, because in practice typescript will infer the type of TurnDiscoverySkipReason as a string
|
11
|
+
| string // used in case of errors, contains the error message
|
12
|
+
| undefined; // used when TURN discovery is not skipped
|
13
|
+
|
14
|
+
export type TurnServerInfo = {
|
15
|
+
urls: string[];
|
16
|
+
username: string;
|
17
|
+
password: string;
|
18
|
+
};
|
19
|
+
|
20
|
+
export type TurnDiscoveryResult = {
|
21
|
+
turnServerInfo?: TurnServerInfo;
|
22
|
+
turnDiscoverySkippedReason: TurnDiscoverySkipReason;
|
23
|
+
};
|
package/src/webinar/index.ts
CHANGED