@webex/plugin-meetings 3.0.0-stream-classes.4 → 3.0.0-test.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 +12 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/webex-errors.js +23 -3
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/logs/request.js +5 -1
- package/dist/common/logs/request.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +69 -9
- package/dist/constants.js.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +40 -11
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +42 -21
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/index.js +10 -6
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +13 -3
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +135 -330
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +4 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2187 -1074
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +34 -19
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +71 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/index.js +48 -23
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +25 -4
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +17 -0
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +142 -57
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +2 -6
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +9 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +11 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +17 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js +15 -4
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +15 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +222 -73
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +262 -432
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +1 -1
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reconnection-manager/index.js +113 -96
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +57 -25
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +5 -13
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +173 -81
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/index.js +68 -6
- package/dist/rtcMetrics/index.js.map +1 -1
- package/dist/statsAnalyzer/index.js +338 -289
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +296 -156
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/webex-errors.d.ts +13 -1
- package/dist/types/common/logs/request.d.ts +2 -0
- package/dist/types/config.d.ts +1 -1
- package/dist/types/constants.d.ts +66 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/locus-info/index.d.ts +1 -1
- package/dist/types/locus-info/parser.d.ts +3 -2
- package/dist/types/mediaQualityMetrics/config.d.ts +99 -223
- package/dist/types/meeting/in-meeting-actions.d.ts +4 -0
- package/dist/types/meeting/index.d.ts +285 -34
- package/dist/types/meeting/locusMediaRequest.d.ts +1 -2
- package/dist/types/meeting/muteState.d.ts +2 -8
- package/dist/types/meeting/request.d.ts +4 -1
- package/dist/types/meeting/util.d.ts +25 -1
- package/dist/types/meeting-info/index.d.ts +7 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/collection.d.ts +9 -0
- package/dist/types/meetings/index.d.ts +42 -14
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/members/types.d.ts +1 -0
- package/dist/types/members/util.d.ts +5 -0
- package/dist/types/metrics/constants.d.ts +15 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +2 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +2 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +25 -1
- package/dist/types/multistream/sendSlotManager.d.ts +9 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +59 -112
- package/dist/types/reachability/request.d.ts +1 -1
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reconnection-manager/index.d.ts +10 -0
- package/dist/types/roap/index.d.ts +2 -1
- package/dist/types/roap/request.d.ts +2 -1
- package/dist/types/roap/turnDiscovery.d.ts +21 -4
- package/dist/types/rtcMetrics/index.d.ts +15 -1
- package/dist/types/statsAnalyzer/index.d.ts +28 -11
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +28 -4
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/package.json +3 -2
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +19 -2
- package/src/common/logs/request.ts +5 -1
- package/src/config.ts +1 -1
- package/src/constants.ts +71 -6
- package/src/index.ts +5 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/index.ts +52 -16
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/parser.ts +47 -21
- package/src/media/index.ts +8 -6
- package/src/media/properties.ts +17 -2
- package/src/mediaQualityMetrics/config.ts +103 -238
- package/src/meeting/in-meeting-actions.ts +8 -0
- package/src/meeting/index.ts +1510 -529
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +19 -1
- package/src/meeting/util.ts +97 -0
- package/src/meeting-info/index.ts +47 -20
- package/src/meeting-info/meeting-info-v2.ts +27 -5
- package/src/meeting-info/utilv2.ts +1 -1
- package/src/meetings/collection.ts +13 -0
- package/src/meetings/index.ts +112 -31
- package/src/meetings/util.ts +2 -8
- package/src/member/index.ts +9 -0
- package/src/member/util.ts +14 -0
- package/src/members/index.ts +29 -2
- package/src/members/types.ts +1 -0
- package/src/members/util.ts +15 -1
- package/src/metrics/constants.ts +14 -0
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +141 -18
- package/src/multistream/sendSlotManager.ts +29 -0
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +221 -382
- package/src/reachability/request.ts +1 -1
- package/src/reachability/util.ts +24 -0
- package/src/reconnection-manager/index.ts +87 -83
- package/src/roap/index.ts +60 -24
- package/src/roap/request.ts +3 -16
- package/src/roap/turnDiscovery.ts +112 -39
- package/src/rtcMetrics/index.ts +71 -5
- package/src/statsAnalyzer/index.ts +430 -427
- package/src/statsAnalyzer/mqaUtil.ts +317 -168
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +7 -7
- package/test/integration/spec/journey.js +86 -104
- package/test/integration/spec/space-meeting.js +9 -9
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/index.ts +36 -3
- package/test/unit/spec/locus-info/index.js +205 -12
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +10 -0
- package/test/unit/spec/locus-info/parser.js +54 -13
- package/test/unit/spec/media/index.ts +20 -4
- package/test/unit/spec/media/properties.ts +2 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +4 -0
- package/test/unit/spec/meeting/index.js +4027 -1075
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +63 -12
- package/test/unit/spec/meeting/utils.js +93 -0
- package/test/unit/spec/meeting-info/index.js +180 -61
- package/test/unit/spec/meeting-info/meetinginfov2.js +196 -53
- package/test/unit/spec/meetings/collection.js +12 -0
- package/test/unit/spec/meetings/index.js +619 -206
- package/test/unit/spec/meetings/utils.js +35 -12
- package/test/unit/spec/member/index.js +8 -7
- package/test/unit/spec/member/util.js +32 -0
- package/test/unit/spec/members/index.js +130 -17
- package/test/unit/spec/members/utils.js +26 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +80 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +210 -3
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +505 -135
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +74 -17
- package/test/unit/spec/roap/index.ts +181 -61
- package/test/unit/spec/roap/request.ts +27 -3
- package/test/unit/spec/roap/turnDiscovery.ts +362 -101
- package/test/unit/spec/rtcMetrics/index.ts +57 -3
- package/test/unit/spec/stats-analyzer/index.js +1225 -12
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/integrationTestUtils.js +4 -4
- package/test/utils/webex-test-users.js +12 -4
|
@@ -154,12 +154,28 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
154
154
|
*/
|
|
155
155
|
}, {
|
|
156
156
|
key: "handleLocalStreamMuteStateChange",
|
|
157
|
-
value: function handleLocalStreamMuteStateChange(meeting
|
|
157
|
+
value: function handleLocalStreamMuteStateChange(meeting) {
|
|
158
158
|
if (this.ignoreMuteStateChange) {
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
|
|
162
|
+
// either user or system may have triggered a mute state change, but localMute should reflect both
|
|
163
|
+
var newMuteState;
|
|
164
|
+
var userMuteState;
|
|
165
|
+
var systemMuteState;
|
|
166
|
+
if (this.type === _constants.AUDIO) {
|
|
167
|
+
var _meeting$mediaPropert5, _meeting$mediaPropert6, _meeting$mediaPropert7;
|
|
168
|
+
newMuteState = (_meeting$mediaPropert5 = meeting.mediaProperties.audioStream) === null || _meeting$mediaPropert5 === void 0 ? void 0 : _meeting$mediaPropert5.muted;
|
|
169
|
+
userMuteState = (_meeting$mediaPropert6 = meeting.mediaProperties.audioStream) === null || _meeting$mediaPropert6 === void 0 ? void 0 : _meeting$mediaPropert6.userMuted;
|
|
170
|
+
systemMuteState = (_meeting$mediaPropert7 = meeting.mediaProperties.audioStream) === null || _meeting$mediaPropert7 === void 0 ? void 0 : _meeting$mediaPropert7.systemMuted;
|
|
171
|
+
} else {
|
|
172
|
+
var _meeting$mediaPropert8, _meeting$mediaPropert9, _meeting$mediaPropert10;
|
|
173
|
+
newMuteState = (_meeting$mediaPropert8 = meeting.mediaProperties.videoStream) === null || _meeting$mediaPropert8 === void 0 ? void 0 : _meeting$mediaPropert8.muted;
|
|
174
|
+
userMuteState = (_meeting$mediaPropert9 = meeting.mediaProperties.videoStream) === null || _meeting$mediaPropert9 === void 0 ? void 0 : _meeting$mediaPropert9.userMuted;
|
|
175
|
+
systemMuteState = (_meeting$mediaPropert10 = meeting.mediaProperties.videoStream) === null || _meeting$mediaPropert10 === void 0 ? void 0 : _meeting$mediaPropert10.systemMuted;
|
|
176
|
+
}
|
|
177
|
+
_loggerProxy.default.logger.info("Meeting:muteState#handleLocalStreamMuteStateChange --> ".concat(this.type, ": local stream new mute state: ").concat(newMuteState, " (user mute: ").concat(userMuteState, ", system mute: ").concat(systemMuteState, ")"));
|
|
178
|
+
this.state.client.localMute = newMuteState;
|
|
163
179
|
this.applyClientStateToServer(meeting);
|
|
164
180
|
}
|
|
165
181
|
|
|
@@ -232,7 +248,9 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
232
248
|
}).catch(function (e) {
|
|
233
249
|
_this.state.syncToServerInProgress = false;
|
|
234
250
|
_loggerProxy.default.logger.warn("Meeting:muteState#applyClientStateToServer --> ".concat(_this.type, ": error: ").concat(e));
|
|
235
|
-
|
|
251
|
+
|
|
252
|
+
// failed to apply client state to server, so revert stream mute state to server state
|
|
253
|
+
_this.muteLocalStream(meeting, _this.state.server.localMute || _this.state.server.remoteMute, 'clientRequestFailed');
|
|
236
254
|
});
|
|
237
255
|
}
|
|
238
256
|
|
|
@@ -287,20 +305,6 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
287
305
|
});
|
|
288
306
|
}
|
|
289
307
|
|
|
290
|
-
/** Sets the mute state of the local stream according to what server thinks is our state
|
|
291
|
-
* @param {Object} meeting - the meeting object
|
|
292
|
-
* @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local stream
|
|
293
|
-
* @returns {void}
|
|
294
|
-
*/
|
|
295
|
-
}, {
|
|
296
|
-
key: "applyServerMuteToLocalStream",
|
|
297
|
-
value: function applyServerMuteToLocalStream(meeting, serverMuteReason) {
|
|
298
|
-
var muted = this.state.server.localMute || this.state.server.remoteMute;
|
|
299
|
-
|
|
300
|
-
// update the local stream mute state, but not this.state.client.localMute
|
|
301
|
-
this.muteLocalStream(meeting, muted, serverMuteReason);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
308
|
/** Applies the current value for unmute allowed to the underlying stream
|
|
305
309
|
*
|
|
306
310
|
* @param {Meeting} meeting
|
|
@@ -311,11 +315,11 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
311
315
|
key: "applyUnmuteAllowedToStream",
|
|
312
316
|
value: function applyUnmuteAllowedToStream(meeting) {
|
|
313
317
|
if (this.type === _constants.AUDIO) {
|
|
314
|
-
var _meeting$
|
|
315
|
-
(_meeting$
|
|
318
|
+
var _meeting$mediaPropert11;
|
|
319
|
+
(_meeting$mediaPropert11 = meeting.mediaProperties.audioStream) === null || _meeting$mediaPropert11 === void 0 ? void 0 : _meeting$mediaPropert11.setUnmuteAllowed(this.state.server.unmuteAllowed);
|
|
316
320
|
} else {
|
|
317
|
-
var _meeting$
|
|
318
|
-
(_meeting$
|
|
321
|
+
var _meeting$mediaPropert12;
|
|
322
|
+
(_meeting$mediaPropert12 = meeting.mediaProperties.videoStream) === null || _meeting$mediaPropert12 === void 0 ? void 0 : _meeting$mediaPropert12.setUnmuteAllowed(this.state.server.unmuteAllowed);
|
|
319
323
|
}
|
|
320
324
|
}
|
|
321
325
|
|
|
@@ -339,7 +343,7 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
339
343
|
}
|
|
340
344
|
if (muted !== undefined) {
|
|
341
345
|
this.state.server.remoteMute = muted;
|
|
342
|
-
this.
|
|
346
|
+
this.muteLocalStream(meeting, muted, 'remotelyMuted');
|
|
343
347
|
}
|
|
344
348
|
}
|
|
345
349
|
|
|
@@ -362,8 +366,16 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
362
366
|
|
|
363
367
|
// todo: I'm seeing "you can now unmute yourself " popup when this happens - but same thing happens on web.w.c so we can ignore for now
|
|
364
368
|
this.state.server.remoteMute = false;
|
|
365
|
-
|
|
366
|
-
|
|
369
|
+
|
|
370
|
+
// change user mute state to false, but keep localMute true if overall mute state is still true
|
|
371
|
+
this.muteLocalStream(meeting, false, 'localUnmuteRequired');
|
|
372
|
+
if (this.type === _constants.AUDIO) {
|
|
373
|
+
var _meeting$mediaPropert13;
|
|
374
|
+
this.state.client.localMute = (_meeting$mediaPropert13 = meeting.mediaProperties.audioStream) === null || _meeting$mediaPropert13 === void 0 ? void 0 : _meeting$mediaPropert13.muted;
|
|
375
|
+
} else {
|
|
376
|
+
var _meeting$mediaPropert14;
|
|
377
|
+
this.state.client.localMute = (_meeting$mediaPropert14 = meeting.mediaProperties.videoStream) === null || _meeting$mediaPropert14 === void 0 ? void 0 : _meeting$mediaPropert14.muted;
|
|
378
|
+
}
|
|
367
379
|
this.applyClientStateToServer(meeting);
|
|
368
380
|
}
|
|
369
381
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMuteState","type","meeting","enabled","LoggerProxy","logger","info","id","muteState","MuteState","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","applyUnmuteAllowedToStream","muteLocalStream","initialMute","mediaProperties","audioStream","muted","videoStream","undefined","applyClientStateToServer","init","enable","mute","reason","setServerMuted","localMuteState","getClientLocalMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","applyServerMuteToLocalStream","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","handleLocusDelta","remoteUpdateError","reject","members","muteMember","selfId","serverMuteReason","setUnmuteAllowed","applyClientStateLocally"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToStream(meeting);\n\n // if we are remotely muted, we need to apply that to the local stream now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalStream(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioStream?.muted\n : meeting.mediaProperties.videoStream?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local stream initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no stream, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video stream has changed.\n * It reapplies the remote mute state onto the new stream and also reads the current\n * local mute state from the stream and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalStreamChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local stream\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the stream, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalStream(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoStream?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local stream mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalStreamMuteStateChange(meeting?: object, mute?: boolean) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${mute}`\n );\n\n this.state.client.localMute = mute;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local stream (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local stream\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalStream(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n this.applyServerMuteToLocalStream(meeting, 'clientRequestFailed');\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.handleLocusDelta(locus, meeting);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Sets the mute state of the local stream according to what server thinks is our state\n * @param {Object} meeting - the meeting object\n * @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local stream\n * @returns {void}\n */\n private applyServerMuteToLocalStream(meeting: any, serverMuteReason: ServerMuteReason) {\n const muted = this.state.server.localMute || this.state.server.remoteMute;\n\n // update the local stream mute state, but not this.state.client.localMute\n this.muteLocalStream(meeting, muted, serverMuteReason);\n }\n\n /** Applies the current value for unmute allowed to the underlying stream\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private applyUnmuteAllowedToStream(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToStream(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n this.applyServerMuteToLocalStream(meeting, 'remotelyMuted');\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: object) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n this.state.client.localMute = false;\n\n this.applyClientStateLocally(meeting, 'localUnmuteRequired');\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,iDACoBL,IAAI,iDAAuCC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,EAAE,EAChG;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACR,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EAEvD,OAAOK,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA,IAOaC,SAAS;EAapB;AACF;AACA;AACA;AACA;AACA;AACA;EACE,mBAAYR,IAAY,EAAEC,OAAY,EAAEC,OA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B;MACf,OACE,IAAI,CAACY,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACD,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IAE9F;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACC,UAAU;IACrC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACI,aAAa;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,0BAAwB;MACtB,OAAO,IAAI,CAACkB,uBAAuB,EAAE;IACvC;EAAC;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["createMuteState","type","meeting","enabled","LoggerProxy","logger","info","id","muteState","MuteState","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","applyUnmuteAllowedToStream","muteLocalStream","initialMute","mediaProperties","audioStream","muted","videoStream","undefined","applyClientStateToServer","init","enable","mute","reason","setServerMuted","newMuteState","userMuteState","systemMuteState","userMuted","systemMuted","localMuteState","getClientLocalMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","handleLocusDelta","remoteUpdateError","reject","members","muteMember","selfId","setUnmuteAllowed"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToStream(meeting);\n\n // if we are remotely muted, we need to apply that to the local stream now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalStream(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioStream?.muted\n : meeting.mediaProperties.videoStream?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local stream initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no stream, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video stream has changed.\n * It reapplies the remote mute state onto the new stream and also reads the current\n * local mute state from the stream and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalStreamChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local stream\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the stream, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalStream(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoStream?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local stream mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalStreamMuteStateChange(meeting?: any) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n\n // either user or system may have triggered a mute state change, but localMute should reflect both\n let newMuteState: boolean;\n let userMuteState: boolean;\n let systemMuteState: boolean;\n if (this.type === AUDIO) {\n newMuteState = meeting.mediaProperties.audioStream?.muted;\n userMuteState = meeting.mediaProperties.audioStream?.userMuted;\n systemMuteState = meeting.mediaProperties.audioStream?.systemMuted;\n } else {\n newMuteState = meeting.mediaProperties.videoStream?.muted;\n userMuteState = meeting.mediaProperties.videoStream?.userMuted;\n systemMuteState = meeting.mediaProperties.videoStream?.systemMuted;\n }\n\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${newMuteState} (user mute: ${userMuteState}, system mute: ${systemMuteState})`\n );\n\n this.state.client.localMute = newMuteState;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local stream (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local stream\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalStream(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n // failed to apply client state to server, so revert stream mute state to server state\n this.muteLocalStream(\n meeting,\n this.state.server.localMute || this.state.server.remoteMute,\n 'clientRequestFailed'\n );\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.handleLocusDelta(locus, meeting);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Applies the current value for unmute allowed to the underlying stream\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private applyUnmuteAllowedToStream(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToStream(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n this.muteLocalStream(meeting, muted, 'remotelyMuted');\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: any) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n\n // change user mute state to false, but keep localMute true if overall mute state is still true\n this.muteLocalStream(meeting, false, 'localUnmuteRequired');\n if (this.type === AUDIO) {\n this.state.client.localMute = meeting.mediaProperties.audioStream?.muted;\n } else {\n this.state.client.localMute = meeting.mediaProperties.videoStream?.muted;\n }\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,iDACoBL,IAAI,iDAAuCC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,EAAE,EAChG;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACR,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EAEvD,OAAOK,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA,IAOaC,SAAS;EAapB;AACF;AACA;AACA;AACA;AACA;AACA;EACE,mBAAYR,IAAY,EAAEC,OAAY,EAAEC,OAAgB,EAAE;IAAA;IAAA;IAAA;IAAA;IAAA;IACxD,IAAIF,IAAI,KAAKS,gBAAK,IAAIT,IAAI,KAAKU,gBAAK,EAAE;MACpC,MAAM,IAAIC,kBAAc,CAAC,yDAAyD,CAAC;IACrF;IACA,IAAI,CAACX,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACY,qBAAqB,GAAG,KAAK;IAClC,IAAI,CAACC,KAAK,GAAG;MACXC,MAA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AE,qBAAqB,CAAC;MAC3D,IAAI,IAAI,CAACD,IAAI,KAAKS,gBAAK,EAAE;QAAA;QACvB,IAAI,CAACI,KAAK,CAACC,MAAM,CAACC,SAAS,8BAAGd,OAAO,CAACyB,eAAe,CAACC,WAAW,4DAAnC,wBAAqCC,KAAK;MAC1E,CAAC,MAAM;QAAA;QACL,IAAI,CAACf,KAAK,CAACC,MAAM,CAACC,SAAS,8BAAGd,OAAO,CAACyB,eAAe,CAACG,WAAW,4DAAnC,wBAAqCD,KAAK;MAC1E;MAEA,IAAI,CAACG,wBAAwB,CAAC9B,OAAO,CAAC;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAA;IAAA,OAQA,mBAAiB;MACf,OACE,IAAI,CAACY,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACD,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IAE9F;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACC,UAAU;IACrC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACI,aAAa;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,0BAAwB;MACtB,OAAO,IAAI,CAACuB,uBAAuB,EAAE;IACvC;EAAC;EAAA;AAAA;AAAA"}
|
package/dist/meeting/request.js
CHANGED
|
@@ -28,6 +28,7 @@ var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
|
28
28
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
29
29
|
var _webexCore = require("@webex/webex-core");
|
|
30
30
|
var _common = require("@webex/common");
|
|
31
|
+
var _internalPluginMetrics = require("@webex/internal-plugin-metrics");
|
|
31
32
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
32
33
|
var _constants = require("../constants");
|
|
33
34
|
var _util = _interopRequireDefault(require("./util"));
|
|
@@ -166,6 +167,13 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
166
167
|
if (liveAnnotationSupported) {
|
|
167
168
|
deviceCapabilities.push(_constants.ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);
|
|
168
169
|
}
|
|
170
|
+
|
|
171
|
+
// append installationId to device config if it exists
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
if (this.webex.internal.device.config.installationId) {
|
|
174
|
+
// @ts-ignore
|
|
175
|
+
body.device.installationId = this.webex.internal.device.config.installationId;
|
|
176
|
+
}
|
|
169
177
|
if (locale) {
|
|
170
178
|
body.locale = locale;
|
|
171
179
|
}
|
|
@@ -180,6 +188,9 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
180
188
|
body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;
|
|
181
189
|
// @ts-ignore
|
|
182
190
|
body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;
|
|
191
|
+
body.device.localIp =
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
_internalPluginMetrics.CallDiagnosticUtils.anonymizeIPAddress(this.webex.meetings.geoHintInfo.clientAddress) || undefined;
|
|
183
194
|
}
|
|
184
195
|
if (moderator !== undefined) {
|
|
185
196
|
body.moderator = moderator;
|
|
@@ -191,44 +202,44 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
191
202
|
body.pin = pin;
|
|
192
203
|
}
|
|
193
204
|
if (!locusUrl) {
|
|
194
|
-
_context2.next =
|
|
205
|
+
_context2.next = 20;
|
|
195
206
|
break;
|
|
196
207
|
}
|
|
197
208
|
url = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
|
|
198
|
-
_context2.next =
|
|
209
|
+
_context2.next = 37;
|
|
199
210
|
break;
|
|
200
|
-
case
|
|
211
|
+
case 20:
|
|
201
212
|
if (!(inviteeAddress || meetingNumber)) {
|
|
202
|
-
_context2.next =
|
|
213
|
+
_context2.next = 37;
|
|
203
214
|
break;
|
|
204
215
|
}
|
|
205
|
-
_context2.prev =
|
|
216
|
+
_context2.prev = 21;
|
|
206
217
|
if (!locusClusterUrl) {
|
|
207
|
-
_context2.next =
|
|
218
|
+
_context2.next = 26;
|
|
208
219
|
break;
|
|
209
220
|
}
|
|
210
221
|
clusterUrl = "https://".concat(locusClusterUrl, "/locus/api/v1");
|
|
211
|
-
_context2.next =
|
|
222
|
+
_context2.next = 29;
|
|
212
223
|
break;
|
|
213
|
-
case
|
|
214
|
-
_context2.next =
|
|
224
|
+
case 26:
|
|
225
|
+
_context2.next = 28;
|
|
215
226
|
return this.webex.internal.services.waitForCatalog('postauth');
|
|
216
|
-
case
|
|
227
|
+
case 28:
|
|
217
228
|
// @ts-ignore
|
|
218
229
|
clusterUrl = this.webex.internal.services.get('locus');
|
|
219
|
-
case
|
|
230
|
+
case 29:
|
|
220
231
|
url = "".concat(clusterUrl, "/").concat(_constants.LOCI, "/").concat(_constants.CALL);
|
|
221
232
|
body.invitee = {
|
|
222
233
|
address: inviteeAddress || "wbxmn:".concat(meetingNumber)
|
|
223
234
|
};
|
|
224
|
-
_context2.next =
|
|
235
|
+
_context2.next = 37;
|
|
225
236
|
break;
|
|
226
|
-
case
|
|
227
|
-
_context2.prev =
|
|
228
|
-
_context2.t0 = _context2["catch"](
|
|
237
|
+
case 33:
|
|
238
|
+
_context2.prev = 33;
|
|
239
|
+
_context2.t0 = _context2["catch"](21);
|
|
229
240
|
_loggerProxy.default.logger.error("Meeting:request#joinMeeting Error Joining ".concat(inviteeAddress || meetingNumber, " --> ").concat(_context2.t0));
|
|
230
241
|
throw _context2.t0;
|
|
231
|
-
case
|
|
242
|
+
case 37:
|
|
232
243
|
// TODO: -- this will be resolved in SDK request
|
|
233
244
|
url = url.concat("?".concat(_constants.ALTERNATE_REDIRECT_TRUE));
|
|
234
245
|
if (resourceId === inviteeAddress) {
|
|
@@ -246,11 +257,11 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
246
257
|
uri: url,
|
|
247
258
|
body: body
|
|
248
259
|
}));
|
|
249
|
-
case
|
|
260
|
+
case 41:
|
|
250
261
|
case "end":
|
|
251
262
|
return _context2.stop();
|
|
252
263
|
}
|
|
253
|
-
}, _callee2, this, [[
|
|
264
|
+
}, _callee2, this, [[21, 33]]);
|
|
254
265
|
}));
|
|
255
266
|
function joinMeeting(_x) {
|
|
256
267
|
return _joinMeeting.apply(this, arguments);
|
|
@@ -385,7 +396,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
385
396
|
uri: url
|
|
386
397
|
}).catch(function (err) {
|
|
387
398
|
_loggerProxy.default.logger.error("Meeting:request#getLocusDTO --> Error getting latest locus, error ".concat(err));
|
|
388
|
-
|
|
399
|
+
throw err;
|
|
389
400
|
});
|
|
390
401
|
}
|
|
391
402
|
return _promise.default.reject();
|
|
@@ -591,6 +602,7 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
591
602
|
* @param {String} options.deviceUrl Url of a device
|
|
592
603
|
* @param {String} options.resourceId Populated if you are paired to a device
|
|
593
604
|
* @param {String} options.uri floor grant uri
|
|
605
|
+
* @param {String} options.shareInstanceId id for current share
|
|
594
606
|
* @returns {Promise}
|
|
595
607
|
*/
|
|
596
608
|
}, {
|
|
@@ -621,6 +633,9 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
621
633
|
floor: floorReq,
|
|
622
634
|
resourceUrl: options.resourceUrl
|
|
623
635
|
};
|
|
636
|
+
if (options !== null && options !== void 0 && options.shareInstanceId) {
|
|
637
|
+
body.floor.shareInstanceId = options.shareInstanceId;
|
|
638
|
+
}
|
|
624
639
|
if (options !== null && options !== void 0 && options.resourceToken) {
|
|
625
640
|
body.resourceToken = options === null || options === void 0 ? void 0 : options.resourceToken;
|
|
626
641
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingRequest","attrs","options","meeting","otherAttrs","webex","boundedStorage","get","REACHABILITY","namespace","localStorageJoinCookie","catch","joinCookieRaw","joinCookie","JSON","parse","LoggerProxy","logger","error","locusDeltaRequest","MeetingUtil","generateLocusDeltaRequest","buildLocusDeltaRequestOptions","generateBuildLocusDeltaRequestOptions","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","locusClusterUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","ipVersion","info","url","getJoinCookie","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","ipver","push","BREAKOUTS","BREAKOUTS_SUPPORTED","ANNOTATION","ANNOTATION_ON_SHARE_SUPPORTED","length","geoHintInfo","countryCode","regionCode","undefined","PARTICIPANT","clusterUrl","internal","services","waitForCatalog","LOCI","CALL","invitee","address","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","GET","reject","phoneUrl","selfId","LEAVE","PUT","prepareLeaveMeetingRequestOptions","ALERT","CONTROLS","lock","locked","PATCH","DECLINE","reason","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","resourceToken","annotationInfo","annotation","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","reactionChannelUrl","reaction","participantId","sender","enable","requestingParticipantId","reactions","enabled","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n BREAKOUTS,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n REACHABILITY,\n SEND_DTMF_ENDPOINT,\n _SLIDES_,\n ANNOTATION,\n IP_VERSION,\n} from '../constants';\nimport {SendReactionOptions, ToggleReactionsOptions} from './request.type';\nimport MeetingUtil from './util';\nimport {AnnotationInfo} from '../annotation/annotation.types';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n meetingRef: WeakRef<any>;\n locusDeltaRequest: (options: object) => Promise<any>;\n buildLocusDeltaRequestOptions: (options: object) => Promise<any>;\n\n /**\n * Constructor\n * @param {Object} attrs\n * @param {Object} options\n */\n constructor(attrs: any, options: any) {\n const {meeting, ...otherAttrs} = attrs;\n\n super(otherAttrs, options);\n\n this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);\n this.buildLocusDeltaRequestOptions = MeetingUtil.generateBuildLocusDeltaRequestOptions(meeting);\n\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {\n leading: true,\n trailing: true,\n });\n }\n\n /**\n * Returns joinCookie from boundedStorage if present.\n * @returns {Object} joinCookie\n */\n private getJoinCookie = async () => {\n // @ts-ignore\n const joinCookieRaw = await this.webex.boundedStorage\n .get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)\n .catch(() => {});\n\n if (joinCookieRaw) {\n try {\n const joinCookie = JSON.parse(joinCookieRaw);\n if (joinCookie) {\n return joinCookie;\n }\n } catch (e) {\n LoggerProxy.logger.error(\n `MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`\n );\n }\n }\n\n return null;\n };\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @param {boolean} options.breakoutsSupported\n * @param {String} options.locale,\n * @param {Array} options.deviceCapabilities\n * @param {boolean} options.liveAnnotationSupported\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n locusClusterUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n breakoutsSupported: boolean;\n locale?: string;\n deviceCapabilities?: Array<string>;\n liveAnnotationSupported: boolean;\n ipVersion?: IP_VERSION;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n locusClusterUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding,\n breakoutsSupported,\n locale,\n deviceCapabilities = [],\n liveAnnotationSupported,\n ipVersion,\n } = options;\n\n LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);\n\n let url = '';\n\n const joinCookie = await this.getJoinCookie();\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType,\n },\n usingResource: resourceId || null,\n moveMediaToResource: (resourceId && moveToResource) || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true,\n joinCookie,\n ipver: ipVersion,\n },\n };\n\n if (breakoutsSupported) {\n deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);\n }\n if (liveAnnotationSupported) {\n deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);\n }\n\n if (locale) {\n body.locale = locale;\n }\n\n // add deviceCapabilities prop\n if (deviceCapabilities.length) {\n body.deviceCapabilities = deviceCapabilities;\n }\n // @ts-ignore\n if (this.webex.meetings.geoHintInfo) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n } else if (inviteeAddress || meetingNumber) {\n try {\n let clusterUrl;\n\n if (locusClusterUrl) {\n clusterUrl = `https://${locusClusterUrl}/locus/api/v1`;\n } else {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n clusterUrl = this.webex.internal.services.get('locus');\n }\n\n url = `${clusterUrl}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`,\n };\n } catch (e) {\n LoggerProxy.logger.error(\n `Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`\n );\n throw e;\n }\n }\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_],\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body,\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({\n captchaRefreshUrl,\n captchaId,\n }: {\n captchaRefreshUrl: string;\n captchaId: string;\n }) {\n const body = {\n captchaId,\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided\n * @param {Object} options\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getLocusDTO(options: {url: string}) {\n const {url} = options;\n\n if (url) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: url,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`\n );\n\n return err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Prepares request options to to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Object} request options\n */\n prepareLeaveMeetingRequestOptions({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body,\n };\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Builds request options to leave a meeting\n * @param {Object} options\n * @returns {Object} request options\n */\n buildLeaveMeetingRequestOptions(options: any) {\n return this.buildLocusDeltaRequestOptions(this.prepareLeaveMeetingRequestOptions(options));\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n correlationId: options.correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Makes a network request to lock the meeting\n * @param {Object} options\n * @param {Boolean} options.lock Whether it is locked or not\n * @returns {Promise}\n */\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock,\n },\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PATCH,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @returns {Promise}\n */\n changeMeetingFloor(\n options:\n | {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n annotationInfo: AnnotationInfo;\n }\n | any\n ) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ],\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl,\n },\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl,\n };\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n if (options?.annotationInfo) {\n body.annotation = options?.annotationInfo;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body,\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones,\n },\n },\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for main: ${JSON.stringify(\n main\n )}`\n )\n );\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for content: ${JSON.stringify(\n content\n )}`\n )\n );\n }\n\n const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams =\n renderInfoMain || renderInfoContent\n ? {\n renderInfo: {\n main: renderInfoMain,\n content: renderInfoContent,\n },\n }\n : undefined;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams,\n },\n },\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({locusUrl}: {locusUrl: string}) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl,\n });\n }\n\n /**\n * Make a network request to send a reaction.\n * @param {Object} options\n * @param {Url} options.reactionChannelUrl\n * @param {Reaction} options.reaction\n * @param {string} options.senderID\n * @returns {Promise}\n */\n sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {\n const uri = reactionChannelUrl;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body: {\n sender: {participantId},\n reaction,\n },\n });\n }\n\n /**\n * Make a network request to enable or disable reactions.\n * @param {boolean} options.enable - determines if we need to enable or disable.\n * @param {locusUrl} options.locusUrl\n * @returns {Promise}\n */\n toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {\n const uri = `${locusUrl}/${CONTROLS}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body: {\n reactions: {\n enabled: enable,\n },\n requestingParticipantId,\n },\n });\n }\n\n getLocusStatusByUrl(locusUrl: string) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AAEA;AACA;AAsBA;AAAiC;AAAA;AAAA;AAAA;AAAA;AAGjC;AACA;AACA;AAFA,IAGqBA,cAAc;EAAA;EAAA;EAMjC;AACF;AACA;AACA;AACA;EACE,wBAAYC,KAAU,EAAEC,OAAY,EAAE;IAAA;IAAA;IACpC,IAAOC,OAAO,GAAmBF,KAAK,CAA/BE,OAAO;MAAKC,UAAU,0CAAIH,KAAK;IAEtC,0BAAMG,UAAU,EAAEF,OAAO;IAAE;IAAA;IAAA;IAAA;IAAA,iLAeL;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OAEM,MAAKG,KAAK,CAACC,cAAc,CAClDC,GAAG,CAACC,uBAAY,CAACC,SAAS,EAAED,uBAAY,CAACE,sBAAsB,CAAC,CAChEC,KAAK,CAAC,YAAM,CAAC,CAAC,CAAC;UAAA;YAFZC,aAAa;YAAA,KAIfA,aAAa;cAAA;cAAA;YAAA;YAAA;YAEPC,UAAU,GAAGC,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C,qBAAU,CAACC,IAAI;QACvBC,GAAG,EAAHA,GAAG;QACHzC,IAAI,EAAE;UACJuG,MAAM,EAAE;YAACD,aAAa,EAAbA;UAAa,CAAC;UACvBD,QAAQ,EAARA;QACF;MACF,CAAC,CAAC;IACJ;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,iCAAqF;MAAA,IAApEG,MAAM,UAANA,MAAM;QAAE1H,QAAQ,UAARA,QAAQ;QAAE2H,uBAAuB,UAAvBA,uBAAuB;MACxD,IAAMhE,GAAG,aAAM3D,QAAQ,cAAIgF,mBAAQ,CAAE;;MAErC;MACA,OAAO,IAAI,CAAC9F,iBAAiB,CAAC;QAC5BsE,MAAM,EAAEC,qBAAU,CAACoB,GAAG;QACtBlB,GAAG,EAAHA,GAAG;QACHzC,IAAI,EAAE;UACJ0G,SAAS,EAAE;YACTC,OAAO,EAAEH;UACX,CAAC;UACDC,uBAAuB,EAAvBA;QACF;MACF,CAAC,CAAC;IACJ;EAAC;IAAA;IAAA,OAED,6BAAoB3H,QAAgB,EAAE;MACpC;MACA,OAAO,IAAI,CAACuD,OAAO,CAAC;QAClBC,MAAM,EAAEC,qBAAU,CAACe,GAAG;QACtBb,GAAG,EAAE3D;MACP,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA,EA/0ByC8H,+BAAoB;AAAA"}
|
|
1
|
+
{"version":3,"names":["MeetingRequest","attrs","options","meeting","otherAttrs","webex","boundedStorage","get","REACHABILITY","namespace","localStorageJoinCookie","catch","joinCookieRaw","joinCookie","JSON","parse","LoggerProxy","logger","error","locusDeltaRequest","MeetingUtil","generateLocusDeltaRequest","buildLocusDeltaRequestOptions","generateBuildLocusDeltaRequestOptions","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","locusClusterUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","ipVersion","info","url","getJoinCookie","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","ipver","push","BREAKOUTS","BREAKOUTS_SUPPORTED","ANNOTATION","ANNOTATION_ON_SHARE_SUPPORTED","internal","installationId","length","geoHintInfo","countryCode","regionCode","localIp","CallDiagnosticUtils","anonymizeIPAddress","clientAddress","undefined","PARTICIPANT","clusterUrl","services","waitForCatalog","LOCI","CALL","invitee","address","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","GET","reject","phoneUrl","selfId","LEAVE","PUT","prepareLeaveMeetingRequestOptions","ALERT","CONTROLS","lock","locked","PATCH","DECLINE","reason","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","shareInstanceId","resourceToken","annotationInfo","annotation","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","reactionChannelUrl","reaction","participantId","sender","enable","requestingParticipantId","reactions","enabled","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\nimport {CallDiagnosticUtils} from '@webex/internal-plugin-metrics';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n BREAKOUTS,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n REACHABILITY,\n SEND_DTMF_ENDPOINT,\n _SLIDES_,\n ANNOTATION,\n IP_VERSION,\n} from '../constants';\nimport {SendReactionOptions, ToggleReactionsOptions} from './request.type';\nimport MeetingUtil from './util';\nimport {AnnotationInfo} from '../annotation/annotation.types';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n meetingRef: WeakRef<any>;\n locusDeltaRequest: (options: object) => Promise<any>;\n buildLocusDeltaRequestOptions: (options: object) => Promise<any>;\n\n /**\n * Constructor\n * @param {Object} attrs\n * @param {Object} options\n */\n constructor(attrs: any, options: any) {\n const {meeting, ...otherAttrs} = attrs;\n\n super(otherAttrs, options);\n\n this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);\n this.buildLocusDeltaRequestOptions = MeetingUtil.generateBuildLocusDeltaRequestOptions(meeting);\n\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {\n leading: true,\n trailing: true,\n });\n }\n\n /**\n * Returns joinCookie from boundedStorage if present.\n * @returns {Object} joinCookie\n */\n private getJoinCookie = async () => {\n // @ts-ignore\n const joinCookieRaw = await this.webex.boundedStorage\n .get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)\n .catch(() => {});\n\n if (joinCookieRaw) {\n try {\n const joinCookie = JSON.parse(joinCookieRaw);\n if (joinCookie) {\n return joinCookie;\n }\n } catch (e) {\n LoggerProxy.logger.error(\n `MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`\n );\n }\n }\n\n return null;\n };\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @param {boolean} options.breakoutsSupported\n * @param {String} options.locale,\n * @param {Array} options.deviceCapabilities\n * @param {boolean} options.liveAnnotationSupported\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n locusClusterUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n breakoutsSupported: boolean;\n locale?: string;\n deviceCapabilities?: Array<string>;\n liveAnnotationSupported: boolean;\n ipVersion?: IP_VERSION;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n locusClusterUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding,\n breakoutsSupported,\n locale,\n deviceCapabilities = [],\n liveAnnotationSupported,\n ipVersion,\n } = options;\n\n LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);\n\n let url = '';\n\n const joinCookie = await this.getJoinCookie();\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType,\n },\n usingResource: resourceId || null,\n moveMediaToResource: (resourceId && moveToResource) || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true,\n joinCookie,\n ipver: ipVersion,\n },\n };\n\n if (breakoutsSupported) {\n deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);\n }\n if (liveAnnotationSupported) {\n deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);\n }\n\n // append installationId to device config if it exists\n // @ts-ignore\n if (this.webex.internal.device.config.installationId) {\n // @ts-ignore\n body.device.installationId = this.webex.internal.device.config.installationId;\n }\n\n if (locale) {\n body.locale = locale;\n }\n\n // add deviceCapabilities prop\n if (deviceCapabilities.length) {\n body.deviceCapabilities = deviceCapabilities;\n }\n // @ts-ignore\n if (this.webex.meetings.geoHintInfo) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.geoHintInfo.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.geoHintInfo.regionCode;\n body.device.localIp =\n // @ts-ignore\n CallDiagnosticUtils.anonymizeIPAddress(this.webex.meetings.geoHintInfo.clientAddress) ||\n undefined;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n } else if (inviteeAddress || meetingNumber) {\n try {\n let clusterUrl;\n\n if (locusClusterUrl) {\n clusterUrl = `https://${locusClusterUrl}/locus/api/v1`;\n } else {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n clusterUrl = this.webex.internal.services.get('locus');\n }\n\n url = `${clusterUrl}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`,\n };\n } catch (e) {\n LoggerProxy.logger.error(\n `Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`\n );\n throw e;\n }\n }\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_],\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body,\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({\n captchaRefreshUrl,\n captchaId,\n }: {\n captchaRefreshUrl: string;\n captchaId: string;\n }) {\n const body = {\n captchaId,\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided\n * @param {Object} options\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getLocusDTO(options: {url: string}) {\n const {url} = options;\n\n if (url) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: url,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`\n );\n\n throw err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Prepares request options to to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Object} request options\n */\n prepareLeaveMeetingRequestOptions({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return {\n method: HTTP_VERBS.PUT,\n uri,\n body,\n };\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Builds request options to leave a meeting\n * @param {Object} options\n * @returns {Object} request options\n */\n buildLeaveMeetingRequestOptions(options: any) {\n return this.buildLocusDeltaRequestOptions(this.prepareLeaveMeetingRequestOptions(options));\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n correlationId: options.correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Makes a network request to lock the meeting\n * @param {Object} options\n * @param {Boolean} options.lock Whether it is locked or not\n * @returns {Promise}\n */\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock,\n },\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PATCH,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @param {String} options.shareInstanceId id for current share\n * @returns {Promise}\n */\n changeMeetingFloor(\n options:\n | {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n annotationInfo: AnnotationInfo;\n shareInstanceId: string;\n }\n | any\n ) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ],\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl,\n },\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl,\n };\n\n if (options?.shareInstanceId) {\n body.floor.shareInstanceId = options.shareInstanceId;\n }\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n if (options?.annotationInfo) {\n body.annotation = options?.annotationInfo;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body,\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones,\n },\n },\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for main: ${JSON.stringify(\n main\n )}`\n )\n );\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for content: ${JSON.stringify(\n content\n )}`\n )\n );\n }\n\n const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams =\n renderInfoMain || renderInfoContent\n ? {\n renderInfo: {\n main: renderInfoMain,\n content: renderInfoContent,\n },\n }\n : undefined;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams,\n },\n },\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({locusUrl}: {locusUrl: string}) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl,\n });\n }\n\n /**\n * Make a network request to send a reaction.\n * @param {Object} options\n * @param {Url} options.reactionChannelUrl\n * @param {Reaction} options.reaction\n * @param {string} options.senderID\n * @returns {Promise}\n */\n sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {\n const uri = reactionChannelUrl;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body: {\n sender: {participantId},\n reaction,\n },\n });\n }\n\n /**\n * Make a network request to enable or disable reactions.\n * @param {boolean} options.enable - determines if we need to enable or disable.\n * @param {locusUrl} options.locusUrl\n * @returns {Promise}\n */\n toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {\n const uri = `${locusUrl}/${CONTROLS}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body: {\n reactions: {\n enabled: enable,\n },\n requestingParticipantId,\n },\n });\n }\n\n getLocusStatusByUrl(locusUrl: string) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AACA;AAEA;AACA;AAsBA;AAAiC;AAAA;AAAA;AAAA;AAAA;AAGjC;AACA;AACA;AAFA,IAGqBA,cAAc;EAAA;EAAA;EAMjC;AACF;AACA;AACA;AACA;EACE,wBAAYC,KAAU,EAAEC,OAAY,EAAE;IAAA;IAAA;IACpC,IAAOC,OAAO,GAAmBF,KAAK,CAA/BE,OAAO;MAAKC,UAAU,0CAAIH,KAAK;IAEtC,0BAAMG,UAAU,EAAEF,OAAO;IAAE;IAAA;IAAA;IAAA;IAAA,iLAeL;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OAEM,MAAKG,KAAK,CAACC,cAAc,CAClDC,GAAG,CAACC,uBAAY,CAACC,SAAS,EAAED,uBAAY,CAACE,sBAAsB,CAAC,CAChEC,KAAK,CAAC,YAAM,CAAC,CAAC,CAAC;UAAA;YAFZC,aAAa;YAAA,KAIfA,aAAa;cAAA;cAAA;YAAA;YAAA;YAEPC,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACH,aAAa,CAAC;YAAA,KACxCC,UAAU;cAAA;cAAA;YAAA;YAAA,iCACLA,UAAU;UAAA;YAAA;YAAA;UAAA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