@webex/plugin-meetings 3.0.0-bnr.5 → 3.0.0-stream-classes.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +70 -32
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +422 -217
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/utils.js +12 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/errors/webex-errors.js +3 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.d.ts +1 -1
- package/dist/common/queue.js +24 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -7
- package/dist/config.js.map +1 -1
- package/dist/constants.js +118 -24
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +2 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +19 -14
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +80 -11
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +62 -20
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +366 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +71 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +305 -57
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +7 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +43 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +219 -63
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +44 -22
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +57 -104
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +60 -121
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +61 -3
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2530 -2534
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +125 -205
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +150 -150
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +568 -438
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +94 -38
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +4 -2
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.d.ts +0 -2
- package/dist/meetings/index.js +260 -85
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/util.js +42 -7
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +2 -0
- package/dist/member/index.js +26 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.d.ts +11 -0
- package/dist/member/member.types.js +18 -0
- package/dist/member/member.types.js.map +1 -0
- package/dist/member/types.js +11 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +60 -23
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +4 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +75 -45
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +308 -317
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +1 -3
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.js +1 -451
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +136 -40
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +4 -4
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +60 -3
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +36 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +233 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/reachability/index.js +18 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +5 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +181 -153
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +21 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +9 -8
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +25 -32
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +42 -51
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +97 -38
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +117 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/index.js +0 -1
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +43 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +124 -0
- package/dist/types/breakouts/events.d.ts +2 -0
- package/dist/types/breakouts/utils.d.ts +7 -0
- package/dist/types/common/errors/webex-errors.d.ts +1 -1
- package/dist/types/config.d.ts +0 -6
- package/dist/types/constants.d.ts +51 -21
- package/dist/types/controls-options-manager/enums.d.ts +2 -0
- package/dist/types/controls-options-manager/index.d.ts +1 -1
- package/dist/types/controls-options-manager/types.d.ts +7 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/index.d.ts +39 -1
- package/dist/types/media/index.d.ts +2 -0
- package/dist/types/media/properties.d.ts +16 -38
- package/dist/types/meeting/in-meeting-actions.d.ts +46 -2
- package/dist/types/meeting/index.d.ts +179 -379
- package/dist/types/meeting/locusMediaRequest.d.ts +70 -0
- package/dist/types/meeting/muteState.d.ts +39 -40
- package/dist/types/meeting/request.d.ts +25 -26
- package/dist/types/meeting/util.d.ts +74 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +14 -3
- package/dist/types/meetings/index.d.ts +49 -1
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/members/request.d.ts +56 -11
- package/dist/types/members/util.d.ts +209 -1
- package/dist/types/metrics/config.d.ts +26 -2
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/metrics/index.d.ts +17 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +27 -10
- package/dist/types/multistream/receiveSlot.d.ts +3 -3
- package/dist/types/multistream/remoteMedia.d.ts +2 -2
- package/dist/types/multistream/remoteMediaManager.d.ts +14 -0
- package/dist/types/roap/request.d.ts +6 -8
- package/dist/types/roap/turnDiscovery.d.ts +18 -1
- package/package.json +21 -20
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +3 -2
- package/src/breakouts/breakout.ts +62 -27
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +244 -64
- package/src/breakouts/utils.ts +13 -0
- package/src/common/errors/webex-errors.ts +6 -2
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +0 -6
- package/src/constants.ts +111 -19
- package/src/controls-options-manager/enums.ts +2 -0
- package/src/controls-options-manager/index.ts +13 -10
- package/src/controls-options-manager/types.ts +10 -0
- package/src/controls-options-manager/util.ts +82 -11
- package/src/index.ts +18 -11
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +81 -0
- package/src/locus-info/index.ts +318 -57
- package/src/locus-info/infoUtils.ts +10 -2
- package/src/locus-info/mediaSharesUtils.ts +48 -0
- package/src/locus-info/parser.ts +224 -39
- package/src/locus-info/selfUtils.ts +32 -20
- package/src/media/index.ts +94 -108
- package/src/media/properties.ts +69 -109
- package/src/meeting/in-meeting-actions.ts +120 -4
- package/src/meeting/index.ts +1967 -2120
- package/src/meeting/locusMediaRequest.ts +314 -0
- package/src/meeting/muteState.ts +119 -194
- package/src/meeting/request.ts +122 -115
- package/src/meeting/util.ts +549 -413
- package/src/meeting-info/index.ts +54 -8
- package/src/meeting-info/meeting-info-v2.ts +89 -24
- package/src/meeting-info/utilv2.ts +6 -2
- package/src/meetings/index.ts +247 -87
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/util.ts +47 -12
- package/src/member/index.ts +28 -1
- package/src/member/types.ts +14 -0
- package/src/member/util.ts +75 -26
- package/src/members/index.ts +7 -1
- package/src/members/request.ts +61 -21
- package/src/members/util.ts +316 -326
- package/src/metrics/constants.ts +1 -0
- package/src/metrics/index.ts +1 -474
- package/src/multistream/mediaRequestManager.ts +183 -67
- package/src/multistream/receiveSlot.ts +4 -4
- package/src/multistream/receiveSlotManager.ts +4 -4
- package/src/multistream/remoteMedia.ts +2 -2
- package/src/multistream/remoteMediaGroup.ts +59 -0
- package/src/multistream/remoteMediaManager.ts +33 -0
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/reachability/index.ts +15 -4
- package/src/reachability/request.ts +7 -3
- package/src/reconnection-manager/index.ts +36 -29
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +25 -30
- package/src/roap/request.ts +44 -51
- package/src/roap/turnDiscovery.ts +51 -25
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/index.ts +0 -1
- package/test/integration/spec/converged-space-meetings.js +60 -3
- package/test/integration/spec/journey.js +336 -259
- package/test/integration/spec/space-meeting.js +76 -3
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +85 -26
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +636 -98
- package/test/unit/spec/breakouts/utils.js +19 -1
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +8 -1
- package/test/unit/spec/controls-options-manager/util.js +576 -397
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +195 -1
- package/test/unit/spec/locus-info/index.js +950 -45
- package/test/unit/spec/locus-info/infoUtils.js +37 -15
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +22 -0
- package/test/unit/spec/locus-info/parser.js +62 -22
- package/test/unit/spec/locus-info/selfConstant.js +19 -0
- package/test/unit/spec/locus-info/selfUtils.js +131 -26
- package/test/unit/spec/media/index.ts +82 -79
- package/test/unit/spec/meeting/in-meeting-actions.ts +60 -2
- package/test/unit/spec/meeting/index.js +3208 -1734
- package/test/unit/spec/meeting/locusMediaRequest.ts +443 -0
- package/test/unit/spec/meeting/muteState.js +328 -417
- package/test/unit/spec/meeting/request.js +393 -48
- package/test/unit/spec/meeting/utils.js +552 -76
- package/test/unit/spec/meeting-info/index.js +181 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +258 -20
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/index.js +631 -145
- package/test/unit/spec/meetings/utils.js +164 -9
- package/test/unit/spec/member/index.js +44 -14
- package/test/unit/spec/member/util.js +296 -155
- package/test/unit/spec/members/index.js +23 -3
- package/test/unit/spec/members/request.js +167 -35
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +366 -8
- package/test/unit/spec/multistream/receiveSlot.ts +1 -1
- package/test/unit/spec/multistream/remoteMediaGroup.ts +266 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +123 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/reachability/index.ts +66 -5
- package/test/unit/spec/reachability/request.js +3 -1
- package/test/unit/spec/reconnection-manager/index.js +55 -5
- package/test/unit/spec/recording-controller/index.js +294 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +21 -48
- package/test/unit/spec/roap/request.ts +74 -60
- package/test/unit/spec/roap/turnDiscovery.ts +30 -6
- package/test/unit/spec/rtcMetrics/index.ts +68 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -60
- package/src/metrics/config.ts +0 -487
package/src/meeting/request.ts
CHANGED
|
@@ -18,22 +18,27 @@ import {
|
|
|
18
18
|
HTTP_VERBS,
|
|
19
19
|
LEAVE,
|
|
20
20
|
LOCI,
|
|
21
|
-
LOCUS,
|
|
22
|
-
MEDIA,
|
|
23
21
|
PARTICIPANT,
|
|
24
22
|
PROVISIONAL_TYPE_DIAL_IN,
|
|
25
23
|
PROVISIONAL_TYPE_DIAL_OUT,
|
|
26
24
|
REACHABILITY,
|
|
27
25
|
SEND_DTMF_ENDPOINT,
|
|
28
26
|
_SLIDES_,
|
|
27
|
+
ANNOTATION,
|
|
28
|
+
IP_VERSION,
|
|
29
29
|
} from '../constants';
|
|
30
30
|
import {SendReactionOptions, ToggleReactionsOptions} from './request.type';
|
|
31
|
+
import MeetingUtil from './util';
|
|
32
|
+
import {AnnotationInfo} from '../annotation/annotation.types';
|
|
31
33
|
|
|
32
34
|
/**
|
|
33
35
|
* @class MeetingRequest
|
|
34
36
|
*/
|
|
35
37
|
export default class MeetingRequest extends StatelessWebexPlugin {
|
|
36
38
|
changeVideoLayoutDebounced: any;
|
|
39
|
+
meetingRef: WeakRef<any>;
|
|
40
|
+
locusDeltaRequest: (options: object) => Promise<any>;
|
|
41
|
+
buildLocusDeltaRequestOptions: (options: object) => Promise<any>;
|
|
37
42
|
|
|
38
43
|
/**
|
|
39
44
|
* Constructor
|
|
@@ -41,7 +46,13 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
41
46
|
* @param {Object} options
|
|
42
47
|
*/
|
|
43
48
|
constructor(attrs: any, options: any) {
|
|
44
|
-
|
|
49
|
+
const {meeting, ...otherAttrs} = attrs;
|
|
50
|
+
|
|
51
|
+
super(otherAttrs, options);
|
|
52
|
+
|
|
53
|
+
this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);
|
|
54
|
+
this.buildLocusDeltaRequestOptions = MeetingUtil.generateBuildLocusDeltaRequestOptions(meeting);
|
|
55
|
+
|
|
45
56
|
this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {
|
|
46
57
|
leading: true,
|
|
47
58
|
trailing: true,
|
|
@@ -88,6 +99,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
88
99
|
* @param {boolean} options.moveToResource
|
|
89
100
|
* @param {Object} options.roapMessage
|
|
90
101
|
* @param {boolean} options.breakoutsSupported
|
|
102
|
+
* @param {String} options.locale,
|
|
103
|
+
* @param {Array} options.deviceCapabilities
|
|
104
|
+
* @param {boolean} options.liveAnnotationSupported
|
|
91
105
|
* @returns {Promise}
|
|
92
106
|
*/
|
|
93
107
|
async joinMeeting(options: {
|
|
@@ -107,6 +121,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
107
121
|
permissionToken: any;
|
|
108
122
|
preferTranscoding: any;
|
|
109
123
|
breakoutsSupported: boolean;
|
|
124
|
+
locale?: string;
|
|
125
|
+
deviceCapabilities?: Array<string>;
|
|
126
|
+
liveAnnotationSupported: boolean;
|
|
127
|
+
ipVersion: IP_VERSION;
|
|
110
128
|
}) {
|
|
111
129
|
const {
|
|
112
130
|
asResourceOccupant,
|
|
@@ -124,6 +142,10 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
124
142
|
roapMessage,
|
|
125
143
|
preferTranscoding,
|
|
126
144
|
breakoutsSupported,
|
|
145
|
+
locale,
|
|
146
|
+
deviceCapabilities = [],
|
|
147
|
+
liveAnnotationSupported,
|
|
148
|
+
ipVersion,
|
|
127
149
|
} = options;
|
|
128
150
|
|
|
129
151
|
LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
|
|
@@ -149,19 +171,31 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
149
171
|
clientMediaPreferences: {
|
|
150
172
|
preferTranscoding: preferTranscoding ?? true,
|
|
151
173
|
joinCookie,
|
|
174
|
+
ipver: ipVersion,
|
|
152
175
|
},
|
|
153
176
|
};
|
|
154
177
|
|
|
155
178
|
if (breakoutsSupported) {
|
|
156
|
-
|
|
179
|
+
deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);
|
|
180
|
+
}
|
|
181
|
+
if (liveAnnotationSupported) {
|
|
182
|
+
deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
|
|
157
183
|
}
|
|
158
184
|
|
|
185
|
+
if (locale) {
|
|
186
|
+
body.locale = locale;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// add deviceCapabilities prop
|
|
190
|
+
if (deviceCapabilities.length) {
|
|
191
|
+
body.deviceCapabilities = deviceCapabilities;
|
|
192
|
+
}
|
|
159
193
|
// @ts-ignore
|
|
160
|
-
if (this.webex.meetings.
|
|
194
|
+
if (this.webex.meetings.geoHintInfo) {
|
|
161
195
|
// @ts-ignore
|
|
162
|
-
body.device.countryCode = this.webex.meetings.
|
|
196
|
+
body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;
|
|
163
197
|
// @ts-ignore
|
|
164
|
-
body.device.regionCode = this.webex.meetings.
|
|
198
|
+
body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;
|
|
165
199
|
}
|
|
166
200
|
|
|
167
201
|
if (moderator !== undefined) {
|
|
@@ -285,7 +319,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
285
319
|
};
|
|
286
320
|
|
|
287
321
|
// @ts-ignore
|
|
288
|
-
return this.
|
|
322
|
+
return this.locusDeltaRequest({
|
|
289
323
|
method: HTTP_VERBS.POST,
|
|
290
324
|
uri,
|
|
291
325
|
body,
|
|
@@ -340,7 +374,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
340
374
|
};
|
|
341
375
|
|
|
342
376
|
// @ts-ignore
|
|
343
|
-
return this.
|
|
377
|
+
return this.locusDeltaRequest({
|
|
344
378
|
method: HTTP_VERBS.POST,
|
|
345
379
|
uri,
|
|
346
380
|
body,
|
|
@@ -354,62 +388,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
354
388
|
}
|
|
355
389
|
|
|
356
390
|
/**
|
|
357
|
-
*
|
|
358
|
-
* @param {Object} options
|
|
359
|
-
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
360
|
-
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
361
|
-
* @returns {Promise}
|
|
362
|
-
*/
|
|
363
|
-
syncMeeting(options: {desync: boolean; syncUrl: string}) {
|
|
364
|
-
/* eslint-disable no-else-return */
|
|
365
|
-
const {desync} = options;
|
|
366
|
-
let {syncUrl} = options;
|
|
367
|
-
|
|
368
|
-
/* istanbul ignore else */
|
|
369
|
-
if (desync) {
|
|
370
|
-
// check for existing URL parameters
|
|
371
|
-
syncUrl = syncUrl
|
|
372
|
-
.concat(syncUrl.split('?')[1] ? '&' : '?')
|
|
373
|
-
.concat(`${LOCUS.SYNCDEBUG}=${desync}`);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// @ts-ignore
|
|
377
|
-
return this.request({
|
|
378
|
-
method: HTTP_VERBS.GET,
|
|
379
|
-
uri: syncUrl,
|
|
380
|
-
}) // TODO: Handle if delta sync failed . Get the full locus object
|
|
381
|
-
.catch((err) => {
|
|
382
|
-
LoggerProxy.logger.error(
|
|
383
|
-
`Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`
|
|
384
|
-
);
|
|
385
|
-
|
|
386
|
-
return err;
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Request to get the complete locus object
|
|
391
|
+
* Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
|
|
392
392
|
* @param {Object} options
|
|
393
|
-
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
394
393
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
395
394
|
* @returns {Promise}
|
|
396
395
|
*/
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
const {desync} = options;
|
|
400
|
-
|
|
401
|
-
if (locusUrl) {
|
|
402
|
-
if (desync) {
|
|
403
|
-
locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;
|
|
404
|
-
}
|
|
396
|
+
getLocusDTO(options: {url: string}) {
|
|
397
|
+
const {url} = options;
|
|
405
398
|
|
|
399
|
+
if (url) {
|
|
406
400
|
// @ts-ignore
|
|
407
401
|
return this.request({
|
|
408
402
|
method: HTTP_VERBS.GET,
|
|
409
|
-
uri:
|
|
403
|
+
uri: url,
|
|
410
404
|
}).catch((err) => {
|
|
411
405
|
LoggerProxy.logger.error(
|
|
412
|
-
`Meeting:request#
|
|
406
|
+
`Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`
|
|
413
407
|
);
|
|
414
408
|
|
|
415
409
|
return err;
|
|
@@ -455,7 +449,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
455
449
|
};
|
|
456
450
|
|
|
457
451
|
// @ts-ignore
|
|
458
|
-
return this.
|
|
452
|
+
return this.locusDeltaRequest({
|
|
459
453
|
method: HTTP_VERBS.PUT,
|
|
460
454
|
uri,
|
|
461
455
|
body,
|
|
@@ -469,13 +463,49 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
469
463
|
}
|
|
470
464
|
|
|
471
465
|
/**
|
|
472
|
-
*
|
|
466
|
+
* Prepares request options to to leave a meeting
|
|
473
467
|
* @param {Object} options
|
|
474
468
|
* @param {Url} options.locusUrl
|
|
475
469
|
* @param {String} options.selfId
|
|
476
470
|
* @param {Url} options.deviceUrl
|
|
477
471
|
* @param {String} options.resourceId,
|
|
478
472
|
* @param {String} options.correlationId
|
|
473
|
+
* @returns {Object} request options
|
|
474
|
+
*/
|
|
475
|
+
prepareLeaveMeetingRequestOptions({
|
|
476
|
+
locusUrl,
|
|
477
|
+
selfId,
|
|
478
|
+
deviceUrl: url,
|
|
479
|
+
resourceId,
|
|
480
|
+
correlationId,
|
|
481
|
+
}: {
|
|
482
|
+
locusUrl: string;
|
|
483
|
+
selfId: string;
|
|
484
|
+
deviceUrl: string;
|
|
485
|
+
resourceId: string;
|
|
486
|
+
correlationId: string;
|
|
487
|
+
}) {
|
|
488
|
+
const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;
|
|
489
|
+
const body = {
|
|
490
|
+
device: {
|
|
491
|
+
// @ts-ignore
|
|
492
|
+
deviceType: this.config.meetings.deviceType,
|
|
493
|
+
url,
|
|
494
|
+
},
|
|
495
|
+
usingResource: resourceId || null,
|
|
496
|
+
correlationId,
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
return {
|
|
500
|
+
method: HTTP_VERBS.PUT,
|
|
501
|
+
uri,
|
|
502
|
+
body,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/**
|
|
507
|
+
* Make a network request to leave a meeting
|
|
508
|
+
* @param {Object} options
|
|
479
509
|
* @returns {Promise}
|
|
480
510
|
*/
|
|
481
511
|
leaveMeeting({
|
|
@@ -504,14 +534,22 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
504
534
|
correlationId,
|
|
505
535
|
};
|
|
506
536
|
|
|
507
|
-
|
|
508
|
-
return this.request({
|
|
537
|
+
return this.locusDeltaRequest({
|
|
509
538
|
method: HTTP_VERBS.PUT,
|
|
510
539
|
uri,
|
|
511
540
|
body,
|
|
512
541
|
});
|
|
513
542
|
}
|
|
514
543
|
|
|
544
|
+
/**
|
|
545
|
+
* Builds request options to leave a meeting
|
|
546
|
+
* @param {Object} options
|
|
547
|
+
* @returns {Object} request options
|
|
548
|
+
*/
|
|
549
|
+
buildLeaveMeetingRequestOptions(options: any) {
|
|
550
|
+
return this.buildLocusDeltaRequestOptions(this.prepareLeaveMeetingRequestOptions(options));
|
|
551
|
+
}
|
|
552
|
+
|
|
515
553
|
/**
|
|
516
554
|
* Make a network request to acknowledge a meeting
|
|
517
555
|
* @param {Object} options
|
|
@@ -531,14 +569,19 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
531
569
|
correlationId: options.correlationId,
|
|
532
570
|
};
|
|
533
571
|
|
|
534
|
-
|
|
535
|
-
return this.request({
|
|
572
|
+
return this.locusDeltaRequest({
|
|
536
573
|
method: HTTP_VERBS.PUT,
|
|
537
574
|
uri,
|
|
538
575
|
body,
|
|
539
576
|
});
|
|
540
577
|
}
|
|
541
578
|
|
|
579
|
+
/**
|
|
580
|
+
* Makes a network request to lock the meeting
|
|
581
|
+
* @param {Object} options
|
|
582
|
+
* @param {Boolean} options.lock Whether it is locked or not
|
|
583
|
+
* @returns {Promise}
|
|
584
|
+
*/
|
|
542
585
|
lockMeeting(options) {
|
|
543
586
|
const uri = `${options.locusUrl}/${CONTROLS}`;
|
|
544
587
|
const body = {
|
|
@@ -547,8 +590,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
547
590
|
},
|
|
548
591
|
};
|
|
549
592
|
|
|
550
|
-
|
|
551
|
-
return this.request({
|
|
593
|
+
return this.locusDeltaRequest({
|
|
552
594
|
method: HTTP_VERBS.PATCH,
|
|
553
595
|
uri,
|
|
554
596
|
body,
|
|
@@ -574,54 +616,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
574
616
|
...(options.reason && {reason: options.reason}),
|
|
575
617
|
};
|
|
576
618
|
|
|
577
|
-
|
|
578
|
-
return this.request({
|
|
579
|
-
method: HTTP_VERBS.PUT,
|
|
580
|
-
uri,
|
|
581
|
-
body,
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* Toggle remote audio and/or video
|
|
587
|
-
* @param {Object} options options for toggling
|
|
588
|
-
* @param {String} options.selfId Locus self id??
|
|
589
|
-
* @param {String} options.locusUrl Locus url
|
|
590
|
-
* @param {String} options.deviceUrl Url of a device
|
|
591
|
-
* @param {String} options.resourceId Populated if you are paired to a device
|
|
592
|
-
* @param {String} options.localMedias local sdps
|
|
593
|
-
* @param {Boolean} options.preferTranscoding false for multistream (Homer), true for transcoded media (Edonus)
|
|
594
|
-
* @returns {Promise}
|
|
595
|
-
*/
|
|
596
|
-
remoteAudioVideoToggle(
|
|
597
|
-
options:
|
|
598
|
-
| {
|
|
599
|
-
selfId: string;
|
|
600
|
-
locusUrl: string;
|
|
601
|
-
deviceUrl: string;
|
|
602
|
-
resourceId: string;
|
|
603
|
-
localMedias: string;
|
|
604
|
-
}
|
|
605
|
-
| any
|
|
606
|
-
) {
|
|
607
|
-
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.selfId}/${MEDIA}`;
|
|
608
|
-
const body = {
|
|
609
|
-
device: {
|
|
610
|
-
// @ts-ignore
|
|
611
|
-
deviceType: this.config.meetings.deviceType,
|
|
612
|
-
url: options.deviceUrl,
|
|
613
|
-
},
|
|
614
|
-
usingResource: options.resourceId || null,
|
|
615
|
-
correlationId: options.correlationId,
|
|
616
|
-
respOnlySdp: true,
|
|
617
|
-
localMedias: options.localMedias,
|
|
618
|
-
clientMediaPreferences: {
|
|
619
|
-
preferTranscoding: options.preferTranscoding ?? true,
|
|
620
|
-
},
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
// @ts-ignore
|
|
624
|
-
return this.request({
|
|
619
|
+
return this.locusDeltaRequest({
|
|
625
620
|
method: HTTP_VERBS.PUT,
|
|
626
621
|
uri,
|
|
627
622
|
body,
|
|
@@ -646,6 +641,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
646
641
|
deviceUrl: string;
|
|
647
642
|
resourceId: string;
|
|
648
643
|
uri: string;
|
|
644
|
+
annotationInfo: AnnotationInfo;
|
|
649
645
|
}
|
|
650
646
|
| any
|
|
651
647
|
) {
|
|
@@ -679,6 +675,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
679
675
|
if (options?.resourceToken) {
|
|
680
676
|
body.resourceToken = options?.resourceToken;
|
|
681
677
|
}
|
|
678
|
+
if (options?.annotationInfo) {
|
|
679
|
+
body.annotation = options?.annotationInfo;
|
|
680
|
+
}
|
|
682
681
|
|
|
683
682
|
// @ts-ignore
|
|
684
683
|
return this.request({
|
|
@@ -698,7 +697,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
698
697
|
*/
|
|
699
698
|
sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {
|
|
700
699
|
// @ts-ignore
|
|
701
|
-
return this.
|
|
700
|
+
return this.locusDeltaRequest({
|
|
702
701
|
method: HTTP_VERBS.POST,
|
|
703
702
|
uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,
|
|
704
703
|
body: {
|
|
@@ -779,7 +778,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
779
778
|
: undefined;
|
|
780
779
|
|
|
781
780
|
// @ts-ignore
|
|
782
|
-
return this.
|
|
781
|
+
return this.locusDeltaRequest({
|
|
783
782
|
method: HTTP_VERBS.PUT,
|
|
784
783
|
uri: `${locusUrl}/${CONTROLS}`,
|
|
785
784
|
body: {
|
|
@@ -802,7 +801,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
802
801
|
const uri = `${locusUrl}/${END}`;
|
|
803
802
|
|
|
804
803
|
// @ts-ignore
|
|
805
|
-
return this.
|
|
804
|
+
return this.locusDeltaRequest({
|
|
806
805
|
method: HTTP_VERBS.POST,
|
|
807
806
|
uri,
|
|
808
807
|
});
|
|
@@ -854,7 +853,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
854
853
|
const uri = `${locusUrl}/${CONTROLS}`;
|
|
855
854
|
|
|
856
855
|
// @ts-ignore
|
|
857
|
-
return this.
|
|
856
|
+
return this.locusDeltaRequest({
|
|
858
857
|
method: HTTP_VERBS.PUT,
|
|
859
858
|
uri,
|
|
860
859
|
body: {
|
|
@@ -865,4 +864,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
865
864
|
},
|
|
866
865
|
});
|
|
867
866
|
}
|
|
867
|
+
|
|
868
|
+
getLocusStatusByUrl(locusUrl: string) {
|
|
869
|
+
// @ts-ignore
|
|
870
|
+
return this.request({
|
|
871
|
+
method: HTTP_VERBS.GET,
|
|
872
|
+
uri: locusUrl,
|
|
873
|
+
});
|
|
874
|
+
}
|
|
868
875
|
}
|