@webex/plugin-meetings 3.0.0-beta.2 → 3.0.0-beta.21
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/breakouts/breakout.js +116 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/index.js +226 -0
- package/dist/breakouts/index.js.map +1 -0
- 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 +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- 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 +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- 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 +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +6 -41
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- 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 +37 -60
- 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 +6 -6
- package/dist/config.js.map +1 -1
- package/dist/constants.js +88 -46
- package/dist/constants.js.map +1 -1
- package/dist/index.js +4 -18
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +12 -29
- 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 +184 -190
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -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 +92 -118
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +34 -91
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +67 -111
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +80 -114
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- 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 +125 -190
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1692 -1925
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +36 -77
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +224 -230
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +43 -215
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +14 -32
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +193 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- 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 +5 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +490 -560
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +24 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +99 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +78 -86
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +31 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +3 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +93 -200
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +16 -39
- 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 +55 -135
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +57 -32
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/multistreamMedia.js +15 -21
- package/dist/multistream/multistreamMedia.js.map +1 -1
- package/dist/multistream/receiveSlot.js +10 -50
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +45 -82
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +18 -58
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +362 -416
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +36 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- 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 +138 -182
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +3 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +322 -455
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +39 -64
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +94 -113
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +85 -94
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +0 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +85 -175
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +72 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +25 -20
- package/src/breakouts/README.md +190 -0
- package/src/breakouts/breakout.ts +110 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/index.ts +225 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +8 -7
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +22 -9
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +17 -12
- package/src/constants.ts +40 -1
- package/src/index.js +2 -1
- package/src/locus-info/controlsUtils.ts +114 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +148 -64
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +17 -17
- package/src/locus-info/{parser.js → parser.ts} +67 -79
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +123 -68
- package/src/media/{index.js → index.ts} +181 -131
- package/src/media/{properties.js → properties.ts} +47 -28
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/{config.js → config.ts} +46 -46
- package/src/meeting/{effectsState.js → effectsState.ts} +47 -41
- package/src/meeting/in-meeting-actions.ts +15 -3
- package/src/meeting/{index.js → index.ts} +2263 -1427
- package/src/meeting/{muteState.js → muteState.ts} +78 -42
- package/src/meeting/{request.js → request.ts} +292 -142
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/{util.js → util.ts} +112 -115
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/{index.js → index.ts} +42 -36
- package/src/meeting-info/meeting-info-v2.ts +273 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +65 -58
- package/src/meetings/{collection.js → collection.ts} +6 -3
- package/src/meetings/index.ts +1159 -0
- package/src/meetings/{request.js → request.ts} +32 -25
- package/src/meetings/{util.js → util.ts} +34 -32
- package/src/member/{index.js → index.ts} +102 -56
- package/src/member/{util.js → util.ts} +52 -25
- package/src/members/{collection.js → collection.ts} +2 -2
- package/src/members/{index.js → index.ts} +219 -142
- package/src/members/{request.js → request.ts} +60 -16
- package/src/members/{util.js → util.ts} +50 -48
- package/src/metrics/{config.js → config.ts} +254 -83
- package/src/metrics/{constants.js → constants.ts} +0 -2
- package/src/metrics/{index.js → index.ts} +106 -74
- package/src/multistream/mediaRequestManager.ts +81 -15
- package/src/multistream/multistreamMedia.ts +5 -0
- package/src/multistream/receiveSlot.ts +18 -12
- package/src/multistream/receiveSlotManager.ts +23 -21
- package/src/multistream/remoteMedia.ts +15 -5
- package/src/multistream/remoteMediaGroup.ts +4 -3
- package/src/multistream/remoteMediaManager.ts +153 -37
- package/src/networkQualityMonitor/{index.js → index.ts} +37 -25
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/{index.js → index.ts} +99 -83
- package/src/reachability/request.ts +39 -33
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +195 -102
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/{index.js → index.ts} +73 -56
- package/src/roap/request.ts +157 -0
- package/src/roap/turnDiscovery.ts +77 -37
- package/src/statsAnalyzer/{global.js → global.ts} +30 -33
- package/src/statsAnalyzer/{index.js → index.ts} +468 -192
- package/src/statsAnalyzer/mqaUtil.ts +290 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/journey.js +664 -463
- package/test/integration/spec/space-meeting.js +320 -206
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/breakouts/breakout.ts +119 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/index.ts +293 -0
- 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 +25 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +104 -2
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- 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 +97 -103
- package/test/unit/spec/locus-info/selfUtils.js +105 -12
- package/test/unit/spec/media/index.ts +31 -47
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/effectsState.js +39 -45
- package/test/unit/spec/meeting/in-meeting-actions.ts +5 -2
- package/test/unit/spec/meeting/index.js +2017 -742
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +115 -44
- package/test/unit/spec/meeting/utils.js +104 -171
- 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 +439 -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 +31 -7
- package/test/unit/spec/members/index.js +104 -54
- 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/multistream/mediaRequestManager.ts +316 -50
- package/test/unit/spec/multistream/receiveSlot.ts +6 -6
- package/test/unit/spec/multistream/receiveSlotManager.ts +13 -13
- package/test/unit/spec/multistream/remoteMedia.ts +10 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +412 -65
- package/test/unit/spec/networkQualityMonitor/index.js +21 -15
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +58 -26
- package/test/unit/spec/reconnection-manager/index.js +102 -9
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +2 -1
- package/test/unit/spec/roap/request.ts +114 -0
- package/test/unit/spec/roap/turnDiscovery.ts +64 -45
- package/test/unit/spec/stats-analyzer/index.js +27 -22
- 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 +54 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
|
@@ -1,12 +1,15 @@
|
|
|
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';
|
|
7
9
|
import {
|
|
8
10
|
ALERT,
|
|
9
11
|
ALTERNATE_REDIRECT_TRUE,
|
|
12
|
+
BREAKOUTS,
|
|
10
13
|
CALL,
|
|
11
14
|
CONTROLS,
|
|
12
15
|
DECLINE,
|
|
@@ -21,16 +24,23 @@ import {
|
|
|
21
24
|
PROVISIONAL_TYPE_DIAL_IN,
|
|
22
25
|
PROVISIONAL_TYPE_DIAL_OUT,
|
|
23
26
|
SEND_DTMF_ENDPOINT,
|
|
24
|
-
_SLIDES_
|
|
27
|
+
_SLIDES_,
|
|
25
28
|
} from '../constants';
|
|
29
|
+
import {Reaction} from '../reactions/reactions.type';
|
|
30
|
+
import {SendReactionOptions, ToggleReactionsOptions} from './request.type';
|
|
26
31
|
|
|
27
32
|
/**
|
|
28
33
|
* @class MeetingRequest
|
|
29
34
|
*/
|
|
30
35
|
export default class MeetingRequest extends StatelessWebexPlugin {
|
|
31
|
-
|
|
36
|
+
changeVideoLayoutDebounced: any;
|
|
37
|
+
|
|
38
|
+
constructor(attrs: any, options: any) {
|
|
32
39
|
super(attrs, options);
|
|
33
|
-
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
40
|
+
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
41
|
+
leading: true,
|
|
42
|
+
trailing: true,
|
|
43
|
+
});
|
|
34
44
|
}
|
|
35
45
|
|
|
36
46
|
/**
|
|
@@ -46,9 +56,27 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
46
56
|
* @param {boolean} options.pin
|
|
47
57
|
* @param {boolean} options.moveToResource
|
|
48
58
|
* @param {Object} options.roapMessage
|
|
59
|
+
* @param {boolean} options.breakoutsSupported
|
|
49
60
|
* @returns {Promise}
|
|
50
61
|
*/
|
|
51
|
-
async joinMeeting(options
|
|
62
|
+
async joinMeeting(options: {
|
|
63
|
+
sipUri: string;
|
|
64
|
+
deviceUrl: string;
|
|
65
|
+
locusUrl: string;
|
|
66
|
+
resourceId: string;
|
|
67
|
+
correlationId: string;
|
|
68
|
+
ensureConversation: boolean;
|
|
69
|
+
moderator: boolean;
|
|
70
|
+
pin: boolean;
|
|
71
|
+
moveToResource: boolean;
|
|
72
|
+
roapMessage: any;
|
|
73
|
+
asResourceOccupant: any;
|
|
74
|
+
inviteeAddress: any;
|
|
75
|
+
meetingNumber: any;
|
|
76
|
+
permissionToken: any;
|
|
77
|
+
preferTranscoding: any;
|
|
78
|
+
breakoutsSupported: boolean;
|
|
79
|
+
}) {
|
|
52
80
|
const {
|
|
53
81
|
asResourceOccupant,
|
|
54
82
|
inviteeAddress,
|
|
@@ -63,36 +91,42 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
63
91
|
pin,
|
|
64
92
|
moveToResource,
|
|
65
93
|
roapMessage,
|
|
66
|
-
preferTranscoding
|
|
94
|
+
preferTranscoding,
|
|
95
|
+
breakoutsSupported,
|
|
67
96
|
} = options;
|
|
68
97
|
|
|
69
|
-
LoggerProxy.logger.info(
|
|
70
|
-
'Meeting:request#joinMeeting --> Joining a meeting',
|
|
71
|
-
correlationId
|
|
72
|
-
);
|
|
98
|
+
LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
|
|
73
99
|
|
|
74
100
|
let url = '';
|
|
75
101
|
|
|
76
|
-
const body = {
|
|
102
|
+
const body: any = {
|
|
77
103
|
asResourceOccupant,
|
|
78
104
|
device: {
|
|
79
105
|
url: deviceUrl,
|
|
80
|
-
|
|
106
|
+
// @ts-ignore - config comes from registerPlugin
|
|
107
|
+
deviceType: this.config.meetings.deviceType,
|
|
81
108
|
},
|
|
82
109
|
usingResource: resourceId || null,
|
|
83
|
-
moveMediaToResource: resourceId && moveToResource || false,
|
|
110
|
+
moveMediaToResource: (resourceId && moveToResource) || false,
|
|
84
111
|
correlationId,
|
|
85
112
|
respOnlySdp: true,
|
|
86
113
|
allowMultiDevice: true,
|
|
87
114
|
ensureConversation: ensureConversation || false,
|
|
88
115
|
supportsNativeLobby: 1,
|
|
89
116
|
clientMediaPreferences: {
|
|
90
|
-
preferTranscoding: preferTranscoding ?? true
|
|
91
|
-
}
|
|
117
|
+
preferTranscoding: preferTranscoding ?? true,
|
|
118
|
+
},
|
|
92
119
|
};
|
|
93
120
|
|
|
121
|
+
if (breakoutsSupported) {
|
|
122
|
+
body.deviceCapabilities = [BREAKOUTS.BREAKOUTS_SUPPORTED];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// @ts-ignore
|
|
94
126
|
if (this.webex.meetings.clientRegion) {
|
|
127
|
+
// @ts-ignore
|
|
95
128
|
body.device.countryCode = this.webex.meetings.clientRegion.countryCode;
|
|
129
|
+
// @ts-ignore
|
|
96
130
|
body.device.regionCode = this.webex.meetings.clientRegion.regionCode;
|
|
97
131
|
}
|
|
98
132
|
|
|
@@ -110,28 +144,29 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
110
144
|
|
|
111
145
|
if (locusUrl) {
|
|
112
146
|
url = `${locusUrl}/${PARTICIPANT}`;
|
|
113
|
-
}
|
|
114
|
-
else if (inviteeAddress || meetingNumber) {
|
|
147
|
+
} else if (inviteeAddress || meetingNumber) {
|
|
115
148
|
try {
|
|
149
|
+
// @ts-ignore
|
|
116
150
|
await this.webex.internal.services.waitForCatalog('postauth');
|
|
151
|
+
// @ts-ignore
|
|
117
152
|
url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;
|
|
118
153
|
body.invitee = {
|
|
119
|
-
address: inviteeAddress || `wbxmn:${meetingNumber}
|
|
154
|
+
address: inviteeAddress || `wbxmn:${meetingNumber}`,
|
|
120
155
|
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
156
|
+
} catch (e) {
|
|
157
|
+
LoggerProxy.logger.error(
|
|
158
|
+
`Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`
|
|
159
|
+
);
|
|
160
|
+
throw e;
|
|
125
161
|
}
|
|
126
162
|
}
|
|
127
163
|
|
|
128
|
-
|
|
129
164
|
// TODO: -- this will be resolved in SDK request
|
|
130
165
|
url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);
|
|
131
166
|
|
|
132
167
|
if (resourceId === inviteeAddress) {
|
|
133
168
|
body.callPreferences = {
|
|
134
|
-
requestedMedia: [_SLIDES_]
|
|
169
|
+
requestedMedia: [_SLIDES_],
|
|
135
170
|
};
|
|
136
171
|
}
|
|
137
172
|
|
|
@@ -139,10 +174,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
139
174
|
body.localMedias = roapMessage.localMedias;
|
|
140
175
|
}
|
|
141
176
|
|
|
177
|
+
/// @ts-ignore
|
|
142
178
|
return this.request({
|
|
143
179
|
method: HTTP_VERBS.POST,
|
|
144
180
|
uri: url,
|
|
145
|
-
body
|
|
181
|
+
body,
|
|
146
182
|
});
|
|
147
183
|
}
|
|
148
184
|
|
|
@@ -154,18 +190,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
154
190
|
* @returns {Promise}
|
|
155
191
|
* @private
|
|
156
192
|
*/
|
|
157
|
-
refreshCaptcha({
|
|
193
|
+
private refreshCaptcha({
|
|
158
194
|
captchaRefreshUrl,
|
|
159
|
-
captchaId
|
|
195
|
+
captchaId,
|
|
196
|
+
}: {
|
|
197
|
+
captchaRefreshUrl: string;
|
|
198
|
+
captchaId: string;
|
|
160
199
|
}) {
|
|
161
200
|
const body = {
|
|
162
|
-
captchaId
|
|
201
|
+
captchaId,
|
|
163
202
|
};
|
|
164
203
|
|
|
204
|
+
// @ts-ignore
|
|
165
205
|
return this.request({
|
|
166
206
|
method: HTTP_VERBS.POST,
|
|
167
207
|
uri: captchaRefreshUrl,
|
|
168
|
-
body
|
|
208
|
+
body,
|
|
169
209
|
}).catch((err) => {
|
|
170
210
|
LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);
|
|
171
211
|
|
|
@@ -177,17 +217,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
177
217
|
* Make a network request to add a dial in device
|
|
178
218
|
* @param {Object} options
|
|
179
219
|
* @param {String} options.correlationId
|
|
180
|
-
* @param {String} options.
|
|
220
|
+
* @param {String} options.locusUrl url for the meeting
|
|
181
221
|
* @param {String} options.dialInUrl identifier for the to-be provisioned device
|
|
182
222
|
* @param {String} options.clientUrl identifier for the web device
|
|
183
223
|
* @returns {Promise}
|
|
184
224
|
* @private
|
|
185
225
|
*/
|
|
186
|
-
dialIn({
|
|
226
|
+
private dialIn({
|
|
187
227
|
locusUrl,
|
|
188
228
|
dialInUrl,
|
|
189
229
|
clientUrl,
|
|
190
|
-
correlationId
|
|
230
|
+
correlationId,
|
|
231
|
+
}: {
|
|
232
|
+
correlationId: string;
|
|
233
|
+
locusUrl: string;
|
|
234
|
+
dialInUrl: string;
|
|
235
|
+
clientUrl: string;
|
|
191
236
|
}) {
|
|
192
237
|
LoggerProxy.logger.info(
|
|
193
238
|
'Meeting:request#dialIn --> Provisioning a dial in device',
|
|
@@ -200,17 +245,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
200
245
|
deviceType: deviceType.PROVISIONAL,
|
|
201
246
|
provisionalType: PROVISIONAL_TYPE_DIAL_IN,
|
|
202
247
|
url: dialInUrl,
|
|
203
|
-
clientUrl
|
|
248
|
+
clientUrl,
|
|
204
249
|
},
|
|
205
|
-
correlationId
|
|
250
|
+
correlationId,
|
|
206
251
|
};
|
|
207
252
|
|
|
253
|
+
// @ts-ignore
|
|
208
254
|
return this.request({
|
|
209
255
|
method: HTTP_VERBS.POST,
|
|
210
256
|
uri,
|
|
211
|
-
body
|
|
257
|
+
body,
|
|
212
258
|
}).catch((err) => {
|
|
213
|
-
LoggerProxy.logger.error(
|
|
259
|
+
LoggerProxy.logger.error(
|
|
260
|
+
`Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`
|
|
261
|
+
);
|
|
214
262
|
|
|
215
263
|
throw err;
|
|
216
264
|
});
|
|
@@ -220,19 +268,25 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
220
268
|
* Make a network request to add a dial out device
|
|
221
269
|
* @param {Object} options
|
|
222
270
|
* @param {String} options.correlationId
|
|
223
|
-
* @param {String} options.
|
|
271
|
+
* @param {String} options.locusUrl url for the meeting
|
|
224
272
|
* @param {String} options.dialOutUrl identifier for the to-be provisioned device
|
|
225
273
|
* @param {String} options.phoneNumber phone number to dial out to
|
|
226
274
|
* @param {String} options.clientUrl identifier for the web device
|
|
227
275
|
* @returns {Promise}
|
|
228
276
|
* @private
|
|
229
277
|
*/
|
|
230
|
-
dialOut({
|
|
278
|
+
private dialOut({
|
|
231
279
|
locusUrl,
|
|
232
280
|
dialOutUrl,
|
|
233
281
|
phoneNumber,
|
|
234
282
|
clientUrl,
|
|
235
|
-
correlationId
|
|
283
|
+
correlationId,
|
|
284
|
+
}: {
|
|
285
|
+
correlationId: string;
|
|
286
|
+
locusUrl: string;
|
|
287
|
+
dialOutUrl: string;
|
|
288
|
+
phoneNumber: string;
|
|
289
|
+
clientUrl: string;
|
|
236
290
|
}) {
|
|
237
291
|
LoggerProxy.logger.info(
|
|
238
292
|
'Meeting:request#dialOut --> Provisioning a dial out device',
|
|
@@ -246,17 +300,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
246
300
|
provisionalType: PROVISIONAL_TYPE_DIAL_OUT,
|
|
247
301
|
url: dialOutUrl,
|
|
248
302
|
dialoutAddress: phoneNumber,
|
|
249
|
-
clientUrl
|
|
303
|
+
clientUrl,
|
|
250
304
|
},
|
|
251
|
-
correlationId
|
|
305
|
+
correlationId,
|
|
252
306
|
};
|
|
253
307
|
|
|
308
|
+
// @ts-ignore
|
|
254
309
|
return this.request({
|
|
255
310
|
method: HTTP_VERBS.POST,
|
|
256
311
|
uri,
|
|
257
|
-
body
|
|
312
|
+
body,
|
|
258
313
|
}).catch((err) => {
|
|
259
|
-
LoggerProxy.logger.error(
|
|
314
|
+
LoggerProxy.logger.error(
|
|
315
|
+
`Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`
|
|
316
|
+
);
|
|
260
317
|
|
|
261
318
|
throw err;
|
|
262
319
|
});
|
|
@@ -265,11 +322,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
265
322
|
/**
|
|
266
323
|
* Syns the missed delta event
|
|
267
324
|
* @param {Object} options
|
|
268
|
-
* @param {
|
|
325
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
269
326
|
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
270
327
|
* @returns {Promise}
|
|
271
328
|
*/
|
|
272
|
-
syncMeeting(options) {
|
|
329
|
+
syncMeeting(options: {desync: boolean; syncUrl: string}) {
|
|
273
330
|
/* eslint-disable no-else-return */
|
|
274
331
|
const {desync} = options;
|
|
275
332
|
let {syncUrl} = options;
|
|
@@ -277,15 +334,20 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
277
334
|
/* istanbul ignore else */
|
|
278
335
|
if (desync) {
|
|
279
336
|
// check for existing URL parameters
|
|
280
|
-
syncUrl = syncUrl
|
|
337
|
+
syncUrl = syncUrl
|
|
338
|
+
.concat(syncUrl.split('?')[1] ? '&' : '?')
|
|
339
|
+
.concat(`${LOCUS.SYNCDEBUG}=${desync}`);
|
|
281
340
|
}
|
|
282
341
|
|
|
342
|
+
// @ts-ignore
|
|
283
343
|
return this.request({
|
|
284
344
|
method: HTTP_VERBS.GET,
|
|
285
|
-
uri: syncUrl
|
|
345
|
+
uri: syncUrl,
|
|
286
346
|
}) // TODO: Handle if delta sync failed . Get the full locus object
|
|
287
347
|
.catch((err) => {
|
|
288
|
-
LoggerProxy.logger.error(
|
|
348
|
+
LoggerProxy.logger.error(
|
|
349
|
+
`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`
|
|
350
|
+
);
|
|
289
351
|
|
|
290
352
|
return err;
|
|
291
353
|
});
|
|
@@ -294,11 +356,11 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
294
356
|
/**
|
|
295
357
|
* Request to get the complete locus object
|
|
296
358
|
* @param {Object} options
|
|
297
|
-
* @param {
|
|
359
|
+
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
298
360
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
299
361
|
* @returns {Promise}
|
|
300
362
|
*/
|
|
301
|
-
getFullLocus(options) {
|
|
363
|
+
getFullLocus(options: {desync: boolean; locusUrl: string}) {
|
|
302
364
|
let {locusUrl} = options;
|
|
303
365
|
const {desync} = options;
|
|
304
366
|
|
|
@@ -307,11 +369,14 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
307
369
|
locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;
|
|
308
370
|
}
|
|
309
371
|
|
|
372
|
+
// @ts-ignore
|
|
310
373
|
return this.request({
|
|
311
374
|
method: HTTP_VERBS.GET,
|
|
312
|
-
uri: locusUrl
|
|
375
|
+
uri: locusUrl,
|
|
313
376
|
}).catch((err) => {
|
|
314
|
-
LoggerProxy.logger.error(
|
|
377
|
+
LoggerProxy.logger.error(
|
|
378
|
+
`Meeting:request#getFullLocus --> Error getting full locus, error ${err}`
|
|
379
|
+
);
|
|
315
380
|
|
|
316
381
|
return err;
|
|
317
382
|
});
|
|
@@ -330,11 +395,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
330
395
|
* @returns {Promise}
|
|
331
396
|
* @private
|
|
332
397
|
*/
|
|
333
|
-
disconnectPhoneAudio({
|
|
398
|
+
private disconnectPhoneAudio({
|
|
334
399
|
locusUrl,
|
|
335
400
|
phoneUrl,
|
|
336
401
|
correlationId,
|
|
337
|
-
selfId
|
|
402
|
+
selfId,
|
|
403
|
+
}: {
|
|
404
|
+
locusUrl: string;
|
|
405
|
+
phoneUrl: string;
|
|
406
|
+
correlationId: string;
|
|
407
|
+
selfId: string;
|
|
338
408
|
}) {
|
|
339
409
|
LoggerProxy.logger.info(
|
|
340
410
|
`Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,
|
|
@@ -345,15 +415,16 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
345
415
|
const body = {
|
|
346
416
|
device: {
|
|
347
417
|
deviceType: deviceType.PROVISIONAL,
|
|
348
|
-
url: phoneUrl
|
|
418
|
+
url: phoneUrl,
|
|
349
419
|
},
|
|
350
|
-
correlationId
|
|
420
|
+
correlationId,
|
|
351
421
|
};
|
|
352
422
|
|
|
423
|
+
// @ts-ignore
|
|
353
424
|
return this.request({
|
|
354
425
|
method: HTTP_VERBS.PUT,
|
|
355
426
|
uri,
|
|
356
|
-
body
|
|
427
|
+
body,
|
|
357
428
|
}).catch((err) => {
|
|
358
429
|
LoggerProxy.logger.error(
|
|
359
430
|
`Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`
|
|
@@ -378,27 +449,32 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
378
449
|
selfId,
|
|
379
450
|
deviceUrl: url,
|
|
380
451
|
resourceId,
|
|
381
|
-
correlationId
|
|
452
|
+
correlationId,
|
|
453
|
+
}: {
|
|
454
|
+
locusUrl: string;
|
|
455
|
+
selfId: string;
|
|
456
|
+
deviceUrl: string;
|
|
457
|
+
resourceId: string;
|
|
458
|
+
correlationId: string;
|
|
382
459
|
}) {
|
|
383
|
-
LoggerProxy.logger.info(
|
|
384
|
-
'Meeting:request#leaveMeeting --> Leaving a meeting',
|
|
385
|
-
correlationId
|
|
386
|
-
);
|
|
460
|
+
LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
|
|
387
461
|
|
|
388
462
|
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
389
463
|
const body = {
|
|
390
464
|
device: {
|
|
465
|
+
// @ts-ignore
|
|
391
466
|
deviceType: this.config.meetings.deviceType,
|
|
392
|
-
url
|
|
467
|
+
url,
|
|
393
468
|
},
|
|
394
469
|
usingResource: resourceId || null,
|
|
395
|
-
correlationId
|
|
470
|
+
correlationId,
|
|
396
471
|
};
|
|
397
472
|
|
|
473
|
+
// @ts-ignore
|
|
398
474
|
return this.request({
|
|
399
475
|
method: HTTP_VERBS.PUT,
|
|
400
476
|
uri,
|
|
401
|
-
body
|
|
477
|
+
body,
|
|
402
478
|
});
|
|
403
479
|
}
|
|
404
480
|
|
|
@@ -410,44 +486,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
410
486
|
* @param {String} options.correlationId
|
|
411
487
|
* @returns {Promise}
|
|
412
488
|
*/
|
|
413
|
-
acknowledgeMeeting(options) {
|
|
489
|
+
acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {
|
|
414
490
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;
|
|
415
491
|
const body = {
|
|
416
492
|
device: {
|
|
493
|
+
// @ts-ignore
|
|
417
494
|
deviceType: this.config.meetings.deviceType,
|
|
418
|
-
url: options.deviceUrl
|
|
495
|
+
url: options.deviceUrl,
|
|
419
496
|
},
|
|
420
|
-
correlationId: options.correlationId
|
|
497
|
+
correlationId: options.correlationId,
|
|
421
498
|
};
|
|
422
499
|
|
|
500
|
+
// @ts-ignore
|
|
423
501
|
return this.request({
|
|
424
502
|
method: HTTP_VERBS.PUT,
|
|
425
503
|
uri,
|
|
426
|
-
body
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Make a network request to acknowledge a meeting
|
|
432
|
-
* @param {Object} options
|
|
433
|
-
* @param {String} options.locusUrl
|
|
434
|
-
* @param {String} options.deviceUrl
|
|
435
|
-
* @param {String} options.id
|
|
436
|
-
* @returns {Promise}
|
|
437
|
-
*/
|
|
438
|
-
recordMeeting(options) {
|
|
439
|
-
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
440
|
-
const body = {
|
|
441
|
-
record: {
|
|
442
|
-
recording: options.recording,
|
|
443
|
-
paused: options.paused
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
|
|
447
|
-
return this.request({
|
|
448
|
-
method: HTTP_VERBS.PATCH,
|
|
449
|
-
uri,
|
|
450
|
-
body
|
|
504
|
+
body,
|
|
451
505
|
});
|
|
452
506
|
}
|
|
453
507
|
|
|
@@ -455,14 +509,15 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
455
509
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
456
510
|
const body = {
|
|
457
511
|
lock: {
|
|
458
|
-
locked: options.lock
|
|
459
|
-
}
|
|
512
|
+
locked: options.lock,
|
|
513
|
+
},
|
|
460
514
|
};
|
|
461
515
|
|
|
516
|
+
// @ts-ignore
|
|
462
517
|
return this.request({
|
|
463
518
|
method: HTTP_VERBS.PATCH,
|
|
464
519
|
uri,
|
|
465
|
-
body
|
|
520
|
+
body,
|
|
466
521
|
});
|
|
467
522
|
}
|
|
468
523
|
|
|
@@ -474,20 +529,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
474
529
|
* @param {String} options.reason
|
|
475
530
|
* @returns {Promise}
|
|
476
531
|
*/
|
|
477
|
-
declineMeeting(options) {
|
|
532
|
+
declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {
|
|
478
533
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;
|
|
479
534
|
const body = {
|
|
480
535
|
device: {
|
|
536
|
+
// @ts-ignore
|
|
481
537
|
deviceType: this.config.meetings.deviceType,
|
|
482
|
-
url: options.deviceUrl
|
|
538
|
+
url: options.deviceUrl,
|
|
483
539
|
},
|
|
484
|
-
...(options.reason && {reason: options.reason})
|
|
540
|
+
...(options.reason && {reason: options.reason}),
|
|
485
541
|
};
|
|
486
542
|
|
|
543
|
+
// @ts-ignore
|
|
487
544
|
return this.request({
|
|
488
545
|
method: HTTP_VERBS.PUT,
|
|
489
546
|
uri,
|
|
490
|
-
body
|
|
547
|
+
body,
|
|
491
548
|
});
|
|
492
549
|
}
|
|
493
550
|
|
|
@@ -502,26 +559,38 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
502
559
|
* @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
|
|
503
560
|
* @returns {Promise}
|
|
504
561
|
*/
|
|
505
|
-
remoteAudioVideoToggle(
|
|
562
|
+
remoteAudioVideoToggle(
|
|
563
|
+
options:
|
|
564
|
+
| {
|
|
565
|
+
selfId: string;
|
|
566
|
+
locusUrl: string;
|
|
567
|
+
deviceUrl: string;
|
|
568
|
+
resourceId: string;
|
|
569
|
+
localMedias: string;
|
|
570
|
+
}
|
|
571
|
+
| any
|
|
572
|
+
) {
|
|
506
573
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
|
|
507
574
|
const body = {
|
|
508
575
|
device: {
|
|
576
|
+
// @ts-ignore
|
|
509
577
|
deviceType: this.config.meetings.deviceType,
|
|
510
|
-
url: options.deviceUrl
|
|
578
|
+
url: options.deviceUrl,
|
|
511
579
|
},
|
|
512
580
|
usingResource: options.resourceId || null,
|
|
513
581
|
correlationId: options.correlationId,
|
|
514
582
|
respOnlySdp: true,
|
|
515
583
|
localMedias: options.localMedias,
|
|
516
584
|
clientMediaPreferences: {
|
|
517
|
-
preferTranscoding: options.preferTranscoding ?? true
|
|
518
|
-
}
|
|
585
|
+
preferTranscoding: options.preferTranscoding ?? true,
|
|
586
|
+
},
|
|
519
587
|
};
|
|
520
588
|
|
|
589
|
+
// @ts-ignore
|
|
521
590
|
return this.request({
|
|
522
591
|
method: HTTP_VERBS.PUT,
|
|
523
592
|
uri,
|
|
524
|
-
body
|
|
593
|
+
body,
|
|
525
594
|
});
|
|
526
595
|
}
|
|
527
596
|
|
|
@@ -535,8 +604,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
535
604
|
* @param {String} options.uri floor grant uri
|
|
536
605
|
* @returns {Promise}
|
|
537
606
|
*/
|
|
538
|
-
changeMeetingFloor(
|
|
539
|
-
|
|
607
|
+
changeMeetingFloor(
|
|
608
|
+
options:
|
|
609
|
+
| {
|
|
610
|
+
disposition: string;
|
|
611
|
+
personUrl: string;
|
|
612
|
+
deviceUrl: string;
|
|
613
|
+
resourceId: string;
|
|
614
|
+
uri: string;
|
|
615
|
+
}
|
|
616
|
+
| any
|
|
617
|
+
) {
|
|
618
|
+
let floorReq: any = {disposition: options.disposition};
|
|
540
619
|
|
|
541
620
|
/* istanbul ignore else */
|
|
542
621
|
if (options.disposition === FLOOR_ACTION.GRANTED) {
|
|
@@ -545,31 +624,33 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
545
624
|
url: options.personUrl,
|
|
546
625
|
devices: [
|
|
547
626
|
{
|
|
627
|
+
// @ts-ignore
|
|
548
628
|
deviceType: this.config.meetings.deviceType,
|
|
549
|
-
url: options.deviceUrl
|
|
550
|
-
}
|
|
551
|
-
]
|
|
629
|
+
url: options.deviceUrl,
|
|
630
|
+
},
|
|
631
|
+
],
|
|
552
632
|
},
|
|
553
633
|
disposition: options.disposition,
|
|
554
634
|
requester: {
|
|
555
|
-
url: options.personUrl
|
|
556
|
-
}
|
|
635
|
+
url: options.personUrl,
|
|
636
|
+
},
|
|
557
637
|
};
|
|
558
638
|
}
|
|
559
639
|
|
|
560
|
-
const body = {
|
|
640
|
+
const body: any = {
|
|
561
641
|
floor: floorReq,
|
|
562
|
-
resourceUrl: options.resourceUrl
|
|
642
|
+
resourceUrl: options.resourceUrl,
|
|
563
643
|
};
|
|
564
644
|
|
|
565
645
|
if (options?.resourceToken) {
|
|
566
646
|
body.resourceToken = options?.resourceToken;
|
|
567
647
|
}
|
|
568
648
|
|
|
649
|
+
// @ts-ignore
|
|
569
650
|
return this.request({
|
|
570
651
|
uri: options.uri,
|
|
571
652
|
method: HTTP_VERBS.PUT,
|
|
572
|
-
body
|
|
653
|
+
body,
|
|
573
654
|
});
|
|
574
655
|
}
|
|
575
656
|
|
|
@@ -581,7 +662,8 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
581
662
|
* @param {String} options.tones a string of one or more DTMF tones to send
|
|
582
663
|
* @returns {Promise}
|
|
583
664
|
*/
|
|
584
|
-
sendDTMF({locusUrl, deviceUrl, tones}) {
|
|
665
|
+
sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {
|
|
666
|
+
// @ts-ignore
|
|
585
667
|
return this.request({
|
|
586
668
|
method: HTTP_VERBS.POST,
|
|
587
669
|
uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
|
|
@@ -589,9 +671,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
589
671
|
deviceUrl,
|
|
590
672
|
dtmf: {
|
|
591
673
|
correlationId: uuid.v4(),
|
|
592
|
-
tones
|
|
593
|
-
}
|
|
594
|
-
}
|
|
674
|
+
tones,
|
|
675
|
+
},
|
|
676
|
+
},
|
|
595
677
|
});
|
|
596
678
|
}
|
|
597
679
|
|
|
@@ -614,29 +696,55 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
614
696
|
deviceUrl,
|
|
615
697
|
layoutType,
|
|
616
698
|
main,
|
|
617
|
-
content
|
|
699
|
+
content,
|
|
700
|
+
}: {
|
|
701
|
+
locusUrl: string;
|
|
702
|
+
deviceUrl: string;
|
|
703
|
+
layoutType: string;
|
|
704
|
+
main: {
|
|
705
|
+
width: number;
|
|
706
|
+
height: number;
|
|
707
|
+
};
|
|
708
|
+
content: {
|
|
709
|
+
width: number;
|
|
710
|
+
height: number;
|
|
711
|
+
};
|
|
618
712
|
}) {
|
|
619
713
|
// send main/content renderInfo only if both width and height are specified
|
|
620
714
|
if (main && (!main.width || !main.height)) {
|
|
621
|
-
return Promise.reject(
|
|
715
|
+
return Promise.reject(
|
|
716
|
+
new Error(
|
|
717
|
+
`Both width and height must be specified. One of them is missing for main: ${JSON.stringify(
|
|
718
|
+
main
|
|
719
|
+
)}`
|
|
720
|
+
)
|
|
721
|
+
);
|
|
622
722
|
}
|
|
623
723
|
|
|
624
724
|
if (content && (!content.width || !content.height)) {
|
|
625
|
-
return Promise.reject(
|
|
725
|
+
return Promise.reject(
|
|
726
|
+
new Error(
|
|
727
|
+
`Both width and height must be specified. One of them is missing for content: ${JSON.stringify(
|
|
728
|
+
content
|
|
729
|
+
)}`
|
|
730
|
+
)
|
|
731
|
+
);
|
|
626
732
|
}
|
|
627
733
|
|
|
628
|
-
const renderInfoMain =
|
|
629
|
-
const renderInfoContent =
|
|
734
|
+
const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;
|
|
735
|
+
const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;
|
|
630
736
|
|
|
631
|
-
const layoutParams =
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
737
|
+
const layoutParams =
|
|
738
|
+
renderInfoMain || renderInfoContent
|
|
739
|
+
? {
|
|
740
|
+
renderInfo: {
|
|
741
|
+
main: renderInfoMain,
|
|
742
|
+
content: renderInfoContent,
|
|
743
|
+
},
|
|
744
|
+
}
|
|
745
|
+
: undefined;
|
|
639
746
|
|
|
747
|
+
// @ts-ignore
|
|
640
748
|
return this.request({
|
|
641
749
|
method: HTTP_VERBS.PUT,
|
|
642
750
|
uri: `${locusUrl}/${CONTROLS}`,
|
|
@@ -644,9 +752,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
644
752
|
layout: {
|
|
645
753
|
deviceUrl,
|
|
646
754
|
type: layoutType,
|
|
647
|
-
layoutParams
|
|
648
|
-
}
|
|
649
|
-
}
|
|
755
|
+
layoutParams,
|
|
756
|
+
},
|
|
757
|
+
},
|
|
650
758
|
});
|
|
651
759
|
}
|
|
652
760
|
|
|
@@ -656,14 +764,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
656
764
|
* @param {Url} options.locusUrl
|
|
657
765
|
* @returns {Promise}
|
|
658
766
|
*/
|
|
659
|
-
endMeetingForAll({
|
|
660
|
-
locusUrl,
|
|
661
|
-
}) {
|
|
767
|
+
endMeetingForAll({locusUrl}: {locusUrl: string}) {
|
|
662
768
|
const uri = `${locusUrl}/${END}`;
|
|
663
769
|
|
|
770
|
+
// @ts-ignore
|
|
664
771
|
return this.request({
|
|
665
772
|
method: HTTP_VERBS.POST,
|
|
666
|
-
uri
|
|
773
|
+
uri,
|
|
667
774
|
});
|
|
668
775
|
}
|
|
669
776
|
|
|
@@ -673,12 +780,55 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
673
780
|
* @param {Url} options.keepAliveUrl
|
|
674
781
|
* @returns {Promise}
|
|
675
782
|
*/
|
|
676
|
-
keepAlive({
|
|
677
|
-
|
|
678
|
-
}) {
|
|
783
|
+
keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {
|
|
784
|
+
// @ts-ignore
|
|
679
785
|
return this.request({
|
|
680
786
|
method: HTTP_VERBS.GET,
|
|
681
|
-
uri: keepAliveUrl
|
|
787
|
+
uri: keepAliveUrl,
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Make a network request to send a reaction.
|
|
793
|
+
* @param {Object} options
|
|
794
|
+
* @param {Url} options.reactionChannelUrl
|
|
795
|
+
* @param {Reaction} options.reaction
|
|
796
|
+
* @param {string} options.senderID
|
|
797
|
+
* @returns {Promise}
|
|
798
|
+
*/
|
|
799
|
+
sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {
|
|
800
|
+
const uri = reactionChannelUrl;
|
|
801
|
+
|
|
802
|
+
// @ts-ignore
|
|
803
|
+
return this.request({
|
|
804
|
+
method: HTTP_VERBS.POST,
|
|
805
|
+
uri,
|
|
806
|
+
body: {
|
|
807
|
+
sender: {participantId},
|
|
808
|
+
reaction,
|
|
809
|
+
},
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Make a network request to enable or disable reactions.
|
|
815
|
+
* @param {boolean} options.enable - determines if we need to enable or disable.
|
|
816
|
+
* @param {locusUrl} options.locusUrl
|
|
817
|
+
* @returns {Promise}
|
|
818
|
+
*/
|
|
819
|
+
toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {
|
|
820
|
+
const uri = `${locusUrl}/${CONTROLS}`;
|
|
821
|
+
|
|
822
|
+
// @ts-ignore
|
|
823
|
+
return this.request({
|
|
824
|
+
method: HTTP_VERBS.PUT,
|
|
825
|
+
uri,
|
|
826
|
+
body: {
|
|
827
|
+
reactions: {
|
|
828
|
+
enabled: enable,
|
|
829
|
+
},
|
|
830
|
+
requestingParticipantId,
|
|
831
|
+
},
|
|
682
832
|
});
|
|
683
833
|
}
|
|
684
834
|
}
|