@webex/plugin-meetings 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/reconnection-not-started.js +46 -0
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/constants.js +16 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +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/media/properties.js +102 -57
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -10
- package/dist/mediaQualityMetrics/config.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 +564 -475
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +27 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +9 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +37 -49
- package/dist/meeting/voicea-meeting.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 -298
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +12 -28
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +88 -9
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +138 -109
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/request.js +3 -27
- package/dist/roap/request.js.map +1 -1
- package/dist/statsAnalyzer/index.js +8 -2
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +17 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +73 -0
- package/dist/types/constants.d.ts +1098 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +117 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +247 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +173 -0
- package/dist/types/meeting/index.d.ts +1832 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +75 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +295 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +122 -0
- package/dist/types/meeting/voicea-meeting.d.ts +17 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +383 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +119 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +300 -0
- package/dist/types/multistream/sendSlotManager.d.ts +69 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +110 -0
- package/dist/types/reachability/index.d.ts +120 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +15 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/constants.ts +14 -5
- package/src/index.ts +30 -0
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/media/properties.ts +67 -15
- package/src/mediaQualityMetrics/config.ts +13 -7
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +144 -107
- package/src/meeting/locusMediaRequest.ts +31 -0
- package/src/meeting/util.ts +9 -16
- package/src/meeting/voicea-meeting.ts +44 -46
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -244
- package/src/meetings/index.ts +15 -27
- package/src/reachability/index.ts +60 -0
- package/src/reconnection-manager/index.ts +128 -105
- package/src/roap/request.ts +1 -24
- package/src/statsAnalyzer/index.ts +10 -3
- package/src/statsAnalyzer/mqaUtil.ts +23 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +21 -0
- package/test/unit/spec/media/properties.ts +145 -140
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +271 -105
- package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
- package/test/unit/spec/meeting/utils.js +3 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
- package/test/unit/spec/meetings/index.js +59 -17
- package/test/unit/spec/reachability/index.ts +266 -0
- package/test/unit/spec/reconnection-manager/index.js +127 -39
- package/test/unit/spec/roap/request.ts +0 -37
- package/test/unit/spec/stats-analyzer/index.js +100 -8
- package/src/common/errors/reconnection-in-progress.ts +0 -8
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import ReachabilityRequest from './request';
|
|
5
|
+
import { ClusterReachability, ClusterReachabilityResult } from './clusterReachability';
|
|
6
|
+
export type ReachabilityMetrics = {
|
|
7
|
+
reachability_public_udp_success: number;
|
|
8
|
+
reachability_public_udp_failed: number;
|
|
9
|
+
reachability_public_tcp_success: number;
|
|
10
|
+
reachability_public_tcp_failed: number;
|
|
11
|
+
reachability_public_xtls_success: number;
|
|
12
|
+
reachability_public_xtls_failed: number;
|
|
13
|
+
reachability_vmn_udp_success: number;
|
|
14
|
+
reachability_vmn_udp_failed: number;
|
|
15
|
+
reachability_vmn_tcp_success: number;
|
|
16
|
+
reachability_vmn_tcp_failed: number;
|
|
17
|
+
reachability_vmn_xtls_success: number;
|
|
18
|
+
reachability_vmn_xtls_failed: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* This is the type that matches what backend expects us to send to them. It is a bit weird, because
|
|
22
|
+
* it uses strings instead of booleans and numbers, but that's what they require.
|
|
23
|
+
*/
|
|
24
|
+
export type TransportResultForBackend = {
|
|
25
|
+
reachable?: 'true' | 'false';
|
|
26
|
+
latencyInMilliseconds?: string;
|
|
27
|
+
clientMediaIPs?: string[];
|
|
28
|
+
untested?: 'true';
|
|
29
|
+
};
|
|
30
|
+
export type ReachabilityResultForBackend = {
|
|
31
|
+
udp: TransportResultForBackend;
|
|
32
|
+
tcp: TransportResultForBackend;
|
|
33
|
+
xtls: TransportResultForBackend;
|
|
34
|
+
};
|
|
35
|
+
export type ReachabilityResultsForBackend = Record<string, ReachabilityResultForBackend>;
|
|
36
|
+
export type ReachabilityResults = Record<string, ClusterReachabilityResult & {
|
|
37
|
+
isVideoMesh?: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* @class Reachability
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export default class Reachability {
|
|
44
|
+
namespace: string;
|
|
45
|
+
webex: object;
|
|
46
|
+
reachabilityRequest: ReachabilityRequest;
|
|
47
|
+
clusterReachability: {
|
|
48
|
+
[key: string]: ClusterReachability;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Creates an instance of Reachability.
|
|
52
|
+
* @param {object} webex
|
|
53
|
+
* @memberof Reachability
|
|
54
|
+
*/
|
|
55
|
+
constructor(webex: object);
|
|
56
|
+
/**
|
|
57
|
+
* Gets a list of media clusters from the backend and performs reachability checks on all the clusters
|
|
58
|
+
* @returns {Promise<ReachabilityResults>} reachability results
|
|
59
|
+
* @public
|
|
60
|
+
* @memberof Reachability
|
|
61
|
+
*/
|
|
62
|
+
gatherReachability(): Promise<ReachabilityResults>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns statistics about last reachability results. The returned value is an object
|
|
65
|
+
* with a flat list of properties so that it can be easily sent with metrics
|
|
66
|
+
*
|
|
67
|
+
* @returns {Promise} Promise with metrics values, it never rejects/throws.
|
|
68
|
+
*/
|
|
69
|
+
getReachabilityMetrics(): Promise<ReachabilityMetrics>;
|
|
70
|
+
/**
|
|
71
|
+
* Maps our internal transport result to the format that backend expects
|
|
72
|
+
* @param {TransportResult} transportResult
|
|
73
|
+
* @returns {TransportResultForBackend}
|
|
74
|
+
*/
|
|
75
|
+
private mapTransportResultToBackendDataFormat;
|
|
76
|
+
/**
|
|
77
|
+
* Reachability results as an object in the format that backend expects
|
|
78
|
+
*
|
|
79
|
+
* @returns {any} reachability results that need to be sent to the backend
|
|
80
|
+
*/
|
|
81
|
+
getReachabilityResults(): Promise<ReachabilityResultsForBackend | undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* fetches reachability data and checks for cluster reachability
|
|
84
|
+
* @returns {boolean}
|
|
85
|
+
* @public
|
|
86
|
+
* @memberof Reachability
|
|
87
|
+
*/
|
|
88
|
+
isAnyPublicClusterReachable(): Promise<boolean>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns true only if ALL protocols (UDP, TCP and TLS) have been tested and none
|
|
91
|
+
* of the media clusters where reachable with any of the protocols. This is done
|
|
92
|
+
* irrespective of the config, so for example:
|
|
93
|
+
* if config.meetings.experimental.enableTlsReachability === false,
|
|
94
|
+
* it will return false, because TLS reachability won't be tested,
|
|
95
|
+
* so we can't say for sure that media backend is unreachable over TLS.
|
|
96
|
+
*
|
|
97
|
+
* @returns {boolean}
|
|
98
|
+
*/
|
|
99
|
+
isWebexMediaBackendUnreachable(): Promise<boolean>;
|
|
100
|
+
/**
|
|
101
|
+
* Get list of all unreachable clusters
|
|
102
|
+
* @returns {array} Unreachable clusters
|
|
103
|
+
* @private
|
|
104
|
+
* @memberof Reachability
|
|
105
|
+
*/
|
|
106
|
+
private getUnreachableClusters;
|
|
107
|
+
/**
|
|
108
|
+
* Make a log of unreachable clusters.
|
|
109
|
+
* @returns {undefined}
|
|
110
|
+
* @private
|
|
111
|
+
* @memberof Reachability
|
|
112
|
+
*/
|
|
113
|
+
private logUnreachableClusters;
|
|
114
|
+
/**
|
|
115
|
+
* Performs reachability checks for all clusters
|
|
116
|
+
* @param {ClusterList} clusterList
|
|
117
|
+
* @returns {Promise<ReachabilityResults>} reachability check results
|
|
118
|
+
*/
|
|
119
|
+
private performReachabilityChecks;
|
|
120
|
+
}
|
|
@@ -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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a stun url to a turn url
|
|
3
|
+
*
|
|
4
|
+
* @param {string} stunUrl url of a stun server
|
|
5
|
+
* @param {'tcp'|'udp'} protocol what protocol to use for the turn server
|
|
6
|
+
* @returns {string} url of a turn server
|
|
7
|
+
*/
|
|
8
|
+
export declare function convertStunUrlToTurn(stunUrl: string, protocol: 'udp' | 'tcp'): string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a stun url to a turns url
|
|
11
|
+
*
|
|
12
|
+
* @param {string} stunUrl url of a stun server
|
|
13
|
+
* @returns {string} url of a turns server
|
|
14
|
+
*/
|
|
15
|
+
export declare function convertStunUrlToTurnTls(stunUrl: string): string;
|
|
@@ -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,126 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
import Meeting from '../meeting';
|
|
5
|
+
/**
|
|
6
|
+
* @export
|
|
7
|
+
* @class ReconnectionManager
|
|
8
|
+
*/
|
|
9
|
+
export default class ReconnectionManager {
|
|
10
|
+
autoRejoinEnabled: any;
|
|
11
|
+
iceState: any;
|
|
12
|
+
maxRejoinAttempts: any;
|
|
13
|
+
meeting: any;
|
|
14
|
+
rejoinAttempts: any;
|
|
15
|
+
shareStatus: any;
|
|
16
|
+
status: any;
|
|
17
|
+
webex: any;
|
|
18
|
+
/**
|
|
19
|
+
* @param {Meeting} meeting
|
|
20
|
+
*/
|
|
21
|
+
constructor(meeting: Meeting);
|
|
22
|
+
/**
|
|
23
|
+
* @public
|
|
24
|
+
* @memberof ReconnectionManager
|
|
25
|
+
* @returns {void}
|
|
26
|
+
*/
|
|
27
|
+
resetReconnectionTimer(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the iceState to connected and clears any disconnect timeouts and
|
|
30
|
+
* related timeout data within the iceState.
|
|
31
|
+
*
|
|
32
|
+
* @returns {undefined}
|
|
33
|
+
* @public
|
|
34
|
+
* @memberof ReconnectionManager
|
|
35
|
+
*/
|
|
36
|
+
iceReconnected(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Set the iceState to disconnected and generates a timeout that waits for the
|
|
39
|
+
* iceState to reconnect and then resolves. If the ice state is already
|
|
40
|
+
* processing a reconnect, it immediately resolves. Rejects if the timeout
|
|
41
|
+
* duration is reached.
|
|
42
|
+
*
|
|
43
|
+
* @returns {Promise<undefined>}
|
|
44
|
+
* @public
|
|
45
|
+
* @memberof ReconnectionManager
|
|
46
|
+
*/
|
|
47
|
+
waitForIceReconnect(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* @returns {undefined}
|
|
50
|
+
* @public
|
|
51
|
+
* @memberof ReconnectionManager
|
|
52
|
+
*/
|
|
53
|
+
reset(): void;
|
|
54
|
+
/**
|
|
55
|
+
* @returns {undefined}
|
|
56
|
+
* @public
|
|
57
|
+
* @memberof ReconnectionManager
|
|
58
|
+
*/
|
|
59
|
+
cleanUp(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Stop the local share stream.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} reason a {@link SHARE_STOPPED_REASON}
|
|
64
|
+
* @returns {undefined}
|
|
65
|
+
* @private
|
|
66
|
+
* @memberof ReconnectionManager
|
|
67
|
+
*/
|
|
68
|
+
private stopLocalShareStream;
|
|
69
|
+
/**
|
|
70
|
+
* @public
|
|
71
|
+
* @memberof ReconnectionManager
|
|
72
|
+
* @returns {Boolean} true if reconnection operation is in progress
|
|
73
|
+
*/
|
|
74
|
+
isReconnectInProgress(): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* @returns {Boolean}
|
|
77
|
+
* @throws {ReconnectInProgress, ReconnectionDisabled}
|
|
78
|
+
* @private
|
|
79
|
+
* @memberof ReconnectionManager
|
|
80
|
+
*/
|
|
81
|
+
private canStartReconnection;
|
|
82
|
+
/**
|
|
83
|
+
* Initiates a media reconnect for the active meeting
|
|
84
|
+
* @param {Object} reconnectOptions
|
|
85
|
+
* @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
|
|
86
|
+
* @param {boolean} [reconnectOptions.networkRetry=false] indicates if we are retrying the reconnect
|
|
87
|
+
* @param {Function} [completionCallback] callback that gets called when reconnection is started successfully
|
|
88
|
+
* @returns {Promise}
|
|
89
|
+
* @public
|
|
90
|
+
* @memberof ReconnectionManager
|
|
91
|
+
*/
|
|
92
|
+
reconnect({ networkDisconnect, networkRetry, }?: {
|
|
93
|
+
networkDisconnect?: boolean;
|
|
94
|
+
networkRetry?: boolean;
|
|
95
|
+
}, completionCallback?: (() => Promise<void>) | undefined): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* @param {Object} reconnectOptions
|
|
98
|
+
* @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened
|
|
99
|
+
* @returns {Promise}
|
|
100
|
+
* @throws {NeedsRetryError}
|
|
101
|
+
* @private
|
|
102
|
+
* @memberof ReconnectionManager
|
|
103
|
+
*/
|
|
104
|
+
private executeReconnection;
|
|
105
|
+
/**
|
|
106
|
+
* Rejoins a meeting after detecting the member was in a LEFT state
|
|
107
|
+
*
|
|
108
|
+
* @async
|
|
109
|
+
* @param {boolean} wasSharing
|
|
110
|
+
* @returns {Promise}
|
|
111
|
+
*/
|
|
112
|
+
rejoinMeeting(wasSharing?: boolean): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* @returns {Promise}
|
|
115
|
+
* @private
|
|
116
|
+
* @memberof ReconnectionManager
|
|
117
|
+
*/
|
|
118
|
+
reconnectMedia(): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Attempt to Reconnect Mercury Websocket
|
|
121
|
+
* @returns {Promise}
|
|
122
|
+
* @private
|
|
123
|
+
* @memberof ReconnectionManager
|
|
124
|
+
*/
|
|
125
|
+
private reconnectMercuryWebSocket;
|
|
126
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { SELF_POLICY } from '../constants';
|
|
2
|
+
import MeetingRequest from '../meeting/request';
|
|
3
|
+
/**
|
|
4
|
+
* @description Recording manages the recording functionality of the meeting object, there should only be one instantation of recording per meeting
|
|
5
|
+
* @export
|
|
6
|
+
* @private
|
|
7
|
+
* @class Recording
|
|
8
|
+
*/
|
|
9
|
+
export default class RecordingController {
|
|
10
|
+
/**
|
|
11
|
+
* @instance
|
|
12
|
+
* @type {MeetingRequest}
|
|
13
|
+
* @private
|
|
14
|
+
* @memberof RecordingController
|
|
15
|
+
*/
|
|
16
|
+
private request;
|
|
17
|
+
/**
|
|
18
|
+
* @instance
|
|
19
|
+
* @type {Array}
|
|
20
|
+
* @private
|
|
21
|
+
* @memberof RecordingInfo
|
|
22
|
+
*/
|
|
23
|
+
private displayHints;
|
|
24
|
+
/**
|
|
25
|
+
* @instance
|
|
26
|
+
* @type {Object}
|
|
27
|
+
* @private
|
|
28
|
+
* @memberof RecordingInfo
|
|
29
|
+
*/
|
|
30
|
+
private selfUserPolicies;
|
|
31
|
+
/**
|
|
32
|
+
* @instance
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @private
|
|
35
|
+
* @memberof RecordingInfo
|
|
36
|
+
*/
|
|
37
|
+
private serviceUrl;
|
|
38
|
+
/**
|
|
39
|
+
* @instance
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @private
|
|
42
|
+
* @memberof RecordingInfo
|
|
43
|
+
*/
|
|
44
|
+
private sessionId;
|
|
45
|
+
/**
|
|
46
|
+
* @instance
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @private
|
|
49
|
+
* @memberof RecordingInfo
|
|
50
|
+
*/
|
|
51
|
+
private locusUrl;
|
|
52
|
+
/**
|
|
53
|
+
* @instance
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @private
|
|
56
|
+
* @memberof RecordingInfo
|
|
57
|
+
*/
|
|
58
|
+
private locusId;
|
|
59
|
+
/**
|
|
60
|
+
* @param {MeetingRequest} request
|
|
61
|
+
* @param {Object} options
|
|
62
|
+
* @constructor
|
|
63
|
+
* @memberof RecordingController
|
|
64
|
+
*/
|
|
65
|
+
constructor(request: MeetingRequest, options?: {
|
|
66
|
+
serviceUrl?: string;
|
|
67
|
+
sessionId: string;
|
|
68
|
+
locusUrl: string;
|
|
69
|
+
displayHints?: Array<string>;
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* @param {MeetingRequest} request
|
|
73
|
+
* @returns {void}
|
|
74
|
+
* @private
|
|
75
|
+
* @memberof RecordingController
|
|
76
|
+
*/
|
|
77
|
+
private initialize;
|
|
78
|
+
/**
|
|
79
|
+
* @param {Object} options
|
|
80
|
+
* @returns {void}
|
|
81
|
+
* @public
|
|
82
|
+
* @memberof RecordingController
|
|
83
|
+
*/
|
|
84
|
+
set(options?: {
|
|
85
|
+
serviceUrl?: string;
|
|
86
|
+
sessionId: string;
|
|
87
|
+
locusUrl: string;
|
|
88
|
+
displayHints?: Array<string>;
|
|
89
|
+
}): void;
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} url
|
|
92
|
+
* @returns {void}
|
|
93
|
+
* @public
|
|
94
|
+
* @memberof RecordingController
|
|
95
|
+
*/
|
|
96
|
+
setLocusUrl(url: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* @param {Array} hints
|
|
99
|
+
* @returns {void}
|
|
100
|
+
* @public
|
|
101
|
+
* @memberof RecordingController
|
|
102
|
+
*/
|
|
103
|
+
setDisplayHints(hints: Array<string>): void;
|
|
104
|
+
/**
|
|
105
|
+
* @param {Object} selfUserPolicies
|
|
106
|
+
* @returns {void}
|
|
107
|
+
* @public
|
|
108
|
+
* @memberof RecordingController
|
|
109
|
+
*/
|
|
110
|
+
setUserPolicy(selfUserPolicies: Record<SELF_POLICY, boolean>): void;
|
|
111
|
+
/**
|
|
112
|
+
* @param {string} id
|
|
113
|
+
* @returns {void}
|
|
114
|
+
* @public
|
|
115
|
+
* @memberof RecordingController
|
|
116
|
+
*/
|
|
117
|
+
setSessionId(id: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* @param {string} url
|
|
120
|
+
* @returns {void}
|
|
121
|
+
* @public
|
|
122
|
+
* @memberof RecordingController
|
|
123
|
+
*/
|
|
124
|
+
setServiceUrl(url: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* @returns {string}
|
|
127
|
+
* @public
|
|
128
|
+
* @memberof RecordingController
|
|
129
|
+
*/
|
|
130
|
+
getLocusUrl(): string;
|
|
131
|
+
/**
|
|
132
|
+
* @returns {string}
|
|
133
|
+
* @public
|
|
134
|
+
* @memberof RecordingController
|
|
135
|
+
*/
|
|
136
|
+
getLocusId(): string;
|
|
137
|
+
/**
|
|
138
|
+
* @returns {string}
|
|
139
|
+
* @public
|
|
140
|
+
* @memberof RecordingController
|
|
141
|
+
*/
|
|
142
|
+
getSessionId(): string;
|
|
143
|
+
/**
|
|
144
|
+
* @returns {string}
|
|
145
|
+
* @public
|
|
146
|
+
* @memberof RecordingController
|
|
147
|
+
*/
|
|
148
|
+
getServiceUrl(): string;
|
|
149
|
+
/**
|
|
150
|
+
* @returns {Array}
|
|
151
|
+
* @public
|
|
152
|
+
* @memberof RecordingController
|
|
153
|
+
*/
|
|
154
|
+
getDisplayHints(): string[];
|
|
155
|
+
/**
|
|
156
|
+
* @param {Object} options
|
|
157
|
+
* @returns {void}
|
|
158
|
+
* @private
|
|
159
|
+
* @memberof RecordingController
|
|
160
|
+
*/
|
|
161
|
+
private extract;
|
|
162
|
+
/**
|
|
163
|
+
* @param {RecordingAction} action
|
|
164
|
+
* @private
|
|
165
|
+
* @memberof RecordingController
|
|
166
|
+
* @returns {Promise}
|
|
167
|
+
*/
|
|
168
|
+
private recordingService;
|
|
169
|
+
/**
|
|
170
|
+
* @param {RecordingAction} action
|
|
171
|
+
* @private
|
|
172
|
+
* @memberof RecordingController
|
|
173
|
+
* @returns {Promise}
|
|
174
|
+
*/
|
|
175
|
+
private recordingControls;
|
|
176
|
+
/**
|
|
177
|
+
* @param {RecordingAction} action
|
|
178
|
+
* @private
|
|
179
|
+
* @memberof RecordingController
|
|
180
|
+
* @returns {Promise}
|
|
181
|
+
*/
|
|
182
|
+
private recordingFacade;
|
|
183
|
+
/**
|
|
184
|
+
* @private
|
|
185
|
+
* @memberof RecordingController
|
|
186
|
+
* @returns {Promise}
|
|
187
|
+
*/
|
|
188
|
+
startRecording(): Promise<any>;
|
|
189
|
+
/**
|
|
190
|
+
* @private
|
|
191
|
+
* @memberof RecordingController
|
|
192
|
+
* @returns {Promise}
|
|
193
|
+
*/
|
|
194
|
+
stopRecording(): Promise<any>;
|
|
195
|
+
/**
|
|
196
|
+
* @private
|
|
197
|
+
* @memberof RecordingController
|
|
198
|
+
* @returns {Promise}
|
|
199
|
+
*/
|
|
200
|
+
pauseRecording(): Promise<any>;
|
|
201
|
+
/**
|
|
202
|
+
* @private
|
|
203
|
+
* @memberof RecordingController
|
|
204
|
+
* @returns {Promise}
|
|
205
|
+
*/
|
|
206
|
+
resumeRecording(): Promise<any>;
|
|
207
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SELF_POLICY } from '../constants';
|
|
2
|
+
import RecordingAction from './enums';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
canUserStart: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
|
|
5
|
+
canUserPause: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
|
|
6
|
+
canUserResume: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
|
|
7
|
+
canUserStop: (displayHints: string[], userPolicies: Record<SELF_POLICY, boolean>) => boolean;
|
|
8
|
+
deriveRecordingStates: (action: RecordingAction) => {
|
|
9
|
+
recording: boolean;
|
|
10
|
+
paused: boolean;
|
|
11
|
+
};
|
|
12
|
+
extractLocusId: (url: string) => string;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { StatelessWebexPlugin } from '@webex/webex-core';
|
|
2
|
+
import TurnDiscovery, { TurnDiscoveryResult } from './turnDiscovery';
|
|
3
|
+
import Meeting from '../meeting';
|
|
4
|
+
export { type TurnDiscoveryResult, type TurnServerInfo, type TurnDiscoverySkipReason, } from './turnDiscovery';
|
|
5
|
+
/**
|
|
6
|
+
* Roap options
|
|
7
|
+
* @typedef {Object} RoapOptions
|
|
8
|
+
* @property {String} sdp
|
|
9
|
+
* @property {Meeting} meeting
|
|
10
|
+
* @property {Number} seq
|
|
11
|
+
* @property {Number} tieBreaker
|
|
12
|
+
* @property {Boolean} reconnect
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {Object} SeqOptions
|
|
16
|
+
* @property {String} correlationId
|
|
17
|
+
* @property {String} mediaId
|
|
18
|
+
* @property {Number} seq
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @class Roap
|
|
22
|
+
* @export
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
export default class Roap extends StatelessWebexPlugin {
|
|
26
|
+
attrs: any;
|
|
27
|
+
lastRoapOffer: any;
|
|
28
|
+
options: any;
|
|
29
|
+
roapHandler: any;
|
|
30
|
+
roapRequest: any;
|
|
31
|
+
turnDiscovery: TurnDiscovery;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param {Object} attrs
|
|
35
|
+
* @param {Object} options
|
|
36
|
+
*/
|
|
37
|
+
constructor(attrs: any, options: any);
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @param {SeqOptions} options
|
|
41
|
+
* @returns {null}
|
|
42
|
+
* @memberof Roap
|
|
43
|
+
*/
|
|
44
|
+
sendRoapOK(options: any): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* Sends a ROAP answer...
|
|
47
|
+
* @param {SeqOptions} options
|
|
48
|
+
* @param {Boolean} options.audioMuted
|
|
49
|
+
* @param {Boolean} options.videoMuted
|
|
50
|
+
* @returns {Promise}
|
|
51
|
+
* @memberof Roap
|
|
52
|
+
*/
|
|
53
|
+
sendRoapAnswer(options: any): any;
|
|
54
|
+
/**
|
|
55
|
+
* Sends a ROAP error...
|
|
56
|
+
* @param {Object} options
|
|
57
|
+
* @returns {Promise}
|
|
58
|
+
* @memberof Roap
|
|
59
|
+
*/
|
|
60
|
+
sendRoapError(options: any): any;
|
|
61
|
+
/**
|
|
62
|
+
* sends a roap media request
|
|
63
|
+
* @param {RoapOptions} options
|
|
64
|
+
* @returns {Promise}
|
|
65
|
+
* @memberof Roap
|
|
66
|
+
*/
|
|
67
|
+
sendRoapMediaRequest(options: any): any;
|
|
68
|
+
/**
|
|
69
|
+
* Performs a TURN server discovery procedure, which involves exchanging
|
|
70
|
+
* some roap messages with the server. This exchange has to be done before
|
|
71
|
+
* any other roap messages are sent
|
|
72
|
+
*
|
|
73
|
+
* @param {Meeting} meeting
|
|
74
|
+
* @param {Boolean} isReconnecting should be set to true if this is a new
|
|
75
|
+
* media connection just after a reconnection
|
|
76
|
+
* @param {Boolean} [isForced]
|
|
77
|
+
* @returns {Promise}
|
|
78
|
+
*/
|
|
79
|
+
doTurnDiscovery(meeting: Meeting, isReconnecting: boolean, isForced?: boolean): Promise<TurnDiscoveryResult>;
|
|
80
|
+
generateTurnDiscoveryRequestMessage(meeting: Meeting, isForced: boolean): Promise<{
|
|
81
|
+
roapMessage?: object;
|
|
82
|
+
turnDiscoverySkippedReason: string;
|
|
83
|
+
}>;
|
|
84
|
+
handleTurnDiscoveryHttpResponse(meeting: Meeting, httpResponse: object): Promise<TurnDiscoveryResult>;
|
|
85
|
+
abortTurnDiscovery(): void;
|
|
86
|
+
}
|