@webex/plugin-meetings 3.8.0 → 3.8.1-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +70 -6
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +12 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +28 -123
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +3 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +78 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +4 -4
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +37 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +92 -12
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +432 -418
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +17 -17
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +94 -6
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +9 -2
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +21 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +678 -344
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +21 -22
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +4 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +13 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +373 -68
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +5 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +136 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +14 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +55 -9
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +3 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +335 -353
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +137 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +38 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +36 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +40 -8
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +63 -27
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +107 -47
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/util.js +5 -5
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +45 -27
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js +17 -0
- package/dist/roap/types.js.map +1 -0
- package/dist/types/common/errors/webex-errors.d.ts +7 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +20 -85
- package/dist/types/controls-options-manager/enums.d.ts +4 -1
- package/dist/types/controls-options-manager/types.d.ts +10 -1
- package/dist/types/locus-info/index.d.ts +3 -3
- package/dist/types/locus-info/selfUtils.d.ts +216 -1
- package/dist/types/media/properties.d.ts +15 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/muteState.d.ts +0 -1
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
- package/dist/types/meetings/index.d.ts +57 -0
- package/dist/types/member/index.d.ts +21 -6
- package/dist/types/member/types.d.ts +73 -14
- package/dist/types/member/util.d.ts +156 -1
- package/dist/types/members/collection.d.ts +6 -5
- package/dist/types/members/index.d.ts +32 -43
- package/dist/types/members/request.d.ts +26 -0
- package/dist/types/members/util.d.ts +27 -0
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
- package/dist/types/reachability/clusterReachability.d.ts +15 -7
- package/dist/types/reachability/index.d.ts +10 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/types/roap/index.d.ts +3 -2
- package/dist/types/roap/turnDiscovery.d.ts +5 -17
- package/dist/types/roap/types.d.ts +16 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/breakouts/index.ts +69 -0
- package/src/common/errors/webex-errors.ts +8 -1
- package/src/config.ts +3 -0
- package/src/constants.ts +30 -90
- package/src/controls-options-manager/enums.ts +3 -0
- package/src/controls-options-manager/types.ts +16 -1
- package/src/controls-options-manager/util.ts +93 -0
- package/src/interpretation/index.ts +3 -3
- package/src/locus-info/controlsUtils.ts +59 -14
- package/src/locus-info/index.ts +97 -13
- package/src/locus-info/selfUtils.ts +496 -442
- package/src/media/index.ts +23 -21
- package/src/media/properties.ts +96 -0
- package/src/meeting/brbState.ts +11 -2
- package/src/meeting/in-meeting-actions.ts +40 -0
- package/src/meeting/index.ts +470 -105
- package/src/meeting/locusMediaRequest.ts +27 -22
- package/src/meeting/muteState.ts +4 -4
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +11 -2
- package/src/meeting-info/meeting-info-v2.ts +254 -8
- package/src/meeting-info/utilv2.ts +5 -0
- package/src/meetings/index.ts +148 -1
- package/src/meetings/util.ts +18 -0
- package/src/member/index.ts +68 -22
- package/src/member/types.ts +82 -16
- package/src/member/util.ts +357 -350
- package/src/members/collection.ts +4 -3
- package/src/members/index.ts +137 -18
- package/src/members/request.ts +44 -0
- package/src/members/util.ts +43 -1
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/remoteMediaManager.ts +32 -10
- package/src/reachability/clusterReachability.ts +73 -26
- package/src/reachability/index.ts +62 -1
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/src/reconnection-manager/index.ts +2 -2
- package/src/recording-controller/util.ts +17 -13
- package/src/roap/index.ts +3 -7
- package/src/roap/turnDiscovery.ts +34 -39
- package/src/roap/types.ts +23 -0
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +167 -95
- package/test/unit/spec/controls-options-manager/util.js +178 -0
- package/test/unit/spec/interpretation/index.ts +39 -1
- package/test/unit/spec/locus-info/controlsUtils.js +155 -9
- package/test/unit/spec/locus-info/index.js +209 -73
- package/test/unit/spec/locus-info/selfUtils.js +98 -24
- package/test/unit/spec/media/index.ts +150 -18
- package/test/unit/spec/media/properties.ts +130 -0
- package/test/unit/spec/meeting/brbState.ts +40 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
- package/test/unit/spec/meeting/index.js +804 -139
- package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
- package/test/unit/spec/meeting/muteState.js +73 -2
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +119 -18
- package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
- package/test/unit/spec/meeting-info/utilv2.js +19 -0
- package/test/unit/spec/meetings/index.js +146 -2
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/members/index.js +304 -78
- package/test/unit/spec/members/request.js +68 -22
- package/test/unit/spec/members/utils.js +75 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
- package/test/unit/spec/reachability/clusterReachability.ts +88 -56
- package/test/unit/spec/reachability/index.ts +97 -0
- package/test/unit/spec/reachability/request.js +47 -2
- package/test/unit/spec/reconnection-manager/index.js +4 -4
- package/test/unit/spec/roap/turnDiscovery.ts +110 -28
- package/test/unit/spec/webinar/index.ts +5 -0
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -93
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -322
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
@@ -1,14 +1,18 @@
|
|
1
1
|
import 'jsdom-global/register';
|
2
2
|
import sinon from 'sinon';
|
3
3
|
import {assert} from '@webex/test-helper-chai';
|
4
|
-
import {
|
5
|
-
|
4
|
+
import {cloneDeep} from 'lodash';
|
5
|
+
import {EventEmitter} from 'events';
|
6
6
|
import MockWebex from '@webex/test-helper-mock-webex';
|
7
7
|
import Meetings from '@webex/plugin-meetings';
|
8
|
-
import {
|
8
|
+
import {
|
9
|
+
LocalMuteRequest,
|
10
|
+
LocusMediaRequest,
|
11
|
+
RoapRequest,
|
12
|
+
} from '@webex/plugin-meetings/src/meeting/locusMediaRequest';
|
9
13
|
import testUtils from '../../../utils/testUtils';
|
10
|
-
import {
|
11
|
-
import {
|
14
|
+
import {Defer} from '@webex/common';
|
15
|
+
import {IP_VERSION} from '../../../../src/constants';
|
12
16
|
|
13
17
|
describe('LocusMediaRequest.send()', () => {
|
14
18
|
let locusMediaRequest: LocusMediaRequest;
|
@@ -16,10 +20,10 @@ describe('LocusMediaRequest.send()', () => {
|
|
16
20
|
let mockWebex;
|
17
21
|
|
18
22
|
const fakeLocusResponse = {
|
19
|
-
locus: {
|
23
|
+
locus: {something: 'whatever'},
|
20
24
|
};
|
21
25
|
|
22
|
-
const exampleRoapRequestBody:RoapRequest = {
|
26
|
+
const exampleRoapRequestBody: RoapRequest = {
|
23
27
|
type: 'RoapMessage',
|
24
28
|
mediaId: 'mediaId',
|
25
29
|
selfUrl: 'fakeMeetingSelfUrl',
|
@@ -31,8 +35,11 @@ describe('LocusMediaRequest.send()', () => {
|
|
31
35
|
tieBreaker: 0xfffffffe,
|
32
36
|
},
|
33
37
|
reachability: {
|
34
|
-
'wjfkm.wjfkm.*': {udp:{reachable: true}, tcp:{reachable:false}},
|
35
|
-
'1eb65fdf-9643-417f-9974-ad72cae0e10f.59268c12-7a04-4b23-a1a1-4c74be03019a.*': {
|
38
|
+
'wjfkm.wjfkm.*': {udp: {reachable: true}, tcp: {reachable: false}},
|
39
|
+
'1eb65fdf-9643-417f-9974-ad72cae0e10f.59268c12-7a04-4b23-a1a1-4c74be03019a.*': {
|
40
|
+
udp: {reachable: false},
|
41
|
+
tcp: {reachable: true},
|
42
|
+
},
|
36
43
|
},
|
37
44
|
clientMediaPreferences: {
|
38
45
|
preferTranscoding: false,
|
@@ -45,19 +52,22 @@ describe('LocusMediaRequest.send()', () => {
|
|
45
52
|
reachability: {
|
46
53
|
version: '1',
|
47
54
|
result: 'some fake reachability result',
|
48
|
-
}
|
49
|
-
}
|
55
|
+
},
|
56
|
+
},
|
50
57
|
};
|
51
58
|
|
52
|
-
const createExpectedRoapBody = (
|
59
|
+
const createExpectedRoapBody = (
|
60
|
+
expectedMessageType,
|
61
|
+
expectedMute: {audioMuted: boolean; videoMuted: boolean}
|
62
|
+
) => {
|
53
63
|
return {
|
54
|
-
device: {
|
64
|
+
device: {url: 'deviceUrl', deviceType: 'deviceType', regionCode: 'regionCode'},
|
55
65
|
correlationId: 'correlationId',
|
56
66
|
localMedias: [
|
57
67
|
{
|
58
68
|
localSdp: `{"audioMuted":${expectedMute.audioMuted},"videoMuted":${expectedMute.videoMuted},"roapMessage":{"messageType":"${expectedMessageType}","sdps":["sdp"],"version":"2","seq":1,"tieBreaker":4294967294},"reachability":{"wjfkm.wjfkm.*":{"udp":{"reachable":true},"tcp":{"reachable":false}},"1eb65fdf-9643-417f-9974-ad72cae0e10f.59268c12-7a04-4b23-a1a1-4c74be03019a.*":{"udp":{"reachable":false},"tcp":{"reachable":true}}}}`,
|
59
|
-
mediaId: 'mediaId'
|
60
|
-
}
|
69
|
+
mediaId: 'mediaId',
|
70
|
+
},
|
61
71
|
],
|
62
72
|
clientMediaPreferences: {
|
63
73
|
preferTranscoding: false,
|
@@ -65,24 +75,27 @@ describe('LocusMediaRequest.send()', () => {
|
|
65
75
|
joinCookie: {
|
66
76
|
anycastEntryPoint: 'aws-eu-west-1',
|
67
77
|
clientIpAddress: 'some ip',
|
68
|
-
timeShot: '2023-05-23T08:03:49Z'
|
78
|
+
timeShot: '2023-05-23T08:03:49Z',
|
69
79
|
},
|
70
80
|
reachability: {
|
71
81
|
version: '1',
|
72
82
|
result: 'some fake reachability result',
|
73
|
-
}
|
74
|
-
}
|
83
|
+
},
|
84
|
+
},
|
75
85
|
};
|
76
86
|
};
|
77
87
|
|
78
|
-
const exampleLocalMuteRequestBody:LocalMuteRequest = {
|
88
|
+
const exampleLocalMuteRequestBody: LocalMuteRequest = {
|
79
89
|
type: 'LocalMute',
|
80
90
|
mediaId: 'mediaId',
|
81
91
|
selfUrl: 'fakeMeetingSelfUrl',
|
82
92
|
muteOptions: {},
|
83
93
|
};
|
84
94
|
|
85
|
-
const createExpectedLocalMuteBody = (
|
95
|
+
const createExpectedLocalMuteBody = (
|
96
|
+
expectedMute: {audioMuted: boolean; videoMuted: boolean},
|
97
|
+
sequence = undefined
|
98
|
+
) => {
|
86
99
|
const body: any = {
|
87
100
|
device: {
|
88
101
|
url: 'deviceUrl',
|
@@ -116,33 +129,37 @@ describe('LocusMediaRequest.send()', () => {
|
|
116
129
|
|
117
130
|
mockWebex.internal = {
|
118
131
|
newMetrics: {
|
119
|
-
submitClientEvent: sinon.stub()
|
132
|
+
submitClientEvent: sinon.stub(),
|
120
133
|
},
|
121
134
|
};
|
122
135
|
|
123
|
-
locusMediaRequest = new LocusMediaRequest(
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
136
|
+
locusMediaRequest = new LocusMediaRequest(
|
137
|
+
{
|
138
|
+
device: {
|
139
|
+
url: 'deviceUrl',
|
140
|
+
deviceType: 'deviceType',
|
141
|
+
regionCode: 'regionCode',
|
142
|
+
},
|
143
|
+
correlationId: 'correlationId',
|
144
|
+
meetingId: 'meetingId',
|
145
|
+
preferTranscoding: true,
|
128
146
|
},
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
parent: mockWebex,
|
134
|
-
});
|
147
|
+
{
|
148
|
+
parent: mockWebex,
|
149
|
+
}
|
150
|
+
);
|
135
151
|
webexRequestStub = sinon.stub(locusMediaRequest, 'request').resolves(fakeLocusResponse);
|
136
|
-
})
|
152
|
+
});
|
137
153
|
|
138
|
-
const sendLocalMute = (muteOptions, overrides={}) =>
|
154
|
+
const sendLocalMute = (muteOptions, overrides = {}) =>
|
155
|
+
locusMediaRequest.send({...exampleLocalMuteRequestBody, ...overrides, muteOptions});
|
139
156
|
|
140
157
|
const sendRoapMessage = (messageType) => {
|
141
158
|
const request = cloneDeep(exampleRoapRequestBody);
|
142
159
|
|
143
160
|
request.roapMessage.messageType = messageType;
|
144
161
|
return locusMediaRequest.send(request);
|
145
|
-
}
|
162
|
+
};
|
146
163
|
|
147
164
|
/** Helper function that makes sure the LocusMediaRequest.confluenceState is 'created' */
|
148
165
|
const ensureConfluenceCreated = async () => {
|
@@ -150,27 +167,7 @@ describe('LocusMediaRequest.send()', () => {
|
|
150
167
|
|
151
168
|
webexRequestStub.resetHistory();
|
152
169
|
mockWebex.internal.newMetrics.submitClientEvent.resetHistory();
|
153
|
-
}
|
154
|
-
|
155
|
-
const checkMetrics = (expectedMetrics: boolean = true) => {
|
156
|
-
if (expectedMetrics) {
|
157
|
-
assert.calledWith(mockWebex.internal.newMetrics.submitClientEvent, {
|
158
|
-
name: 'client.locus.media.request',
|
159
|
-
options: {
|
160
|
-
meetingId: 'meetingId',
|
161
|
-
},
|
162
|
-
});
|
163
|
-
|
164
|
-
assert.calledWith(mockWebex.internal.newMetrics.submitClientEvent, {
|
165
|
-
name: 'client.locus.media.response',
|
166
|
-
options: {
|
167
|
-
meetingId: 'meetingId',
|
168
|
-
},
|
169
|
-
});
|
170
|
-
} else {
|
171
|
-
assert.notCalled(mockWebex.internal.newMetrics.submitClientEvent);
|
172
|
-
}
|
173
|
-
}
|
170
|
+
};
|
174
171
|
|
175
172
|
it('sends a roap message', async () => {
|
176
173
|
const result = await sendRoapMessage('OFFER');
|
@@ -181,9 +178,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
181
178
|
method: 'PUT',
|
182
179
|
uri: 'fakeMeetingSelfUrl/media',
|
183
180
|
body: createExpectedRoapBody('OFFER', {audioMuted: true, videoMuted: true}),
|
181
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
182
|
+
download: sinon.match.instanceOf(EventEmitter),
|
184
183
|
});
|
185
|
-
|
186
|
-
checkMetrics();
|
187
184
|
});
|
188
185
|
|
189
186
|
it('sends correct metric event when roap message fails', async () => {
|
@@ -210,9 +207,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
210
207
|
method: 'PUT',
|
211
208
|
uri: 'fakeMeetingSelfUrl/media',
|
212
209
|
body: createExpectedLocalMuteBody({audioMuted: false, videoMuted: false}),
|
210
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
211
|
+
download: sinon.match.instanceOf(EventEmitter),
|
213
212
|
});
|
214
|
-
|
215
|
-
checkMetrics(false);
|
216
213
|
});
|
217
214
|
|
218
215
|
it('sends a local mute request with sequence', async () => {
|
@@ -228,6 +225,8 @@ describe('LocusMediaRequest.send()', () => {
|
|
228
225
|
method: 'PUT',
|
229
226
|
uri: 'fakeMeetingSelfUrl/media',
|
230
227
|
body: createExpectedLocalMuteBody({audioMuted: false, videoMuted: false}, sequence),
|
228
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
229
|
+
download: sinon.match.instanceOf(EventEmitter),
|
231
230
|
});
|
232
231
|
});
|
233
232
|
|
@@ -237,15 +236,13 @@ describe('LocusMediaRequest.send()', () => {
|
|
237
236
|
let result1;
|
238
237
|
let result2;
|
239
238
|
|
240
|
-
const promise1 = sendLocalMute({audioMuted: true, videoMuted: false})
|
241
|
-
|
242
|
-
|
243
|
-
});
|
239
|
+
const promise1 = sendLocalMute({audioMuted: true, videoMuted: false}).then((result) => {
|
240
|
+
result1 = result;
|
241
|
+
});
|
244
242
|
|
245
|
-
const promise2 = sendLocalMute({audioMuted: false, videoMuted: true})
|
246
|
-
|
247
|
-
|
248
|
-
});
|
243
|
+
const promise2 = sendLocalMute({audioMuted: false, videoMuted: true}).then((result) => {
|
244
|
+
result2 = result;
|
245
|
+
});
|
249
246
|
|
250
247
|
await testUtils.flushPromises();
|
251
248
|
|
@@ -258,9 +255,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
258
255
|
method: 'PUT',
|
259
256
|
uri: 'fakeMeetingSelfUrl/media',
|
260
257
|
body: createExpectedLocalMuteBody({audioMuted: false, videoMuted: true}),
|
258
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
259
|
+
download: sinon.match.instanceOf(EventEmitter),
|
261
260
|
});
|
262
|
-
|
263
|
-
checkMetrics(false);
|
264
261
|
});
|
265
262
|
|
266
263
|
it('sends a local mute request with the last audio/video mute values', async () => {
|
@@ -277,9 +274,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
277
274
|
method: 'PUT',
|
278
275
|
uri: 'fakeMeetingSelfUrl/media',
|
279
276
|
body: createExpectedLocalMuteBody({audioMuted: true, videoMuted: false}),
|
277
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
278
|
+
download: sinon.match.instanceOf(EventEmitter),
|
280
279
|
});
|
281
|
-
|
282
|
-
checkMetrics(false);
|
283
280
|
});
|
284
281
|
|
285
282
|
it('sends only roap when roap and local mute are requested', async () => {
|
@@ -296,9 +293,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
296
293
|
method: 'PUT',
|
297
294
|
uri: 'fakeMeetingSelfUrl/media',
|
298
295
|
body: createExpectedRoapBody('OFFER', {audioMuted: true, videoMuted: false}),
|
296
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
297
|
+
download: sinon.match.instanceOf(EventEmitter),
|
299
298
|
});
|
300
|
-
|
301
|
-
checkMetrics();
|
302
299
|
});
|
303
300
|
|
304
301
|
describe('queueing', () => {
|
@@ -328,10 +325,10 @@ describe('LocusMediaRequest.send()', () => {
|
|
328
325
|
* after the processing cycle from which it was called is finished.
|
329
326
|
* This helper function waits for this to happen - it's needed, because we're using
|
330
327
|
* fake timers in these tests
|
331
|
-
|
328
|
+
*/
|
332
329
|
const ensureQueueProcessingIsStarted = () => {
|
333
330
|
clock.tick(1);
|
334
|
-
}
|
331
|
+
};
|
335
332
|
it('queues requests if there is one already in progress', async () => {
|
336
333
|
results.push(sendRoapMessage('OFFER'));
|
337
334
|
|
@@ -342,6 +339,8 @@ describe('LocusMediaRequest.send()', () => {
|
|
342
339
|
method: 'PUT',
|
343
340
|
uri: 'fakeMeetingSelfUrl/media',
|
344
341
|
body: createExpectedRoapBody('OFFER', {audioMuted: true, videoMuted: true}),
|
342
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
343
|
+
download: sinon.match.instanceOf(EventEmitter),
|
345
344
|
});
|
346
345
|
|
347
346
|
webexRequestStub.resetHistory();
|
@@ -364,6 +363,8 @@ describe('LocusMediaRequest.send()', () => {
|
|
364
363
|
method: 'PUT',
|
365
364
|
uri: 'fakeMeetingSelfUrl/media',
|
366
365
|
body: createExpectedRoapBody('OK', {audioMuted: true, videoMuted: true}),
|
366
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
367
|
+
download: sinon.match.instanceOf(EventEmitter),
|
367
368
|
});
|
368
369
|
|
369
370
|
// promise returned by the first call to send OFFER should be resolved by now
|
@@ -386,6 +387,8 @@ describe('LocusMediaRequest.send()', () => {
|
|
386
387
|
method: 'PUT',
|
387
388
|
uri: 'fakeMeetingSelfUrl/media',
|
388
389
|
body: createExpectedRoapBody('OFFER', {audioMuted: false, videoMuted: false}),
|
390
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
391
|
+
download: sinon.match.instanceOf(EventEmitter),
|
389
392
|
});
|
390
393
|
|
391
394
|
webexRequestStub.resetHistory();
|
@@ -410,6 +413,8 @@ describe('LocusMediaRequest.send()', () => {
|
|
410
413
|
method: 'PUT',
|
411
414
|
uri: 'fakeMeetingSelfUrl/media',
|
412
415
|
body: createExpectedRoapBody('OK', {audioMuted: false, videoMuted: true}),
|
416
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
417
|
+
download: sinon.match.instanceOf(EventEmitter),
|
413
418
|
});
|
414
419
|
|
415
420
|
// promise returned by the first call to send OFFER should be resolved by now
|
@@ -438,16 +443,17 @@ describe('LocusMediaRequest.send()', () => {
|
|
438
443
|
|
439
444
|
ensureQueueProcessingIsStarted();
|
440
445
|
|
441
|
-
sendLocalMute({audioMuted: false, videoMuted: true})
|
442
|
-
|
443
|
-
|
444
|
-
});
|
446
|
+
sendLocalMute({audioMuted: false, videoMuted: true}).then((response) => {
|
447
|
+
result = response;
|
448
|
+
});
|
445
449
|
|
446
450
|
// only roap offer should have been sent so far
|
447
451
|
assert.calledOnceWithExactly(webexRequestStub, {
|
448
452
|
method: 'PUT',
|
449
453
|
uri: 'fakeMeetingSelfUrl/media',
|
450
454
|
body: createExpectedRoapBody('OFFER', {audioMuted: true, videoMuted: true}),
|
455
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
456
|
+
download: sinon.match.instanceOf(EventEmitter),
|
451
457
|
});
|
452
458
|
assert.equal(result, undefined); // sendLocalMute shouldn't resolve yet, as the request should be queued
|
453
459
|
assert.equal(locusMediaRequest.isConfluenceCreated(), false);
|
@@ -464,10 +470,12 @@ describe('LocusMediaRequest.send()', () => {
|
|
464
470
|
method: 'PUT',
|
465
471
|
uri: 'fakeMeetingSelfUrl/media',
|
466
472
|
body: createExpectedLocalMuteBody({audioMuted: false, videoMuted: true}),
|
473
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
474
|
+
download: sinon.match.instanceOf(EventEmitter),
|
467
475
|
});
|
468
476
|
|
469
477
|
// check also the result once Locus replies to local mute
|
470
|
-
const fakeLocusResponse = {
|
478
|
+
const fakeLocusResponse = {response: 'ok'};
|
471
479
|
requestsToLocus[1].resolve(fakeLocusResponse);
|
472
480
|
await testUtils.flushPromises();
|
473
481
|
assert.deepEqual(result, fakeLocusResponse);
|
@@ -487,10 +495,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
487
495
|
assert.equal(locusMediaRequest.isConfluenceCreated(), true);
|
488
496
|
|
489
497
|
// now send local mute
|
490
|
-
sendLocalMute({audioMuted: false, videoMuted: true})
|
491
|
-
|
492
|
-
|
493
|
-
});
|
498
|
+
sendLocalMute({audioMuted: false, videoMuted: true}).then((response) => {
|
499
|
+
result = response;
|
500
|
+
});
|
494
501
|
|
495
502
|
ensureQueueProcessingIsStarted();
|
496
503
|
|
@@ -499,8 +506,9 @@ describe('LocusMediaRequest.send()', () => {
|
|
499
506
|
method: 'PUT',
|
500
507
|
uri: 'fakeMeetingSelfUrl/media',
|
501
508
|
body: createExpectedLocalMuteBody({audioMuted: false, videoMuted: true}),
|
509
|
+
upload: sinon.match.instanceOf(EventEmitter),
|
510
|
+
download: sinon.match.instanceOf(EventEmitter),
|
502
511
|
});
|
503
512
|
});
|
504
|
-
|
505
513
|
});
|
506
|
-
})
|
514
|
+
});
|
@@ -2,7 +2,6 @@ import sinon from 'sinon';
|
|
2
2
|
import {assert} from '@webex/test-helper-chai';
|
3
3
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
4
4
|
import {createMuteState, MuteState} from '@webex/plugin-meetings/src/meeting/muteState';
|
5
|
-
import PermissionError from '@webex/plugin-meetings/src/common/errors/permission';
|
6
5
|
import {AUDIO, VIDEO} from '@webex/plugin-meetings/src/constants';
|
7
6
|
|
8
7
|
import testUtils from '../../../utils/testUtils';
|
@@ -39,7 +38,6 @@ describe('plugin-meetings', () => {
|
|
39
38
|
unmuteAllowed: true,
|
40
39
|
remoteVideoMuted: false,
|
41
40
|
unmuteVideoAllowed: true,
|
42
|
-
|
43
41
|
locusInfo: {
|
44
42
|
handleLocusDelta: sinon.stub(),
|
45
43
|
},
|
@@ -778,5 +776,78 @@ describe('plugin-meetings', () => {
|
|
778
776
|
})
|
779
777
|
);
|
780
778
|
});
|
779
|
+
|
780
|
+
describe('#enable', () => {
|
781
|
+
let locusLocalMuteStub;
|
782
|
+
let locusRemoteMuteStub;
|
783
|
+
|
784
|
+
const resetStubHistory = () => {
|
785
|
+
locusLocalMuteStub.resetHistory();
|
786
|
+
locusRemoteMuteStub.resetHistory();
|
787
|
+
};
|
788
|
+
|
789
|
+
beforeEach(async () => {
|
790
|
+
locusLocalMuteStub = MeetingUtil.remoteUpdateAudioVideo;
|
791
|
+
locusRemoteMuteStub = meeting.members.muteMember;
|
792
|
+
|
793
|
+
// initialise the MuteState with the stream
|
794
|
+
audio.handleLocalStreamChange(meeting);
|
795
|
+
await testUtils.flushPromises();
|
796
|
+
|
797
|
+
resetStubHistory();
|
798
|
+
});
|
799
|
+
|
800
|
+
it('does not do anything if current state is already the same', async () => {
|
801
|
+
// set it up so that we are remotely muted (so that a sync to server would do a remote unmute)
|
802
|
+
audio.handleServerRemoteMuteUpdate(meeting, true, true);
|
803
|
+
|
804
|
+
// audio is already enabled and we call to enable it again
|
805
|
+
audio.enable(meeting, true);
|
806
|
+
await testUtils.flushPromises();
|
807
|
+
|
808
|
+
// nothing should happen (especially no remote unmute)
|
809
|
+
assert.notCalled(locusRemoteMuteStub);
|
810
|
+
assert.notCalled(locusLocalMuteStub);
|
811
|
+
|
812
|
+
// now disable audio
|
813
|
+
audio.enable(meeting, false);
|
814
|
+
await testUtils.flushPromises();
|
815
|
+
|
816
|
+
resetStubHistory();
|
817
|
+
|
818
|
+
// disable it again
|
819
|
+
audio.enable(meeting, false);
|
820
|
+
await testUtils.flushPromises();
|
821
|
+
|
822
|
+
// nothing should happen
|
823
|
+
assert.notCalled(locusRemoteMuteStub);
|
824
|
+
assert.notCalled(locusLocalMuteStub);
|
825
|
+
});
|
826
|
+
|
827
|
+
it('does necessary local and remote mute changes when called with a new state', async () => {
|
828
|
+
// initial state is audio enabled with nothing muted
|
829
|
+
|
830
|
+
// now we disable audio
|
831
|
+
audio.enable(meeting, false);
|
832
|
+
await testUtils.flushPromises();
|
833
|
+
|
834
|
+
// so only a local mute should be done
|
835
|
+
assert.notCalled(locusRemoteMuteStub);
|
836
|
+
assert.calledWith(locusLocalMuteStub, meeting, true, undefined);
|
837
|
+
|
838
|
+
resetStubHistory();
|
839
|
+
|
840
|
+
// now simulate additionally a remote mute
|
841
|
+
audio.state.server.remoteMute = true;
|
842
|
+
|
843
|
+
// and enable audio back
|
844
|
+
audio.enable(meeting, true);
|
845
|
+
await testUtils.flushPromises();
|
846
|
+
|
847
|
+
// both local and remote unmute should be done
|
848
|
+
assert.calledWith(locusRemoteMuteStub, meeting.members.selfId, false, true);
|
849
|
+
assert.calledWith(locusLocalMuteStub, meeting, false, undefined);
|
850
|
+
});
|
851
|
+
});
|
781
852
|
});
|
782
853
|
});
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import 'jsdom-global/register';
|
2
|
+
import {v4 as uuidv4} from 'uuid';
|
2
3
|
import sinon from 'sinon';
|
3
4
|
import {assert} from '@webex/test-helper-chai';
|
4
5
|
import MockWebex from '@webex/test-helper-mock-webex';
|
@@ -205,7 +206,7 @@ describe('plugin-meetings', () => {
|
|
205
206
|
roapMessage,
|
206
207
|
reachability,
|
207
208
|
permissionToken,
|
208
|
-
clientMediaPreferences
|
209
|
+
clientMediaPreferences,
|
209
210
|
});
|
210
211
|
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
211
212
|
|
@@ -630,6 +631,36 @@ describe('plugin-meetings', () => {
|
|
630
631
|
});
|
631
632
|
});
|
632
633
|
|
634
|
+
describe('#setPostMeetingDataConsent', () => {
|
635
|
+
[true, false].forEach((consent) => {
|
636
|
+
it(`sends request to set post meeting data consent with ${consent}`, async () => {
|
637
|
+
const locusUrl = `https://locus-test.wbx2.com/locus/api/v1/loci/${consent}`;
|
638
|
+
const selfId = uuidv4();
|
639
|
+
const deviceUrl = `https://wdm-test.wbx2.com/wdm/api/v1/devices/${consent}`;
|
640
|
+
|
641
|
+
const consentPromise = meetingsRequest.setPostMeetingDataConsent({
|
642
|
+
postMeetingDataConsent: consent,
|
643
|
+
locusUrl,
|
644
|
+
selfId,
|
645
|
+
deviceUrl,
|
646
|
+
});
|
647
|
+
assert.exists(consentPromise.then);
|
648
|
+
await consentPromise;
|
649
|
+
|
650
|
+
checkRequest({
|
651
|
+
method: 'PATCH',
|
652
|
+
uri: `${locusUrl}/participant/${selfId}/controls`,
|
653
|
+
body: {
|
654
|
+
consent: {
|
655
|
+
postMeetingDataConsent: consent,
|
656
|
+
deviceUrl,
|
657
|
+
},
|
658
|
+
},
|
659
|
+
});
|
660
|
+
});
|
661
|
+
});
|
662
|
+
});
|
663
|
+
|
633
664
|
describe('#prepareLeaveMeetingRequestOptions', () => {
|
634
665
|
it('returns expected result', async () => {
|
635
666
|
const result = meetingsRequest.prepareLeaveMeetingRequestOptions({
|