@webex/plugin-meetings 2.60.0-next.1 → 2.60.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/annotation/annotation.types.d.ts +42 -0
- package/dist/annotation/constants.d.ts +31 -0
- package/dist/annotation/index.d.ts +117 -0
- package/dist/breakouts/breakout.d.ts +8 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/collection.d.ts +5 -0
- package/dist/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/breakouts/events.d.ts +8 -0
- package/dist/breakouts/index.d.ts +5 -0
- package/dist/breakouts/index.js +1 -1
- package/dist/breakouts/request.d.ts +22 -0
- package/dist/breakouts/utils.d.ts +15 -0
- package/dist/common/browser-detection.d.ts +9 -0
- package/dist/common/collection.d.ts +48 -0
- package/dist/common/config.d.ts +2 -0
- package/dist/common/errors/captcha-error.d.ts +15 -0
- package/dist/common/errors/intent-to-join.d.ts +16 -0
- package/dist/common/errors/join-meeting.d.ts +17 -0
- package/dist/common/errors/media.d.ts +15 -0
- package/dist/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/common/errors/parameter.d.ts +15 -0
- package/dist/common/errors/password-error.d.ts +15 -0
- package/dist/common/errors/permission.d.ts +14 -0
- package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/common/errors/reconnection.d.ts +15 -0
- package/dist/common/errors/stats.d.ts +15 -0
- package/dist/common/errors/webex-errors.d.ts +93 -0
- package/dist/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/common/events/events-scope.d.ts +17 -0
- package/dist/common/events/events.d.ts +12 -0
- package/dist/common/events/trigger-proxy.d.ts +2 -0
- package/dist/common/events/util.d.ts +2 -0
- package/dist/common/logs/logger-config.d.ts +2 -0
- package/dist/common/logs/logger-proxy.d.ts +2 -0
- package/dist/common/logs/request.d.ts +36 -0
- package/dist/common/queue.d.ts +34 -0
- package/dist/config.d.ts +71 -0
- package/dist/constants.d.ts +1072 -0
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.d.ts +4 -0
- package/dist/controls-options-manager/enums.d.ts +15 -0
- package/dist/controls-options-manager/enums.js +2 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.d.ts +136 -0
- package/dist/controls-options-manager/types.d.ts +43 -0
- package/dist/controls-options-manager/util.d.ts +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/interpretation/collection.d.ts +5 -0
- package/dist/interpretation/index.d.ts +5 -0
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.d.ts +5 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.d.ts +2 -0
- package/dist/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/locus-info/fullState.d.ts +2 -0
- package/dist/locus-info/hostUtils.d.ts +2 -0
- package/dist/locus-info/index.d.ts +322 -0
- package/dist/locus-info/infoUtils.d.ts +2 -0
- package/dist/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/locus-info/parser.d.ts +272 -0
- package/dist/locus-info/parser.js +5 -5
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.d.ts +2 -0
- package/dist/media/index.d.ts +34 -0
- package/dist/media/index.js +6 -5
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.d.ts +93 -0
- package/dist/media/util.d.ts +2 -0
- package/dist/mediaQualityMetrics/config.d.ts +237 -0
- package/dist/mediaQualityMetrics/config.js +1 -202
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/meeting/in-meeting-actions.js +4 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.d.ts +1719 -0
- package/dist/meeting/index.js +288 -155
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/meeting/muteState.d.ts +184 -0
- package/dist/meeting/request.d.ts +290 -0
- package/dist/meeting/request.type.d.ts +11 -0
- package/dist/meeting/state.d.ts +9 -0
- package/dist/meeting/util.d.ts +103 -0
- package/dist/meeting-info/collection.d.ts +20 -0
- package/dist/meeting-info/index.d.ts +69 -0
- package/dist/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/meeting-info/meeting-info-v2.js +3 -0
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.d.ts +22 -0
- package/dist/meeting-info/util.d.ts +2 -0
- package/dist/meeting-info/utilv2.d.ts +2 -0
- package/dist/meeting-info/utilv2.js +14 -29
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.d.ts +40 -0
- package/dist/meetings/collection.js +17 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.d.ts +378 -0
- package/dist/meetings/index.js +30 -9
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.d.ts +4 -0
- package/dist/meetings/request.d.ts +27 -0
- package/dist/meetings/util.d.ts +18 -0
- package/dist/member/index.d.ts +160 -0
- package/dist/member/member.types.d.ts +11 -0
- package/dist/member/types.d.ts +32 -0
- package/dist/member/util.d.ts +2 -0
- package/dist/members/collection.d.ts +29 -0
- package/dist/members/index.d.ts +353 -0
- package/dist/members/request.d.ts +114 -0
- package/dist/members/types.d.ts +25 -0
- package/dist/members/util.d.ts +215 -0
- package/dist/metrics/constants.d.ts +68 -0
- package/dist/metrics/constants.js +3 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +45 -0
- package/dist/multistream/mediaRequestManager.d.ts +118 -0
- package/dist/multistream/receiveSlot.d.ts +68 -0
- package/dist/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/multistream/remoteMedia.d.ts +72 -0
- package/dist/multistream/remoteMediaGroup.d.ts +47 -0
- package/dist/multistream/remoteMediaManager.d.ts +285 -0
- package/dist/multistream/sendSlotManager.d.ts +61 -0
- package/dist/networkQualityMonitor/index.d.ts +70 -0
- package/dist/personal-meeting-room/index.d.ts +47 -0
- package/dist/personal-meeting-room/request.d.ts +14 -0
- package/dist/personal-meeting-room/util.d.ts +2 -0
- package/dist/reachability/index.d.ts +194 -0
- package/dist/reachability/request.d.ts +39 -0
- package/dist/reactions/constants.d.ts +3 -0
- package/dist/reactions/reactions.d.ts +4 -0
- package/dist/reactions/reactions.type.d.ts +52 -0
- package/dist/reconnection-manager/index.d.ts +136 -0
- package/dist/reconnection-manager/index.js +27 -28
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.d.ts +7 -0
- package/dist/recording-controller/index.d.ts +207 -0
- package/dist/recording-controller/util.d.ts +14 -0
- package/dist/roap/index.d.ts +78 -0
- package/dist/roap/request.d.ts +41 -0
- package/dist/roap/turnDiscovery.d.ts +92 -0
- package/dist/rtcMetrics/constants.d.ts +4 -0
- package/dist/rtcMetrics/index.d.ts +54 -0
- package/dist/rtcMetrics/index.js +25 -0
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/global.d.ts +36 -0
- package/dist/statsAnalyzer/index.d.ts +191 -0
- package/dist/statsAnalyzer/index.js +53 -146
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +24 -0
- package/dist/statsAnalyzer/mqaUtil.js +11 -12
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.d.ts +64 -0
- package/dist/webinar/collection.d.ts +16 -0
- package/dist/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +26 -27
- package/src/constants.ts +10 -4
- package/src/controls-options-manager/enums.ts +2 -0
- package/src/locus-info/parser.ts +6 -6
- package/src/media/index.ts +5 -5
- package/src/mediaQualityMetrics/config.ts +0 -135
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +263 -125
- package/src/meeting-info/meeting-info-v2.ts +4 -0
- package/src/meeting-info/utilv2.ts +6 -19
- package/src/meetings/collection.ts +13 -0
- package/src/meetings/index.ts +28 -10
- package/src/metrics/constants.ts +3 -0
- package/src/reconnection-manager/index.ts +63 -68
- package/src/rtcMetrics/index.ts +24 -0
- package/src/statsAnalyzer/index.ts +68 -216
- package/src/statsAnalyzer/mqaUtil.ts +17 -22
- package/test/unit/spec/media/index.ts +20 -4
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +1376 -189
- package/test/unit/spec/meeting/muteState.js +2 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +28 -0
- package/test/unit/spec/meetings/collection.js +12 -0
- package/test/unit/spec/meetings/index.js +382 -118
- package/test/unit/spec/member/util.js +0 -31
- package/test/unit/spec/reconnection-manager/index.js +42 -12
- package/test/unit/spec/rtcMetrics/index.ts +20 -0
- package/test/unit/spec/stats-analyzer/index.js +12 -2
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
export type ReachabilityMetrics = {
|
|
5
|
+
reachability_public_udp_success: number;
|
|
6
|
+
reachability_public_udp_failed: number;
|
|
7
|
+
reachability_public_tcp_success: number;
|
|
8
|
+
reachability_public_tcp_failed: number;
|
|
9
|
+
reachability_vmn_udp_success: number;
|
|
10
|
+
reachability_vmn_udp_failed: number;
|
|
11
|
+
reachability_vmn_tcp_success: number;
|
|
12
|
+
reachability_vmn_tcp_failed: number;
|
|
13
|
+
};
|
|
14
|
+
export type TransportResult = {
|
|
15
|
+
reachable?: 'true' | 'false';
|
|
16
|
+
latencyInMilliseconds?: string;
|
|
17
|
+
clientMediaIPs?: string[];
|
|
18
|
+
untested?: 'true';
|
|
19
|
+
};
|
|
20
|
+
type ReachabilityResult = {
|
|
21
|
+
udp: TransportResult;
|
|
22
|
+
tcp: TransportResult;
|
|
23
|
+
xtls: {
|
|
24
|
+
untested: 'true';
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ReachabilityResults = Record<string, ReachabilityResult>;
|
|
28
|
+
type InternalReachabilityResults = Record<string, ReachabilityResult & {
|
|
29
|
+
isVideoMesh?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export type ICECandidateResult = {
|
|
32
|
+
clusterId: string;
|
|
33
|
+
isVideoMesh: boolean;
|
|
34
|
+
elapsed?: string | null;
|
|
35
|
+
publicIPs?: string[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @class Reachability
|
|
39
|
+
* @export
|
|
40
|
+
*/
|
|
41
|
+
export default class Reachability {
|
|
42
|
+
namespace: string;
|
|
43
|
+
webex: object;
|
|
44
|
+
reachabilityRequest: any;
|
|
45
|
+
clusterLatencyResults: any;
|
|
46
|
+
/**
|
|
47
|
+
* Creates an instance of Reachability.
|
|
48
|
+
* @param {object} webex
|
|
49
|
+
* @memberof Reachability
|
|
50
|
+
*/
|
|
51
|
+
constructor(webex: object);
|
|
52
|
+
/**
|
|
53
|
+
* fetches reachability data
|
|
54
|
+
* @returns {Object} reachability data
|
|
55
|
+
* @public
|
|
56
|
+
* @async
|
|
57
|
+
* @memberof Reachability
|
|
58
|
+
*/
|
|
59
|
+
gatherReachability(): Promise<InternalReachabilityResults>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns statistics about last reachability results. The returned value is an object
|
|
62
|
+
* with a flat list of properties so that it can be easily sent with metrics
|
|
63
|
+
*
|
|
64
|
+
* @returns {Promise} Promise with metrics values, it never rejects/throws.
|
|
65
|
+
*/
|
|
66
|
+
getReachabilityMetrics(): Promise<ReachabilityMetrics>;
|
|
67
|
+
/**
|
|
68
|
+
* Reachability results as an object in the format that backend expects
|
|
69
|
+
*
|
|
70
|
+
* @returns {any} reachability results that need to be sent to the backend
|
|
71
|
+
*/
|
|
72
|
+
getReachabilityResults(): Promise<ReachabilityResults | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* fetches reachability data and checks for cluster reachability
|
|
75
|
+
* @returns {boolean}
|
|
76
|
+
* @public
|
|
77
|
+
* @memberof Reachability
|
|
78
|
+
*/
|
|
79
|
+
isAnyPublicClusterReachable(): Promise<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Generate peerConnection config settings
|
|
82
|
+
* @param {object} cluster
|
|
83
|
+
* @returns {object} peerConnectionConfig
|
|
84
|
+
* @private
|
|
85
|
+
* @memberof Reachability
|
|
86
|
+
*/
|
|
87
|
+
private buildPeerConnectionConfig;
|
|
88
|
+
/**
|
|
89
|
+
* Creates an RTCPeerConnection
|
|
90
|
+
* @param {object} cluster
|
|
91
|
+
* @returns {RTCPeerConnection} peerConnection
|
|
92
|
+
* @private
|
|
93
|
+
* @memberof Reachability
|
|
94
|
+
*/
|
|
95
|
+
private createPeerConnection;
|
|
96
|
+
/**
|
|
97
|
+
* Gets total elapsed time
|
|
98
|
+
* @param {RTCPeerConnection} peerConnection
|
|
99
|
+
* @returns {Number} Milliseconds
|
|
100
|
+
* @private
|
|
101
|
+
* @memberof Reachability
|
|
102
|
+
*/
|
|
103
|
+
private getElapsedTime;
|
|
104
|
+
/**
|
|
105
|
+
* creates offer and generates localSDP
|
|
106
|
+
* @param {object} clusterList cluster List
|
|
107
|
+
* @returns {Promise} Reachability latency results
|
|
108
|
+
* @private
|
|
109
|
+
* @memberof Reachability
|
|
110
|
+
*/
|
|
111
|
+
private getLocalSDPForClusters;
|
|
112
|
+
/**
|
|
113
|
+
* Get list of all unreachable clusters
|
|
114
|
+
* @returns {array} Unreachable clusters
|
|
115
|
+
* @private
|
|
116
|
+
* @memberof Reachability
|
|
117
|
+
*/
|
|
118
|
+
private getUnreachablClusters;
|
|
119
|
+
/**
|
|
120
|
+
* Attach an event handler for the icegatheringstatechange
|
|
121
|
+
* event and measure latency.
|
|
122
|
+
* @param {RTCPeerConnection} peerConnection
|
|
123
|
+
* @returns {undefined}
|
|
124
|
+
* @private
|
|
125
|
+
* @memberof Reachability
|
|
126
|
+
*/
|
|
127
|
+
private handleIceGatheringStateChange;
|
|
128
|
+
/**
|
|
129
|
+
* Attach an event handler for the icecandidate
|
|
130
|
+
* event and measure latency.
|
|
131
|
+
* @param {RTCPeerConnection} peerConnection
|
|
132
|
+
* @returns {undefined}
|
|
133
|
+
* @private
|
|
134
|
+
* @memberof Reachability
|
|
135
|
+
*/
|
|
136
|
+
private handleOnIceCandidate;
|
|
137
|
+
/**
|
|
138
|
+
* An event handler on an RTCPeerConnection when the state of the ICE
|
|
139
|
+
* candidate gathering process changes. Used to measure connection
|
|
140
|
+
* speed.
|
|
141
|
+
* @private
|
|
142
|
+
* @param {RTCPeerConnection} peerConnection
|
|
143
|
+
* @param {boolean} isVideoMesh
|
|
144
|
+
* @returns {Promise}
|
|
145
|
+
*/
|
|
146
|
+
private iceGatheringState;
|
|
147
|
+
/**
|
|
148
|
+
* Make a log of unreachable clusters.
|
|
149
|
+
* @returns {undefined}
|
|
150
|
+
* @private
|
|
151
|
+
* @memberof Reachability
|
|
152
|
+
*/
|
|
153
|
+
private logUnreachableClusters;
|
|
154
|
+
/**
|
|
155
|
+
* Calculates time to establish connection
|
|
156
|
+
* @param {Array<ICECandidateResult>} iceResults iceResults
|
|
157
|
+
* @returns {object} reachabilityMap
|
|
158
|
+
* @protected
|
|
159
|
+
* @memberof Reachability
|
|
160
|
+
*/
|
|
161
|
+
protected parseIceResultsToInternalReachabilityResults(iceResults: Array<ICECandidateResult>): InternalReachabilityResults;
|
|
162
|
+
/**
|
|
163
|
+
* fetches reachability data
|
|
164
|
+
* @param {object} clusterList
|
|
165
|
+
* @returns {Promise<InternalReachabilityResults>} reachability check results
|
|
166
|
+
* @private
|
|
167
|
+
* @memberof Reachability
|
|
168
|
+
*/
|
|
169
|
+
private performReachabilityCheck;
|
|
170
|
+
/**
|
|
171
|
+
* Adds public IP (client media IPs)
|
|
172
|
+
* @param {RTCPeerConnection} peerConnection
|
|
173
|
+
* @param {string} publicIP
|
|
174
|
+
* @returns {void}
|
|
175
|
+
*/
|
|
176
|
+
protected addPublicIP(peerConnection: RTCPeerConnection, publicIP?: string | null): void;
|
|
177
|
+
/**
|
|
178
|
+
* Records latency and closes the peerConnection
|
|
179
|
+
* @param {RTCPeerConnection} peerConnection
|
|
180
|
+
* @param {number} elapsed Latency in milliseconds
|
|
181
|
+
* @returns {undefined}
|
|
182
|
+
* @private
|
|
183
|
+
* @memberof Reachability
|
|
184
|
+
*/
|
|
185
|
+
private setLatencyAndClose;
|
|
186
|
+
/**
|
|
187
|
+
* utility function
|
|
188
|
+
* @returns {undefined}
|
|
189
|
+
* @private
|
|
190
|
+
* @memberof Reachability
|
|
191
|
+
*/
|
|
192
|
+
private setup;
|
|
193
|
+
}
|
|
194
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IP_VERSION } from '../constants';
|
|
2
|
+
export interface ClusterNode {
|
|
3
|
+
isVideoMesh: boolean;
|
|
4
|
+
udp: Array<string>;
|
|
5
|
+
tcp: Array<string>;
|
|
6
|
+
xtls: Array<string>;
|
|
7
|
+
}
|
|
8
|
+
export type ClusterList = {
|
|
9
|
+
[key: string]: ClusterNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @class ReachabilityRequest
|
|
13
|
+
*/
|
|
14
|
+
declare class ReachabilityRequest {
|
|
15
|
+
webex: any;
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of ReachabilityRequest.
|
|
18
|
+
* @param {object} webex
|
|
19
|
+
* @memberof ReachabilityRequest
|
|
20
|
+
*/
|
|
21
|
+
constructor(webex: object);
|
|
22
|
+
/**
|
|
23
|
+
* Gets the cluster information
|
|
24
|
+
*
|
|
25
|
+
* @param {IP_VERSION} ipVersion information about current ip network we're on
|
|
26
|
+
* @returns {Promise}
|
|
27
|
+
*/
|
|
28
|
+
getClusters: (ipVersion?: IP_VERSION) => Promise<{
|
|
29
|
+
clusters: ClusterList;
|
|
30
|
+
joinCookie: any;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* gets remote SDP For Clusters
|
|
34
|
+
* @param {Object} localSDPList localSDPs for the cluster
|
|
35
|
+
* @returns {Object}
|
|
36
|
+
*/
|
|
37
|
+
remoteSDPForClusters: (localSDPList: object) => any;
|
|
38
|
+
}
|
|
39
|
+
export default ReachabilityRequest;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { REACTION_RELAY_TYPES } from './constants';
|
|
2
|
+
export type EmoticonData = {
|
|
3
|
+
type: string;
|
|
4
|
+
codepoints?: string;
|
|
5
|
+
shortcodes?: string;
|
|
6
|
+
};
|
|
7
|
+
export type SkinTone = EmoticonData;
|
|
8
|
+
export type Reaction = EmoticonData & {
|
|
9
|
+
tone?: SkinTone;
|
|
10
|
+
};
|
|
11
|
+
export declare enum ReactionServerType {
|
|
12
|
+
smile = "smile",
|
|
13
|
+
sad = "sad",
|
|
14
|
+
wow = "wow",
|
|
15
|
+
haha = "haha",
|
|
16
|
+
celebrate = "celebrate",
|
|
17
|
+
clap = "clap",
|
|
18
|
+
thumb_up = "thumb_up",
|
|
19
|
+
thumb_down = "thumb_down",
|
|
20
|
+
heart = "heart",
|
|
21
|
+
fire = "fire",
|
|
22
|
+
prayer = "prayer",
|
|
23
|
+
speed_up = "speed_up",
|
|
24
|
+
slow_down = "slow_down"
|
|
25
|
+
}
|
|
26
|
+
export declare enum SkinToneType {
|
|
27
|
+
normal = "normal",
|
|
28
|
+
light = "light",
|
|
29
|
+
medium_light = "medium_light",
|
|
30
|
+
medium = "medium",
|
|
31
|
+
medium_dark = "medium_dark",
|
|
32
|
+
dark = "dark"
|
|
33
|
+
}
|
|
34
|
+
export type Sender = {
|
|
35
|
+
participantId: string;
|
|
36
|
+
};
|
|
37
|
+
export type ProcessedReaction = {
|
|
38
|
+
reaction: Reaction;
|
|
39
|
+
sender: {
|
|
40
|
+
id: Sender['participantId'];
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
type RelayEventData = {
|
|
45
|
+
relayType: (typeof REACTION_RELAY_TYPES)['REACTION'];
|
|
46
|
+
reaction: Reaction;
|
|
47
|
+
sender: Sender;
|
|
48
|
+
};
|
|
49
|
+
export type RelayEvent = {
|
|
50
|
+
data: RelayEventData;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import { RECONNECTION_STATE } from '../constants';
|
|
5
|
+
import Meeting from '../meeting';
|
|
6
|
+
/**
|
|
7
|
+
* @export
|
|
8
|
+
* @class ReconnectionManager
|
|
9
|
+
*/
|
|
10
|
+
export default class ReconnectionManager {
|
|
11
|
+
autoRejoinEnabled: any;
|
|
12
|
+
iceState: any;
|
|
13
|
+
maxRejoinAttempts: any;
|
|
14
|
+
meeting: any;
|
|
15
|
+
rejoinAttempts: any;
|
|
16
|
+
shareStatus: any;
|
|
17
|
+
status: any;
|
|
18
|
+
tryCount: any;
|
|
19
|
+
webex: any;
|
|
20
|
+
/**
|
|
21
|
+
* @param {Meeting} meeting
|
|
22
|
+
*/
|
|
23
|
+
constructor(meeting: Meeting);
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* @memberof ReconnectionManager
|
|
27
|
+
* @returns {void}
|
|
28
|
+
*/
|
|
29
|
+
resetReconnectionTimer(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the iceState to connected and clears any disconnect timeouts and
|
|
32
|
+
* related timeout data within the iceState.
|
|
33
|
+
*
|
|
34
|
+
* @returns {undefined}
|
|
35
|
+
* @public
|
|
36
|
+
* @memberof ReconnectionManager
|
|
37
|
+
*/
|
|
38
|
+
iceReconnected(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Set the iceState to disconnected and generates a timeout that waits for the
|
|
41
|
+
* iceState to reconnect and then resolves. If the ice state is already
|
|
42
|
+
* processing a reconnect, it immediately resolves. Rejects if the timeout
|
|
43
|
+
* duration is reached.
|
|
44
|
+
*
|
|
45
|
+
* @returns {Promise<undefined>}
|
|
46
|
+
* @public
|
|
47
|
+
* @memberof ReconnectionManager
|
|
48
|
+
*/
|
|
49
|
+
waitForIceReconnect(): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* @returns {undefined}
|
|
52
|
+
* @public
|
|
53
|
+
* @memberof ReconnectionManager
|
|
54
|
+
*/
|
|
55
|
+
reset(): void;
|
|
56
|
+
/**
|
|
57
|
+
* @returns {undefined}
|
|
58
|
+
* @public
|
|
59
|
+
* @memberof ReconnectionManager
|
|
60
|
+
*/
|
|
61
|
+
cleanUp(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Stop the local share stream.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} reason a {@link SHARE_STOPPED_REASON}
|
|
66
|
+
* @returns {undefined}
|
|
67
|
+
* @private
|
|
68
|
+
* @memberof ReconnectionManager
|
|
69
|
+
*/
|
|
70
|
+
private stopLocalShareStream;
|
|
71
|
+
/**
|
|
72
|
+
* @public
|
|
73
|
+
* @memberof ReconnectionManager
|
|
74
|
+
* @returns {Boolean} true if reconnection operation is in progress
|
|
75
|
+
*/
|
|
76
|
+
isReconnectInProgress(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Sets the reconnection status
|
|
79
|
+
*
|
|
80
|
+
* @public
|
|
81
|
+
* @param {RECONNECTION_STATE} status
|
|
82
|
+
* @memberof ReconnectionManager
|
|
83
|
+
* @returns {undefined}
|
|
84
|
+
*/
|
|
85
|
+
setStatus(status: RECONNECTION_STATE): void;
|
|
86
|
+
/**
|
|
87
|
+
* @returns {Boolean}
|
|
88
|
+
* @throws {ReconnectionError}
|
|
89
|
+
* @private
|
|
90
|
+
* @memberof ReconnectionManager
|
|
91
|
+
*/
|
|
92
|
+
private validate;
|
|
93
|
+
/**
|
|
94
|
+
* Initiates a media reconnect for the active meeting
|
|
95
|
+
* @param {Object} reconnectOptions
|
|
96
|
+
* @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
|
|
97
|
+
* @param {boolean} [reconnectOptions.networkRetry=false] indicates if we are retrying the reconnect
|
|
98
|
+
* @returns {Promise}
|
|
99
|
+
* @public
|
|
100
|
+
* @memberof ReconnectionManager
|
|
101
|
+
*/
|
|
102
|
+
reconnect({ networkDisconnect, networkRetry, }?: {
|
|
103
|
+
networkDisconnect?: boolean;
|
|
104
|
+
networkRetry?: boolean;
|
|
105
|
+
}): any;
|
|
106
|
+
/**
|
|
107
|
+
* @param {Object} reconnectOptions
|
|
108
|
+
* @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
|
|
109
|
+
* @returns {Promise}
|
|
110
|
+
* @throws {NeedsRetryError}
|
|
111
|
+
* @private
|
|
112
|
+
* @memberof ReconnectionManager
|
|
113
|
+
*/
|
|
114
|
+
private executeReconnection;
|
|
115
|
+
/**
|
|
116
|
+
* Rejoins a meeting after detecting the member was in a LEFT state
|
|
117
|
+
*
|
|
118
|
+
* @async
|
|
119
|
+
* @param {boolean} wasSharing
|
|
120
|
+
* @returns {Promise}
|
|
121
|
+
*/
|
|
122
|
+
rejoinMeeting(wasSharing?: boolean): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* @returns {Promise}
|
|
125
|
+
* @private
|
|
126
|
+
* @memberof ReconnectionManager
|
|
127
|
+
*/
|
|
128
|
+
reconnectMedia(): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Attempt to Reconnect Mercury Websocket
|
|
131
|
+
* @returns {Promise}
|
|
132
|
+
* @private
|
|
133
|
+
* @memberof ReconnectionManager
|
|
134
|
+
*/
|
|
135
|
+
private reconnectMercuryWebSocket;
|
|
136
|
+
}
|
|
@@ -23,9 +23,9 @@ var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy")
|
|
|
23
23
|
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
24
24
|
var _constants = require("../constants");
|
|
25
25
|
var _constants2 = _interopRequireDefault(require("../metrics/constants"));
|
|
26
|
-
var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
|
|
27
26
|
var _reconnectionInProgress = _interopRequireDefault(require("../common/errors/reconnection-in-progress"));
|
|
28
27
|
var _metrics = _interopRequireDefault(require("../metrics"));
|
|
28
|
+
var _reconnection = _interopRequireDefault(require("../common/errors/reconnection"));
|
|
29
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
30
30
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!
|
|
31
31
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
@@ -112,7 +112,7 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* @instance
|
|
115
|
-
* @type {
|
|
115
|
+
* @type {RECONNECTION_STATE}
|
|
116
116
|
* @private
|
|
117
117
|
* @memberof ReconnectionManager
|
|
118
118
|
*/
|
|
@@ -244,7 +244,6 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
244
244
|
key: "cleanUp",
|
|
245
245
|
value: function cleanUp() {
|
|
246
246
|
this.reset();
|
|
247
|
-
this.meeting = null;
|
|
248
247
|
}
|
|
249
248
|
|
|
250
249
|
/**
|
|
@@ -294,6 +293,20 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
294
293
|
return this.status === _constants.RECONNECTION.STATE.IN_PROGRESS;
|
|
295
294
|
}
|
|
296
295
|
|
|
296
|
+
/**
|
|
297
|
+
* Sets the reconnection status
|
|
298
|
+
*
|
|
299
|
+
* @public
|
|
300
|
+
* @param {RECONNECTION_STATE} status
|
|
301
|
+
* @memberof ReconnectionManager
|
|
302
|
+
* @returns {undefined}
|
|
303
|
+
*/
|
|
304
|
+
}, {
|
|
305
|
+
key: "setStatus",
|
|
306
|
+
value: function setStatus(status) {
|
|
307
|
+
this.status = status;
|
|
308
|
+
}
|
|
309
|
+
|
|
297
310
|
/**
|
|
298
311
|
* @returns {Boolean}
|
|
299
312
|
* @throws {ReconnectionError}
|
|
@@ -364,20 +377,6 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
364
377
|
}
|
|
365
378
|
return _context2.abrupt("return", this.executeReconnection({
|
|
366
379
|
networkDisconnect: networkDisconnect
|
|
367
|
-
}).then(function () {
|
|
368
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection successful.');
|
|
369
|
-
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Sending reconnect success metric.');
|
|
370
|
-
|
|
371
|
-
// @ts-ignore
|
|
372
|
-
_this3.webex.internal.newMetrics.submitClientEvent({
|
|
373
|
-
name: 'client.media.recovered',
|
|
374
|
-
payload: {
|
|
375
|
-
recoveredBy: 'new'
|
|
376
|
-
},
|
|
377
|
-
options: {
|
|
378
|
-
meetingId: _this3.meeting.id
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
380
|
}).catch(function (reconnectError) {
|
|
382
381
|
if (reconnectError instanceof NeedsRetryError) {
|
|
383
382
|
_loggerProxy.default.logger.info('ReconnectionManager:index#reconnect --> Reconnection not successful, retrying.');
|
|
@@ -523,20 +522,19 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
523
522
|
return this.reconnectMedia();
|
|
524
523
|
case 41:
|
|
525
524
|
media = _context3.sent;
|
|
526
|
-
_loggerProxy.default.logger.log('ReconnectionManager:index#executeReconnection -->
|
|
527
|
-
this.status = _constants.RECONNECTION.STATE.COMPLETE;
|
|
525
|
+
_loggerProxy.default.logger.log('ReconnectionManager:index#executeReconnection --> webRTC media connection renewed and local sdp offer sent');
|
|
528
526
|
return _context3.abrupt("return", media);
|
|
529
|
-
case
|
|
530
|
-
_context3.prev =
|
|
527
|
+
case 46:
|
|
528
|
+
_context3.prev = 46;
|
|
531
529
|
_context3.t2 = _context3["catch"](38);
|
|
532
|
-
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection -->
|
|
530
|
+
_loggerProxy.default.logger.error('ReconnectionManager:index#executeReconnection --> failed to renew webRTC media connection or initiate offer');
|
|
533
531
|
this.status = _constants.RECONNECTION.STATE.FAILURE;
|
|
534
532
|
throw _context3.t2;
|
|
535
|
-
case
|
|
533
|
+
case 51:
|
|
536
534
|
case "end":
|
|
537
535
|
return _context3.stop();
|
|
538
536
|
}
|
|
539
|
-
}, _callee3, this, [[8, 14], [20, 26], [38,
|
|
537
|
+
}, _callee3, this, [[8, 14], [20, 26], [38, 46]]);
|
|
540
538
|
}));
|
|
541
539
|
function executeReconnection(_x2) {
|
|
542
540
|
return _executeReconnection.apply(this, arguments);
|
|
@@ -636,7 +634,7 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
636
634
|
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
637
635
|
while (1) switch (_context5.prev = _context5.next) {
|
|
638
636
|
case 0:
|
|
639
|
-
_loggerProxy.default.logger.log('ReconnectionManager:index#reconnectMedia -->
|
|
637
|
+
_loggerProxy.default.logger.log('ReconnectionManager:index#reconnectMedia --> do turn discovery');
|
|
640
638
|
|
|
641
639
|
// do the TURN server discovery again and ignore reachability results since the TURN server might change
|
|
642
640
|
_context5.next = 3;
|
|
@@ -651,9 +649,10 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
651
649
|
credential: turnServerResult.turnServerInfo.password || ''
|
|
652
650
|
});
|
|
653
651
|
}
|
|
654
|
-
|
|
652
|
+
_loggerProxy.default.logger.log('ReconnectionManager:index#reconnectMedia --> renew webRTC media connection and send local sdp offer');
|
|
653
|
+
_context5.next = 9;
|
|
655
654
|
return this.meeting.mediaProperties.webrtcMediaConnection.reconnect(iceServers);
|
|
656
|
-
case
|
|
655
|
+
case 9:
|
|
657
656
|
// resend media requests
|
|
658
657
|
if (this.meeting.isMultistream) {
|
|
659
658
|
(0, _values.default)(this.meeting.mediaRequestManagers).forEach(function (mediaRequestManager) {
|
|
@@ -661,7 +660,7 @@ var ReconnectionManager = exports.default = /*#__PURE__*/function () {
|
|
|
661
660
|
mediaRequestManager.commit();
|
|
662
661
|
});
|
|
663
662
|
}
|
|
664
|
-
case
|
|
663
|
+
case 10:
|
|
665
664
|
case "end":
|
|
666
665
|
return _context5.stop();
|
|
667
666
|
}
|