@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
3
2
|
import ParameterError from '../common/errors/parameter';
|
|
4
3
|
import PermissionError from '../common/errors/permission';
|
|
@@ -11,6 +10,7 @@ import {AUDIO, VIDEO} from '../constants';
|
|
|
11
10
|
If we ever need to support it, search for REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION string to find the places that need updating
|
|
12
11
|
*/
|
|
13
12
|
|
|
13
|
+
|
|
14
14
|
const createMuteState = (type, meeting, mediaDirection) => {
|
|
15
15
|
if (type === AUDIO && !mediaDirection.sendAudio) {
|
|
16
16
|
return null;
|
|
@@ -30,13 +30,18 @@ const createMuteState = (type, meeting, mediaDirection) => {
|
|
|
30
30
|
More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#
|
|
31
31
|
*/
|
|
32
32
|
class MuteState {
|
|
33
|
+
pendingPromiseReject: any;
|
|
34
|
+
pendingPromiseResolve: any;
|
|
35
|
+
state: any;
|
|
36
|
+
type: any;
|
|
37
|
+
|
|
33
38
|
/**
|
|
34
39
|
* Constructor
|
|
35
40
|
*
|
|
36
41
|
* @param {String} type - audio or video
|
|
37
42
|
* @param {Object} meeting - the meeting object (used for reading current remote mute status)
|
|
38
43
|
*/
|
|
39
|
-
constructor(type, meeting) {
|
|
44
|
+
constructor(type: string, meeting: any) {
|
|
40
45
|
if ((type !== AUDIO) && (type !== VIDEO)) {
|
|
41
46
|
throw new ParameterError('Mute state is designed for handling audio or video only');
|
|
42
47
|
}
|
|
@@ -72,7 +77,7 @@ class MuteState {
|
|
|
72
77
|
* @param {Boolean} [mute] true for muting, false for unmuting request
|
|
73
78
|
* @returns {Promise}
|
|
74
79
|
*/
|
|
75
|
-
handleClientRequest(meeting, mute) {
|
|
80
|
+
public handleClientRequest(meeting?: object, mute?: boolean) {
|
|
76
81
|
LoggerProxy.logger.info(`Meeting:muteState#handleClientRequest --> ${this.type}: user requesting new mute state: ${mute}`);
|
|
77
82
|
|
|
78
83
|
if (!mute && !this.state.server.unmuteAllowed) {
|
|
@@ -103,7 +108,7 @@ class MuteState {
|
|
|
103
108
|
* @memberof MuteState
|
|
104
109
|
* @returns {void}
|
|
105
110
|
*/
|
|
106
|
-
applyClientStateLocally(meeting) {
|
|
111
|
+
public applyClientStateLocally(meeting?: any) {
|
|
107
112
|
Media.setLocalTrack(
|
|
108
113
|
!this.state.client.localMute,
|
|
109
114
|
(this.type === AUDIO) ? meeting.mediaProperties.audioTrack : meeting.mediaProperties.videoTrack
|
|
@@ -118,7 +123,7 @@ class MuteState {
|
|
|
118
123
|
* @memberof MuteState
|
|
119
124
|
* @returns {void}
|
|
120
125
|
*/
|
|
121
|
-
applyClientStateToServer(meeting) {
|
|
126
|
+
private applyClientStateToServer(meeting?: object) {
|
|
122
127
|
if (this.state.syncToServerInProgress) {
|
|
123
128
|
LoggerProxy.logger.info(`Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`);
|
|
124
129
|
|
|
@@ -178,7 +183,7 @@ class MuteState {
|
|
|
178
183
|
* @memberof MuteState
|
|
179
184
|
* @returns {Promise}
|
|
180
185
|
*/
|
|
181
|
-
sendLocalMuteRequestToServer(meeting) {
|
|
186
|
+
private sendLocalMuteRequestToServer(meeting?: any) {
|
|
182
187
|
const audioMuted = (this.type === AUDIO) ? this.state.client.localMute : meeting.audio?.state.client.localMute;
|
|
183
188
|
const videoMuted = (this.type === VIDEO) ? this.state.client.localMute : meeting.video?.state.client.localMute;
|
|
184
189
|
|
|
@@ -214,7 +219,7 @@ class MuteState {
|
|
|
214
219
|
* @memberof MuteState
|
|
215
220
|
* @returns {Promise}
|
|
216
221
|
*/
|
|
217
|
-
sendRemoteMuteRequestToServer(meeting) {
|
|
222
|
+
private sendRemoteMuteRequestToServer(meeting?: any) {
|
|
218
223
|
if (this.type === AUDIO) {
|
|
219
224
|
const remoteMute = this.state.client.localMute;
|
|
220
225
|
|
|
@@ -252,7 +257,7 @@ class MuteState {
|
|
|
252
257
|
* @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when "hard mute" feature is used)
|
|
253
258
|
* @returns {undefined}
|
|
254
259
|
*/
|
|
255
|
-
handleServerRemoteMuteUpdate(muted, unmuteAllowed) {
|
|
260
|
+
public handleServerRemoteMuteUpdate(muted?: boolean, unmuteAllowed?: boolean) {
|
|
256
261
|
LoggerProxy.logger.info(`Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`);
|
|
257
262
|
this.state.server.remoteMute = muted;
|
|
258
263
|
this.state.server.unmuteAllowed = unmuteAllowed;
|
|
@@ -266,7 +271,7 @@ class MuteState {
|
|
|
266
271
|
* @param {Object} [meeting] the meeting object
|
|
267
272
|
* @returns {undefined}
|
|
268
273
|
*/
|
|
269
|
-
handleServerLocalUnmuteRequired(meeting) {
|
|
274
|
+
public handleServerLocalUnmuteRequired(meeting?: object) {
|
|
270
275
|
LoggerProxy.logger.info(`Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`);
|
|
271
276
|
|
|
272
277
|
this.state.server.remoteMute = false;
|
|
@@ -289,7 +294,7 @@ class MuteState {
|
|
|
289
294
|
* @memberof MuteState
|
|
290
295
|
* @returns {Boolean}
|
|
291
296
|
*/
|
|
292
|
-
isMuted() {
|
|
297
|
+
public isMuted() {
|
|
293
298
|
return this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute;
|
|
294
299
|
}
|
|
295
300
|
|
|
@@ -300,7 +305,7 @@ class MuteState {
|
|
|
300
305
|
* @memberof MuteState
|
|
301
306
|
* @returns {Boolean}
|
|
302
307
|
*/
|
|
303
|
-
isSelf() {
|
|
308
|
+
public isSelf() {
|
|
304
309
|
return this.state.client.localMute && !this.state.server.remoteMute;
|
|
305
310
|
}
|
|
306
311
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import uuid from 'uuid';
|
|
2
2
|
import {debounce} from 'lodash';
|
|
3
|
+
// @ts-ignore
|
|
3
4
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
5
|
+
// @ts-ignore
|
|
4
6
|
import {deviceType} from '@webex/common';
|
|
5
7
|
|
|
6
8
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
@@ -23,12 +25,15 @@ import {
|
|
|
23
25
|
SEND_DTMF_ENDPOINT,
|
|
24
26
|
_SLIDES_
|
|
25
27
|
} from '../constants';
|
|
28
|
+
import {Reaction} from '../reactions/reactions.type';
|
|
26
29
|
|
|
27
30
|
/**
|
|
28
31
|
* @class MeetingRequest
|
|
29
32
|
*/
|
|
30
33
|
export default class MeetingRequest extends StatelessWebexPlugin {
|
|
31
|
-
|
|
34
|
+
changeVideoLayoutDebounced: any;
|
|
35
|
+
|
|
36
|
+
constructor(attrs: any, options: any) {
|
|
32
37
|
super(attrs, options);
|
|
33
38
|
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});
|
|
34
39
|
}
|
|
@@ -48,7 +53,23 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
48
53
|
* @param {Object} options.roapMessage
|
|
49
54
|
* @returns {Promise}
|
|
50
55
|
*/
|
|
51
|
-
async joinMeeting(options
|
|
56
|
+
async joinMeeting(options: {
|
|
57
|
+
sipUri: string;
|
|
58
|
+
deviceUrl: string;
|
|
59
|
+
locusUrl: string;
|
|
60
|
+
resourceId: string;
|
|
61
|
+
correlationId: string;
|
|
62
|
+
ensureConversation: boolean;
|
|
63
|
+
moderator: boolean;
|
|
64
|
+
pin: boolean;
|
|
65
|
+
moveToResource: boolean;
|
|
66
|
+
roapMessage: any;
|
|
67
|
+
asResourceOccupant: any;
|
|
68
|
+
inviteeAddress: any;
|
|
69
|
+
meetingNumber: any;
|
|
70
|
+
permissionToken: any;
|
|
71
|
+
preferTranscoding: any;
|
|
72
|
+
}) {
|
|
52
73
|
const {
|
|
53
74
|
asResourceOccupant,
|
|
54
75
|
inviteeAddress,
|
|
@@ -73,10 +94,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
73
94
|
|
|
74
95
|
let url = '';
|
|
75
96
|
|
|
76
|
-
const body = {
|
|
97
|
+
const body: any = {
|
|
77
98
|
asResourceOccupant,
|
|
78
99
|
device: {
|
|
79
100
|
url: deviceUrl,
|
|
101
|
+
// @ts-ignore - config comes from registerPlugin
|
|
80
102
|
deviceType: this.config.meetings.deviceType
|
|
81
103
|
},
|
|
82
104
|
usingResource: resourceId || null,
|
|
@@ -91,8 +113,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
91
113
|
}
|
|
92
114
|
};
|
|
93
115
|
|
|
116
|
+
// @ts-ignore
|
|
94
117
|
if (this.webex.meetings.clientRegion) {
|
|
118
|
+
// @ts-ignore
|
|
95
119
|
body.device.countryCode = this.webex.meetings.clientRegion.countryCode;
|
|
120
|
+
// @ts-ignore
|
|
96
121
|
body.device.regionCode = this.webex.meetings.clientRegion.regionCode;
|
|
97
122
|
}
|
|
98
123
|
|
|
@@ -113,7 +138,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
113
138
|
}
|
|
114
139
|
else if (inviteeAddress || meetingNumber) {
|
|
115
140
|
try {
|
|
141
|
+
// @ts-ignore
|
|
116
142
|
await this.webex.internal.services.waitForCatalog('postauth');
|
|
143
|
+
// @ts-ignore
|
|
117
144
|
url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
|
|
118
145
|
body.invitee = {
|
|
119
146
|
address: inviteeAddress || `wbxmn:${meetingNumber}`
|
|
@@ -139,6 +166,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
139
166
|
body.localMedias = roapMessage.localMedias;
|
|
140
167
|
}
|
|
141
168
|
|
|
169
|
+
/// @ts-ignore
|
|
142
170
|
return this.request({
|
|
143
171
|
method: HTTP_VERBS.POST,
|
|
144
172
|
uri: url,
|
|
@@ -154,14 +182,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
154
182
|
* @returns {Promise}
|
|
155
183
|
* @private
|
|
156
184
|
*/
|
|
157
|
-
refreshCaptcha({
|
|
158
|
-
captchaRefreshUrl,
|
|
159
|
-
captchaId
|
|
160
|
-
}) {
|
|
185
|
+
private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {
|
|
161
186
|
const body = {
|
|
162
187
|
captchaId
|
|
163
188
|
};
|
|
164
189
|
|
|
190
|
+
// @ts-ignore
|
|
165
191
|
return this.request({
|
|
166
192
|
method: HTTP_VERBS.POST,
|
|
167
193
|
uri: captchaRefreshUrl,
|
|
@@ -177,17 +203,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
177
203
|
* Make a network request to add a dial in device
|
|
178
204
|
* @param {Object} options
|
|
179
205
|
* @param {String} options.correlationId
|
|
180
|
-
* @param {String} options.
|
|
206
|
+
* @param {String} options.locusUrl url for the meeting
|
|
181
207
|
* @param {String} options.dialInUrl identifier for the to-be provisioned device
|
|
182
208
|
* @param {String} options.clientUrl identifier for the web device
|
|
183
209
|
* @returns {Promise}
|
|
184
210
|
* @private
|
|
185
211
|
*/
|
|
186
|
-
dialIn({
|
|
212
|
+
private dialIn({
|
|
187
213
|
locusUrl,
|
|
188
214
|
dialInUrl,
|
|
189
215
|
clientUrl,
|
|
190
|
-
correlationId
|
|
216
|
+
correlationId,
|
|
217
|
+
}: {
|
|
218
|
+
correlationId: string;
|
|
219
|
+
locusUrl: string;
|
|
220
|
+
dialInUrl: string;
|
|
221
|
+
clientUrl: string;
|
|
191
222
|
}) {
|
|
192
223
|
LoggerProxy.logger.info(
|
|
193
224
|
'Meeting:request#dialIn --> Provisioning a dial in device',
|
|
@@ -205,6 +236,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
205
236
|
correlationId
|
|
206
237
|
};
|
|
207
238
|
|
|
239
|
+
// @ts-ignore
|
|
208
240
|
return this.request({
|
|
209
241
|
method: HTTP_VERBS.POST,
|
|
210
242
|
uri,
|
|
@@ -220,19 +252,25 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
220
252
|
* Make a network request to add a dial out device
|
|
221
253
|
* @param {Object} options
|
|
222
254
|
* @param {String} options.correlationId
|
|
223
|
-
* @param {String} options.
|
|
255
|
+
* @param {String} options.locusUrl url for the meeting
|
|
224
256
|
* @param {String} options.dialOutUrl identifier for the to-be provisioned device
|
|
225
257
|
* @param {String} options.phoneNumber phone number to dial out to
|
|
226
258
|
* @param {String} options.clientUrl identifier for the web device
|
|
227
259
|
* @returns {Promise}
|
|
228
260
|
* @private
|
|
229
261
|
*/
|
|
230
|
-
dialOut({
|
|
262
|
+
private dialOut({
|
|
231
263
|
locusUrl,
|
|
232
264
|
dialOutUrl,
|
|
233
265
|
phoneNumber,
|
|
234
266
|
clientUrl,
|
|
235
|
-
correlationId
|
|
267
|
+
correlationId,
|
|
268
|
+
}: {
|
|
269
|
+
correlationId: string;
|
|
270
|
+
locusUrl: string;
|
|
271
|
+
dialOutUrl: string;
|
|
272
|
+
phoneNumber: string;
|
|
273
|
+
clientUrl: string;
|
|
236
274
|
}) {
|
|
237
275
|
LoggerProxy.logger.info(
|
|
238
276
|
'Meeting:request#dialOut --> Provisioning a dial out device',
|
|
@@ -251,6 +289,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
251
289
|
correlationId
|
|
252
290
|
};
|
|
253
291
|
|
|
292
|
+
// @ts-ignore
|
|
254
293
|
return this.request({
|
|
255
294
|
method: HTTP_VERBS.POST,
|
|
256
295
|
uri,
|
|
@@ -265,11 +304,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
265
304
|
/**
|
|
266
305
|
* Syns the missed delta event
|
|
267
306
|
* @param {Object} options
|
|
268
|
-
* @param {
|
|
307
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
269
308
|
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
270
309
|
* @returns {Promise}
|
|
271
310
|
*/
|
|
272
|
-
syncMeeting(options) {
|
|
311
|
+
syncMeeting(options: { desync: boolean; syncUrl: string }) {
|
|
273
312
|
/* eslint-disable no-else-return */
|
|
274
313
|
const {desync} = options;
|
|
275
314
|
let {syncUrl} = options;
|
|
@@ -280,6 +319,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
280
319
|
syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);
|
|
281
320
|
}
|
|
282
321
|
|
|
322
|
+
// @ts-ignore
|
|
283
323
|
return this.request({
|
|
284
324
|
method: HTTP_VERBS.GET,
|
|
285
325
|
uri: syncUrl
|
|
@@ -294,11 +334,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
294
334
|
/**
|
|
295
335
|
* Request to get the complete locus object
|
|
296
336
|
* @param {Object} options
|
|
297
|
-
* @param {
|
|
337
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
298
338
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
299
339
|
* @returns {Promise}
|
|
300
340
|
*/
|
|
301
|
-
getFullLocus(options) {
|
|
341
|
+
getFullLocus(options: { desync: boolean; locusUrl: string }) {
|
|
302
342
|
let {locusUrl} = options;
|
|
303
343
|
const {desync} = options;
|
|
304
344
|
|
|
@@ -307,6 +347,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
307
347
|
locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;
|
|
308
348
|
}
|
|
309
349
|
|
|
350
|
+
// @ts-ignore
|
|
310
351
|
return this.request({
|
|
311
352
|
method: HTTP_VERBS.GET,
|
|
312
353
|
uri: locusUrl
|
|
@@ -330,11 +371,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
330
371
|
* @returns {Promise}
|
|
331
372
|
* @private
|
|
332
373
|
*/
|
|
333
|
-
disconnectPhoneAudio({
|
|
374
|
+
private disconnectPhoneAudio({
|
|
334
375
|
locusUrl,
|
|
335
376
|
phoneUrl,
|
|
336
377
|
correlationId,
|
|
337
|
-
selfId
|
|
378
|
+
selfId,
|
|
379
|
+
}: {
|
|
380
|
+
locusUrl: string;
|
|
381
|
+
phoneUrl: string;
|
|
382
|
+
correlationId: string;
|
|
383
|
+
selfId: string;
|
|
338
384
|
}) {
|
|
339
385
|
LoggerProxy.logger.info(
|
|
340
386
|
`Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,
|
|
@@ -350,6 +396,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
350
396
|
correlationId
|
|
351
397
|
};
|
|
352
398
|
|
|
399
|
+
// @ts-ignore
|
|
353
400
|
return this.request({
|
|
354
401
|
method: HTTP_VERBS.PUT,
|
|
355
402
|
uri,
|
|
@@ -378,7 +425,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
378
425
|
selfId,
|
|
379
426
|
deviceUrl: url,
|
|
380
427
|
resourceId,
|
|
381
|
-
correlationId
|
|
428
|
+
correlationId,
|
|
429
|
+
}: {
|
|
430
|
+
locusUrl: string;
|
|
431
|
+
selfId: string;
|
|
432
|
+
deviceUrl: string;
|
|
433
|
+
resourceId: string;
|
|
434
|
+
correlationId: string;
|
|
382
435
|
}) {
|
|
383
436
|
LoggerProxy.logger.info(
|
|
384
437
|
'Meeting:request#leaveMeeting --> Leaving a meeting',
|
|
@@ -388,6 +441,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
388
441
|
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
389
442
|
const body = {
|
|
390
443
|
device: {
|
|
444
|
+
// @ts-ignore
|
|
391
445
|
deviceType: this.config.meetings.deviceType,
|
|
392
446
|
url
|
|
393
447
|
},
|
|
@@ -395,6 +449,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
395
449
|
correlationId
|
|
396
450
|
};
|
|
397
451
|
|
|
452
|
+
// @ts-ignore
|
|
398
453
|
return this.request({
|
|
399
454
|
method: HTTP_VERBS.PUT,
|
|
400
455
|
uri,
|
|
@@ -410,16 +465,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
410
465
|
* @param {String} options.correlationId
|
|
411
466
|
* @returns {Promise}
|
|
412
467
|
*/
|
|
413
|
-
acknowledgeMeeting(options) {
|
|
468
|
+
acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {
|
|
414
469
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
|
|
415
470
|
const body = {
|
|
416
471
|
device: {
|
|
472
|
+
// @ts-ignore
|
|
417
473
|
deviceType: this.config.meetings.deviceType,
|
|
418
474
|
url: options.deviceUrl
|
|
419
475
|
},
|
|
420
476
|
correlationId: options.correlationId
|
|
421
477
|
};
|
|
422
478
|
|
|
479
|
+
// @ts-ignore
|
|
423
480
|
return this.request({
|
|
424
481
|
method: HTTP_VERBS.PUT,
|
|
425
482
|
uri,
|
|
@@ -435,7 +492,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
435
492
|
* @param {String} options.id
|
|
436
493
|
* @returns {Promise}
|
|
437
494
|
*/
|
|
438
|
-
recordMeeting(options) {
|
|
495
|
+
recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {
|
|
439
496
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
440
497
|
const body = {
|
|
441
498
|
record: {
|
|
@@ -444,6 +501,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
444
501
|
}
|
|
445
502
|
};
|
|
446
503
|
|
|
504
|
+
// @ts-ignore
|
|
447
505
|
return this.request({
|
|
448
506
|
method: HTTP_VERBS.PATCH,
|
|
449
507
|
uri,
|
|
@@ -459,6 +517,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
459
517
|
}
|
|
460
518
|
};
|
|
461
519
|
|
|
520
|
+
// @ts-ignore
|
|
462
521
|
return this.request({
|
|
463
522
|
method: HTTP_VERBS.PATCH,
|
|
464
523
|
uri,
|
|
@@ -474,16 +533,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
474
533
|
* @param {String} options.reason
|
|
475
534
|
* @returns {Promise}
|
|
476
535
|
*/
|
|
477
|
-
declineMeeting(options) {
|
|
536
|
+
declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {
|
|
478
537
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
|
|
479
538
|
const body = {
|
|
480
539
|
device: {
|
|
540
|
+
// @ts-ignore
|
|
481
541
|
deviceType: this.config.meetings.deviceType,
|
|
482
542
|
url: options.deviceUrl
|
|
483
543
|
},
|
|
484
|
-
...(options.reason && {reason: options.reason})
|
|
544
|
+
...(options.reason && {reason: options.reason}),
|
|
485
545
|
};
|
|
486
546
|
|
|
547
|
+
// @ts-ignore
|
|
487
548
|
return this.request({
|
|
488
549
|
method: HTTP_VERBS.PUT,
|
|
489
550
|
uri,
|
|
@@ -499,12 +560,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
499
560
|
* @param {String} options.deviceUrl Url of a device
|
|
500
561
|
* @param {String} options.resourceId Populated if you are paired to a device
|
|
501
562
|
* @param {String} options.localMedias local sdps
|
|
563
|
+
* @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
|
|
502
564
|
* @returns {Promise}
|
|
503
565
|
*/
|
|
504
|
-
remoteAudioVideoToggle(options
|
|
566
|
+
remoteAudioVideoToggle(options: {
|
|
567
|
+
selfId: string;
|
|
568
|
+
locusUrl: string;
|
|
569
|
+
deviceUrl: string;
|
|
570
|
+
resourceId: string;
|
|
571
|
+
localMedias: string;
|
|
572
|
+
} | any) {
|
|
505
573
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
|
|
506
574
|
const body = {
|
|
507
575
|
device: {
|
|
576
|
+
// @ts-ignore
|
|
508
577
|
deviceType: this.config.meetings.deviceType,
|
|
509
578
|
url: options.deviceUrl
|
|
510
579
|
},
|
|
@@ -517,6 +586,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
517
586
|
}
|
|
518
587
|
};
|
|
519
588
|
|
|
589
|
+
// @ts-ignore
|
|
520
590
|
return this.request({
|
|
521
591
|
method: HTTP_VERBS.PUT,
|
|
522
592
|
uri,
|
|
@@ -534,8 +604,14 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
534
604
|
* @param {String} options.uri floor grant uri
|
|
535
605
|
* @returns {Promise}
|
|
536
606
|
*/
|
|
537
|
-
changeMeetingFloor(options
|
|
538
|
-
|
|
607
|
+
changeMeetingFloor(options: {
|
|
608
|
+
disposition: string;
|
|
609
|
+
personUrl: string;
|
|
610
|
+
deviceUrl: string;
|
|
611
|
+
resourceId: string;
|
|
612
|
+
uri: string;
|
|
613
|
+
} | any) {
|
|
614
|
+
let floorReq: any = {disposition: options.disposition};
|
|
539
615
|
|
|
540
616
|
/* istanbul ignore else */
|
|
541
617
|
if (options.disposition === FLOOR_ACTION.GRANTED) {
|
|
@@ -544,6 +620,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
544
620
|
url: options.personUrl,
|
|
545
621
|
devices: [
|
|
546
622
|
{
|
|
623
|
+
// @ts-ignore
|
|
547
624
|
deviceType: this.config.meetings.deviceType,
|
|
548
625
|
url: options.deviceUrl
|
|
549
626
|
}
|
|
@@ -556,7 +633,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
556
633
|
};
|
|
557
634
|
}
|
|
558
635
|
|
|
559
|
-
const body = {
|
|
636
|
+
const body: any = {
|
|
560
637
|
floor: floorReq,
|
|
561
638
|
resourceUrl: options.resourceUrl
|
|
562
639
|
};
|
|
@@ -565,6 +642,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
565
642
|
body.resourceToken = options?.resourceToken;
|
|
566
643
|
}
|
|
567
644
|
|
|
645
|
+
// @ts-ignore
|
|
568
646
|
return this.request({
|
|
569
647
|
uri: options.uri,
|
|
570
648
|
method: HTTP_VERBS.PUT,
|
|
@@ -580,7 +658,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
580
658
|
* @param {String} options.tones a string of one or more DTMF tones to send
|
|
581
659
|
* @returns {Promise}
|
|
582
660
|
*/
|
|
583
|
-
sendDTMF({locusUrl, deviceUrl, tones}) {
|
|
661
|
+
sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {
|
|
662
|
+
// @ts-ignore
|
|
584
663
|
return this.request({
|
|
585
664
|
method: HTTP_VERBS.POST,
|
|
586
665
|
uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
|
|
@@ -613,7 +692,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
613
692
|
deviceUrl,
|
|
614
693
|
layoutType,
|
|
615
694
|
main,
|
|
616
|
-
content
|
|
695
|
+
content,
|
|
696
|
+
}: {
|
|
697
|
+
locusUrl: string;
|
|
698
|
+
deviceUrl: string;
|
|
699
|
+
layoutType: string;
|
|
700
|
+
main: {
|
|
701
|
+
width: number;
|
|
702
|
+
height: number;
|
|
703
|
+
};
|
|
704
|
+
content: {
|
|
705
|
+
width: number;
|
|
706
|
+
height: number;
|
|
707
|
+
};
|
|
617
708
|
}) {
|
|
618
709
|
// send main/content renderInfo only if both width and height are specified
|
|
619
710
|
if (main && (!main.width || !main.height)) {
|
|
@@ -636,6 +727,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
636
727
|
}
|
|
637
728
|
} : undefined;
|
|
638
729
|
|
|
730
|
+
// @ts-ignore
|
|
639
731
|
return this.request({
|
|
640
732
|
method: HTTP_VERBS.PUT,
|
|
641
733
|
uri: `${locusUrl}/${CONTROLS}`,
|
|
@@ -655,11 +747,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
655
747
|
* @param {Url} options.locusUrl
|
|
656
748
|
* @returns {Promise}
|
|
657
749
|
*/
|
|
658
|
-
endMeetingForAll({
|
|
659
|
-
locusUrl,
|
|
660
|
-
}) {
|
|
750
|
+
endMeetingForAll({ locusUrl }: { locusUrl: string }) {
|
|
661
751
|
const uri = `${locusUrl}/${END}`;
|
|
662
752
|
|
|
753
|
+
// @ts-ignore
|
|
663
754
|
return this.request({
|
|
664
755
|
method: HTTP_VERBS.POST,
|
|
665
756
|
uri
|
|
@@ -672,12 +763,33 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
672
763
|
* @param {Url} options.keepAliveUrl
|
|
673
764
|
* @returns {Promise}
|
|
674
765
|
*/
|
|
675
|
-
keepAlive({
|
|
676
|
-
|
|
677
|
-
}) {
|
|
766
|
+
keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {
|
|
767
|
+
// @ts-ignore
|
|
678
768
|
return this.request({
|
|
679
769
|
method: HTTP_VERBS.GET,
|
|
680
770
|
uri: keepAliveUrl
|
|
681
771
|
});
|
|
682
772
|
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Make a network request to send a reaction.
|
|
776
|
+
* @param {Object} options
|
|
777
|
+
* @param {Url} options.reactionChannelUrl
|
|
778
|
+
* @param {Reaction} options.reaction
|
|
779
|
+
* @param {string} options.senderID
|
|
780
|
+
* @returns {Promise}
|
|
781
|
+
*/
|
|
782
|
+
sendReaction({ reactionChannelUrl, reaction, participantId }: { reactionChannelUrl: string, reaction: Reaction, participantId: string }) {
|
|
783
|
+
const uri = reactionChannelUrl;
|
|
784
|
+
|
|
785
|
+
// @ts-ignore
|
|
786
|
+
return this.request({
|
|
787
|
+
method: HTTP_VERBS.POST,
|
|
788
|
+
uri,
|
|
789
|
+
body: {
|
|
790
|
+
sender: {participantId},
|
|
791
|
+
reaction,
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
}
|
|
683
795
|
}
|
|
@@ -13,7 +13,7 @@ const MeetingStateMachine = {
|
|
|
13
13
|
* @param {Meeting} meetingRef A reference to a meeting instance
|
|
14
14
|
* @returns {StateMachine}
|
|
15
15
|
*/
|
|
16
|
-
create(meetingRef) {
|
|
16
|
+
create(meetingRef: any) {
|
|
17
17
|
if (!meetingRef) {
|
|
18
18
|
throw new ParameterError('You must initialize the meeting state machine with a meeting reference.');
|
|
19
19
|
}
|
|
@@ -44,7 +44,7 @@ const MeetingStateMachine = {
|
|
|
44
44
|
* @param {Boolean} remote.remoteDeclined
|
|
45
45
|
* @returns {String}
|
|
46
46
|
*/
|
|
47
|
-
to(remote) {
|
|
47
|
+
to(remote: { remoteAnswered: boolean; remoteDeclined: boolean }) {
|
|
48
48
|
// other user answered the call
|
|
49
49
|
if (remote.remoteAnswered) {
|
|
50
50
|
return MEETING_STATE_MACHINE.STATES.ANSWERED;
|
|
@@ -114,7 +114,7 @@ const MeetingStateMachine = {
|
|
|
114
114
|
* @param {Object} stop -- {remoteAnswered: {Boolean}, remoteDeclined: {Boolean}}
|
|
115
115
|
* @returns {Boolean}
|
|
116
116
|
*/
|
|
117
|
-
onRemote(transition, stop) {
|
|
117
|
+
onRemote(transition: object, stop: object) {
|
|
118
118
|
if (this.meeting) {
|
|
119
119
|
Trigger.trigger(
|
|
120
120
|
this.meeting,
|
|
@@ -136,7 +136,7 @@ const MeetingStateMachine = {
|
|
|
136
136
|
* @param {String} type -- incoming call === INCOMING / or other meetings have a ring type of JOIN
|
|
137
137
|
* @returns {Boolean}
|
|
138
138
|
*/
|
|
139
|
-
onRing(transition, type) {
|
|
139
|
+
onRing(transition: object, type: string) {
|
|
140
140
|
if (this.meeting) {
|
|
141
141
|
Trigger.trigger(
|
|
142
142
|
this.meeting,
|
|
@@ -158,7 +158,7 @@ const MeetingStateMachine = {
|
|
|
158
158
|
* @param {Error} error
|
|
159
159
|
* @returns {Boolean}
|
|
160
160
|
*/
|
|
161
|
-
onEnterError(transition, error) {
|
|
161
|
+
onEnterError(transition: any, error: Error) {
|
|
162
162
|
LoggerProxy.logger.error(`Meeting:state#onEnterError --> state->onEnterError#meeting.id: ${this.meeting.id} | Transition '${transition?.transition}' : ${transition?.from} -> ${transition?.to}, with error ${error}. Last states: ${this.history}`);
|
|
163
163
|
},
|
|
164
164
|
/**
|
|
@@ -166,7 +166,7 @@ const MeetingStateMachine = {
|
|
|
166
166
|
* @param {Object} transition
|
|
167
167
|
* @returns {Boolean}
|
|
168
168
|
*/
|
|
169
|
-
onAfterTransition(transition) {
|
|
169
|
+
onAfterTransition(transition: any) {
|
|
170
170
|
LoggerProxy.logger.log(`Meeting:state#onAfterTransition --> state->onAfterTransition#meeting.id: ${this.meeting.id} | Transition '${transition.transition}' : ${transition.from} -> ${transition.to} executed. Last states: ${this.history}`);
|
|
171
171
|
}
|
|
172
172
|
},
|