@webex/plugin-meetings 3.0.0 → 3.1.0-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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +18 -6
- package/dist/constants.js.map +1 -1
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +5 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +163 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -0
- package/dist/media/index.js +4 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +106 -81
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1010 -753
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +32 -23
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +10 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -295
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +21 -23
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +179 -65
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +29 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +18 -2
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +19 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reconnection-manager/index.js +140 -110
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +15 -0
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +3 -3
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +307 -126
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +57 -30
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +3 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/{config.d.ts → types/config.d.ts} +1 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +15 -6
- package/dist/types/index.d.ts +19 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/{media → types/media}/properties.d.ts +26 -2
- package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
- package/dist/{meeting → types/meeting}/index.d.ts +29 -12
- package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
- package/dist/{meeting → types/meeting}/request.d.ts +3 -0
- package/dist/{meeting → types/meeting}/util.d.ts +3 -0
- package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
- package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/{meetings → types/meetings}/index.d.ts +9 -16
- package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
- package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
- package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
- package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
- package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
- package/dist/{reachability → types/reachability}/index.d.ts +4 -0
- package/dist/{reachability → types/reachability}/util.d.ts +7 -0
- package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
- package/dist/{roap → types/roap}/index.d.ts +10 -2
- package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -23
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +18 -6
- package/src/index.ts +31 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/media/MediaConnectionAwaiter.ts +174 -0
- package/src/media/index.ts +3 -1
- package/src/media/properties.ts +73 -46
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +389 -180
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +9 -0
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -243
- package/src/meetings/index.ts +20 -24
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +101 -16
- package/src/multistream/sendSlotManager.ts +28 -0
- package/src/reachability/clusterReachability.ts +20 -5
- package/src/reachability/index.ts +24 -1
- package/src/reachability/request.ts +15 -11
- package/src/reachability/util.ts +21 -0
- package/src/reconnection-manager/index.ts +129 -106
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +3 -3
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +67 -27
- package/src/statsAnalyzer/mqaUtil.ts +5 -0
- package/test/integration/spec/journey.js +14 -14
- package/test/integration/spec/space-meeting.js +1 -1
- package/test/unit/spec/interpretation/index.ts +39 -3
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +49 -19
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/locus-info/selfUtils.js +42 -12
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
- package/test/unit/spec/media/index.ts +89 -78
- package/test/unit/spec/media/properties.ts +160 -209
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +833 -205
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +9 -1
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +41 -26
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +86 -22
- package/test/unit/spec/reachability/index.ts +197 -60
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reachability/util.ts +32 -2
- package/test/unit/spec/reconnection-manager/index.js +155 -39
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +298 -16
- package/test/unit/spec/stats-analyzer/index.js +190 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/src/common/errors/reconnection-in-progress.ts +0 -8
- package/src/member/member.types.ts +0 -13
- /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
- /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
- /package/dist/{common → types/common}/collection.d.ts +0 -0
- /package/dist/{common → types/common}/config.d.ts +0 -0
- /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{common → types/common}/errors/media.d.ts +0 -0
- /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
- /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
- /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
- /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
- /package/dist/{common → types/common}/events/events.d.ts +0 -0
- /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/events/util.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/logs/request.d.ts +0 -0
- /package/dist/{common → types/common}/queue.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{media → types/media}/index.d.ts +0 -0
- /package/dist/{media → types/media}/util.d.ts +0 -0
- /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
- /package/dist/{member → types/member}/index.d.ts +0 -0
- /package/dist/{member → types/member}/types.d.ts +0 -0
- /package/dist/{member → types/member}/util.d.ts +0 -0
- /package/dist/{members → types/members}/collection.d.ts +0 -0
- /package/dist/{members → types/members}/index.d.ts +0 -0
- /package/dist/{members → types/members}/request.d.ts +0 -0
- /package/dist/{members → types/members}/types.d.ts +0 -0
- /package/dist/{members → types/members}/util.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
- /package/dist/{roap → types/roap}/request.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
- /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
- /package/test/unit/spec/locus-info/{lib/selfConstant.js → selfConstant.js} +0 -0
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
RECONNECTION_STATE,
|
|
18
18
|
} from '../constants';
|
|
19
19
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
20
|
-
import
|
|
20
|
+
import ReconnectionError from '../common/errors/reconnection';
|
|
21
|
+
import ReconnectionNotStartedError from '../common/errors/reconnection-not-started';
|
|
21
22
|
import Metrics from '../metrics';
|
|
22
23
|
import Meeting from '../meeting';
|
|
23
24
|
import {MediaRequestManager} from '../multistream/mediaRequestManager';
|
|
24
|
-
import ReconnectionError from '../common/errors/reconnection';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Used to indicate that the reconnect logic needs to be retried.
|
|
@@ -73,7 +73,6 @@ export default class ReconnectionManager {
|
|
|
73
73
|
rejoinAttempts: any;
|
|
74
74
|
shareStatus: any;
|
|
75
75
|
status: any;
|
|
76
|
-
tryCount: any;
|
|
77
76
|
webex: any;
|
|
78
77
|
/**
|
|
79
78
|
* @param {Meeting} meeting
|
|
@@ -102,13 +101,6 @@ export default class ReconnectionManager {
|
|
|
102
101
|
* @memberof ReconnectionManager
|
|
103
102
|
*/
|
|
104
103
|
this.status = RECONNECTION.STATE.DEFAULT_STATUS;
|
|
105
|
-
/**
|
|
106
|
-
* @instance
|
|
107
|
-
* @type {Number}
|
|
108
|
-
* @private
|
|
109
|
-
* @memberof ReconnectionManager
|
|
110
|
-
*/
|
|
111
|
-
this.tryCount = RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
112
104
|
/**
|
|
113
105
|
* @instance
|
|
114
106
|
* @type {Object}
|
|
@@ -131,7 +123,7 @@ export default class ReconnectionManager {
|
|
|
131
123
|
|
|
132
124
|
// @ts-ignore
|
|
133
125
|
this.maxRejoinAttempts = meeting.config.reconnection.maxRejoinAttempts;
|
|
134
|
-
this.rejoinAttempts =
|
|
126
|
+
this.rejoinAttempts = 0;
|
|
135
127
|
// @ts-ignore
|
|
136
128
|
this.autoRejoinEnabled = meeting.config.reconnection.autoRejoin;
|
|
137
129
|
|
|
@@ -217,8 +209,7 @@ export default class ReconnectionManager {
|
|
|
217
209
|
*/
|
|
218
210
|
public reset() {
|
|
219
211
|
this.status = RECONNECTION.STATE.DEFAULT_STATUS;
|
|
220
|
-
this.
|
|
221
|
-
this.rejoinAttempts = RECONNECTION.STATE.DEFAULT_TRY_COUNT;
|
|
212
|
+
this.rejoinAttempts = 0;
|
|
222
213
|
}
|
|
223
214
|
|
|
224
215
|
/**
|
|
@@ -265,43 +256,30 @@ export default class ReconnectionManager {
|
|
|
265
256
|
return this.status === RECONNECTION.STATE.IN_PROGRESS;
|
|
266
257
|
}
|
|
267
258
|
|
|
268
|
-
/**
|
|
269
|
-
* Sets the reconnection status
|
|
270
|
-
*
|
|
271
|
-
* @public
|
|
272
|
-
* @param {RECONNECTION_STATE} status
|
|
273
|
-
* @memberof ReconnectionManager
|
|
274
|
-
* @returns {undefined}
|
|
275
|
-
*/
|
|
276
|
-
public setStatus(status: RECONNECTION_STATE) {
|
|
277
|
-
this.status = status;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
259
|
/**
|
|
281
260
|
* @returns {Boolean}
|
|
282
|
-
* @throws {
|
|
261
|
+
* @throws {ReconnectInProgress, ReconnectionDisabled}
|
|
283
262
|
* @private
|
|
284
263
|
* @memberof ReconnectionManager
|
|
285
264
|
*/
|
|
286
|
-
private
|
|
265
|
+
private canStartReconnection() {
|
|
287
266
|
if (this.meeting.config.reconnection.enabled) {
|
|
288
|
-
if (
|
|
289
|
-
this.status === RECONNECTION.STATE.DEFAULT_STATUS ||
|
|
290
|
-
this.status === RECONNECTION.STATE.COMPLETE
|
|
291
|
-
) {
|
|
267
|
+
if (this.status === RECONNECTION.STATE.DEFAULT_STATUS) {
|
|
292
268
|
return true;
|
|
293
269
|
}
|
|
294
270
|
|
|
295
271
|
LoggerProxy.logger.info(
|
|
296
|
-
'ReconnectionManager:index#
|
|
272
|
+
'ReconnectionManager:index#canStartReconnection --> Reconnection already in progress.'
|
|
297
273
|
);
|
|
298
274
|
|
|
299
|
-
|
|
275
|
+
return false;
|
|
300
276
|
}
|
|
301
277
|
|
|
302
|
-
LoggerProxy.logger.info(
|
|
278
|
+
LoggerProxy.logger.info(
|
|
279
|
+
'ReconnectionManager:index#canStartReconnection --> Reconnection is not enabled.'
|
|
280
|
+
);
|
|
303
281
|
|
|
304
|
-
|
|
282
|
+
return false;
|
|
305
283
|
}
|
|
306
284
|
|
|
307
285
|
/**
|
|
@@ -309,105 +287,152 @@ export default class ReconnectionManager {
|
|
|
309
287
|
* @param {Object} reconnectOptions
|
|
310
288
|
* @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
|
|
311
289
|
* @param {boolean} [reconnectOptions.networkRetry=false] indicates if we are retrying the reconnect
|
|
290
|
+
* @param {Function} [completionCallback] callback that gets called when reconnection is started successfully
|
|
312
291
|
* @returns {Promise}
|
|
313
292
|
* @public
|
|
314
293
|
* @memberof ReconnectionManager
|
|
315
294
|
*/
|
|
316
|
-
public async reconnect(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
295
|
+
public async reconnect(
|
|
296
|
+
{
|
|
297
|
+
networkDisconnect = false,
|
|
298
|
+
networkRetry = false,
|
|
299
|
+
}: {
|
|
300
|
+
networkDisconnect?: boolean;
|
|
301
|
+
networkRetry?: boolean;
|
|
302
|
+
} = {},
|
|
303
|
+
completionCallback: (() => Promise<void>) | undefined = undefined
|
|
304
|
+
) {
|
|
323
305
|
LoggerProxy.logger.info(
|
|
324
306
|
`ReconnectionManager:index#reconnect --> Reconnection start for meeting ${this.meeting.id}.`
|
|
325
307
|
);
|
|
326
|
-
// First, validate that we can reconnect, if not, it will throw an error
|
|
327
|
-
try {
|
|
328
|
-
this.validate();
|
|
329
|
-
} catch (error) {
|
|
330
|
-
LoggerProxy.logger.info(
|
|
331
|
-
'ReconnectionManager:index#reconnect --> Reconnection unable to begin.',
|
|
332
|
-
error
|
|
333
|
-
);
|
|
334
|
-
throw error;
|
|
335
|
-
}
|
|
336
308
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
309
|
+
const triggerEvent = (event, payload = undefined) =>
|
|
310
|
+
Trigger.trigger(
|
|
311
|
+
this.meeting,
|
|
312
|
+
{
|
|
313
|
+
file: 'reconnection-manager/index',
|
|
314
|
+
function: 'reconnect',
|
|
315
|
+
},
|
|
316
|
+
event,
|
|
317
|
+
payload
|
|
341
318
|
);
|
|
342
319
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
name: 'client.media.reconnecting',
|
|
346
|
-
options: {
|
|
347
|
-
meetingId: this.meeting.id,
|
|
348
|
-
},
|
|
349
|
-
});
|
|
320
|
+
if (!this.canStartReconnection()) {
|
|
321
|
+
throw new ReconnectionNotStartedError();
|
|
350
322
|
}
|
|
351
323
|
|
|
352
324
|
try {
|
|
353
|
-
|
|
354
|
-
} catch (err) {
|
|
355
|
-
LoggerProxy.logger.info(
|
|
356
|
-
'ReconnectionManager:index#reconnect --> Reachability failed, continuing with reconnection attempt, err: ',
|
|
357
|
-
err
|
|
358
|
-
);
|
|
359
|
-
}
|
|
325
|
+
this.status = RECONNECTION.STATE.IN_PROGRESS;
|
|
360
326
|
|
|
361
|
-
|
|
362
|
-
const media = await this.executeReconnection({networkDisconnect});
|
|
327
|
+
triggerEvent(EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING);
|
|
363
328
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
if (reconnectError instanceof NeedsRetryError) {
|
|
329
|
+
if (!networkRetry) {
|
|
330
|
+
// Only log START metrics on the initial reconnect
|
|
367
331
|
LoggerProxy.logger.info(
|
|
368
|
-
'ReconnectionManager:index#reconnect -->
|
|
332
|
+
'ReconnectionManager:index#reconnect --> Sending reconnect start metric.'
|
|
369
333
|
);
|
|
370
|
-
// Reset our reconnect status since we are looping back to the beginning
|
|
371
|
-
this.status = RECONNECTION.STATE.DEFAULT_STATUS;
|
|
372
334
|
|
|
373
|
-
//
|
|
374
|
-
|
|
335
|
+
// @ts-ignore
|
|
336
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
337
|
+
name: 'client.media.reconnecting',
|
|
338
|
+
options: {
|
|
339
|
+
meetingId: this.meeting.id,
|
|
340
|
+
},
|
|
341
|
+
});
|
|
375
342
|
}
|
|
376
343
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
344
|
+
try {
|
|
345
|
+
await this.webex.meetings.startReachability();
|
|
346
|
+
} catch (err) {
|
|
347
|
+
LoggerProxy.logger.info(
|
|
348
|
+
'ReconnectionManager:index#reconnect --> Reachability failed, continuing with reconnection attempt, err: ',
|
|
349
|
+
err
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
try {
|
|
354
|
+
await this.executeReconnection({networkDisconnect});
|
|
355
|
+
} catch (reconnectError) {
|
|
356
|
+
if (reconnectError instanceof NeedsRetryError) {
|
|
357
|
+
LoggerProxy.logger.info(
|
|
358
|
+
'ReconnectionManager:index#reconnect --> Reconnection not successful, retrying.'
|
|
359
|
+
);
|
|
360
|
+
// Reset our reconnect status since we are looping back to the beginning
|
|
361
|
+
this.status = RECONNECTION.STATE.DEFAULT_STATUS;
|
|
362
|
+
|
|
363
|
+
// This is a network retry, so we should not log START metrics again
|
|
364
|
+
await this.reconnect({networkDisconnect: true, networkRetry: true}, completionCallback);
|
|
365
|
+
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Reconnect has failed
|
|
370
|
+
LoggerProxy.logger.error(
|
|
371
|
+
'ReconnectionManager:index#reconnect --> Reconnection failed.',
|
|
372
|
+
reconnectError.message
|
|
373
|
+
);
|
|
374
|
+
|
|
375
|
+
// send call aborted event with category as expected as we are trying to rejoin
|
|
376
|
+
// @ts-ignore
|
|
377
|
+
this.webex.internal.newMetrics.submitClientEvent({
|
|
378
|
+
name: 'client.call.aborted',
|
|
379
|
+
payload: {
|
|
380
|
+
errors: [
|
|
381
|
+
{
|
|
382
|
+
category: 'expected',
|
|
383
|
+
errorCode: 2008,
|
|
384
|
+
fatal: true,
|
|
385
|
+
name: 'media-engine',
|
|
386
|
+
shownToUser: false,
|
|
387
|
+
},
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
options: {
|
|
391
|
+
meetingId: this.meeting.id,
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
if (reconnectError instanceof NeedsRejoinError && this.autoRejoinEnabled) {
|
|
396
|
+
await this.rejoinMeeting(reconnectError.wasSharing);
|
|
397
|
+
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
throw reconnectError;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
// finalize the reconnection process by calling the completionCallback
|
|
405
|
+
if (completionCallback) {
|
|
406
|
+
await completionCallback();
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
triggerEvent(EVENT_TRIGGERS.MEETING_RECONNECTION_SUCCESS);
|
|
385
410
|
|
|
386
|
-
// send call aborted event with catogery as expected as we are trying to rejoin
|
|
387
411
|
// @ts-ignore
|
|
388
412
|
this.webex.internal.newMetrics.submitClientEvent({
|
|
389
|
-
name: 'client.
|
|
413
|
+
name: 'client.media.recovered',
|
|
390
414
|
payload: {
|
|
391
|
-
|
|
392
|
-
{
|
|
393
|
-
category: 'expected',
|
|
394
|
-
errorCode: 2008,
|
|
395
|
-
fatal: true,
|
|
396
|
-
name: 'media-engine',
|
|
397
|
-
shownToUser: false,
|
|
398
|
-
},
|
|
399
|
-
],
|
|
415
|
+
recoveredBy: 'new',
|
|
400
416
|
},
|
|
401
417
|
options: {
|
|
402
418
|
meetingId: this.meeting.id,
|
|
403
419
|
},
|
|
404
420
|
});
|
|
421
|
+
} catch (error) {
|
|
422
|
+
triggerEvent(EVENT_TRIGGERS.MEETING_RECONNECTION_FAILURE, {
|
|
423
|
+
error: new ReconnectionError('Reconnection failure event', error),
|
|
424
|
+
});
|
|
405
425
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
426
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEETING_RECONNECT_FAILURE, {
|
|
427
|
+
correlation_id: this.meeting.correlationId,
|
|
428
|
+
locus_id: this.meeting.locusUrl.split('/').pop(),
|
|
429
|
+
reason: error.message,
|
|
430
|
+
stack: error.stack,
|
|
431
|
+
});
|
|
409
432
|
|
|
410
|
-
throw
|
|
433
|
+
throw new ReconnectionError('Reconnection failure event', error);
|
|
434
|
+
} finally {
|
|
435
|
+
this.reset();
|
|
411
436
|
}
|
|
412
437
|
}
|
|
413
438
|
|
|
@@ -420,8 +445,6 @@ export default class ReconnectionManager {
|
|
|
420
445
|
* @memberof ReconnectionManager
|
|
421
446
|
*/
|
|
422
447
|
private async executeReconnection({networkDisconnect = false}: {networkDisconnect?: boolean}) {
|
|
423
|
-
this.status = RECONNECTION.STATE.IN_PROGRESS;
|
|
424
|
-
|
|
425
448
|
LoggerProxy.logger.info(
|
|
426
449
|
'ReconnectionManager:index#executeReconnection --> Attempting to reconnect to meeting.'
|
|
427
450
|
);
|
|
@@ -568,7 +591,7 @@ export default class ReconnectionManager {
|
|
|
568
591
|
|
|
569
592
|
const iceServers = [];
|
|
570
593
|
|
|
571
|
-
if (turnServerResult.turnServerInfo) {
|
|
594
|
+
if (turnServerResult.turnServerInfo?.url) {
|
|
572
595
|
iceServers.push({
|
|
573
596
|
urls: turnServerResult.turnServerInfo.url,
|
|
574
597
|
username: turnServerResult.turnServerInfo.username || '',
|
package/src/roap/index.ts
CHANGED
|
@@ -5,12 +5,18 @@ import {ROAP} from '../constants';
|
|
|
5
5
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
6
6
|
|
|
7
7
|
import RoapRequest from './request';
|
|
8
|
-
import TurnDiscovery from './turnDiscovery';
|
|
8
|
+
import TurnDiscovery, {TurnDiscoveryResult} from './turnDiscovery';
|
|
9
9
|
import Meeting from '../meeting';
|
|
10
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';
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* Roap options
|
|
16
22
|
* @typedef {Object} RoapOptions
|
|
@@ -39,7 +45,7 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
39
45
|
options: any;
|
|
40
46
|
roapHandler: any;
|
|
41
47
|
roapRequest: any;
|
|
42
|
-
turnDiscovery:
|
|
48
|
+
turnDiscovery: TurnDiscovery;
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
51
|
*
|
|
@@ -260,7 +266,23 @@ export default class Roap extends StatelessWebexPlugin {
|
|
|
260
266
|
* @param {Boolean} [isForced]
|
|
261
267
|
* @returns {Promise}
|
|
262
268
|
*/
|
|
263
|
-
doTurnDiscovery(
|
|
269
|
+
doTurnDiscovery(
|
|
270
|
+
meeting: Meeting,
|
|
271
|
+
isReconnecting: boolean,
|
|
272
|
+
isForced?: boolean
|
|
273
|
+
): Promise<TurnDiscoveryResult> {
|
|
264
274
|
return this.turnDiscovery.doTurnDiscovery(meeting, isReconnecting, isForced);
|
|
265
275
|
}
|
|
276
|
+
|
|
277
|
+
generateTurnDiscoveryRequestMessage(meeting: Meeting, isForced: boolean) {
|
|
278
|
+
return this.turnDiscovery.generateTurnDiscoveryRequestMessage(meeting, isForced);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
handleTurnDiscoveryHttpResponse(meeting: Meeting, httpResponse: object) {
|
|
282
|
+
return this.turnDiscovery.handleTurnDiscoveryHttpResponse(meeting, httpResponse);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
abortTurnDiscovery() {
|
|
286
|
+
return this.turnDiscovery.abort();
|
|
287
|
+
}
|
|
266
288
|
}
|
package/src/roap/request.ts
CHANGED
|
@@ -123,7 +123,7 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
123
123
|
);
|
|
124
124
|
const {locus} = res.body;
|
|
125
125
|
|
|
126
|
-
locus.roapSeq = roapMessage.seq;
|
|
126
|
+
locus.roapSeq = options.roapMessage.seq;
|
|
127
127
|
|
|
128
128
|
return {
|
|
129
129
|
locus,
|
|
@@ -139,9 +139,9 @@ export default class RoapRequest extends StatelessWebexPlugin {
|
|
|
139
139
|
rawError: err,
|
|
140
140
|
},
|
|
141
141
|
});
|
|
142
|
-
LoggerProxy.logger.error(`Roap:request#sendRoap --> Error
|
|
142
|
+
LoggerProxy.logger.error(`Roap:request#sendRoap --> Error:`, err);
|
|
143
143
|
LoggerProxy.logger.error(
|
|
144
|
-
`Roap:request#sendRoapRequest -->
|
|
144
|
+
`Roap:request#sendRoapRequest --> roapMessage that caused error:${JSON.stringify(
|
|
145
145
|
roapMessage,
|
|
146
146
|
null,
|
|
147
147
|
2
|