@webex/plugin-meetings 3.10.0 → 3.11.0-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/dist/annotation/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +38 -27
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +14 -8
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +20 -0
- package/dist/hashTree/constants.js.map +1 -0
- package/dist/hashTree/hashTree.js +515 -0
- package/dist/hashTree/hashTree.js.map +1 -0
- package/dist/hashTree/hashTreeParser.js +1250 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +23 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/hashTree/utils.js +59 -0
- package/dist/hashTree/utils.js.map +1 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +33 -13
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +5 -3
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +619 -177
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/media/MediaConnectionAwaiter.js +58 -3
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +5 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +19 -19
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1672 -1553
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +118 -25
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +276 -174
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +36 -30
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +5 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +188 -352
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +212 -204
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +445 -0
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +12 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +28 -21
- package/dist/types/hashTree/constants.d.ts +8 -0
- package/dist/types/hashTree/hashTree.d.ts +129 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +250 -0
- package/dist/types/hashTree/types.d.ts +33 -0
- package/dist/types/hashTree/utils.d.ts +16 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interceptors/locusRouteToken.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +98 -80
- package/dist/types/locus-info/types.d.ts +54 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +2 -1
- package/dist/types/meeting/index.d.ts +40 -12
- package/dist/types/meeting/util.d.ts +25 -0
- package/dist/types/meetings/index.d.ts +12 -3
- package/dist/types/metrics/constants.d.ts +4 -0
- package/dist/types/reachability/clusterReachability.d.ts +33 -84
- package/dist/types/reachability/reachability.types.d.ts +12 -1
- package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
- package/dist/types/reactions/reactions.type.d.ts +1 -0
- package/dist/types/webinar/utils.d.ts +6 -0
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +206 -158
- package/dist/webinar/index.js.map +1 -1
- package/dist/webinar/utils.js +25 -0
- package/dist/webinar/utils.js.map +1 -0
- package/package.json +24 -23
- package/src/common/errors/webex-errors.ts +19 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +17 -2
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTree.ts +463 -0
- package/src/hashTree/hashTreeParser.ts +1143 -0
- package/src/hashTree/types.ts +39 -0
- package/src/hashTree/utils.ts +53 -0
- package/src/index.ts +2 -0
- package/src/interceptors/locusRouteToken.ts +22 -5
- package/src/locus-info/controlsUtils.ts +6 -0
- package/src/locus-info/index.ts +641 -164
- package/src/locus-info/types.ts +53 -0
- package/src/media/MediaConnectionAwaiter.ts +41 -1
- package/src/media/index.ts +6 -0
- package/src/media/properties.ts +3 -1
- package/src/meeting/index.ts +173 -37
- package/src/meeting/util.ts +119 -1
- package/src/meetings/index.ts +212 -67
- package/src/meetings/util.ts +10 -9
- package/src/metrics/constants.ts +4 -0
- package/src/reachability/clusterReachability.ts +159 -330
- package/src/reachability/index.ts +15 -1
- package/src/reachability/reachability.types.ts +15 -1
- package/src/reachability/reachabilityPeerConnection.ts +418 -0
- package/src/reactions/reactions.type.ts +1 -0
- package/src/webinar/index.ts +44 -1
- package/src/webinar/utils.ts +16 -0
- package/test/unit/spec/hashTree/hashTree.ts +655 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1524 -0
- package/test/unit/spec/hashTree/utils.ts +140 -0
- package/test/unit/spec/interceptors/locusRouteToken.ts +44 -0
- package/test/unit/spec/locus-info/controlsUtils.js +27 -1
- package/test/unit/spec/locus-info/index.js +879 -16
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +41 -1
- package/test/unit/spec/media/index.ts +140 -9
- package/test/unit/spec/media/properties.ts +12 -3
- package/test/unit/spec/meeting/index.js +514 -130
- package/test/unit/spec/meeting/utils.js +341 -15
- package/test/unit/spec/meetings/index.js +822 -32
- package/test/unit/spec/meetings/utils.js +51 -1
- package/test/unit/spec/reachability/clusterReachability.ts +404 -137
- package/test/unit/spec/reachability/index.ts +26 -3
- package/test/unit/spec/webinar/index.ts +106 -0
- package/test/unit/spec/webinar/utils.ts +39 -0
|
@@ -5,6 +5,8 @@ import {ConnectionState, MediaConnectionEventNames} from '@webex/internal-media-
|
|
|
5
5
|
import testUtils from '../../../utils/testUtils';
|
|
6
6
|
import {ICE_AND_DTLS_CONNECTION_TIMEOUT} from '@webex/plugin-meetings/src/constants';
|
|
7
7
|
import MediaConnectionAwaiter from '../../../../src/media/MediaConnectionAwaiter';
|
|
8
|
+
import Metrics from '../../../../src/metrics';
|
|
9
|
+
import BEHAVIORAL_METRICS from '../../../../src/metrics/constants';
|
|
8
10
|
|
|
9
11
|
describe('MediaConnectionAwaiter', () => {
|
|
10
12
|
let mediaConnectionAwaiter;
|
|
@@ -14,18 +16,34 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
14
16
|
beforeEach(() => {
|
|
15
17
|
clock = sinon.useFakeTimers();
|
|
16
18
|
|
|
19
|
+
const mockTransportReport = {
|
|
20
|
+
type: 'transport',
|
|
21
|
+
dtlsState: 'connecting',
|
|
22
|
+
iceState: 'checking',
|
|
23
|
+
packetsSent: 10,
|
|
24
|
+
packetsReceived: 5,
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
mockMC = {
|
|
18
|
-
getStats: sinon.stub().resolves(
|
|
28
|
+
getStats: sinon.stub().resolves({
|
|
29
|
+
values: () => [mockTransportReport],
|
|
30
|
+
}),
|
|
19
31
|
on: sinon.stub(),
|
|
20
32
|
off: sinon.stub(),
|
|
21
33
|
getConnectionState: sinon.stub().returns(ConnectionState.New),
|
|
22
34
|
getIceGatheringState: sinon.stub().returns('new'),
|
|
23
35
|
getIceConnectionState: sinon.stub().returns('new'),
|
|
24
36
|
getPeerConnectionState: sinon.stub().returns('new'),
|
|
37
|
+
multistreamConnection: {
|
|
38
|
+
dataChannel: {
|
|
39
|
+
readyState: 'open',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
25
42
|
};
|
|
26
43
|
|
|
27
44
|
mediaConnectionAwaiter = new MediaConnectionAwaiter({
|
|
28
45
|
webrtcMediaConnection: mockMC,
|
|
46
|
+
correlationId: 'test-correlation-id',
|
|
29
47
|
});
|
|
30
48
|
});
|
|
31
49
|
|
|
@@ -44,6 +62,8 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
44
62
|
});
|
|
45
63
|
|
|
46
64
|
it('rejects after timeout if ice state is not connected', async () => {
|
|
65
|
+
const sendMetricSpy = sinon.spy(Metrics, 'sendBehavioralMetric');
|
|
66
|
+
|
|
47
67
|
mockMC.getConnectionState.returns(ConnectionState.Connecting);
|
|
48
68
|
mockMC.getIceGatheringState.returns('gathering');
|
|
49
69
|
|
|
@@ -83,6 +103,18 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
83
103
|
assert.equal(promiseRejected, true);
|
|
84
104
|
|
|
85
105
|
assert.calledThrice(mockMC.off);
|
|
106
|
+
|
|
107
|
+
assert.calledOnceWithExactly(sendMetricSpy, BEHAVIORAL_METRICS.MEDIA_STILL_NOT_CONNECTED, {
|
|
108
|
+
correlation_id: 'test-correlation-id',
|
|
109
|
+
numTransports: 1,
|
|
110
|
+
dtlsState: 'connecting',
|
|
111
|
+
iceState: 'checking',
|
|
112
|
+
packetsSent: 10,
|
|
113
|
+
packetsReceived: 5,
|
|
114
|
+
dataChannelState: 'open',
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
sendMetricSpy.restore();
|
|
86
118
|
});
|
|
87
119
|
|
|
88
120
|
it('rejects immediately if ice state is FAILED', async () => {
|
|
@@ -351,6 +383,8 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
351
383
|
});
|
|
352
384
|
|
|
353
385
|
it(`reject with restart timer once if gathering state is not complete`, async () => {
|
|
386
|
+
const sendMetricSpy = sinon.spy(Metrics, 'sendBehavioralMetric');
|
|
387
|
+
|
|
354
388
|
mockMC.getConnectionState.returns(ConnectionState.Connecting);
|
|
355
389
|
mockMC.getIceGatheringState.returns('new');
|
|
356
390
|
|
|
@@ -390,6 +424,12 @@ describe('MediaConnectionAwaiter', () => {
|
|
|
390
424
|
|
|
391
425
|
assert.calledOnce(clearTimeoutSpy);
|
|
392
426
|
assert.calledTwice(setTimeoutSpy);
|
|
427
|
+
|
|
428
|
+
// verify sendMetric was called twice (once for each timeout)
|
|
429
|
+
assert.calledTwice(sendMetricSpy);
|
|
430
|
+
assert.calledWith(sendMetricSpy, BEHAVIORAL_METRICS.MEDIA_STILL_NOT_CONNECTED);
|
|
431
|
+
|
|
432
|
+
sendMetricSpy.restore();
|
|
393
433
|
});
|
|
394
434
|
|
|
395
435
|
it(`resolves gathering and connection state complete right after`, async () => {
|
|
@@ -141,12 +141,12 @@ describe('createMediaConnection', () => {
|
|
|
141
141
|
const roapMediaConnectionConstructorStub = sinon
|
|
142
142
|
.stub(InternalMediaCoreModule, 'RoapMediaConnection')
|
|
143
143
|
.returns(fakeRoapMediaConnection);
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
|
|
146
|
-
|
|
146
|
+
|
|
147
147
|
const ENABLE_EXTMAP = false;
|
|
148
148
|
const ENABLE_RTX = true;
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
Media.createMediaConnection(false, 'sendonly-debug-id', 'meetingId', {
|
|
151
151
|
mediaProperties: {
|
|
152
152
|
mediaDirection: {
|
|
@@ -168,7 +168,7 @@ describe('createMediaConnection', () => {
|
|
|
168
168
|
turnServerInfo: undefined,
|
|
169
169
|
iceCandidatesTimeout: undefined,
|
|
170
170
|
});
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
assert.calledWith(
|
|
173
173
|
roapMediaConnectionConstructorStub,
|
|
174
174
|
sinon.match.any,
|
|
@@ -194,12 +194,12 @@ describe('createMediaConnection', () => {
|
|
|
194
194
|
const roapMediaConnectionConstructorStub = sinon
|
|
195
195
|
.stub(InternalMediaCoreModule, 'RoapMediaConnection')
|
|
196
196
|
.returns(fakeRoapMediaConnection);
|
|
197
|
-
|
|
197
|
+
|
|
198
198
|
StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
|
|
199
|
-
|
|
199
|
+
|
|
200
200
|
const ENABLE_EXTMAP = true;
|
|
201
201
|
const ENABLE_RTX = false;
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
Media.createMediaConnection(false, 'recvonly-debug-id', 'meetingId', {
|
|
204
204
|
mediaProperties: {
|
|
205
205
|
mediaDirection: {
|
|
@@ -221,7 +221,7 @@ describe('createMediaConnection', () => {
|
|
|
221
221
|
turnServerInfo: undefined,
|
|
222
222
|
iceCandidatesTimeout: undefined,
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
|
|
225
225
|
assert.calledWith(
|
|
226
226
|
roapMediaConnectionConstructorStub,
|
|
227
227
|
sinon.match.any,
|
|
@@ -242,7 +242,6 @@ describe('createMediaConnection', () => {
|
|
|
242
242
|
'recvonly-debug-id'
|
|
243
243
|
);
|
|
244
244
|
});
|
|
245
|
-
|
|
246
245
|
|
|
247
246
|
it('creates a MultistreamRoapMediaConnection when multistream is enabled', () => {
|
|
248
247
|
const multistreamRoapMediaConnectionConstructorStub = sinon
|
|
@@ -511,6 +510,138 @@ describe('createMediaConnection', () => {
|
|
|
511
510
|
);
|
|
512
511
|
});
|
|
513
512
|
|
|
513
|
+
const testEnableInboundAudioLevelMonitoring = (
|
|
514
|
+
testName: string,
|
|
515
|
+
browserStubs: {isChrome?: boolean; isEdge?: boolean; isFirefox?: boolean},
|
|
516
|
+
isMultistream: boolean,
|
|
517
|
+
expectedConfig: object,
|
|
518
|
+
additionalOptions = {}
|
|
519
|
+
) => {
|
|
520
|
+
it(testName, () => {
|
|
521
|
+
const connectionConstructorStub = isMultistream
|
|
522
|
+
? sinon.stub(InternalMediaCoreModule, 'MultistreamRoapMediaConnection')
|
|
523
|
+
: sinon.stub(InternalMediaCoreModule, 'RoapMediaConnection');
|
|
524
|
+
|
|
525
|
+
connectionConstructorStub.returns(fakeRoapMediaConnection);
|
|
526
|
+
|
|
527
|
+
// Set up browser stubs
|
|
528
|
+
sinon.stub(BrowserInfo, 'isChrome').returns(browserStubs.isChrome || false);
|
|
529
|
+
sinon.stub(BrowserInfo, 'isEdge').returns(browserStubs.isEdge || false);
|
|
530
|
+
sinon.stub(BrowserInfo, 'isFirefox').returns(browserStubs.isFirefox || false);
|
|
531
|
+
|
|
532
|
+
const baseOptions = {
|
|
533
|
+
mediaProperties: {
|
|
534
|
+
mediaDirection: {
|
|
535
|
+
sendAudio: true,
|
|
536
|
+
sendVideo: true,
|
|
537
|
+
sendShare: false,
|
|
538
|
+
receiveAudio: true,
|
|
539
|
+
receiveVideo: true,
|
|
540
|
+
receiveShare: true,
|
|
541
|
+
},
|
|
542
|
+
...(isMultistream
|
|
543
|
+
? {}
|
|
544
|
+
: {
|
|
545
|
+
audioStream: fakeAudioStream,
|
|
546
|
+
videoStream: fakeVideoStream,
|
|
547
|
+
shareVideoTrack: null,
|
|
548
|
+
shareAudioTrack: null,
|
|
549
|
+
}),
|
|
550
|
+
},
|
|
551
|
+
...(isMultistream
|
|
552
|
+
? {}
|
|
553
|
+
: {
|
|
554
|
+
remoteQualityLevel: 'HIGH',
|
|
555
|
+
enableRtx: true,
|
|
556
|
+
enableExtmap: true,
|
|
557
|
+
}),
|
|
558
|
+
...additionalOptions,
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
if (!isMultistream) {
|
|
562
|
+
StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
Media.createMediaConnection(isMultistream, 'debug string', 'meeting id', baseOptions);
|
|
566
|
+
|
|
567
|
+
if (isMultistream) {
|
|
568
|
+
assert.calledOnceWithExactly(
|
|
569
|
+
connectionConstructorStub,
|
|
570
|
+
expectedConfig,
|
|
571
|
+
'meeting id',
|
|
572
|
+
sinon.match.func,
|
|
573
|
+
sinon.match.func,
|
|
574
|
+
sinon.match.func
|
|
575
|
+
);
|
|
576
|
+
} else {
|
|
577
|
+
assert.calledOnceWithExactly(
|
|
578
|
+
connectionConstructorStub,
|
|
579
|
+
expectedConfig,
|
|
580
|
+
sinon.match.object,
|
|
581
|
+
'debug string'
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
testEnableInboundAudioLevelMonitoring(
|
|
588
|
+
'enables enableInboundAudioLevelMonitoring for multistream when browser is Chrome',
|
|
589
|
+
{isChrome: true},
|
|
590
|
+
true,
|
|
591
|
+
{
|
|
592
|
+
iceServers: [],
|
|
593
|
+
disableAudioTwcc: true,
|
|
594
|
+
enableInboundAudioLevelMonitoring: true,
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
|
|
598
|
+
testEnableInboundAudioLevelMonitoring(
|
|
599
|
+
'enables enableInboundAudioLevelMonitoring for multistream when browser is Edge',
|
|
600
|
+
{isEdge: true},
|
|
601
|
+
true,
|
|
602
|
+
{
|
|
603
|
+
iceServers: [],
|
|
604
|
+
disableAudioTwcc: true,
|
|
605
|
+
enableInboundAudioLevelMonitoring: true,
|
|
606
|
+
}
|
|
607
|
+
);
|
|
608
|
+
|
|
609
|
+
testEnableInboundAudioLevelMonitoring(
|
|
610
|
+
'does not enable enableInboundAudioLevelMonitoring for multistream when browser is Firefox',
|
|
611
|
+
{isFirefox: true},
|
|
612
|
+
true,
|
|
613
|
+
{
|
|
614
|
+
iceServers: [],
|
|
615
|
+
disableAudioTwcc: true,
|
|
616
|
+
doFullIce: true,
|
|
617
|
+
stopIceGatheringAfterFirstRelayCandidate: undefined,
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
|
|
621
|
+
testEnableInboundAudioLevelMonitoring(
|
|
622
|
+
'does not enable enableInboundAudioLevelMonitoring for non-multistream connections even when browser is Chrome',
|
|
623
|
+
{isChrome: true},
|
|
624
|
+
false,
|
|
625
|
+
{
|
|
626
|
+
iceServers: [],
|
|
627
|
+
iceCandidatesTimeout: undefined,
|
|
628
|
+
skipInactiveTransceivers: false,
|
|
629
|
+
requireH264: true,
|
|
630
|
+
sdpMunging: {
|
|
631
|
+
convertPort9to0: false,
|
|
632
|
+
addContentSlides: true,
|
|
633
|
+
bandwidthLimits: {
|
|
634
|
+
audio: 123,
|
|
635
|
+
video: 456,
|
|
636
|
+
},
|
|
637
|
+
startBitrate: 999,
|
|
638
|
+
periodicKeyframes: 20,
|
|
639
|
+
disableExtmap: false,
|
|
640
|
+
disableRtx: false,
|
|
641
|
+
},
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
|
|
514
645
|
[
|
|
515
646
|
{testCase: 'turnServerInfo is undefined', turnServerInfo: undefined},
|
|
516
647
|
{
|
|
@@ -41,14 +41,23 @@ describe('MediaProperties', () => {
|
|
|
41
41
|
describe('waitForMediaConnectionConnected', () => {
|
|
42
42
|
it('resolves if media connection is connected', async () => {
|
|
43
43
|
const waitForMediaConnectionConnectedResult = new Defer();
|
|
44
|
+
const correlationId = 'aaaa-bbbb-cccc-dddd';
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
let capturedInstance;
|
|
47
|
+
const stub = sinon
|
|
46
48
|
.stub(MediaConnectionAwaiter.prototype, 'waitForMediaConnectionConnected')
|
|
47
|
-
.
|
|
49
|
+
.callsFake(function () {
|
|
50
|
+
capturedInstance = this;
|
|
51
|
+
return waitForMediaConnectionConnectedResult.promise;
|
|
52
|
+
});
|
|
48
53
|
|
|
49
54
|
waitForMediaConnectionConnectedResult.resolve();
|
|
50
55
|
|
|
51
|
-
await mediaProperties.waitForMediaConnectionConnected();
|
|
56
|
+
await mediaProperties.waitForMediaConnectionConnected(correlationId);
|
|
57
|
+
|
|
58
|
+
assert.calledOnce(stub);
|
|
59
|
+
assert.equal(capturedInstance.correlationId, correlationId);
|
|
60
|
+
assert.equal(capturedInstance.webrtcMediaConnection, mockMC);
|
|
52
61
|
});
|
|
53
62
|
it('rejects if media connection is not connected', async () => {
|
|
54
63
|
const waitForMediaConnectionConnectedResult = new Defer();
|