@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.11
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/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +7 -0
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +8 -0
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +8 -0
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +7 -0
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +7 -0
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +7 -0
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +7 -0
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +7 -0
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +5 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js.map +1 -1
- 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 +3 -0
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +15 -74
- package/dist/constants.js.map +1 -1
- 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 +43 -5
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +4 -0
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +12 -3
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +71 -210
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal-media-core-wrapper.js +22 -0
- package/dist/media/internal-media-core-wrapper.js.map +1 -0
- package/dist/media/properties.js +32 -25
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +0 -27
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +8 -1
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/index.js +1146 -602
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +6 -0
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +83 -24
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +5 -44
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +4 -1
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +5 -0
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +14 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -0
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +4 -1
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +136 -25
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +4 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +24 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +30 -7
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +2 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +82 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +19 -9
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +8 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +133 -0
- package/dist/multistream/mediaRequestManager.js.map +1 -0
- package/dist/multistream/multistreamMedia.js +116 -0
- package/dist/multistream/multistreamMedia.js.map +1 -0
- package/dist/multistream/receiveSlot.js +209 -0
- package/dist/multistream/receiveSlot.js.map +1 -0
- package/dist/multistream/receiveSlotManager.js +195 -0
- package/dist/multistream/receiveSlotManager.js.map +1 -0
- package/dist/multistream/remoteMedia.js +289 -0
- package/dist/multistream/remoteMedia.js.map +1 -0
- package/dist/multistream/remoteMediaGroup.js +243 -0
- package/dist/multistream/remoteMediaGroup.js.map +1 -0
- package/dist/multistream/remoteMediaManager.js +1113 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +10 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +11 -0
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -1
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +17 -7
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +111 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +40 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +130 -132
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +58 -231
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +7 -116
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +20 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +2 -0
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +58 -37
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +9 -3
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +10 -3
- package/dist/transcription/index.js.map +1 -1
- package/package.json +21 -20
- package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
- package/src/common/collection.ts +6 -6
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
- package/src/common/errors/{media.js → media.ts} +5 -1
- package/src/common/errors/parameter.ts +3 -2
- package/src/common/errors/{password-error.js → password-error.ts} +5 -1
- package/src/common/errors/{permission.js → permission.ts} +5 -1
- package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
- package/src/common/errors/{stats.js → stats.ts} +5 -1
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -20
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
- package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
- package/src/common/events/{events.js → events.ts} +0 -0
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
- package/src/common/events/{util.js → util.ts} +1 -1
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
- package/src/common/logs/{request.js → request.ts} +12 -2
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +2 -0
- package/src/constants.ts +139 -179
- package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +1 -1
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
- package/src/locus-info/{index.js → index.ts} +67 -32
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +7 -4
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
- package/src/locus-info/{parser.js → parser.ts} +22 -12
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
- package/src/media/{index.js → index.ts} +130 -205
- package/src/media/internal-media-core-wrapper.ts +9 -0
- package/src/media/{properties.js → properties.ts} +35 -29
- package/src/media/util.ts +16 -0
- package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
- package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
- package/src/meeting/{index.js → index.ts} +993 -474
- package/src/meeting/{muteState.js → muteState.ts} +16 -11
- package/src/meeting/{request.js → request.ts} +148 -36
- package/src/meeting/{state.js → state.ts} +6 -6
- package/src/meeting/{util.js → util.ts} +9 -51
- package/src/meeting-info/{collection.js → collection.ts} +4 -1
- package/src/meeting-info/{index.js → index.ts} +10 -6
- package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
- package/src/meeting-info/{request.js → request.ts} +6 -2
- package/src/meeting-info/{util.js → util.ts} +6 -5
- package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
- package/src/meetings/{collection.js → collection.ts} +5 -2
- package/src/meetings/{index.js → index.ts} +118 -22
- package/src/meetings/{request.js → request.ts} +6 -1
- package/src/meetings/{util.js → util.ts} +28 -5
- package/src/member/{index.js → index.ts} +46 -15
- package/src/member/{util.js → util.ts} +17 -16
- package/src/members/{collection.js → collection.ts} +2 -1
- package/src/members/{index.js → index.ts} +94 -26
- package/src/members/{request.js → request.ts} +16 -5
- package/src/members/{util.js → util.ts} +7 -7
- package/src/metrics/{config.js → config.ts} +0 -2
- package/src/metrics/{constants.js → constants.ts} +0 -0
- package/src/metrics/{index.js → index.ts} +27 -8
- package/src/multistream/mediaRequestManager.ts +166 -0
- package/src/multistream/multistreamMedia.ts +92 -0
- package/src/multistream/receiveSlot.ts +141 -0
- package/src/multistream/receiveSlotManager.ts +142 -0
- package/src/multistream/remoteMedia.ts +228 -0
- package/src/multistream/remoteMediaGroup.ts +224 -0
- package/src/multistream/remoteMediaManager.ts +911 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
- package/src/personal-meeting-room/{index.js → index.ts} +17 -4
- package/src/personal-meeting-room/{request.js → request.ts} +3 -1
- package/src/personal-meeting-room/{util.js → util.ts} +1 -1
- package/src/reachability/{index.js → index.ts} +28 -17
- package/src/reachability/request.ts +4 -2
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +36 -0
- package/src/reconnection-manager/{index.js → index.ts} +81 -65
- package/src/roap/index.ts +229 -0
- package/src/roap/{request.js → request.ts} +15 -74
- package/src/roap/turnDiscovery.ts +26 -11
- package/src/statsAnalyzer/{global.js → global.ts} +2 -0
- package/src/statsAnalyzer/{index.js → index.ts} +66 -61
- package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
- package/src/transcription/{index.js → index.ts} +16 -11
- package/test/integration/spec/journey.js +1 -1
- package/test/integration/spec/space-meeting.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +17 -1
- package/test/unit/spec/media/index.ts +207 -0
- package/test/unit/spec/media/properties.ts +73 -82
- package/test/unit/spec/meeting/effectsState.js +1 -3
- package/test/unit/spec/meeting/index.js +672 -245
- package/test/unit/spec/meeting/muteState.js +7 -0
- package/test/unit/spec/meeting/request.js +25 -1
- package/test/unit/spec/meeting/utils.js +63 -2
- package/test/unit/spec/meetings/index.js +0 -4
- package/test/unit/spec/members/index.js +164 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +515 -0
- package/test/unit/spec/multistream/receiveSlot.ts +104 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +173 -0
- package/test/unit/spec/multistream/remoteMedia.ts +225 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +396 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1309 -0
- package/test/unit/spec/reconnection-manager/index.js +68 -2
- package/test/unit/spec/roap/index.ts +63 -35
- package/test/unit/spec/stats-analyzer/index.js +19 -22
- package/dist/peer-connection-manager/index.js +0 -794
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/roap/collection.js +0 -73
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -337
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/state.js +0 -164
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/util.js +0 -102
- package/dist/roap/util.js.map +0 -1
- package/src/media/util.js +0 -38
- package/src/peer-connection-manager/index.js +0 -723
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/collection.js +0 -63
- package/src/roap/handler.js +0 -252
- package/src/roap/index.js +0 -380
- package/src/roap/state.js +0 -149
- package/src/roap/util.js +0 -93
- package/test/unit/spec/peerconnection-manager/index.js +0 -188
- package/test/unit/spec/peerconnection-manager/utils.js +0 -48
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- package/test/unit/spec/roap/util.js +0 -30
|
@@ -2,15 +2,81 @@ import 'jsdom-global/register';
|
|
|
2
2
|
import chai from 'chai';
|
|
3
3
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
4
|
import sinon from 'sinon';
|
|
5
|
-
|
|
6
|
-
import
|
|
5
|
+
import ReconnectionManager from '@webex/plugin-meetings/src/reconnection-manager';
|
|
6
|
+
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
7
7
|
|
|
8
8
|
const {assert} = chai;
|
|
9
9
|
|
|
10
10
|
chai.use(chaiAsPromised);
|
|
11
11
|
sinon.assert.expose(chai.assert, {prefix: ''});
|
|
12
12
|
|
|
13
|
+
|
|
13
14
|
describe('plugin-meetings', () => {
|
|
15
|
+
describe('ReconnectionManager.reconnect', () => {
|
|
16
|
+
it('uses correct TURN TLS information on the new connection', async () => {
|
|
17
|
+
Metrics.postEvent = sinon.stub();
|
|
18
|
+
|
|
19
|
+
const fakeMediaConnection = {
|
|
20
|
+
initiateOffer: sinon.stub().resolves({})
|
|
21
|
+
};
|
|
22
|
+
const fakeMeeting = {
|
|
23
|
+
closePeerConnections: sinon.stub().resolves({}),
|
|
24
|
+
createMediaConnection: sinon.stub().returns(fakeMediaConnection),
|
|
25
|
+
config: {
|
|
26
|
+
reconnection: {
|
|
27
|
+
enabled: true,
|
|
28
|
+
detection: true,
|
|
29
|
+
iceReconnectionTimeout: 10000,
|
|
30
|
+
retry: {
|
|
31
|
+
times: 2,
|
|
32
|
+
backOff: {
|
|
33
|
+
start: 1000,
|
|
34
|
+
rate: 2
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
mediaProperties: {
|
|
40
|
+
unsetPeerConnection: sinon.stub(),
|
|
41
|
+
},
|
|
42
|
+
roap: {
|
|
43
|
+
doTurnDiscovery: sinon.stub().resolves({
|
|
44
|
+
turnServerInfo: {
|
|
45
|
+
url: 'fake_turn_url',
|
|
46
|
+
username: 'fake_turn_username',
|
|
47
|
+
password: 'fake_turn_password',
|
|
48
|
+
},
|
|
49
|
+
turnDiscoverySkippedReason: undefined
|
|
50
|
+
})
|
|
51
|
+
},
|
|
52
|
+
statsAnalyzer: {
|
|
53
|
+
updateMediaConnection: sinon.stub(),
|
|
54
|
+
},
|
|
55
|
+
webex: {
|
|
56
|
+
meetings: {
|
|
57
|
+
getMeetingByType: sinon.stub().returns(true),
|
|
58
|
+
syncMeetings: sinon.stub().resolves({})
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const rm = new ReconnectionManager(fakeMeeting);
|
|
64
|
+
|
|
65
|
+
await rm.reconnect();
|
|
66
|
+
|
|
67
|
+
assert.calledOnce(fakeMeeting.closePeerConnections);
|
|
68
|
+
assert.calledOnce(fakeMeeting.mediaProperties.unsetPeerConnection);
|
|
69
|
+
assert.calledOnce(fakeMeeting.roap.doTurnDiscovery);
|
|
70
|
+
assert.calledOnce(fakeMeeting.createMediaConnection);
|
|
71
|
+
assert.calledWith(fakeMeeting.createMediaConnection, {
|
|
72
|
+
url: 'fake_turn_url',
|
|
73
|
+
username: 'fake_turn_username',
|
|
74
|
+
password: 'fake_turn_password',
|
|
75
|
+
});
|
|
76
|
+
assert.calledOnce(fakeMediaConnection.initiateOffer);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
14
80
|
/**
|
|
15
81
|
* Currently, testing dependent classes that aren't available at the top
|
|
16
82
|
* level causes testing errors in CI based around related files. Skipping this here until a solution
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {assert} from '@webex/test-helper-chai';
|
|
2
2
|
import sinon from 'sinon';
|
|
3
3
|
import TurnDiscovery from '@webex/plugin-meetings/src/roap/turnDiscovery';
|
|
4
|
-
import {ROAP} from '@webex/plugin-meetings/src/constants';
|
|
5
4
|
|
|
6
5
|
import RoapRequest from '@webex/plugin-meetings/src/roap/request';
|
|
7
|
-
import RoapHandler from '@webex/plugin-meetings/src/roap/handler';
|
|
8
6
|
import Roap from '@webex/plugin-meetings/src/roap/';
|
|
9
7
|
|
|
10
8
|
describe('Roap', () => {
|
|
@@ -13,7 +11,9 @@ describe('Roap', () => {
|
|
|
13
11
|
const RESULT = {something: 'some value'};
|
|
14
12
|
const meeting = {id: 'some meeting id'};
|
|
15
13
|
|
|
16
|
-
const doTurnDiscoveryStub = sinon
|
|
14
|
+
const doTurnDiscoveryStub = sinon
|
|
15
|
+
.stub(TurnDiscovery.prototype, 'doTurnDiscovery')
|
|
16
|
+
.resolves(RESULT);
|
|
17
17
|
|
|
18
18
|
const roap = new Roap({}, {parent: 'fake'});
|
|
19
19
|
|
|
@@ -37,22 +37,22 @@ describe('Roap', () => {
|
|
|
37
37
|
|
|
38
38
|
describe('sendRoapMediaRequest', () => {
|
|
39
39
|
let sendRoapStub;
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
const meeting = {
|
|
43
|
-
id: 'some meeting id',
|
|
44
|
-
correlationId: 'correlation id',
|
|
45
|
-
selfUrl: 'self url',
|
|
46
|
-
mediaId: 'media id',
|
|
47
|
-
isAudioMuted: () => true,
|
|
48
|
-
isVideoMuted: () => false,
|
|
49
|
-
setRoapSeq: sinon.stub(),
|
|
50
|
-
config: {experimental: {enableTurnDiscovery: false}},
|
|
51
|
-
};
|
|
40
|
+
let meeting;
|
|
52
41
|
|
|
53
42
|
beforeEach(() => {
|
|
43
|
+
meeting = {
|
|
44
|
+
id: 'some meeting id',
|
|
45
|
+
correlationId: 'correlation id',
|
|
46
|
+
selfUrl: 'self url',
|
|
47
|
+
mediaId: 'media id',
|
|
48
|
+
isMultistream: false,
|
|
49
|
+
isAudioMuted: () => true,
|
|
50
|
+
isVideoMuted: () => false,
|
|
51
|
+
setRoapSeq: sinon.stub(),
|
|
52
|
+
config: {experimental: {enableTurnDiscovery: false}},
|
|
53
|
+
};
|
|
54
|
+
|
|
54
55
|
sendRoapStub = sinon.stub(RoapRequest.prototype, 'sendRoap').resolves({});
|
|
55
|
-
roapHandlerSubmitStub = sinon.stub(RoapHandler.prototype, 'submit');
|
|
56
56
|
meeting.setRoapSeq.resetHistory();
|
|
57
57
|
});
|
|
58
58
|
|
|
@@ -66,13 +66,21 @@ describe('Roap', () => {
|
|
|
66
66
|
{reconnect: false, enableTurnDiscovery: true, expectEmptyMediaId: false},
|
|
67
67
|
{reconnect: false, enableTurnDiscovery: false, expectEmptyMediaId: false},
|
|
68
68
|
].forEach(({reconnect, enableTurnDiscovery, expectEmptyMediaId}) =>
|
|
69
|
-
it(`sends roap OFFER with ${expectEmptyMediaId ? 'empty ' : ''}mediaId when ${
|
|
69
|
+
it(`sends roap OFFER with ${expectEmptyMediaId ? 'empty ' : ''}mediaId when ${
|
|
70
|
+
reconnect ? '' : 'not '
|
|
71
|
+
}reconnecting and TURN discovery is ${
|
|
72
|
+
enableTurnDiscovery ? 'enabled' : 'disabled'
|
|
73
|
+
}`, async () => {
|
|
70
74
|
meeting.config.experimental.enableTurnDiscovery = enableTurnDiscovery;
|
|
71
75
|
|
|
72
76
|
const roap = new Roap({}, {parent: 'fake'});
|
|
73
77
|
|
|
74
78
|
await roap.sendRoapMediaRequest({
|
|
75
|
-
meeting,
|
|
79
|
+
meeting,
|
|
80
|
+
sdp: 'sdp',
|
|
81
|
+
reconnect,
|
|
82
|
+
seq: 2,
|
|
83
|
+
tieBreaker: 4294967294,
|
|
76
84
|
});
|
|
77
85
|
|
|
78
86
|
const expectedRoapMessage = {
|
|
@@ -80,7 +88,7 @@ describe('Roap', () => {
|
|
|
80
88
|
sdps: ['sdp'],
|
|
81
89
|
version: '2',
|
|
82
90
|
seq: 2,
|
|
83
|
-
tieBreaker: 4294967294
|
|
91
|
+
tieBreaker: 4294967294,
|
|
84
92
|
};
|
|
85
93
|
|
|
86
94
|
assert.calledOnce(sendRoapStub);
|
|
@@ -91,23 +99,43 @@ describe('Roap', () => {
|
|
|
91
99
|
mediaId: expectEmptyMediaId ? '' : meeting.mediaId,
|
|
92
100
|
audioMuted: meeting.isAudioMuted(),
|
|
93
101
|
videoMuted: meeting.isVideoMuted(),
|
|
94
|
-
meetingId: meeting.id
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
assert.calledTwice(roapHandlerSubmitStub);
|
|
98
|
-
assert.calledWith(roapHandlerSubmitStub, {
|
|
99
|
-
type: ROAP.SEND_ROAP_MSG,
|
|
100
|
-
msg: expectedRoapMessage,
|
|
101
|
-
correlationId: meeting.correlationId
|
|
102
|
-
});
|
|
103
|
-
assert.calledWith(roapHandlerSubmitStub, {
|
|
104
|
-
type: ROAP.SEND_ROAP_MSG_SUCCESS,
|
|
105
|
-
seq: 2,
|
|
106
|
-
correlationId: meeting.correlationId
|
|
102
|
+
meetingId: meeting.id,
|
|
103
|
+
preferTranscoding: true,
|
|
107
104
|
});
|
|
105
|
+
})
|
|
106
|
+
);
|
|
107
|
+
it('sends roap request with preferTranscoding=false for multistream meetings', async () => {
|
|
108
|
+
const roap = new Roap({}, {parent: 'fake'});
|
|
108
109
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
meeting.isMultistream = true;
|
|
111
|
+
|
|
112
|
+
await roap.sendRoapMediaRequest({
|
|
113
|
+
meeting,
|
|
114
|
+
sdp: 'sdp',
|
|
115
|
+
reconnect: false,
|
|
116
|
+
seq: 10,
|
|
117
|
+
tieBreaker: 1,
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const expectedRoapMessage = {
|
|
121
|
+
messageType: 'OFFER',
|
|
122
|
+
sdps: ['sdp'],
|
|
123
|
+
version: '2',
|
|
124
|
+
seq: 10,
|
|
125
|
+
tieBreaker: 1,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
assert.calledOnce(sendRoapStub);
|
|
129
|
+
assert.calledWith(sendRoapStub, {
|
|
130
|
+
roapMessage: expectedRoapMessage,
|
|
131
|
+
correlationId: meeting.correlationId,
|
|
132
|
+
locusSelfUrl: meeting.selfUrl,
|
|
133
|
+
mediaId: meeting.mediaId,
|
|
134
|
+
audioMuted: meeting.isAudioMuted(),
|
|
135
|
+
videoMuted: meeting.isVideoMuted(),
|
|
136
|
+
meetingId: meeting.id,
|
|
137
|
+
preferTranscoding: false,
|
|
138
|
+
});
|
|
139
|
+
});
|
|
112
140
|
});
|
|
113
141
|
});
|
|
@@ -2,6 +2,7 @@ import 'jsdom-global/register';
|
|
|
2
2
|
import chai from 'chai';
|
|
3
3
|
import chaiAsPromised from 'chai-as-promised';
|
|
4
4
|
import sinon from 'sinon';
|
|
5
|
+
import {MediaConnection as MC} from '@webex/internal-media-core';
|
|
5
6
|
|
|
6
7
|
import {StatsAnalyzer, EVENTS} from '../../../../src/statsAnalyzer';
|
|
7
8
|
import NetworkQualityMonitor from '../../../../src/networkQualityMonitor';
|
|
@@ -130,30 +131,26 @@ describe('plugin-meetings', () => {
|
|
|
130
131
|
};
|
|
131
132
|
|
|
132
133
|
pc = {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
videoTransceiver: {
|
|
142
|
-
sender: {
|
|
143
|
-
getStats: sinon.stub().resolves([fakeStats.video.sender])
|
|
144
|
-
},
|
|
145
|
-
receiver: {
|
|
146
|
-
getStats: sinon.stub().resolves([fakeStats.video.receiver])
|
|
134
|
+
getConnectionState: sinon.stub().returns(MC.ConnectionState.Connected),
|
|
135
|
+
getTransceiverStats: sinon.stub().resolves({
|
|
136
|
+
audio: {
|
|
137
|
+
sender: [fakeStats.audio.sender],
|
|
138
|
+
receiver: [fakeStats.audio.receiver],
|
|
139
|
+
currentDirection: 'sendrecv',
|
|
140
|
+
localTrackLabel: 'fake mic',
|
|
147
141
|
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
142
|
+
video: {
|
|
143
|
+
sender: [fakeStats.video.sender],
|
|
144
|
+
receiver: [fakeStats.video.receiver],
|
|
145
|
+
currentDirection: 'sendrecv',
|
|
146
|
+
localTrackLabel: 'fake camera',
|
|
152
147
|
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
screenShareVideo: {
|
|
149
|
+
sender: [],
|
|
150
|
+
receiver: [],
|
|
151
|
+
currentDirection: 'sendrecv'
|
|
152
|
+
}
|
|
153
|
+
})
|
|
157
154
|
};
|
|
158
155
|
|
|
159
156
|
networkQualityMonitor = new NetworkQualityMonitor(initialConfig);
|