@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.10
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 +1116 -613
- 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 +55 -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/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} +961 -474
- package/src/meeting/{muteState.js → muteState.ts} +16 -11
- package/src/meeting/{request.js → request.ts} +125 -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/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 +585 -245
- package/test/unit/spec/meeting/muteState.js +7 -0
- 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';
|
|
@@ -28,7 +30,9 @@ import {
|
|
|
28
30
|
* @class MeetingRequest
|
|
29
31
|
*/
|
|
30
32
|
export default class MeetingRequest extends StatelessWebexPlugin {
|
|
31
|
-
|
|
33
|
+
changeVideoLayoutDebounced: any;
|
|
34
|
+
|
|
35
|
+
constructor(attrs: any, options: any) {
|
|
32
36
|
super(attrs, options);
|
|
33
37
|
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {leading: true, trailing: true});
|
|
34
38
|
}
|
|
@@ -48,7 +52,23 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
48
52
|
* @param {Object} options.roapMessage
|
|
49
53
|
* @returns {Promise}
|
|
50
54
|
*/
|
|
51
|
-
async joinMeeting(options
|
|
55
|
+
async joinMeeting(options: {
|
|
56
|
+
sipUri: string;
|
|
57
|
+
deviceUrl: string;
|
|
58
|
+
locusUrl: string;
|
|
59
|
+
resourceId: string;
|
|
60
|
+
correlationId: string;
|
|
61
|
+
ensureConversation: boolean;
|
|
62
|
+
moderator: boolean;
|
|
63
|
+
pin: boolean;
|
|
64
|
+
moveToResource: boolean;
|
|
65
|
+
roapMessage: any;
|
|
66
|
+
asResourceOccupant: any;
|
|
67
|
+
inviteeAddress: any;
|
|
68
|
+
meetingNumber: any;
|
|
69
|
+
permissionToken: any;
|
|
70
|
+
preferTranscoding: any;
|
|
71
|
+
}) {
|
|
52
72
|
const {
|
|
53
73
|
asResourceOccupant,
|
|
54
74
|
inviteeAddress,
|
|
@@ -73,10 +93,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
73
93
|
|
|
74
94
|
let url = '';
|
|
75
95
|
|
|
76
|
-
const body = {
|
|
96
|
+
const body: any = {
|
|
77
97
|
asResourceOccupant,
|
|
78
98
|
device: {
|
|
79
99
|
url: deviceUrl,
|
|
100
|
+
// @ts-ignore - config comes from registerPlugin
|
|
80
101
|
deviceType: this.config.meetings.deviceType
|
|
81
102
|
},
|
|
82
103
|
usingResource: resourceId || null,
|
|
@@ -91,8 +112,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
91
112
|
}
|
|
92
113
|
};
|
|
93
114
|
|
|
115
|
+
// @ts-ignore
|
|
94
116
|
if (this.webex.meetings.clientRegion) {
|
|
117
|
+
// @ts-ignore
|
|
95
118
|
body.device.countryCode = this.webex.meetings.clientRegion.countryCode;
|
|
119
|
+
// @ts-ignore
|
|
96
120
|
body.device.regionCode = this.webex.meetings.clientRegion.regionCode;
|
|
97
121
|
}
|
|
98
122
|
|
|
@@ -113,7 +137,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
113
137
|
}
|
|
114
138
|
else if (inviteeAddress || meetingNumber) {
|
|
115
139
|
try {
|
|
140
|
+
// @ts-ignore
|
|
116
141
|
await this.webex.internal.services.waitForCatalog('postauth');
|
|
142
|
+
// @ts-ignore
|
|
117
143
|
url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
|
|
118
144
|
body.invitee = {
|
|
119
145
|
address: inviteeAddress || `wbxmn:${meetingNumber}`
|
|
@@ -139,6 +165,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
139
165
|
body.localMedias = roapMessage.localMedias;
|
|
140
166
|
}
|
|
141
167
|
|
|
168
|
+
/// @ts-ignore
|
|
142
169
|
return this.request({
|
|
143
170
|
method: HTTP_VERBS.POST,
|
|
144
171
|
uri: url,
|
|
@@ -154,14 +181,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
154
181
|
* @returns {Promise}
|
|
155
182
|
* @private
|
|
156
183
|
*/
|
|
157
|
-
refreshCaptcha({
|
|
158
|
-
captchaRefreshUrl,
|
|
159
|
-
captchaId
|
|
160
|
-
}) {
|
|
184
|
+
private refreshCaptcha({ captchaRefreshUrl, captchaId }: { captchaRefreshUrl: string; captchaId: string }) {
|
|
161
185
|
const body = {
|
|
162
186
|
captchaId
|
|
163
187
|
};
|
|
164
188
|
|
|
189
|
+
// @ts-ignore
|
|
165
190
|
return this.request({
|
|
166
191
|
method: HTTP_VERBS.POST,
|
|
167
192
|
uri: captchaRefreshUrl,
|
|
@@ -177,17 +202,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
177
202
|
* Make a network request to add a dial in device
|
|
178
203
|
* @param {Object} options
|
|
179
204
|
* @param {String} options.correlationId
|
|
180
|
-
* @param {String} options.
|
|
205
|
+
* @param {String} options.locusUrl url for the meeting
|
|
181
206
|
* @param {String} options.dialInUrl identifier for the to-be provisioned device
|
|
182
207
|
* @param {String} options.clientUrl identifier for the web device
|
|
183
208
|
* @returns {Promise}
|
|
184
209
|
* @private
|
|
185
210
|
*/
|
|
186
|
-
dialIn({
|
|
211
|
+
private dialIn({
|
|
187
212
|
locusUrl,
|
|
188
213
|
dialInUrl,
|
|
189
214
|
clientUrl,
|
|
190
|
-
correlationId
|
|
215
|
+
correlationId,
|
|
216
|
+
}: {
|
|
217
|
+
correlationId: string;
|
|
218
|
+
locusUrl: string;
|
|
219
|
+
dialInUrl: string;
|
|
220
|
+
clientUrl: string;
|
|
191
221
|
}) {
|
|
192
222
|
LoggerProxy.logger.info(
|
|
193
223
|
'Meeting:request#dialIn --> Provisioning a dial in device',
|
|
@@ -205,6 +235,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
205
235
|
correlationId
|
|
206
236
|
};
|
|
207
237
|
|
|
238
|
+
// @ts-ignore
|
|
208
239
|
return this.request({
|
|
209
240
|
method: HTTP_VERBS.POST,
|
|
210
241
|
uri,
|
|
@@ -220,19 +251,25 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
220
251
|
* Make a network request to add a dial out device
|
|
221
252
|
* @param {Object} options
|
|
222
253
|
* @param {String} options.correlationId
|
|
223
|
-
* @param {String} options.
|
|
254
|
+
* @param {String} options.locusUrl url for the meeting
|
|
224
255
|
* @param {String} options.dialOutUrl identifier for the to-be provisioned device
|
|
225
256
|
* @param {String} options.phoneNumber phone number to dial out to
|
|
226
257
|
* @param {String} options.clientUrl identifier for the web device
|
|
227
258
|
* @returns {Promise}
|
|
228
259
|
* @private
|
|
229
260
|
*/
|
|
230
|
-
dialOut({
|
|
261
|
+
private dialOut({
|
|
231
262
|
locusUrl,
|
|
232
263
|
dialOutUrl,
|
|
233
264
|
phoneNumber,
|
|
234
265
|
clientUrl,
|
|
235
|
-
correlationId
|
|
266
|
+
correlationId,
|
|
267
|
+
}: {
|
|
268
|
+
correlationId: string;
|
|
269
|
+
locusUrl: string;
|
|
270
|
+
dialOutUrl: string;
|
|
271
|
+
phoneNumber: string;
|
|
272
|
+
clientUrl: string;
|
|
236
273
|
}) {
|
|
237
274
|
LoggerProxy.logger.info(
|
|
238
275
|
'Meeting:request#dialOut --> Provisioning a dial out device',
|
|
@@ -251,6 +288,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
251
288
|
correlationId
|
|
252
289
|
};
|
|
253
290
|
|
|
291
|
+
// @ts-ignore
|
|
254
292
|
return this.request({
|
|
255
293
|
method: HTTP_VERBS.POST,
|
|
256
294
|
uri,
|
|
@@ -265,11 +303,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
265
303
|
/**
|
|
266
304
|
* Syns the missed delta event
|
|
267
305
|
* @param {Object} options
|
|
268
|
-
* @param {
|
|
306
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
269
307
|
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
270
308
|
* @returns {Promise}
|
|
271
309
|
*/
|
|
272
|
-
syncMeeting(options) {
|
|
310
|
+
syncMeeting(options: { desync: boolean; syncUrl: string }) {
|
|
273
311
|
/* eslint-disable no-else-return */
|
|
274
312
|
const {desync} = options;
|
|
275
313
|
let {syncUrl} = options;
|
|
@@ -280,6 +318,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
280
318
|
syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat(`${LOCUS.SYNCDEBUG}=${desync}`);
|
|
281
319
|
}
|
|
282
320
|
|
|
321
|
+
// @ts-ignore
|
|
283
322
|
return this.request({
|
|
284
323
|
method: HTTP_VERBS.GET,
|
|
285
324
|
uri: syncUrl
|
|
@@ -294,11 +333,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
294
333
|
/**
|
|
295
334
|
* Request to get the complete locus object
|
|
296
335
|
* @param {Object} options
|
|
297
|
-
* @param {
|
|
336
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
298
337
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
299
338
|
* @returns {Promise}
|
|
300
339
|
*/
|
|
301
|
-
getFullLocus(options) {
|
|
340
|
+
getFullLocus(options: { desync: boolean; locusUrl: string }) {
|
|
302
341
|
let {locusUrl} = options;
|
|
303
342
|
const {desync} = options;
|
|
304
343
|
|
|
@@ -307,6 +346,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
307
346
|
locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;
|
|
308
347
|
}
|
|
309
348
|
|
|
349
|
+
// @ts-ignore
|
|
310
350
|
return this.request({
|
|
311
351
|
method: HTTP_VERBS.GET,
|
|
312
352
|
uri: locusUrl
|
|
@@ -330,11 +370,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
330
370
|
* @returns {Promise}
|
|
331
371
|
* @private
|
|
332
372
|
*/
|
|
333
|
-
disconnectPhoneAudio({
|
|
373
|
+
private disconnectPhoneAudio({
|
|
334
374
|
locusUrl,
|
|
335
375
|
phoneUrl,
|
|
336
376
|
correlationId,
|
|
337
|
-
selfId
|
|
377
|
+
selfId,
|
|
378
|
+
}: {
|
|
379
|
+
locusUrl: string;
|
|
380
|
+
phoneUrl: string;
|
|
381
|
+
correlationId: string;
|
|
382
|
+
selfId: string;
|
|
338
383
|
}) {
|
|
339
384
|
LoggerProxy.logger.info(
|
|
340
385
|
`Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,
|
|
@@ -350,6 +395,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
350
395
|
correlationId
|
|
351
396
|
};
|
|
352
397
|
|
|
398
|
+
// @ts-ignore
|
|
353
399
|
return this.request({
|
|
354
400
|
method: HTTP_VERBS.PUT,
|
|
355
401
|
uri,
|
|
@@ -378,7 +424,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
378
424
|
selfId,
|
|
379
425
|
deviceUrl: url,
|
|
380
426
|
resourceId,
|
|
381
|
-
correlationId
|
|
427
|
+
correlationId,
|
|
428
|
+
}: {
|
|
429
|
+
locusUrl: string;
|
|
430
|
+
selfId: string;
|
|
431
|
+
deviceUrl: string;
|
|
432
|
+
resourceId: string;
|
|
433
|
+
correlationId: string;
|
|
382
434
|
}) {
|
|
383
435
|
LoggerProxy.logger.info(
|
|
384
436
|
'Meeting:request#leaveMeeting --> Leaving a meeting',
|
|
@@ -388,6 +440,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
388
440
|
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
389
441
|
const body = {
|
|
390
442
|
device: {
|
|
443
|
+
// @ts-ignore
|
|
391
444
|
deviceType: this.config.meetings.deviceType,
|
|
392
445
|
url
|
|
393
446
|
},
|
|
@@ -395,6 +448,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
395
448
|
correlationId
|
|
396
449
|
};
|
|
397
450
|
|
|
451
|
+
// @ts-ignore
|
|
398
452
|
return this.request({
|
|
399
453
|
method: HTTP_VERBS.PUT,
|
|
400
454
|
uri,
|
|
@@ -410,16 +464,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
410
464
|
* @param {String} options.correlationId
|
|
411
465
|
* @returns {Promise}
|
|
412
466
|
*/
|
|
413
|
-
acknowledgeMeeting(options) {
|
|
467
|
+
acknowledgeMeeting(options: { locusUrl: string; deviceUrl: string; correlationId: string }) {
|
|
414
468
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
|
|
415
469
|
const body = {
|
|
416
470
|
device: {
|
|
471
|
+
// @ts-ignore
|
|
417
472
|
deviceType: this.config.meetings.deviceType,
|
|
418
473
|
url: options.deviceUrl
|
|
419
474
|
},
|
|
420
475
|
correlationId: options.correlationId
|
|
421
476
|
};
|
|
422
477
|
|
|
478
|
+
// @ts-ignore
|
|
423
479
|
return this.request({
|
|
424
480
|
method: HTTP_VERBS.PUT,
|
|
425
481
|
uri,
|
|
@@ -435,7 +491,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
435
491
|
* @param {String} options.id
|
|
436
492
|
* @returns {Promise}
|
|
437
493
|
*/
|
|
438
|
-
recordMeeting(options) {
|
|
494
|
+
recordMeeting(options: { locusUrl: string; deviceUrl: string; id: string, recording: any, paused: any }) {
|
|
439
495
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
440
496
|
const body = {
|
|
441
497
|
record: {
|
|
@@ -444,6 +500,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
444
500
|
}
|
|
445
501
|
};
|
|
446
502
|
|
|
503
|
+
// @ts-ignore
|
|
447
504
|
return this.request({
|
|
448
505
|
method: HTTP_VERBS.PATCH,
|
|
449
506
|
uri,
|
|
@@ -459,6 +516,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
459
516
|
}
|
|
460
517
|
};
|
|
461
518
|
|
|
519
|
+
// @ts-ignore
|
|
462
520
|
return this.request({
|
|
463
521
|
method: HTTP_VERBS.PATCH,
|
|
464
522
|
uri,
|
|
@@ -474,16 +532,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
474
532
|
* @param {String} options.reason
|
|
475
533
|
* @returns {Promise}
|
|
476
534
|
*/
|
|
477
|
-
declineMeeting(options) {
|
|
535
|
+
declineMeeting(options: { locusUrl: string; deviceUrl: string; reason: string }) {
|
|
478
536
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
|
|
479
537
|
const body = {
|
|
480
538
|
device: {
|
|
539
|
+
// @ts-ignore
|
|
481
540
|
deviceType: this.config.meetings.deviceType,
|
|
482
541
|
url: options.deviceUrl
|
|
483
542
|
},
|
|
484
|
-
...(options.reason && {reason: options.reason})
|
|
543
|
+
...(options.reason && {reason: options.reason}),
|
|
485
544
|
};
|
|
486
545
|
|
|
546
|
+
// @ts-ignore
|
|
487
547
|
return this.request({
|
|
488
548
|
method: HTTP_VERBS.PUT,
|
|
489
549
|
uri,
|
|
@@ -499,12 +559,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
499
559
|
* @param {String} options.deviceUrl Url of a device
|
|
500
560
|
* @param {String} options.resourceId Populated if you are paired to a device
|
|
501
561
|
* @param {String} options.localMedias local sdps
|
|
562
|
+
* @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
|
|
502
563
|
* @returns {Promise}
|
|
503
564
|
*/
|
|
504
|
-
remoteAudioVideoToggle(options
|
|
565
|
+
remoteAudioVideoToggle(options: {
|
|
566
|
+
selfId: string;
|
|
567
|
+
locusUrl: string;
|
|
568
|
+
deviceUrl: string;
|
|
569
|
+
resourceId: string;
|
|
570
|
+
localMedias: string;
|
|
571
|
+
} | any) {
|
|
505
572
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
|
|
506
573
|
const body = {
|
|
507
574
|
device: {
|
|
575
|
+
// @ts-ignore
|
|
508
576
|
deviceType: this.config.meetings.deviceType,
|
|
509
577
|
url: options.deviceUrl
|
|
510
578
|
},
|
|
@@ -517,6 +585,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
517
585
|
}
|
|
518
586
|
};
|
|
519
587
|
|
|
588
|
+
// @ts-ignore
|
|
520
589
|
return this.request({
|
|
521
590
|
method: HTTP_VERBS.PUT,
|
|
522
591
|
uri,
|
|
@@ -534,8 +603,14 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
534
603
|
* @param {String} options.uri floor grant uri
|
|
535
604
|
* @returns {Promise}
|
|
536
605
|
*/
|
|
537
|
-
changeMeetingFloor(options
|
|
538
|
-
|
|
606
|
+
changeMeetingFloor(options: {
|
|
607
|
+
disposition: string;
|
|
608
|
+
personUrl: string;
|
|
609
|
+
deviceUrl: string;
|
|
610
|
+
resourceId: string;
|
|
611
|
+
uri: string;
|
|
612
|
+
} | any) {
|
|
613
|
+
let floorReq: any = {disposition: options.disposition};
|
|
539
614
|
|
|
540
615
|
/* istanbul ignore else */
|
|
541
616
|
if (options.disposition === FLOOR_ACTION.GRANTED) {
|
|
@@ -544,6 +619,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
544
619
|
url: options.personUrl,
|
|
545
620
|
devices: [
|
|
546
621
|
{
|
|
622
|
+
// @ts-ignore
|
|
547
623
|
deviceType: this.config.meetings.deviceType,
|
|
548
624
|
url: options.deviceUrl
|
|
549
625
|
}
|
|
@@ -556,7 +632,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
556
632
|
};
|
|
557
633
|
}
|
|
558
634
|
|
|
559
|
-
const body = {
|
|
635
|
+
const body: any = {
|
|
560
636
|
floor: floorReq,
|
|
561
637
|
resourceUrl: options.resourceUrl
|
|
562
638
|
};
|
|
@@ -565,6 +641,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
565
641
|
body.resourceToken = options?.resourceToken;
|
|
566
642
|
}
|
|
567
643
|
|
|
644
|
+
// @ts-ignore
|
|
568
645
|
return this.request({
|
|
569
646
|
uri: options.uri,
|
|
570
647
|
method: HTTP_VERBS.PUT,
|
|
@@ -580,7 +657,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
580
657
|
* @param {String} options.tones a string of one or more DTMF tones to send
|
|
581
658
|
* @returns {Promise}
|
|
582
659
|
*/
|
|
583
|
-
sendDTMF({locusUrl, deviceUrl, tones}) {
|
|
660
|
+
sendDTMF({ locusUrl, deviceUrl, tones }: { locusUrl: string; deviceUrl: string; tones: string }) {
|
|
661
|
+
// @ts-ignore
|
|
584
662
|
return this.request({
|
|
585
663
|
method: HTTP_VERBS.POST,
|
|
586
664
|
uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
|
|
@@ -613,7 +691,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
613
691
|
deviceUrl,
|
|
614
692
|
layoutType,
|
|
615
693
|
main,
|
|
616
|
-
content
|
|
694
|
+
content,
|
|
695
|
+
}: {
|
|
696
|
+
locusUrl: string;
|
|
697
|
+
deviceUrl: string;
|
|
698
|
+
layoutType: string;
|
|
699
|
+
main: {
|
|
700
|
+
width: number;
|
|
701
|
+
height: number;
|
|
702
|
+
};
|
|
703
|
+
content: {
|
|
704
|
+
width: number;
|
|
705
|
+
height: number;
|
|
706
|
+
};
|
|
617
707
|
}) {
|
|
618
708
|
// send main/content renderInfo only if both width and height are specified
|
|
619
709
|
if (main && (!main.width || !main.height)) {
|
|
@@ -636,6 +726,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
636
726
|
}
|
|
637
727
|
} : undefined;
|
|
638
728
|
|
|
729
|
+
// @ts-ignore
|
|
639
730
|
return this.request({
|
|
640
731
|
method: HTTP_VERBS.PUT,
|
|
641
732
|
uri: `${locusUrl}/${CONTROLS}`,
|
|
@@ -655,11 +746,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
655
746
|
* @param {Url} options.locusUrl
|
|
656
747
|
* @returns {Promise}
|
|
657
748
|
*/
|
|
658
|
-
endMeetingForAll({
|
|
659
|
-
locusUrl,
|
|
660
|
-
}) {
|
|
749
|
+
endMeetingForAll({ locusUrl }: { locusUrl: string }) {
|
|
661
750
|
const uri = `${locusUrl}/${END}`;
|
|
662
751
|
|
|
752
|
+
// @ts-ignore
|
|
663
753
|
return this.request({
|
|
664
754
|
method: HTTP_VERBS.POST,
|
|
665
755
|
uri
|
|
@@ -672,9 +762,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
672
762
|
* @param {Url} options.keepAliveUrl
|
|
673
763
|
* @returns {Promise}
|
|
674
764
|
*/
|
|
675
|
-
keepAlive({
|
|
676
|
-
|
|
677
|
-
}) {
|
|
765
|
+
keepAlive({ keepAliveUrl }: { keepAliveUrl: string }) {
|
|
766
|
+
// @ts-ignore
|
|
678
767
|
return this.request({
|
|
679
768
|
method: HTTP_VERBS.GET,
|
|
680
769
|
uri: keepAliveUrl
|
|
@@ -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
|
},
|