@webex/plugin-meetings 3.6.0-next.9 → 3.7.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +24 -2
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +1 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +10 -3
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +12 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +28 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +2 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/index.js +61 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +19 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +564 -441
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +2 -6
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/request.js +21 -29
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +94 -59
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +2 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/members/index.js +3 -2
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +9 -5
- package/dist/members/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +0 -4
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +433 -136
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +7 -0
- package/dist/reachability/reachability.types.js.map +1 -0
- package/dist/reachability/request.js +23 -9
- package/dist/reachability/request.js.map +1 -1
- package/dist/roap/index.js +5 -7
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +45 -79
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +3 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +19 -0
- package/dist/types/controls-options-manager/enums.d.ts +2 -1
- package/dist/types/controls-options-manager/index.d.ts +2 -1
- package/dist/types/controls-options-manager/types.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +9 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +18 -0
- package/dist/types/meeting/index.d.ts +14 -3
- package/dist/types/meeting/locusMediaRequest.d.ts +2 -3
- package/dist/types/meeting/request.d.ts +2 -2
- package/dist/types/meeting/util.d.ts +2 -2
- package/dist/types/meetings/index.d.ts +1 -1
- package/dist/types/members/index.d.ts +2 -1
- package/dist/types/members/util.d.ts +3 -1
- package/dist/types/reachability/clusterReachability.d.ts +1 -10
- package/dist/types/reachability/index.d.ts +74 -35
- package/dist/types/reachability/reachability.types.d.ts +64 -0
- package/dist/types/reachability/request.d.ts +5 -1
- package/dist/types/roap/request.d.ts +1 -13
- package/dist/webinar/index.js +32 -19
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -22
- package/src/config.ts +1 -0
- package/src/constants.ts +25 -0
- package/src/controls-options-manager/enums.ts +1 -0
- package/src/controls-options-manager/index.ts +19 -2
- package/src/controls-options-manager/types.ts +2 -0
- package/src/controls-options-manager/util.ts +12 -0
- package/src/locus-info/controlsUtils.ts +46 -2
- package/src/locus-info/fullState.ts +1 -0
- package/src/locus-info/index.ts +60 -0
- package/src/meeting/in-meeting-actions.ts +37 -0
- package/src/meeting/index.ts +114 -11
- package/src/meeting/locusMediaRequest.ts +4 -8
- package/src/meeting/request.ts +4 -11
- package/src/meeting/util.ts +24 -4
- package/src/meetings/index.ts +46 -39
- package/src/members/index.ts +4 -2
- package/src/members/util.ts +3 -1
- package/src/reachability/clusterReachability.ts +1 -14
- package/src/reachability/index.ts +285 -77
- package/src/reachability/reachability.types.ts +85 -0
- package/src/reachability/request.ts +55 -30
- package/src/roap/index.ts +4 -5
- package/src/roap/request.ts +30 -44
- package/src/roap/turnDiscovery.ts +2 -4
- package/src/webinar/index.ts +31 -17
- package/test/unit/spec/controls-options-manager/index.js +56 -32
- package/test/unit/spec/controls-options-manager/util.js +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +80 -4
- package/test/unit/spec/locus-info/index.js +59 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +18 -0
- package/test/unit/spec/meeting/index.js +231 -100
- package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
- package/test/unit/spec/meeting/request.js +3 -26
- package/test/unit/spec/meeting/utils.js +53 -13
- package/test/unit/spec/meetings/index.js +16 -1
- package/test/unit/spec/members/index.js +25 -2
- package/test/unit/spec/members/request.js +37 -3
- package/test/unit/spec/members/utils.js +15 -1
- package/test/unit/spec/reachability/index.ts +265 -1
- package/test/unit/spec/reachability/request.js +56 -15
- package/test/unit/spec/roap/index.ts +1 -1
- package/test/unit/spec/roap/request.ts +51 -109
- package/test/unit/spec/roap/turnDiscovery.ts +202 -147
- package/test/unit/spec/webinar/index.ts +82 -16
package/src/meeting/request.ts
CHANGED
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
SEND_DTMF_ENDPOINT,
|
|
27
27
|
_SLIDES_,
|
|
28
28
|
ANNOTATION,
|
|
29
|
-
IP_VERSION,
|
|
30
29
|
} from '../constants';
|
|
31
30
|
import {SendReactionOptions, ToggleReactionsOptions} from './request.type';
|
|
32
31
|
import MeetingUtil from './util';
|
|
33
32
|
import {AnnotationInfo} from '../annotation/annotation.types';
|
|
33
|
+
import {ClientMediaPreferences} from '../reachability/reachability.types';
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* @class MeetingRequest
|
|
@@ -128,8 +128,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
128
128
|
locale?: string;
|
|
129
129
|
deviceCapabilities?: Array<string>;
|
|
130
130
|
liveAnnotationSupported: boolean;
|
|
131
|
-
ipVersion?: IP_VERSION;
|
|
132
131
|
alias?: string;
|
|
132
|
+
clientMediaPreferences: ClientMediaPreferences;
|
|
133
133
|
}) {
|
|
134
134
|
const {
|
|
135
135
|
asResourceOccupant,
|
|
@@ -147,12 +147,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
147
147
|
moveToResource,
|
|
148
148
|
roapMessage,
|
|
149
149
|
reachability,
|
|
150
|
-
preferTranscoding,
|
|
151
150
|
breakoutsSupported,
|
|
152
151
|
locale,
|
|
153
152
|
deviceCapabilities = [],
|
|
154
153
|
liveAnnotationSupported,
|
|
155
|
-
|
|
154
|
+
clientMediaPreferences,
|
|
156
155
|
alias,
|
|
157
156
|
} = options;
|
|
158
157
|
|
|
@@ -160,8 +159,6 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
160
159
|
|
|
161
160
|
let url = '';
|
|
162
161
|
|
|
163
|
-
const joinCookie = await this.getJoinCookie();
|
|
164
|
-
|
|
165
162
|
const body: any = {
|
|
166
163
|
asResourceOccupant,
|
|
167
164
|
device: {
|
|
@@ -176,11 +173,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
176
173
|
allowMultiDevice: true,
|
|
177
174
|
ensureConversation: ensureConversation || false,
|
|
178
175
|
supportsNativeLobby: 1,
|
|
179
|
-
clientMediaPreferences
|
|
180
|
-
preferTranscoding: preferTranscoding ?? true,
|
|
181
|
-
joinCookie,
|
|
182
|
-
ipver: ipVersion,
|
|
183
|
-
},
|
|
176
|
+
clientMediaPreferences,
|
|
184
177
|
};
|
|
185
178
|
|
|
186
179
|
if (alias) {
|
package/src/meeting/util.ts
CHANGED
|
@@ -115,7 +115,7 @@ const MeetingUtil = {
|
|
|
115
115
|
return IP_VERSION.unknown;
|
|
116
116
|
},
|
|
117
117
|
|
|
118
|
-
joinMeeting: (meeting, options) => {
|
|
118
|
+
joinMeeting: async (meeting, options) => {
|
|
119
119
|
if (!meeting) {
|
|
120
120
|
return Promise.reject(new ParameterError('You need a meeting object.'));
|
|
121
121
|
}
|
|
@@ -127,6 +127,27 @@ const MeetingUtil = {
|
|
|
127
127
|
options: {meetingId: meeting.id},
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
+
let reachability;
|
|
131
|
+
let clientMediaPreferences = {
|
|
132
|
+
// bare minimum fallback value that should allow us to join
|
|
133
|
+
ipver: IP_VERSION.unknown,
|
|
134
|
+
joinCookie: undefined,
|
|
135
|
+
preferTranscoding: !meeting.isMultistream,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
clientMediaPreferences = await webex.meetings.reachability.getClientMediaPreferences(
|
|
140
|
+
meeting.isMultistream,
|
|
141
|
+
MeetingUtil.getIpVersion(webex)
|
|
142
|
+
);
|
|
143
|
+
reachability = await webex.meetings.reachability.getReachabilityReportToAttachToRoap();
|
|
144
|
+
} catch (e) {
|
|
145
|
+
LoggerProxy.logger.error(
|
|
146
|
+
'Meeting:util#joinMeeting --> Error getting reachability or clientMediaPreferences:',
|
|
147
|
+
e
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
130
151
|
// eslint-disable-next-line no-warning-comments
|
|
131
152
|
// TODO: check if the meeting is in JOINING state
|
|
132
153
|
// if Joining state termintate the request as user might click multiple times
|
|
@@ -138,20 +159,19 @@ const MeetingUtil = {
|
|
|
138
159
|
locusUrl: meeting.locusUrl,
|
|
139
160
|
locusClusterUrl: meeting.meetingInfo?.locusClusterUrl,
|
|
140
161
|
correlationId: meeting.correlationId,
|
|
141
|
-
reachability
|
|
162
|
+
reachability,
|
|
142
163
|
roapMessage: options.roapMessage,
|
|
143
164
|
permissionToken: meeting.permissionToken,
|
|
144
165
|
resourceId: options.resourceId || null,
|
|
145
166
|
moderator: options.moderator,
|
|
146
167
|
pin: options.pin,
|
|
147
168
|
moveToResource: options.moveToResource,
|
|
148
|
-
preferTranscoding: !meeting.isMultistream,
|
|
149
169
|
asResourceOccupant: options.asResourceOccupant,
|
|
150
170
|
breakoutsSupported: options.breakoutsSupported,
|
|
151
171
|
locale: options.locale,
|
|
152
172
|
deviceCapabilities: options.deviceCapabilities,
|
|
153
173
|
liveAnnotationSupported: options.liveAnnotationSupported,
|
|
154
|
-
|
|
174
|
+
clientMediaPreferences,
|
|
155
175
|
})
|
|
156
176
|
.then((res) => {
|
|
157
177
|
const parsed = MeetingUtil.parseLocusJoin(res);
|
package/src/meetings/index.ts
CHANGED
|
@@ -1044,48 +1044,55 @@ export default class Meetings extends WebexPlugin {
|
|
|
1044
1044
|
*/
|
|
1045
1045
|
fetchUserPreferredWebexSite() {
|
|
1046
1046
|
// @ts-ignore
|
|
1047
|
-
return this.webex.people
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1047
|
+
return this.webex.people
|
|
1048
|
+
._getMe()
|
|
1049
|
+
.then((me) => {
|
|
1050
|
+
const isGuestUser = me.type === 'appuser';
|
|
1051
|
+
if (!isGuestUser) {
|
|
1052
|
+
return this.request.getMeetingPreferences().then((res) => {
|
|
1053
|
+
if (res) {
|
|
1054
|
+
const preferredWebexSite = MeetingsUtil.parseDefaultSiteFromMeetingPreferences(res);
|
|
1055
|
+
this.preferredWebexSite = preferredWebexSite;
|
|
1056
|
+
// @ts-ignore
|
|
1057
|
+
this.webex.internal.services._getCatalog().addAllowedDomains([preferredWebexSite]);
|
|
1058
|
+
}
|
|
1057
1059
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1060
|
+
// fall back to getting the preferred site from the user information
|
|
1061
|
+
if (!this.preferredWebexSite) {
|
|
1062
|
+
// @ts-ignore
|
|
1063
|
+
return this.webex.internal.user
|
|
1064
|
+
.get()
|
|
1065
|
+
.then((user) => {
|
|
1066
|
+
const preferredWebexSite =
|
|
1067
|
+
user?.userPreferences?.userPreferencesItems?.preferredWebExSite;
|
|
1068
|
+
if (preferredWebexSite) {
|
|
1069
|
+
this.preferredWebexSite = preferredWebexSite;
|
|
1070
|
+
// @ts-ignore
|
|
1071
|
+
this.webex.internal.services
|
|
1072
|
+
._getCatalog()
|
|
1073
|
+
.addAllowedDomains([preferredWebexSite]);
|
|
1074
|
+
} else {
|
|
1075
|
+
throw new Error('site not found');
|
|
1076
|
+
}
|
|
1077
|
+
})
|
|
1078
|
+
.catch(() => {
|
|
1079
|
+
LoggerProxy.logger.error(
|
|
1080
|
+
'Failed to fetch preferred site from user - no site will be set'
|
|
1081
|
+
);
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1082
1084
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1085
|
+
return Promise.resolve();
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1086
1088
|
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
+
return Promise.resolve();
|
|
1090
|
+
})
|
|
1091
|
+
.catch(() => {
|
|
1092
|
+
LoggerProxy.logger.error(
|
|
1093
|
+
'Failed to retrieve user information. No preferredWebexSite will be set'
|
|
1094
|
+
);
|
|
1095
|
+
});
|
|
1089
1096
|
}
|
|
1090
1097
|
|
|
1091
1098
|
/**
|
package/src/members/index.ts
CHANGED
|
@@ -915,11 +915,12 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
915
915
|
/**
|
|
916
916
|
* Lower all hands of members in a meeting
|
|
917
917
|
* @param {String} requestingMemberId - id of the participant which requested the lower all hands
|
|
918
|
+
* @param {array} roles which should be lowered
|
|
918
919
|
* @returns {Promise}
|
|
919
920
|
* @public
|
|
920
921
|
* @memberof Members
|
|
921
922
|
*/
|
|
922
|
-
public lowerAllHands(requestingMemberId: string) {
|
|
923
|
+
public lowerAllHands(requestingMemberId: string, roles: Array<string>) {
|
|
923
924
|
if (!this.locusUrl) {
|
|
924
925
|
return Promise.reject(
|
|
925
926
|
new ParameterError(
|
|
@@ -936,7 +937,8 @@ export default class Members extends StatelessWebexPlugin {
|
|
|
936
937
|
}
|
|
937
938
|
const options = MembersUtil.generateLowerAllHandsMemberOptions(
|
|
938
939
|
requestingMemberId,
|
|
939
|
-
this.locusUrl
|
|
940
|
+
this.locusUrl,
|
|
941
|
+
roles
|
|
940
942
|
);
|
|
941
943
|
|
|
942
944
|
return this.membersRequest.lowerAllHandsMember(options);
|
package/src/members/util.ts
CHANGED
|
@@ -166,9 +166,10 @@ const MembersUtil = {
|
|
|
166
166
|
locusUrl,
|
|
167
167
|
}),
|
|
168
168
|
|
|
169
|
-
generateLowerAllHandsMemberOptions: (requestingParticipantId, locusUrl) => ({
|
|
169
|
+
generateLowerAllHandsMemberOptions: (requestingParticipantId, locusUrl, roles) => ({
|
|
170
170
|
requestingParticipantId,
|
|
171
171
|
locusUrl,
|
|
172
|
+
...(roles !== undefined && {roles}),
|
|
172
173
|
}),
|
|
173
174
|
|
|
174
175
|
/**
|
|
@@ -253,6 +254,7 @@ const MembersUtil = {
|
|
|
253
254
|
const body = {
|
|
254
255
|
hand: {
|
|
255
256
|
raised: false,
|
|
257
|
+
...(options.roles !== undefined && {roles: options.roles}),
|
|
256
258
|
},
|
|
257
259
|
requestingParticipantId: options.requestingParticipantId,
|
|
258
260
|
};
|
|
@@ -6,20 +6,7 @@ import {convertStunUrlToTurn, convertStunUrlToTurnTls} from './util';
|
|
|
6
6
|
import EventsScope from '../common/events/events-scope';
|
|
7
7
|
|
|
8
8
|
import {CONNECTION_STATE, Enum, ICE_GATHERING_STATE} from '../constants';
|
|
9
|
-
|
|
10
|
-
// result for a specific transport protocol (like udp or tcp)
|
|
11
|
-
export type TransportResult = {
|
|
12
|
-
result: 'reachable' | 'unreachable' | 'untested';
|
|
13
|
-
latencyInMilliseconds?: number; // amount of time it took to get the first ICE candidate
|
|
14
|
-
clientMediaIPs?: string[];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// reachability result for a specific media cluster
|
|
18
|
-
export type ClusterReachabilityResult = {
|
|
19
|
-
udp: TransportResult;
|
|
20
|
-
tcp: TransportResult;
|
|
21
|
-
xtls: TransportResult;
|
|
22
|
-
};
|
|
9
|
+
import {ClusterReachabilityResult} from './reachability.types';
|
|
23
10
|
|
|
24
11
|
// data for the Events.resultReady event
|
|
25
12
|
export type ResultEventData = {
|