@webex/plugin-meetings 2.37.0 → 2.37.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/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +7 -46
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -5
- package/dist/config.js.map +1 -1
- package/dist/constants.js +46 -42
- package/dist/constants.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +10 -28
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +101 -193
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -37
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +87 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +16 -81
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +74 -137
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +64 -110
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +3 -17
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -12
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +120 -192
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +0 -13
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +812 -1487
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +31 -78
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +157 -227
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +25 -169
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +179 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +137 -228
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +3 -21
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +451 -570
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +7 -30
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +94 -148
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -89
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +17 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +2 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +68 -184
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +21 -56
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +9 -38
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +0 -2
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -136
- package/dist/metrics/index.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +28 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +60 -190
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/peer-connection-manager/util.js +10 -24
- package/dist/peer-connection-manager/util.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +100 -166
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +2 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +0 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +0 -5
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +294 -468
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/collection.js +1 -12
- package/dist/roap/collection.js.map +1 -1
- package/dist/roap/handler.js +15 -85
- package/dist/roap/handler.js.map +1 -1
- package/dist/roap/index.js +42 -94
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +81 -148
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/state.js +2 -39
- package/dist/roap/state.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -52
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/util.js +0 -26
- package/dist/roap/util.js.map +1 -1
- package/dist/statsAnalyzer/global.js +0 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +68 -168
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +54 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +17 -17
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +11 -11
- package/src/constants.ts +138 -119
- package/src/index.js +1 -1
- package/src/locus-info/controlsUtils.ts +34 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +25 -34
- package/src/locus-info/infoUtils.ts +12 -4
- package/src/locus-info/mediaSharesUtils.ts +4 -4
- package/src/locus-info/parser.ts +45 -68
- package/src/locus-info/selfUtils.ts +106 -57
- package/src/media/index.ts +118 -109
- package/src/media/properties.ts +26 -20
- package/src/media/util.ts +2 -2
- package/src/mediaQualityMetrics/config.ts +46 -46
- package/src/meeting/effectsState.ts +35 -35
- package/src/meeting/in-meeting-actions.ts +7 -3
- package/src/meeting/index.ts +1435 -1210
- package/src/meeting/muteState.ts +62 -31
- package/src/meeting/request.ts +160 -113
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +131 -90
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +106 -108
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +59 -53
- package/src/meetings/collection.ts +1 -1
- package/src/meetings/index.ts +513 -441
- package/src/meetings/request.ts +26 -24
- package/src/meetings/util.ts +26 -23
- package/src/member/index.ts +55 -49
- package/src/member/util.ts +26 -13
- package/src/members/collection.ts +0 -1
- package/src/members/index.ts +172 -121
- package/src/members/request.ts +46 -14
- package/src/members/util.ts +44 -42
- package/src/metrics/config.ts +254 -81
- package/src/metrics/constants.ts +0 -2
- package/src/metrics/index.ts +84 -71
- package/src/networkQualityMonitor/index.ts +20 -23
- package/src/peer-connection-manager/index.ts +321 -241
- package/src/peer-connection-manager/util.ts +4 -2
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +61 -59
- package/src/reachability/request.ts +36 -32
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +2 -3
- package/src/reconnection-manager/index.ts +159 -98
- package/src/roap/collection.ts +2 -4
- package/src/roap/handler.ts +63 -32
- package/src/roap/index.ts +78 -58
- package/src/roap/request.ts +69 -54
- package/src/roap/state.ts +17 -11
- package/src/roap/turnDiscovery.ts +60 -31
- package/src/roap/util.ts +39 -31
- package/src/statsAnalyzer/global.ts +30 -33
- package/src/statsAnalyzer/index.ts +397 -169
- package/src/statsAnalyzer/mqaUtil.ts +178 -72
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/journey.js +666 -462
- package/test/integration/spec/space-meeting.js +318 -203
- package/test/integration/spec/transcription.js +6 -7
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +5 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +24 -31
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +72 -103
- package/test/unit/spec/locus-info/selfUtils.js +21 -12
- package/test/unit/spec/meeting/effectsState.js +33 -45
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
- package/test/unit/spec/meeting/index.js +1141 -649
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +56 -45
- package/test/unit/spec/meeting/utils.js +66 -49
- package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +110 -74
- package/test/unit/spec/meetings/collection.js +1 -1
- package/test/unit/spec/meetings/index.js +438 -257
- package/test/unit/spec/meetings/utils.js +14 -12
- package/test/unit/spec/member/index.js +0 -1
- package/test/unit/spec/member/util.js +5 -6
- package/test/unit/spec/members/index.js +84 -35
- package/test/unit/spec/members/request.js +29 -20
- package/test/unit/spec/members/utils.js +8 -5
- package/test/unit/spec/metrics/index.js +16 -21
- package/test/unit/spec/networkQualityMonitor/index.js +21 -15
- package/test/unit/spec/peerconnection-manager/index.js +88 -58
- package/test/unit/spec/peerconnection-manager/utils.js +5 -4
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +7 -8
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +9 -11
- package/test/unit/spec/reconnection-manager/index.js +14 -17
- package/test/unit/spec/roap/index.ts +18 -8
- package/test/unit/spec/roap/turnDiscovery.ts +22 -19
- package/test/unit/spec/roap/util.js +3 -3
- package/test/unit/spec/stats-analyzer/index.js +29 -24
- package/test/utils/cmr.js +44 -42
- package/test/utils/testUtils.js +83 -74
- package/test/utils/webex-config.js +18 -18
- package/test/utils/webex-test-users.js +53 -50
package/src/meeting/request.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
PROVISIONAL_TYPE_DIAL_IN,
|
|
24
24
|
PROVISIONAL_TYPE_DIAL_OUT,
|
|
25
25
|
SEND_DTMF_ENDPOINT,
|
|
26
|
-
_SLIDES_
|
|
26
|
+
_SLIDES_,
|
|
27
27
|
} from '../constants';
|
|
28
28
|
import {Reaction} from '../reactions/reactions.type';
|
|
29
29
|
|
|
@@ -35,7 +35,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
35
35
|
|
|
36
36
|
constructor(attrs: any, options: any) {
|
|
37
37
|
super(attrs, options);
|
|
38
|
-
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
38
|
+
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
39
|
+
leading: true,
|
|
40
|
+
trailing: true,
|
|
41
|
+
});
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
/**
|
|
@@ -84,13 +87,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
84
87
|
pin,
|
|
85
88
|
moveToResource,
|
|
86
89
|
roapMessage,
|
|
87
|
-
preferTranscoding
|
|
90
|
+
preferTranscoding,
|
|
88
91
|
} = options;
|
|
89
92
|
|
|
90
|
-
LoggerProxy.logger.info(
|
|
91
|
-
'Meeting:request#joinMeeting --> Joining a meeting',
|
|
92
|
-
correlationId
|
|
93
|
-
);
|
|
93
|
+
LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
|
|
94
94
|
|
|
95
95
|
let url = '';
|
|
96
96
|
|
|
@@ -99,18 +99,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
99
99
|
device: {
|
|
100
100
|
url: deviceUrl,
|
|
101
101
|
// @ts-ignore - config comes from registerPlugin
|
|
102
|
-
deviceType: this.config.meetings.deviceType
|
|
102
|
+
deviceType: this.config.meetings.deviceType,
|
|
103
103
|
},
|
|
104
104
|
usingResource: resourceId || null,
|
|
105
|
-
moveMediaToResource: resourceId && moveToResource || false,
|
|
105
|
+
moveMediaToResource: (resourceId && moveToResource) || false,
|
|
106
106
|
correlationId,
|
|
107
107
|
respOnlySdp: true,
|
|
108
108
|
allowMultiDevice: true,
|
|
109
109
|
ensureConversation: ensureConversation || false,
|
|
110
110
|
supportsNativeLobby: 1,
|
|
111
111
|
clientMediaPreferences: {
|
|
112
|
-
preferTranscoding: preferTranscoding ?? true
|
|
113
|
-
}
|
|
112
|
+
preferTranscoding: preferTranscoding ?? true,
|
|
113
|
+
},
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
// @ts-ignore
|
|
@@ -135,30 +135,29 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
135
135
|
|
|
136
136
|
if (locusUrl) {
|
|
137
137
|
url = `${locusUrl}/${PARTICIPANT}`;
|
|
138
|
-
}
|
|
139
|
-
else if (inviteeAddress || meetingNumber) {
|
|
138
|
+
} else if (inviteeAddress || meetingNumber) {
|
|
140
139
|
try {
|
|
141
140
|
// @ts-ignore
|
|
142
141
|
await this.webex.internal.services.waitForCatalog('postauth');
|
|
143
142
|
// @ts-ignore
|
|
144
143
|
url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
|
|
145
144
|
body.invitee = {
|
|
146
|
-
address: inviteeAddress || `wbxmn:${meetingNumber}
|
|
145
|
+
address: inviteeAddress || `wbxmn:${meetingNumber}`,
|
|
147
146
|
};
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
} catch (e) {
|
|
148
|
+
LoggerProxy.logger.error(
|
|
149
|
+
`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`
|
|
150
|
+
);
|
|
151
|
+
throw e;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
|
|
156
155
|
// TODO: -- this will be resolved in SDK request
|
|
157
156
|
url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);
|
|
158
157
|
|
|
159
158
|
if (resourceId === inviteeAddress) {
|
|
160
159
|
body.callPreferences = {
|
|
161
|
-
requestedMedia: [_SLIDES_]
|
|
160
|
+
requestedMedia: [_SLIDES_],
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
163
|
|
|
@@ -170,7 +169,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
170
169
|
return this.request({
|
|
171
170
|
method: HTTP_VERBS.POST,
|
|
172
171
|
uri: url,
|
|
173
|
-
body
|
|
172
|
+
body,
|
|
174
173
|
});
|
|
175
174
|
}
|
|
176
175
|
|
|
@@ -182,16 +181,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
182
181
|
* @returns {Promise}
|
|
183
182
|
* @private
|
|
184
183
|
*/
|
|
185
|
-
private refreshCaptcha({
|
|
184
|
+
private refreshCaptcha({
|
|
185
|
+
captchaRefreshUrl,
|
|
186
|
+
captchaId,
|
|
187
|
+
}: {
|
|
188
|
+
captchaRefreshUrl: string;
|
|
189
|
+
captchaId: string;
|
|
190
|
+
}) {
|
|
186
191
|
const body = {
|
|
187
|
-
captchaId
|
|
192
|
+
captchaId,
|
|
188
193
|
};
|
|
189
194
|
|
|
190
195
|
// @ts-ignore
|
|
191
196
|
return this.request({
|
|
192
197
|
method: HTTP_VERBS.POST,
|
|
193
198
|
uri: captchaRefreshUrl,
|
|
194
|
-
body
|
|
199
|
+
body,
|
|
195
200
|
}).catch((err) => {
|
|
196
201
|
LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);
|
|
197
202
|
|
|
@@ -231,18 +236,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
231
236
|
deviceType: deviceType.PROVISIONAL,
|
|
232
237
|
provisionalType: PROVISIONAL_TYPE_DIAL_IN,
|
|
233
238
|
url: dialInUrl,
|
|
234
|
-
clientUrl
|
|
239
|
+
clientUrl,
|
|
235
240
|
},
|
|
236
|
-
correlationId
|
|
241
|
+
correlationId,
|
|
237
242
|
};
|
|
238
243
|
|
|
239
244
|
// @ts-ignore
|
|
240
245
|
return this.request({
|
|
241
246
|
method: HTTP_VERBS.POST,
|
|
242
247
|
uri,
|
|
243
|
-
body
|
|
248
|
+
body,
|
|
244
249
|
}).catch((err) => {
|
|
245
|
-
LoggerProxy.logger.error(
|
|
250
|
+
LoggerProxy.logger.error(
|
|
251
|
+
`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`
|
|
252
|
+
);
|
|
246
253
|
|
|
247
254
|
throw err;
|
|
248
255
|
});
|
|
@@ -284,18 +291,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
284
291
|
provisionalType: PROVISIONAL_TYPE_DIAL_OUT,
|
|
285
292
|
url: dialOutUrl,
|
|
286
293
|
dialoutAddress: phoneNumber,
|
|
287
|
-
clientUrl
|
|
294
|
+
clientUrl,
|
|
288
295
|
},
|
|
289
|
-
correlationId
|
|
296
|
+
correlationId,
|
|
290
297
|
};
|
|
291
298
|
|
|
292
299
|
// @ts-ignore
|
|
293
300
|
return this.request({
|
|
294
301
|
method: HTTP_VERBS.POST,
|
|
295
302
|
uri,
|
|
296
|
-
body
|
|
303
|
+
body,
|
|
297
304
|
}).catch((err) => {
|
|
298
|
-
LoggerProxy.logger.error(
|
|
305
|
+
LoggerProxy.logger.error(
|
|
306
|
+
`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`
|
|
307
|
+
);
|
|
299
308
|
|
|
300
309
|
throw err;
|
|
301
310
|
});
|
|
@@ -308,7 +317,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
308
317
|
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
309
318
|
* @returns {Promise}
|
|
310
319
|
*/
|
|
311
|
-
syncMeeting(options: {
|
|
320
|
+
syncMeeting(options: {desync: boolean; syncUrl: string}) {
|
|
312
321
|
/* eslint-disable no-else-return */
|
|
313
322
|
const {desync} = options;
|
|
314
323
|
let {syncUrl} = options;
|
|
@@ -316,16 +325,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
316
325
|
/* istanbul ignore else */
|
|
317
326
|
if (desync) {
|
|
318
327
|
// check for existing URL parameters
|
|
319
|
-
syncUrl = syncUrl
|
|
328
|
+
syncUrl = syncUrl
|
|
329
|
+
.concat(syncUrl.split('?')[1] ? '&' : '?')
|
|
330
|
+
.concat(`${LOCUS.SYNCDEBUG}=${desync}`);
|
|
320
331
|
}
|
|
321
332
|
|
|
322
333
|
// @ts-ignore
|
|
323
334
|
return this.request({
|
|
324
335
|
method: HTTP_VERBS.GET,
|
|
325
|
-
uri: syncUrl
|
|
336
|
+
uri: syncUrl,
|
|
326
337
|
}) // TODO: Handle if delta sync failed . Get the full locus object
|
|
327
338
|
.catch((err) => {
|
|
328
|
-
LoggerProxy.logger.error(
|
|
339
|
+
LoggerProxy.logger.error(
|
|
340
|
+
`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`
|
|
341
|
+
);
|
|
329
342
|
|
|
330
343
|
return err;
|
|
331
344
|
});
|
|
@@ -338,7 +351,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
338
351
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
339
352
|
* @returns {Promise}
|
|
340
353
|
*/
|
|
341
|
-
getFullLocus(options: {
|
|
354
|
+
getFullLocus(options: {desync: boolean; locusUrl: string}) {
|
|
342
355
|
let {locusUrl} = options;
|
|
343
356
|
const {desync} = options;
|
|
344
357
|
|
|
@@ -350,9 +363,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
350
363
|
// @ts-ignore
|
|
351
364
|
return this.request({
|
|
352
365
|
method: HTTP_VERBS.GET,
|
|
353
|
-
uri: locusUrl
|
|
366
|
+
uri: locusUrl,
|
|
354
367
|
}).catch((err) => {
|
|
355
|
-
LoggerProxy.logger.error(
|
|
368
|
+
LoggerProxy.logger.error(
|
|
369
|
+
`Meeting:request#getFullLocus --> Error getting full locus, error ${err}`
|
|
370
|
+
);
|
|
356
371
|
|
|
357
372
|
return err;
|
|
358
373
|
});
|
|
@@ -391,16 +406,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
391
406
|
const body = {
|
|
392
407
|
device: {
|
|
393
408
|
deviceType: deviceType.PROVISIONAL,
|
|
394
|
-
url: phoneUrl
|
|
409
|
+
url: phoneUrl,
|
|
395
410
|
},
|
|
396
|
-
correlationId
|
|
411
|
+
correlationId,
|
|
397
412
|
};
|
|
398
413
|
|
|
399
414
|
// @ts-ignore
|
|
400
415
|
return this.request({
|
|
401
416
|
method: HTTP_VERBS.PUT,
|
|
402
417
|
uri,
|
|
403
|
-
body
|
|
418
|
+
body,
|
|
404
419
|
}).catch((err) => {
|
|
405
420
|
LoggerProxy.logger.error(
|
|
406
421
|
`Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`
|
|
@@ -433,27 +448,24 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
433
448
|
resourceId: string;
|
|
434
449
|
correlationId: string;
|
|
435
450
|
}) {
|
|
436
|
-
LoggerProxy.logger.info(
|
|
437
|
-
'Meeting:request#leaveMeeting --> Leaving a meeting',
|
|
438
|
-
correlationId
|
|
439
|
-
);
|
|
451
|
+
LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
|
|
440
452
|
|
|
441
453
|
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
442
454
|
const body = {
|
|
443
455
|
device: {
|
|
444
456
|
// @ts-ignore
|
|
445
457
|
deviceType: this.config.meetings.deviceType,
|
|
446
|
-
url
|
|
458
|
+
url,
|
|
447
459
|
},
|
|
448
460
|
usingResource: resourceId || null,
|
|
449
|
-
correlationId
|
|
461
|
+
correlationId,
|
|
450
462
|
};
|
|
451
463
|
|
|
452
464
|
// @ts-ignore
|
|
453
465
|
return this.request({
|
|
454
466
|
method: HTTP_VERBS.PUT,
|
|
455
467
|
uri,
|
|
456
|
-
body
|
|
468
|
+
body,
|
|
457
469
|
});
|
|
458
470
|
}
|
|
459
471
|
|
|
@@ -465,22 +477,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
465
477
|
* @param {String} options.correlationId
|
|
466
478
|
* @returns {Promise}
|
|
467
479
|
*/
|
|
468
|
-
acknowledgeMeeting(options: {
|
|
480
|
+
acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {
|
|
469
481
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
|
|
470
482
|
const body = {
|
|
471
483
|
device: {
|
|
472
484
|
// @ts-ignore
|
|
473
485
|
deviceType: this.config.meetings.deviceType,
|
|
474
|
-
url: options.deviceUrl
|
|
486
|
+
url: options.deviceUrl,
|
|
475
487
|
},
|
|
476
|
-
correlationId: options.correlationId
|
|
488
|
+
correlationId: options.correlationId,
|
|
477
489
|
};
|
|
478
490
|
|
|
479
491
|
// @ts-ignore
|
|
480
492
|
return this.request({
|
|
481
493
|
method: HTTP_VERBS.PUT,
|
|
482
494
|
uri,
|
|
483
|
-
body
|
|
495
|
+
body,
|
|
484
496
|
});
|
|
485
497
|
}
|
|
486
498
|
|
|
@@ -492,20 +504,26 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
492
504
|
* @param {String} options.id
|
|
493
505
|
* @returns {Promise}
|
|
494
506
|
*/
|
|
495
|
-
recordMeeting(options: {
|
|
507
|
+
recordMeeting(options: {
|
|
508
|
+
locusUrl: string;
|
|
509
|
+
deviceUrl: string;
|
|
510
|
+
id: string;
|
|
511
|
+
recording: any;
|
|
512
|
+
paused: any;
|
|
513
|
+
}) {
|
|
496
514
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
497
515
|
const body = {
|
|
498
516
|
record: {
|
|
499
517
|
recording: options.recording,
|
|
500
|
-
paused: options.paused
|
|
501
|
-
}
|
|
518
|
+
paused: options.paused,
|
|
519
|
+
},
|
|
502
520
|
};
|
|
503
521
|
|
|
504
522
|
// @ts-ignore
|
|
505
523
|
return this.request({
|
|
506
524
|
method: HTTP_VERBS.PATCH,
|
|
507
525
|
uri,
|
|
508
|
-
body
|
|
526
|
+
body,
|
|
509
527
|
});
|
|
510
528
|
}
|
|
511
529
|
|
|
@@ -513,15 +531,15 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
513
531
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
514
532
|
const body = {
|
|
515
533
|
lock: {
|
|
516
|
-
locked: options.lock
|
|
517
|
-
}
|
|
534
|
+
locked: options.lock,
|
|
535
|
+
},
|
|
518
536
|
};
|
|
519
537
|
|
|
520
538
|
// @ts-ignore
|
|
521
539
|
return this.request({
|
|
522
540
|
method: HTTP_VERBS.PATCH,
|
|
523
541
|
uri,
|
|
524
|
-
body
|
|
542
|
+
body,
|
|
525
543
|
});
|
|
526
544
|
}
|
|
527
545
|
|
|
@@ -533,13 +551,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
533
551
|
* @param {String} options.reason
|
|
534
552
|
* @returns {Promise}
|
|
535
553
|
*/
|
|
536
|
-
declineMeeting(options: {
|
|
554
|
+
declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {
|
|
537
555
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
|
|
538
556
|
const body = {
|
|
539
557
|
device: {
|
|
540
558
|
// @ts-ignore
|
|
541
559
|
deviceType: this.config.meetings.deviceType,
|
|
542
|
-
url: options.deviceUrl
|
|
560
|
+
url: options.deviceUrl,
|
|
543
561
|
},
|
|
544
562
|
...(options.reason && {reason: options.reason}),
|
|
545
563
|
};
|
|
@@ -548,7 +566,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
548
566
|
return this.request({
|
|
549
567
|
method: HTTP_VERBS.PUT,
|
|
550
568
|
uri,
|
|
551
|
-
body
|
|
569
|
+
body,
|
|
552
570
|
});
|
|
553
571
|
}
|
|
554
572
|
|
|
@@ -562,34 +580,38 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
562
580
|
* @param {String} options.localMedias local sdps
|
|
563
581
|
* @returns {Promise}
|
|
564
582
|
*/
|
|
565
|
-
remoteAudioVideoToggle(
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
583
|
+
remoteAudioVideoToggle(
|
|
584
|
+
options:
|
|
585
|
+
| {
|
|
586
|
+
selfId: string;
|
|
587
|
+
locusUrl: string;
|
|
588
|
+
deviceUrl: string;
|
|
589
|
+
resourceId: string;
|
|
590
|
+
localMedias: string;
|
|
591
|
+
}
|
|
592
|
+
| any
|
|
593
|
+
) {
|
|
572
594
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
|
|
573
595
|
const body = {
|
|
574
596
|
device: {
|
|
575
597
|
// @ts-ignore
|
|
576
598
|
deviceType: this.config.meetings.deviceType,
|
|
577
|
-
url: options.deviceUrl
|
|
599
|
+
url: options.deviceUrl,
|
|
578
600
|
},
|
|
579
601
|
usingResource: options.resourceId || null,
|
|
580
602
|
correlationId: options.correlationId,
|
|
581
603
|
respOnlySdp: true,
|
|
582
604
|
localMedias: options.localMedias,
|
|
583
605
|
clientMediaPreferences: {
|
|
584
|
-
preferTranscoding: options.preferTranscoding ?? true
|
|
585
|
-
}
|
|
606
|
+
preferTranscoding: options.preferTranscoding ?? true,
|
|
607
|
+
},
|
|
586
608
|
};
|
|
587
609
|
|
|
588
610
|
// @ts-ignore
|
|
589
611
|
return this.request({
|
|
590
612
|
method: HTTP_VERBS.PUT,
|
|
591
613
|
uri,
|
|
592
|
-
body
|
|
614
|
+
body,
|
|
593
615
|
});
|
|
594
616
|
}
|
|
595
617
|
|
|
@@ -603,13 +625,17 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
603
625
|
* @param {String} options.uri floor grant uri
|
|
604
626
|
* @returns {Promise}
|
|
605
627
|
*/
|
|
606
|
-
changeMeetingFloor(
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
628
|
+
changeMeetingFloor(
|
|
629
|
+
options:
|
|
630
|
+
| {
|
|
631
|
+
disposition: string;
|
|
632
|
+
personUrl: string;
|
|
633
|
+
deviceUrl: string;
|
|
634
|
+
resourceId: string;
|
|
635
|
+
uri: string;
|
|
636
|
+
}
|
|
637
|
+
| any
|
|
638
|
+
) {
|
|
613
639
|
let floorReq: any = {disposition: options.disposition};
|
|
614
640
|
|
|
615
641
|
/* istanbul ignore else */
|
|
@@ -621,20 +647,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
621
647
|
{
|
|
622
648
|
// @ts-ignore
|
|
623
649
|
deviceType: this.config.meetings.deviceType,
|
|
624
|
-
url: options.deviceUrl
|
|
625
|
-
}
|
|
626
|
-
]
|
|
650
|
+
url: options.deviceUrl,
|
|
651
|
+
},
|
|
652
|
+
],
|
|
627
653
|
},
|
|
628
654
|
disposition: options.disposition,
|
|
629
655
|
requester: {
|
|
630
|
-
url: options.personUrl
|
|
631
|
-
}
|
|
656
|
+
url: options.personUrl,
|
|
657
|
+
},
|
|
632
658
|
};
|
|
633
659
|
}
|
|
634
660
|
|
|
635
661
|
const body: any = {
|
|
636
662
|
floor: floorReq,
|
|
637
|
-
resourceUrl: options.resourceUrl
|
|
663
|
+
resourceUrl: options.resourceUrl,
|
|
638
664
|
};
|
|
639
665
|
|
|
640
666
|
if (options?.resourceToken) {
|
|
@@ -645,7 +671,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
645
671
|
return this.request({
|
|
646
672
|
uri: options.uri,
|
|
647
673
|
method: HTTP_VERBS.PUT,
|
|
648
|
-
body
|
|
674
|
+
body,
|
|
649
675
|
});
|
|
650
676
|
}
|
|
651
677
|
|
|
@@ -657,7 +683,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
657
683
|
* @param {String} options.tones a string of one or more DTMF tones to send
|
|
658
684
|
* @returns {Promise}
|
|
659
685
|
*/
|
|
660
|
-
sendDTMF({
|
|
686
|
+
sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {
|
|
661
687
|
// @ts-ignore
|
|
662
688
|
return this.request({
|
|
663
689
|
method: HTTP_VERBS.POST,
|
|
@@ -666,9 +692,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
666
692
|
deviceUrl,
|
|
667
693
|
dtmf: {
|
|
668
694
|
correlationId: uuid.v4(),
|
|
669
|
-
tones
|
|
670
|
-
}
|
|
671
|
-
}
|
|
695
|
+
tones,
|
|
696
|
+
},
|
|
697
|
+
},
|
|
672
698
|
});
|
|
673
699
|
}
|
|
674
700
|
|
|
@@ -707,24 +733,37 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
707
733
|
}) {
|
|
708
734
|
// send main/content renderInfo only if both width and height are specified
|
|
709
735
|
if (main && (!main.width || !main.height)) {
|
|
710
|
-
return Promise.reject(
|
|
736
|
+
return Promise.reject(
|
|
737
|
+
new Error(
|
|
738
|
+
`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(
|
|
739
|
+
main
|
|
740
|
+
)}`
|
|
741
|
+
)
|
|
742
|
+
);
|
|
711
743
|
}
|
|
712
744
|
|
|
713
745
|
if (content && (!content.width || !content.height)) {
|
|
714
|
-
return Promise.reject(
|
|
746
|
+
return Promise.reject(
|
|
747
|
+
new Error(
|
|
748
|
+
`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(
|
|
749
|
+
content
|
|
750
|
+
)}`
|
|
751
|
+
)
|
|
752
|
+
);
|
|
715
753
|
}
|
|
716
754
|
|
|
717
|
-
const renderInfoMain =
|
|
718
|
-
const renderInfoContent =
|
|
755
|
+
const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;
|
|
756
|
+
const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;
|
|
719
757
|
|
|
720
|
-
const layoutParams =
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
758
|
+
const layoutParams =
|
|
759
|
+
renderInfoMain || renderInfoContent
|
|
760
|
+
? {
|
|
761
|
+
renderInfo: {
|
|
762
|
+
main: renderInfoMain,
|
|
763
|
+
content: renderInfoContent,
|
|
764
|
+
},
|
|
765
|
+
}
|
|
766
|
+
: undefined;
|
|
728
767
|
|
|
729
768
|
// @ts-ignore
|
|
730
769
|
return this.request({
|
|
@@ -734,9 +773,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
734
773
|
layout: {
|
|
735
774
|
deviceUrl,
|
|
736
775
|
type: layoutType,
|
|
737
|
-
layoutParams
|
|
738
|
-
}
|
|
739
|
-
}
|
|
776
|
+
layoutParams,
|
|
777
|
+
},
|
|
778
|
+
},
|
|
740
779
|
});
|
|
741
780
|
}
|
|
742
781
|
|
|
@@ -746,13 +785,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
746
785
|
* @param {Url} options.locusUrl
|
|
747
786
|
* @returns {Promise}
|
|
748
787
|
*/
|
|
749
|
-
endMeetingForAll({
|
|
788
|
+
endMeetingForAll({locusUrl}: {locusUrl: string}) {
|
|
750
789
|
const uri = `${locusUrl}/${END}`;
|
|
751
790
|
|
|
752
791
|
// @ts-ignore
|
|
753
792
|
return this.request({
|
|
754
793
|
method: HTTP_VERBS.POST,
|
|
755
|
-
uri
|
|
794
|
+
uri,
|
|
756
795
|
});
|
|
757
796
|
}
|
|
758
797
|
|
|
@@ -762,11 +801,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
762
801
|
* @param {Url} options.keepAliveUrl
|
|
763
802
|
* @returns {Promise}
|
|
764
803
|
*/
|
|
765
|
-
keepAlive({
|
|
804
|
+
keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {
|
|
766
805
|
// @ts-ignore
|
|
767
806
|
return this.request({
|
|
768
807
|
method: HTTP_VERBS.GET,
|
|
769
|
-
uri: keepAliveUrl
|
|
808
|
+
uri: keepAliveUrl,
|
|
770
809
|
});
|
|
771
810
|
}
|
|
772
811
|
|
|
@@ -778,7 +817,15 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
778
817
|
* @param {string} options.senderID
|
|
779
818
|
* @returns {Promise}
|
|
780
819
|
*/
|
|
781
|
-
sendReaction({
|
|
820
|
+
sendReaction({
|
|
821
|
+
reactionChannelUrl,
|
|
822
|
+
reaction,
|
|
823
|
+
participantId,
|
|
824
|
+
}: {
|
|
825
|
+
reactionChannelUrl: string;
|
|
826
|
+
reaction: Reaction;
|
|
827
|
+
participantId: string;
|
|
828
|
+
}) {
|
|
782
829
|
const uri = reactionChannelUrl;
|
|
783
830
|
|
|
784
831
|
// @ts-ignore
|
|
@@ -788,7 +835,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
788
835
|
body: {
|
|
789
836
|
sender: {participantId},
|
|
790
837
|
reaction,
|
|
791
|
-
}
|
|
838
|
+
},
|
|
792
839
|
});
|
|
793
840
|
}
|
|
794
841
|
}
|