@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.11
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/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +7 -0
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +8 -0
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +8 -0
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +7 -0
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +7 -0
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +7 -0
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +7 -0
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +7 -0
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +5 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +3 -0
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +15 -74
- package/dist/constants.js.map +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +43 -5
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +4 -0
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +12 -3
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +71 -210
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal-media-core-wrapper.js +22 -0
- package/dist/media/internal-media-core-wrapper.js.map +1 -0
- package/dist/media/properties.js +32 -25
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +0 -27
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +8 -1
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/index.js +1146 -602
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +6 -0
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +83 -24
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +5 -44
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +4 -1
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +5 -0
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +14 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -0
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +4 -1
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +136 -25
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +4 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +24 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +30 -7
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +2 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +82 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +19 -9
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +8 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +133 -0
- package/dist/multistream/mediaRequestManager.js.map +1 -0
- package/dist/multistream/multistreamMedia.js +116 -0
- package/dist/multistream/multistreamMedia.js.map +1 -0
- package/dist/multistream/receiveSlot.js +209 -0
- package/dist/multistream/receiveSlot.js.map +1 -0
- package/dist/multistream/receiveSlotManager.js +195 -0
- package/dist/multistream/receiveSlotManager.js.map +1 -0
- package/dist/multistream/remoteMedia.js +289 -0
- package/dist/multistream/remoteMedia.js.map +1 -0
- package/dist/multistream/remoteMediaGroup.js +243 -0
- package/dist/multistream/remoteMediaGroup.js.map +1 -0
- package/dist/multistream/remoteMediaManager.js +1113 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +10 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +11 -0
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -1
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +17 -7
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +111 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +40 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +130 -132
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +58 -231
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +7 -116
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +20 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +2 -0
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +58 -37
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +9 -3
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +10 -3
- package/dist/transcription/index.js.map +1 -1
- package/package.json +21 -20
- package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
- package/src/common/collection.ts +6 -6
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
- package/src/common/errors/{media.js → media.ts} +5 -1
- package/src/common/errors/parameter.ts +3 -2
- package/src/common/errors/{password-error.js → password-error.ts} +5 -1
- package/src/common/errors/{permission.js → permission.ts} +5 -1
- package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
- package/src/common/errors/{stats.js → stats.ts} +5 -1
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -20
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
- package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
- package/src/common/events/{events.js → events.ts} +0 -0
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
- package/src/common/events/{util.js → util.ts} +1 -1
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
- package/src/common/logs/{request.js → request.ts} +12 -2
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +2 -0
- package/src/constants.ts +139 -179
- package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +1 -1
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
- package/src/locus-info/{index.js → index.ts} +67 -32
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +7 -4
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
- package/src/locus-info/{parser.js → parser.ts} +22 -12
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
- package/src/media/{index.js → index.ts} +130 -205
- package/src/media/internal-media-core-wrapper.ts +9 -0
- package/src/media/{properties.js → properties.ts} +35 -29
- package/src/media/util.ts +16 -0
- package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
- package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
- package/src/meeting/{index.js → index.ts} +993 -474
- package/src/meeting/{muteState.js → muteState.ts} +16 -11
- package/src/meeting/{request.js → request.ts} +148 -36
- package/src/meeting/{state.js → state.ts} +6 -6
- package/src/meeting/{util.js → util.ts} +9 -51
- package/src/meeting-info/{collection.js → collection.ts} +4 -1
- package/src/meeting-info/{index.js → index.ts} +10 -6
- package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
- package/src/meeting-info/{request.js → request.ts} +6 -2
- package/src/meeting-info/{util.js → util.ts} +6 -5
- package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
- package/src/meetings/{collection.js → collection.ts} +5 -2
- package/src/meetings/{index.js → index.ts} +118 -22
- package/src/meetings/{request.js → request.ts} +6 -1
- package/src/meetings/{util.js → util.ts} +28 -5
- package/src/member/{index.js → index.ts} +46 -15
- package/src/member/{util.js → util.ts} +17 -16
- package/src/members/{collection.js → collection.ts} +2 -1
- package/src/members/{index.js → index.ts} +94 -26
- package/src/members/{request.js → request.ts} +16 -5
- package/src/members/{util.js → util.ts} +7 -7
- package/src/metrics/{config.js → config.ts} +0 -2
- package/src/metrics/{constants.js → constants.ts} +0 -0
- package/src/metrics/{index.js → index.ts} +27 -8
- package/src/multistream/mediaRequestManager.ts +166 -0
- package/src/multistream/multistreamMedia.ts +92 -0
- package/src/multistream/receiveSlot.ts +141 -0
- package/src/multistream/receiveSlotManager.ts +142 -0
- package/src/multistream/remoteMedia.ts +228 -0
- package/src/multistream/remoteMediaGroup.ts +224 -0
- package/src/multistream/remoteMediaManager.ts +911 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
- package/src/personal-meeting-room/{index.js → index.ts} +17 -4
- package/src/personal-meeting-room/{request.js → request.ts} +3 -1
- package/src/personal-meeting-room/{util.js → util.ts} +1 -1
- package/src/reachability/{index.js → index.ts} +28 -17
- package/src/reachability/request.ts +4 -2
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +36 -0
- package/src/reconnection-manager/{index.js → index.ts} +81 -65
- package/src/roap/index.ts +229 -0
- package/src/roap/{request.js → request.ts} +15 -74
- package/src/roap/turnDiscovery.ts +26 -11
- package/src/statsAnalyzer/{global.js → global.ts} +2 -0
- package/src/statsAnalyzer/{index.js → index.ts} +66 -61
- package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
- package/src/transcription/{index.js → index.ts} +16 -11
- package/test/integration/spec/journey.js +1 -1
- package/test/integration/spec/space-meeting.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +17 -1
- package/test/unit/spec/media/index.ts +207 -0
- package/test/unit/spec/media/properties.ts +73 -82
- package/test/unit/spec/meeting/effectsState.js +1 -3
- package/test/unit/spec/meeting/index.js +672 -245
- package/test/unit/spec/meeting/muteState.js +7 -0
- package/test/unit/spec/meeting/request.js +25 -1
- package/test/unit/spec/meeting/utils.js +63 -2
- package/test/unit/spec/meetings/index.js +0 -4
- package/test/unit/spec/members/index.js +164 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +515 -0
- package/test/unit/spec/multistream/receiveSlot.ts +104 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +173 -0
- package/test/unit/spec/multistream/remoteMedia.ts +225 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +396 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1309 -0
- package/test/unit/spec/reconnection-manager/index.js +68 -2
- package/test/unit/spec/roap/index.ts +63 -35
- package/test/unit/spec/stats-analyzer/index.js +19 -22
- package/dist/peer-connection-manager/index.js +0 -794
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/roap/collection.js +0 -73
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -337
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/state.js +0 -164
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/util.js +0 -102
- package/dist/roap/util.js.map +0 -1
- package/src/media/util.js +0 -38
- package/src/peer-connection-manager/index.js +0 -723
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/collection.js +0 -63
- package/src/roap/handler.js +0 -252
- package/src/roap/index.js +0 -380
- package/src/roap/state.js +0 -149
- package/src/roap/util.js +0 -93
- package/test/unit/spec/peerconnection-manager/index.js +0 -188
- package/test/unit/spec/peerconnection-manager/utils.js +0 -48
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- package/test/unit/spec/roap/util.js +0 -30
|
@@ -19,10 +19,10 @@ import PermissionError from '../common/errors/permission';
|
|
|
19
19
|
import PasswordError from '../common/errors/password-error';
|
|
20
20
|
import CaptchaError from '../common/errors/captcha-error';
|
|
21
21
|
|
|
22
|
-
const MeetingUtil = {};
|
|
22
|
+
const MeetingUtil: any = {};
|
|
23
23
|
|
|
24
24
|
MeetingUtil.parseLocusJoin = (response) => {
|
|
25
|
-
const parsed = {};
|
|
25
|
+
const parsed: any = {};
|
|
26
26
|
|
|
27
27
|
// First todo: add check for existance
|
|
28
28
|
parsed.locus = response.body.locus;
|
|
@@ -58,7 +58,8 @@ MeetingUtil.remoteUpdateAudioVideo = (audioMuted, videoMuted, meeting) => {
|
|
|
58
58
|
selfId: meeting.selfId,
|
|
59
59
|
localMedias,
|
|
60
60
|
deviceUrl: meeting.deviceUrl,
|
|
61
|
-
correlationId: meeting.correlationId
|
|
61
|
+
correlationId: meeting.correlationId,
|
|
62
|
+
preferTranscoding: !meeting.isMultistream,
|
|
62
63
|
}).then((response) => {
|
|
63
64
|
Metrics.postEvent({event: eventType.MEDIA_RESPONSE, meeting});
|
|
64
65
|
|
|
@@ -95,7 +96,7 @@ MeetingUtil.joinMeeting = (meeting, options) => {
|
|
|
95
96
|
moderator: options.moderator,
|
|
96
97
|
pin: options.pin,
|
|
97
98
|
moveToResource: options.moveToResource,
|
|
98
|
-
preferTranscoding:
|
|
99
|
+
preferTranscoding: !meeting.isMultistream,
|
|
99
100
|
asResourceOccupant: options.asResourceOccupant
|
|
100
101
|
})
|
|
101
102
|
.then((res) => {
|
|
@@ -130,8 +131,8 @@ MeetingUtil.cleanUp = (meeting) => {
|
|
|
130
131
|
meeting.unsetPeerConnections();
|
|
131
132
|
meeting.reconnectionManager.cleanUp();
|
|
132
133
|
})
|
|
133
|
-
.then(() => meeting.
|
|
134
|
-
.then(() => meeting.
|
|
134
|
+
.then(() => meeting.stopKeepAlive())
|
|
135
|
+
.then(() => meeting.updateLLMConnection());
|
|
135
136
|
};
|
|
136
137
|
|
|
137
138
|
MeetingUtil.disconnectPhoneAudio = (meeting, phoneUrl) => {
|
|
@@ -168,7 +169,7 @@ MeetingUtil.disconnectPhoneAudio = (meeting, phoneUrl) => {
|
|
|
168
169
|
// if you explicity want it not to leave on resource id, pass
|
|
169
170
|
// {resourceId: null}
|
|
170
171
|
// TODO: chris, you can modify this however you want
|
|
171
|
-
MeetingUtil.leaveMeeting = (meeting, options = {}) => {
|
|
172
|
+
MeetingUtil.leaveMeeting = (meeting, options: any = {}) => {
|
|
172
173
|
if (meeting.meetingState === FULL_STATE.INACTIVE) {
|
|
173
174
|
// TODO: clean up if the meeting is already inactive
|
|
174
175
|
return Promise.reject(new MeetingNotActiveError());
|
|
@@ -237,7 +238,7 @@ MeetingUtil.isMediaEstablished = (currentMediaStatus) =>
|
|
|
237
238
|
currentMediaStatus && (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share);
|
|
238
239
|
|
|
239
240
|
|
|
240
|
-
MeetingUtil.joinMeetingOptions = (meeting, options = {}) => {
|
|
241
|
+
MeetingUtil.joinMeetingOptions = (meeting, options: any = {}) => {
|
|
241
242
|
meeting.resourceId = meeting.resourceId || options.resourceId;
|
|
242
243
|
|
|
243
244
|
if (meeting.requiredCaptcha) {
|
|
@@ -279,49 +280,6 @@ MeetingUtil.joinMeetingOptions = (meeting, options = {}) => {
|
|
|
279
280
|
});
|
|
280
281
|
};
|
|
281
282
|
|
|
282
|
-
MeetingUtil.updateTransceiver = (options, meetingOptions) => {
|
|
283
|
-
const {
|
|
284
|
-
type,
|
|
285
|
-
sendTrack,
|
|
286
|
-
receiveTrack,
|
|
287
|
-
track,
|
|
288
|
-
transceiver,
|
|
289
|
-
peerConnection,
|
|
290
|
-
previousMediaDirection
|
|
291
|
-
} = options;
|
|
292
|
-
|
|
293
|
-
if ((sendTrack !== undefined && sendTrack !== previousMediaDirection.sendTrack) ||
|
|
294
|
-
(receiveTrack !== undefined && receiveTrack !== previousMediaDirection.receiveTrack)) {
|
|
295
|
-
return Media.updateTransceiver({
|
|
296
|
-
meetingId: meetingOptions.meeting.id,
|
|
297
|
-
remoteQualityLevel: meetingOptions.mediaProperties.remoteQualityLevel,
|
|
298
|
-
enableRtx: meetingOptions.meeting.config.enableRtx,
|
|
299
|
-
enableExtmap: meetingOptions.meeting.config.enableExtmap
|
|
300
|
-
}, peerConnection, transceiver,
|
|
301
|
-
{
|
|
302
|
-
track,
|
|
303
|
-
type,
|
|
304
|
-
receiveTrack,
|
|
305
|
-
sendTrack
|
|
306
|
-
})
|
|
307
|
-
.then(() => meetingOptions.meeting.roap
|
|
308
|
-
.sendRoapMediaRequest({
|
|
309
|
-
sdp: meetingOptions.mediaProperties.peerConnection.sdp,
|
|
310
|
-
roapSeq: meetingOptions.meeting.roapSeq,
|
|
311
|
-
meeting: meetingOptions.meeting // or can pass meeting ID
|
|
312
|
-
}))
|
|
313
|
-
.catch((e) => {
|
|
314
|
-
LoggerProxy.logger.error(`Meeting:util#updateTransceiver --> Error updating the ${type} streams with error: ${e}`);
|
|
315
|
-
});
|
|
316
|
-
} if (track) {
|
|
317
|
-
transceiver.sender.replaceTrack(track);
|
|
318
|
-
|
|
319
|
-
return Promise.resolve();
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return Promise.reject(new ParameterError('update Failed: please pass valid parameter'));
|
|
323
|
-
};
|
|
324
|
-
|
|
325
283
|
MeetingUtil.validateOptions = (options) => {
|
|
326
284
|
const {
|
|
327
285
|
sendVideo, sendAudio, sendShare, localStream, localShare
|
|
@@ -24,12 +24,15 @@ export default class MeetingInfoCollection extends Collection {
|
|
|
24
24
|
* @public
|
|
25
25
|
* @memberof MeetingInfoCollection
|
|
26
26
|
*/
|
|
27
|
-
get(id) {
|
|
27
|
+
public get(id: string) {
|
|
28
|
+
// @ts-ignore
|
|
28
29
|
if (this.meetingInfos[id]) {
|
|
30
|
+
// @ts-ignore
|
|
29
31
|
return this.meetingInfos[id];
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
return find(
|
|
35
|
+
// @ts-ignore
|
|
33
36
|
this.meetingInfos,
|
|
34
37
|
(info) => info.sipUrl === id || info.locusId === id || info.userId === id || info.meetingLink === id
|
|
35
38
|
);
|
|
@@ -17,11 +17,15 @@ import MeetingInfoUtil from './util';
|
|
|
17
17
|
* @class MeetingInfo
|
|
18
18
|
*/
|
|
19
19
|
export default class MeetingInfo {
|
|
20
|
+
meetingInfoCollection: any;
|
|
21
|
+
meetingInfoRequest: any;
|
|
22
|
+
webex: any;
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
*
|
|
22
26
|
* @param {WebexSDK} webex
|
|
23
27
|
*/
|
|
24
|
-
constructor(webex) {
|
|
28
|
+
constructor(webex: any) {
|
|
25
29
|
this.webex = webex;
|
|
26
30
|
|
|
27
31
|
/**
|
|
@@ -48,7 +52,7 @@ export default class MeetingInfo {
|
|
|
48
52
|
* @public
|
|
49
53
|
* @memberof MeetingInfo
|
|
50
54
|
*/
|
|
51
|
-
getMeetingInfo(id) {
|
|
55
|
+
public getMeetingInfo(id: string) {
|
|
52
56
|
return this.meetingInfoCollection.get(id);
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -59,7 +63,7 @@ export default class MeetingInfo {
|
|
|
59
63
|
* @public
|
|
60
64
|
* @memberof MeetingInfo
|
|
61
65
|
*/
|
|
62
|
-
setMeetingInfo(id, info) {
|
|
66
|
+
public setMeetingInfo(id: string, info: object) {
|
|
63
67
|
this.meetingInfoCollection.set(id, info);
|
|
64
68
|
}
|
|
65
69
|
|
|
@@ -70,7 +74,7 @@ export default class MeetingInfo {
|
|
|
70
74
|
* @private
|
|
71
75
|
* @memberof MeetingInfo
|
|
72
76
|
*/
|
|
73
|
-
requestFetchInfo(options) {
|
|
77
|
+
private requestFetchInfo(options: object) {
|
|
74
78
|
return this.meetingInfoRequest.fetchMeetingInfo(options).then((info) => {
|
|
75
79
|
if (info && info.body) {
|
|
76
80
|
this.setMeetingInfo(info.body.sipMeetingUri || info.body.meetingLink, info.body);
|
|
@@ -92,7 +96,7 @@ export default class MeetingInfo {
|
|
|
92
96
|
* @private
|
|
93
97
|
* @memberof MeetingInfo
|
|
94
98
|
*/
|
|
95
|
-
fetchInfoOptions(destination, type) {
|
|
99
|
+
private fetchInfoOptions(destination: string, type: string) {
|
|
96
100
|
return MeetingInfoUtil.generateOptions({
|
|
97
101
|
destination,
|
|
98
102
|
type,
|
|
@@ -108,7 +112,7 @@ export default class MeetingInfo {
|
|
|
108
112
|
* @public
|
|
109
113
|
* @memberof MeetingInfo
|
|
110
114
|
*/
|
|
111
|
-
fetchMeetingInfo(destination, type = null) {
|
|
115
|
+
public fetchMeetingInfo(destination: string, type: string = null) {
|
|
112
116
|
if (type === _PERSONAL_ROOM_ && !destination) {
|
|
113
117
|
destination = this.webex.internal.device.userId;
|
|
114
118
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {HTTP_VERBS, _CONVERSATION_URL_, WBXAPPAPI_SERVICE} from '../constants';
|
|
1
|
+
import { HTTP_VERBS, _CONVERSATION_URL_, WBXAPPAPI_SERVICE } from '../constants';
|
|
3
2
|
import Metrics from '../metrics';
|
|
4
3
|
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
5
4
|
|
|
@@ -14,6 +13,10 @@ const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
|
|
|
14
13
|
* Error to indicate that wbxappapi requires a password
|
|
15
14
|
*/
|
|
16
15
|
export class MeetingInfoV2PasswordError extends Error {
|
|
16
|
+
meetingInfo: any;
|
|
17
|
+
sdkMessage: any;
|
|
18
|
+
wbxAppApiCode: any;
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
*
|
|
19
22
|
* @constructor
|
|
@@ -21,7 +24,7 @@ export class MeetingInfoV2PasswordError extends Error {
|
|
|
21
24
|
* @param {Object} [meetingInfo]
|
|
22
25
|
* @param {String} [message]
|
|
23
26
|
*/
|
|
24
|
-
constructor(wbxAppApiErrorCode, meetingInfo, message = PASSWORD_ERROR_DEFAULT_MESSAGE) {
|
|
27
|
+
constructor(wbxAppApiErrorCode?: number, meetingInfo?: object, message: string = PASSWORD_ERROR_DEFAULT_MESSAGE) {
|
|
25
28
|
super(`${message}, code=${wbxAppApiErrorCode}`);
|
|
26
29
|
this.name = 'MeetingInfoV2PasswordError';
|
|
27
30
|
this.sdkMessage = message;
|
|
@@ -35,13 +38,15 @@ export class MeetingInfoV2PasswordError extends Error {
|
|
|
35
38
|
* Error generating a adhoc space meeting
|
|
36
39
|
*/
|
|
37
40
|
export class MeetingInfoV2AdhocMeetingError extends Error {
|
|
41
|
+
sdkMessage: any;
|
|
42
|
+
wbxAppApiCode: any;
|
|
38
43
|
/**
|
|
39
44
|
*
|
|
40
45
|
* @constructor
|
|
41
46
|
* @param {Number} [wbxAppApiErrorCode]
|
|
42
47
|
* @param {String} [message]
|
|
43
48
|
*/
|
|
44
|
-
constructor(wbxAppApiErrorCode, message = ADHOC_MEETING_DEFAULT_ERROR) {
|
|
49
|
+
constructor(wbxAppApiErrorCode?: number, message: string = ADHOC_MEETING_DEFAULT_ERROR) {
|
|
45
50
|
super(`${message}, code=${wbxAppApiErrorCode}`);
|
|
46
51
|
this.name = 'MeetingInfoV2AdhocMeetingError';
|
|
47
52
|
this.sdkMessage = message;
|
|
@@ -50,11 +55,14 @@ export class MeetingInfoV2AdhocMeetingError extends Error {
|
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
|
|
54
58
|
/**
|
|
55
59
|
* Error to indicate that preferred webex site not present to start adhoc meeting
|
|
56
60
|
*/
|
|
57
61
|
export class MeetingInfoV2CaptchaError extends Error {
|
|
62
|
+
captchaInfo: any;
|
|
63
|
+
isPasswordRequired: any;
|
|
64
|
+
sdkMessage: any;
|
|
65
|
+
wbxAppApiCode: any;
|
|
58
66
|
/**
|
|
59
67
|
*
|
|
60
68
|
* @constructor
|
|
@@ -62,7 +70,7 @@ export class MeetingInfoV2CaptchaError extends Error {
|
|
|
62
70
|
* @param {Object} [captchaInfo]
|
|
63
71
|
* @param {String} [message]
|
|
64
72
|
*/
|
|
65
|
-
constructor(wbxAppApiErrorCode, captchaInfo, message = CAPTCHA_ERROR_DEFAULT_MESSAGE) {
|
|
73
|
+
constructor(wbxAppApiErrorCode?: number, captchaInfo?: object, message: string = CAPTCHA_ERROR_DEFAULT_MESSAGE) {
|
|
66
74
|
super(`${message}, code=${wbxAppApiErrorCode}`);
|
|
67
75
|
this.name = 'MeetingInfoV2PasswordError';
|
|
68
76
|
this.sdkMessage = message;
|
|
@@ -77,6 +85,8 @@ export class MeetingInfoV2CaptchaError extends Error {
|
|
|
77
85
|
* @class MeetingInfo
|
|
78
86
|
*/
|
|
79
87
|
export default class MeetingInfoV2 {
|
|
88
|
+
webex: any;
|
|
89
|
+
|
|
80
90
|
/**
|
|
81
91
|
*
|
|
82
92
|
* @param {WebexSDK} webex
|
|
@@ -93,7 +103,7 @@ export default class MeetingInfoV2 {
|
|
|
93
103
|
* @public
|
|
94
104
|
* @memberof MeetingInfo
|
|
95
105
|
*/
|
|
96
|
-
fetchInfoOptions(destination, type = null) {
|
|
106
|
+
fetchInfoOptions(destination: string, type: string = null) {
|
|
97
107
|
return MeetingInfoUtil.getDestinationType({
|
|
98
108
|
destination,
|
|
99
109
|
type,
|
|
@@ -108,7 +118,7 @@ export default class MeetingInfoV2 {
|
|
|
108
118
|
* @public
|
|
109
119
|
* @memberof MeetingInfo
|
|
110
120
|
*/
|
|
111
|
-
async createAdhocSpaceMeeting(conversationUrl) {
|
|
121
|
+
async createAdhocSpaceMeeting(conversationUrl: string) {
|
|
112
122
|
if (!this.webex.meetings.preferredWebexSite) {
|
|
113
123
|
throw Error('No preferred webex site found');
|
|
114
124
|
}
|
|
@@ -177,7 +187,15 @@ export default class MeetingInfoV2 {
|
|
|
177
187
|
* @public
|
|
178
188
|
* @memberof MeetingInfo
|
|
179
189
|
*/
|
|
180
|
-
async fetchMeetingInfo(
|
|
190
|
+
async fetchMeetingInfo(
|
|
191
|
+
destination: string,
|
|
192
|
+
type: string = null,
|
|
193
|
+
password: string = null,
|
|
194
|
+
captchaInfo: {
|
|
195
|
+
code: string;
|
|
196
|
+
id: string;
|
|
197
|
+
} = null
|
|
198
|
+
) {
|
|
181
199
|
const destinationType = await MeetingInfoUtil.getDestinationType({
|
|
182
200
|
destination,
|
|
183
201
|
type,
|
|
@@ -190,7 +208,7 @@ export default class MeetingInfoV2 {
|
|
|
190
208
|
|
|
191
209
|
const body = await MeetingInfoUtil.getRequestBody({...destinationType, password, captchaInfo});
|
|
192
210
|
|
|
193
|
-
const options = {
|
|
211
|
+
const options: any = {
|
|
194
212
|
method: HTTP_VERBS.POST,
|
|
195
213
|
body
|
|
196
214
|
};
|
|
@@ -2,15 +2,19 @@ import {API} from '../constants';
|
|
|
2
2
|
import ParameterError from '../common/errors/parameter';
|
|
3
3
|
|
|
4
4
|
import MeetingInfoUtil from './util';
|
|
5
|
+
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* @class MeetingInfoRequest
|
|
7
9
|
*/
|
|
8
10
|
export default class MeetingInfoRequest {
|
|
11
|
+
webex: any;
|
|
12
|
+
|
|
9
13
|
/**
|
|
10
14
|
* Meeting Info Request Constructor
|
|
11
15
|
* @param {WebexSDK} webex
|
|
12
16
|
*/
|
|
13
|
-
constructor(webex) {
|
|
17
|
+
constructor(webex: any) {
|
|
14
18
|
this.webex = webex;
|
|
15
19
|
}
|
|
16
20
|
|
|
@@ -24,7 +28,7 @@ export default class MeetingInfoRequest {
|
|
|
24
28
|
* @throws {Error} if the options are not valid and complete
|
|
25
29
|
* @memberof MeetingInfoRequest
|
|
26
30
|
*/
|
|
27
|
-
fetchMeetingInfo(options) {
|
|
31
|
+
fetchMeetingInfo(options: any) {
|
|
28
32
|
if (!options || !options.type || !options.destination) {
|
|
29
33
|
throw new ParameterError('MeetingInfo should be fetched with a type and destination specified, see list of valid types and their corresponding values in constants');
|
|
30
34
|
}
|
|
@@ -2,6 +2,7 @@ import url from 'url';
|
|
|
2
2
|
|
|
3
3
|
import btoa from 'btoa';
|
|
4
4
|
import {
|
|
5
|
+
// @ts-ignore
|
|
5
6
|
deconstructHydraId
|
|
6
7
|
} from '@webex/common';
|
|
7
8
|
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
UUID_REG
|
|
34
35
|
} from '../constants';
|
|
35
36
|
|
|
36
|
-
const MeetingInfoUtil = {};
|
|
37
|
+
const MeetingInfoUtil: any = {};
|
|
37
38
|
|
|
38
39
|
MeetingInfoUtil.extractDestination = (destination, type) => {
|
|
39
40
|
let dest = destination;
|
|
@@ -74,7 +75,7 @@ MeetingInfoUtil.getParsedUrl = (link) => {
|
|
|
74
75
|
* @param {String} value string to parse and see if it matches a meeting link
|
|
75
76
|
* @returns {Boolean}
|
|
76
77
|
*/
|
|
77
|
-
MeetingInfoUtil.isMeetingLink = (value) => {
|
|
78
|
+
MeetingInfoUtil.isMeetingLink = (value: string) => {
|
|
78
79
|
const parsedUrl = MeetingInfoUtil.getParsedUrl(value);
|
|
79
80
|
const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
|
|
80
81
|
const pathNameBool = parsedUrl.pathname && (parsedUrl.pathname.includes(`/${MEET}`) || parsedUrl.pathname.includes(`/${MEET_M}`) || parsedUrl.pathname.includes(`/${JOIN}`));
|
|
@@ -173,7 +174,7 @@ MeetingInfoUtil.generateOptions = async (from) => {
|
|
|
173
174
|
type
|
|
174
175
|
};
|
|
175
176
|
}
|
|
176
|
-
const options = {};
|
|
177
|
+
const options: any = {};
|
|
177
178
|
const hydraId = MeetingInfoUtil.getHydraId(destination);
|
|
178
179
|
|
|
179
180
|
if (MeetingInfoUtil.isMeetingLink(destination)) {
|
|
@@ -238,7 +239,7 @@ MeetingInfoUtil.generateOptions = async (from) => {
|
|
|
238
239
|
* @param {Object} value ?? value.value
|
|
239
240
|
* @returns {Object} returns an object with {resource, method}
|
|
240
241
|
*/
|
|
241
|
-
MeetingInfoUtil.getResourceUrl = (type, value) => {
|
|
242
|
+
MeetingInfoUtil.getResourceUrl = (type: string, value: any) => {
|
|
242
243
|
let resource = `/${LOCI}/${MEETINGINFO}`;
|
|
243
244
|
let method = HTTP_VERBS.GET;
|
|
244
245
|
let uri = null;
|
|
@@ -270,7 +271,7 @@ MeetingInfoUtil.getResourceUrl = (type, value) => {
|
|
|
270
271
|
};
|
|
271
272
|
|
|
272
273
|
MeetingInfoUtil.getRequestParams = (resourceOptions, type, value, api) => {
|
|
273
|
-
let requestParams = {
|
|
274
|
+
let requestParams: any = {
|
|
274
275
|
method: resourceOptions.method,
|
|
275
276
|
api,
|
|
276
277
|
resource: resourceOptions.resource
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import url from 'url';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
// @ts-ignore
|
|
4
5
|
deconstructHydraId
|
|
5
6
|
} from '@webex/common';
|
|
6
7
|
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
import ParameterError from '../common/errors/parameter';
|
|
28
29
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
29
30
|
|
|
30
|
-
const MeetingInfoUtil = {};
|
|
31
|
+
const MeetingInfoUtil: any = {};
|
|
31
32
|
|
|
32
33
|
MeetingInfoUtil.getParsedUrl = (link) => {
|
|
33
34
|
try {
|
|
@@ -55,7 +56,7 @@ MeetingInfoUtil.getParsedUrl = (link) => {
|
|
|
55
56
|
* @param {String} value string to parse and see if it matches a meeting link
|
|
56
57
|
* @returns {Boolean}
|
|
57
58
|
*/
|
|
58
|
-
MeetingInfoUtil.isMeetingLink = (value) => {
|
|
59
|
+
MeetingInfoUtil.isMeetingLink = (value: string) => {
|
|
59
60
|
const parsedUrl = MeetingInfoUtil.getParsedUrl(value);
|
|
60
61
|
const hostNameBool = parsedUrl.hostname && parsedUrl.hostname.includes(WEBEX_DOT_COM);
|
|
61
62
|
const pathNameBool = parsedUrl.pathname && (parsedUrl.pathname.includes(`/${MEET}`) || parsedUrl.pathname.includes(`/${MEET_M}`) || parsedUrl.pathname.includes(`/${JOIN}`));
|
|
@@ -144,7 +145,7 @@ MeetingInfoUtil.getDestinationType = async (from) => {
|
|
|
144
145
|
type
|
|
145
146
|
};
|
|
146
147
|
}
|
|
147
|
-
const options = {};
|
|
148
|
+
const options: any = {};
|
|
148
149
|
const hydraId = MeetingInfoUtil.getHydraId(destination);
|
|
149
150
|
|
|
150
151
|
if (MeetingInfoUtil.isMeetingLink(destination)) {
|
|
@@ -211,11 +212,11 @@ MeetingInfoUtil.getDestinationType = async (from) => {
|
|
|
211
212
|
* @param {Object} options.destination ?? value.value
|
|
212
213
|
* @returns {Object} returns an object with {resource, method}
|
|
213
214
|
*/
|
|
214
|
-
MeetingInfoUtil.getRequestBody = (options) => {
|
|
215
|
+
MeetingInfoUtil.getRequestBody = (options: { type: string; destination: object } | any) => {
|
|
215
216
|
const {
|
|
216
217
|
type, destination, password, captchaInfo
|
|
217
218
|
} = options;
|
|
218
|
-
const body = {
|
|
219
|
+
const body: any = {
|
|
219
220
|
supportHostKey: true,
|
|
220
221
|
supportCountryList: true,
|
|
221
222
|
};
|
|
@@ -270,7 +271,7 @@ MeetingInfoUtil.getRequestBody = (options) => {
|
|
|
270
271
|
* @param {String} uri string (e.g. '10019857020@convergedats.webex.com')
|
|
271
272
|
* @returns {String} the site/host part of the URI string (e.g. 'convergedats.webex.com')
|
|
272
273
|
*/
|
|
273
|
-
MeetingInfoUtil.getWebexSite = (uri) => {
|
|
274
|
+
MeetingInfoUtil.getWebexSite = (uri: string) => {
|
|
274
275
|
const exceptedDomains = ['meet.webex.com', 'meetup.webex.com', 'ciscospark.com'];
|
|
275
276
|
const site = uri?.match(/.+@([^.]+\.[^.]+\.[^.]+)$/)?.[1];
|
|
276
277
|
|
|
@@ -284,7 +285,7 @@ MeetingInfoUtil.getWebexSite = (uri) => {
|
|
|
284
285
|
* @param {Object} options.destination ?? value.value
|
|
285
286
|
* @returns {String} returns a URI string or null of there is no direct URI
|
|
286
287
|
*/
|
|
287
|
-
MeetingInfoUtil.getDirectMeetingInfoURI = (options) => {
|
|
288
|
+
MeetingInfoUtil.getDirectMeetingInfoURI = (options: { type: string; destination: any }) => {
|
|
288
289
|
const {
|
|
289
290
|
type, destination
|
|
290
291
|
} = options;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {find} from 'lodash';
|
|
2
2
|
|
|
3
3
|
import Collection from '../common/collection';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* @export
|
|
6
7
|
* @class MeetingCollection
|
|
@@ -16,12 +17,13 @@ export default class MeetingCollection extends Collection {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
set(meeting) {
|
|
20
|
+
// @ts-ignore
|
|
19
21
|
this.meetings[meeting.id] = meeting;
|
|
20
22
|
|
|
23
|
+
// @ts-ignore
|
|
21
24
|
return this.meetings[meeting.id];
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
|
|
25
27
|
/**
|
|
26
28
|
* get a specific meeting searching for key
|
|
27
29
|
* @param {String} key
|
|
@@ -30,8 +32,9 @@ export default class MeetingCollection extends Collection {
|
|
|
30
32
|
* @public
|
|
31
33
|
* @memberof MeetingCollection
|
|
32
34
|
*/
|
|
33
|
-
getByKey(key, value) {
|
|
35
|
+
public getByKey(key: string, value: any) {
|
|
34
36
|
if (key && value) {
|
|
37
|
+
// @ts-ignore
|
|
35
38
|
return find(this.meetings, (meeting) => (meeting[key] === value));
|
|
36
39
|
}
|
|
37
40
|
|