@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
|
@@ -12,6 +12,7 @@ describe('plugin-meetings', () => {
|
|
|
12
12
|
let meeting;
|
|
13
13
|
let audio;
|
|
14
14
|
let video;
|
|
15
|
+
let originalRemoteUpdateAudioVideo;
|
|
15
16
|
|
|
16
17
|
const fakeLocus = {info: 'this is a fake locus'};
|
|
17
18
|
|
|
@@ -34,10 +35,16 @@ describe('plugin-meetings', () => {
|
|
|
34
35
|
audio = createMuteState(AUDIO, meeting, {sendAudio: true});
|
|
35
36
|
video = createMuteState(VIDEO, meeting, {sendVideo: true});
|
|
36
37
|
|
|
38
|
+
originalRemoteUpdateAudioVideo = MeetingUtil.remoteUpdateAudioVideo;
|
|
39
|
+
|
|
37
40
|
MeetingUtil.remoteUpdateAudioVideo = sinon.stub().resolves(fakeLocus);
|
|
38
41
|
Media.setLocalTrack = sinon.stub();
|
|
39
42
|
});
|
|
40
43
|
|
|
44
|
+
afterEach(() => {
|
|
45
|
+
MeetingUtil.remoteUpdateAudioVideo = originalRemoteUpdateAudioVideo;
|
|
46
|
+
});
|
|
47
|
+
|
|
41
48
|
describe('mute state library', () => {
|
|
42
49
|
it('does not create an audio instance if we are not sending audio', async () => {
|
|
43
50
|
assert.isNull(createMuteState(AUDIO, meeting, {sendAudio: false}));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import sinon from 'sinon';
|
|
2
2
|
import {assert} from '@webex/test-helper-chai';
|
|
3
3
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
4
|
-
|
|
5
4
|
import Meetings from '@webex/plugin-meetings';
|
|
6
5
|
import MeetingRequest from '@webex/plugin-meetings/src/meeting/request';
|
|
7
6
|
|
|
@@ -278,5 +277,30 @@ describe('plugin-meetings', () => {
|
|
|
278
277
|
assert.equal(requestParams.uri, keepAliveUrl);
|
|
279
278
|
});
|
|
280
279
|
});
|
|
280
|
+
|
|
281
|
+
describe('#sendReaction', () => {
|
|
282
|
+
it('sends request to sendReaction', async () => {
|
|
283
|
+
const reactionChannelUrl = 'reactionChannelUrl';
|
|
284
|
+
const participantId = 'participantId';
|
|
285
|
+
const reaction = {
|
|
286
|
+
type: 'thumb_down',
|
|
287
|
+
codepoints: '1F44E',
|
|
288
|
+
shortcodes: ':thumbsdown:',
|
|
289
|
+
tone: {type: 'normal_skin_tone', codepoints: '', shortcodes: ''}
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
await meetingsRequest.sendReaction({
|
|
293
|
+
reactionChannelUrl,
|
|
294
|
+
reaction,
|
|
295
|
+
participantId
|
|
296
|
+
});
|
|
297
|
+
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
298
|
+
|
|
299
|
+
assert.equal(requestParams.method, 'POST');
|
|
300
|
+
assert.equal(requestParams.uri, reactionChannelUrl);
|
|
301
|
+
assert.equal(requestParams.body.sender.participantId, participantId);
|
|
302
|
+
assert.equal(requestParams.body.reaction, reaction);
|
|
303
|
+
});
|
|
304
|
+
});
|
|
281
305
|
});
|
|
282
306
|
});
|
|
@@ -41,8 +41,8 @@ describe('plugin-meetings', () => {
|
|
|
41
41
|
meeting.unsetRemoteTracks = sinon.stub();
|
|
42
42
|
meeting.unsetPeerConnections = sinon.stub();
|
|
43
43
|
meeting.reconnectionManager = {cleanUp: sinon.stub()};
|
|
44
|
-
meeting.roap = {stop: sinon.stub()};
|
|
45
44
|
meeting.stopKeepAlive = sinon.stub();
|
|
45
|
+
meeting.updateLLMConnection = sinon.stub();
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
afterEach(() => {
|
|
@@ -63,8 +63,8 @@ describe('plugin-meetings', () => {
|
|
|
63
63
|
assert.calledOnce(meeting.unsetRemoteTracks);
|
|
64
64
|
assert.calledOnce(meeting.unsetPeerConnections);
|
|
65
65
|
assert.calledOnce(meeting.reconnectionManager.cleanUp);
|
|
66
|
-
assert.calledOnce(meeting.roap.stop);
|
|
67
66
|
assert.calledOnce(meeting.stopKeepAlive);
|
|
67
|
+
assert.calledOnce(meeting.updateLLMConnection);
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
|
|
@@ -136,6 +136,48 @@ describe('plugin-meetings', () => {
|
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
+
describe('remoteUpdateAudioVideo', () => {
|
|
140
|
+
it('#Should call meetingRequest.remoteAudioVideoToggle with correct parameters (multistream)', async () => {
|
|
141
|
+
const meeting = {
|
|
142
|
+
correlationId: 'correlation id',
|
|
143
|
+
isMultistream: true,
|
|
144
|
+
mediaId: '12345',
|
|
145
|
+
meetingJoinUrl: 'meetingJoinUrl',
|
|
146
|
+
locusUrl: 'locusUrl',
|
|
147
|
+
deviceUrl: 'some device url',
|
|
148
|
+
selfId: 'self id',
|
|
149
|
+
meetingRequest: {remoteAudioVideoToggle: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
await MeetingUtil.remoteUpdateAudioVideo(true, false, meeting);
|
|
153
|
+
|
|
154
|
+
assert.calledOnce(meeting.meetingRequest.remoteAudioVideoToggle);
|
|
155
|
+
const parameter = meeting.meetingRequest.remoteAudioVideoToggle.getCall(0).args[0];
|
|
156
|
+
|
|
157
|
+
assert.equal(parameter.locusUrl, 'locusUrl');
|
|
158
|
+
assert.equal(parameter.selfId, 'self id');
|
|
159
|
+
assert.equal(parameter.correlationId, 'correlation id');
|
|
160
|
+
assert.equal(parameter.deviceUrl, 'some device url');
|
|
161
|
+
assert.deepEqual(parameter.localMedias, [{localSdp: '{"audioMuted":true,"videoMuted":false}', mediaId: '12345'}]);
|
|
162
|
+
assert.equal(parameter.preferTranscoding, false);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('#Should call meetingRequest.remoteAudioVideoToggle with preferTranscoding:true for non multistream connections', async () => {
|
|
166
|
+
const meeting = {
|
|
167
|
+
isMultistream: false,
|
|
168
|
+
mediaId: '12345',
|
|
169
|
+
meetingRequest: {remoteAudioVideoToggle: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
await MeetingUtil.remoteUpdateAudioVideo(true, false, meeting);
|
|
173
|
+
|
|
174
|
+
assert.calledOnce(meeting.meetingRequest.remoteAudioVideoToggle);
|
|
175
|
+
const parameter = meeting.meetingRequest.remoteAudioVideoToggle.getCall(0).args[0];
|
|
176
|
+
|
|
177
|
+
assert.equal(parameter.preferTranscoding, true);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
139
181
|
describe('joinMeeting', () => {
|
|
140
182
|
it('#Should call `meetingRequest.joinMeeting', async () => {
|
|
141
183
|
const meeting = {meetingJoinUrl: 'meetingJoinUrl', locusUrl: 'locusUrl', meetingRequest: {joinMeeting: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}};
|
|
@@ -147,6 +189,25 @@ describe('plugin-meetings', () => {
|
|
|
147
189
|
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
148
190
|
|
|
149
191
|
assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
|
|
192
|
+
assert.equal(parameter.preferTranscoding, true);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
it('#Should call meetingRequest.joinMeeting with preferTranscoding=false when multistream is enabled', async () => {
|
|
196
|
+
const meeting = {
|
|
197
|
+
isMultistream: true,
|
|
198
|
+
meetingJoinUrl: 'meetingJoinUrl',
|
|
199
|
+
locusUrl: 'locusUrl',
|
|
200
|
+
meetingRequest: {joinMeeting: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
MeetingUtil.parseLocusJoin = sinon.stub();
|
|
204
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
205
|
+
|
|
206
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
207
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
208
|
+
|
|
209
|
+
assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
|
|
210
|
+
assert.equal(parameter.preferTranscoding, false);
|
|
150
211
|
});
|
|
151
212
|
|
|
152
213
|
it('#Should fallback sipUrl if meetingJoinUrl does not exists', async () => {
|
|
@@ -12,7 +12,6 @@ import uuid from 'uuid';
|
|
|
12
12
|
import StaticConfig from '@webex/plugin-meetings/src/common/config';
|
|
13
13
|
import TriggerProxy from '@webex/plugin-meetings/src/common/events/trigger-proxy';
|
|
14
14
|
import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
|
|
15
|
-
import MediaUtil from '@webex/plugin-meetings/src/media/util';
|
|
16
15
|
import Meeting from '@webex/plugin-meetings/src/meeting';
|
|
17
16
|
import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
|
18
17
|
import Meetings from '@webex/plugin-meetings/src/meetings';
|
|
@@ -787,7 +786,6 @@ describe('plugin-meetings', () => {
|
|
|
787
786
|
});
|
|
788
787
|
describe('#createMeeting', () => {
|
|
789
788
|
beforeEach(() => {
|
|
790
|
-
MediaUtil.createPeerConnection = sinon.stub().returns(true);
|
|
791
789
|
webex.internal.device.userId = uuid1;
|
|
792
790
|
webex.internal.device.url = url1;
|
|
793
791
|
MeetingCollection.set = sinon.stub().returns(true);
|
|
@@ -1024,7 +1022,6 @@ describe('plugin-meetings', () => {
|
|
|
1024
1022
|
describe('Public Event Triggers', () => {
|
|
1025
1023
|
describe('#destroy', () => {
|
|
1026
1024
|
beforeEach(() => {
|
|
1027
|
-
MediaUtil.createPeerConnection = sinon.stub().returns(true);
|
|
1028
1025
|
MeetingUtil.cleanUp = sinon.stub();
|
|
1029
1026
|
});
|
|
1030
1027
|
it('should have #destroy', () => {
|
|
@@ -1116,7 +1113,6 @@ describe('plugin-meetings', () => {
|
|
|
1116
1113
|
let meeting;
|
|
1117
1114
|
|
|
1118
1115
|
beforeEach(async () => {
|
|
1119
|
-
MediaUtil.createPeerConnection = sinon.stub().returns(true);
|
|
1120
1116
|
webex.internal.device.userId = uuid1;
|
|
1121
1117
|
webex.internal.device.url = url1;
|
|
1122
1118
|
MeetingCollection.set = sinon.stub().returns(true);
|
|
@@ -10,9 +10,8 @@ import chaiAsPromised from 'chai-as-promised';
|
|
|
10
10
|
import {Credentials} from '@webex/webex-core';
|
|
11
11
|
import Support from '@webex/internal-plugin-support';
|
|
12
12
|
import MockWebex from '@webex/test-helper-mock-webex';
|
|
13
|
-
|
|
14
|
-
import Meetings from '@webex/plugin-meetings';
|
|
15
13
|
import ParameterError from '@webex/plugin-meetings/src/common/errors/parameter';
|
|
14
|
+
import Meetings from '@webex/plugin-meetings';
|
|
16
15
|
import Members from '@webex/plugin-meetings/src/members';
|
|
17
16
|
import MembersUtil from '@webex/plugin-meetings/src/members/util';
|
|
18
17
|
|
|
@@ -311,5 +310,168 @@ describe('plugin-meetings', () => {
|
|
|
311
310
|
await checkValid(resultPromise, spies, requestingMemberId, url1);
|
|
312
311
|
});
|
|
313
312
|
});
|
|
313
|
+
|
|
314
|
+
describe('findMemberByCsi()', () => {
|
|
315
|
+
let members;
|
|
316
|
+
|
|
317
|
+
// fake collection that contains all combinations of members data structure (with respect to CSIs)
|
|
318
|
+
const fakeCollection = {
|
|
319
|
+
oneWithoutDevices: {
|
|
320
|
+
participant: {
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
oneWithEmptyDevices: {
|
|
324
|
+
participant: {
|
|
325
|
+
devices: [],
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
oneWithDevicesWithoutCsis: {
|
|
329
|
+
participant: {
|
|
330
|
+
devices: [
|
|
331
|
+
{
|
|
332
|
+
url: 'https://fakeURL1.com',
|
|
333
|
+
deviceType: 'SIP',
|
|
334
|
+
state: 'JOINED',
|
|
335
|
+
csis: [],
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
url: 'dialout:///fakeagain',
|
|
339
|
+
deviceType: 'PROVISIONAL',
|
|
340
|
+
state: 'JOINED',
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
id: 'abc-123-abc-123',
|
|
345
|
+
status: 'IN_MEETING',
|
|
346
|
+
},
|
|
347
|
+
oneWithSomeCsis: {
|
|
348
|
+
participant: {
|
|
349
|
+
devices: [
|
|
350
|
+
{
|
|
351
|
+
url: 'https://fakeURL2.com',
|
|
352
|
+
deviceType: 'SIP',
|
|
353
|
+
state: 'JOINED',
|
|
354
|
+
csis: [1000, 1001, 1002],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
url: 'https://fakeURL3.com',
|
|
358
|
+
deviceType: 'SIP',
|
|
359
|
+
state: 'JOINED',
|
|
360
|
+
csis: [2000, 2001, 2002],
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
beforeEach(() => {
|
|
368
|
+
members = createMembers({url: url1});
|
|
369
|
+
members.membersCollection.setAll(fakeCollection);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
it('returns undefined if member not found', () => {
|
|
373
|
+
assert.strictEqual(members.findMemberByCsi(123), undefined);
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
it('returns correct member when CSI matches the first device', () => {
|
|
377
|
+
assert.strictEqual(members.findMemberByCsi(1001), fakeCollection.oneWithSomeCsis);
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
it('returns correct member when CSI matches the second device', () => {
|
|
381
|
+
assert.strictEqual(members.findMemberByCsi(2001), fakeCollection.oneWithSomeCsis);
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
describe('getCsisForMember()', () => {
|
|
386
|
+
let members;
|
|
387
|
+
|
|
388
|
+
// fake collection that contains all combinations of members data structure (with respect to CSIs)
|
|
389
|
+
const fakeCollection = {
|
|
390
|
+
oneWithoutParticipant: {
|
|
391
|
+
id: 'oneWithoutParticipant',
|
|
392
|
+
},
|
|
393
|
+
oneWithoutDevices: {
|
|
394
|
+
id: 'oneWithoutDevices',
|
|
395
|
+
participant: {
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
oneWithEmptyDevices: {
|
|
399
|
+
id: 'oneWithEmptyDevices',
|
|
400
|
+
participant: {
|
|
401
|
+
devices: [],
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
oneWithDevicesWithoutCsis: {
|
|
405
|
+
id: 'oneWithDevicesWithoutCsis',
|
|
406
|
+
participant: {
|
|
407
|
+
devices: [
|
|
408
|
+
{
|
|
409
|
+
url: 'https://fakeURL1.com',
|
|
410
|
+
deviceType: 'SIP',
|
|
411
|
+
state: 'JOINED',
|
|
412
|
+
mediaSessions: [],
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
url: 'dialout:///fakeagain',
|
|
416
|
+
deviceType: 'PROVISIONAL',
|
|
417
|
+
state: 'JOINED',
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
},
|
|
421
|
+
status: 'IN_MEETING',
|
|
422
|
+
},
|
|
423
|
+
oneWithSomeCsis: {
|
|
424
|
+
id: 'oneWithSomeCsis',
|
|
425
|
+
participant: {
|
|
426
|
+
devices: [
|
|
427
|
+
{
|
|
428
|
+
url: 'https://fakeURL2.com',
|
|
429
|
+
deviceType: 'SIP',
|
|
430
|
+
state: 'JOINED',
|
|
431
|
+
mediaSessions: [
|
|
432
|
+
{mediaType: 'audio', mediaContent: 'main', csi: 1000},
|
|
433
|
+
{mediaType: 'video', mediaContent: 'main', csi: 1001},
|
|
434
|
+
{mediaType: 'video', mediaContent: 'content', csi: 1002}
|
|
435
|
+
],
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
url: 'https://fakeURL3.com',
|
|
439
|
+
deviceType: 'SIP',
|
|
440
|
+
state: 'JOINED',
|
|
441
|
+
mediaSessions: [
|
|
442
|
+
{mediaType: 'audio', mediaContent: 'main', csi: 2000},
|
|
443
|
+
{mediaType: 'video', mediaContent: 'main', csi: 2001},
|
|
444
|
+
{mediaType: 'video', mediaContent: 'content', csi: 2002}
|
|
445
|
+
],
|
|
446
|
+
}
|
|
447
|
+
]
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
beforeEach(() => {
|
|
453
|
+
members = createMembers({url: url1});
|
|
454
|
+
members.membersCollection.setAll(fakeCollection);
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
it('returns empty array if member not found', () => {
|
|
458
|
+
assert.deepEqual(members.getCsisForMember('wrong id'), []);
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
it('returns empty array if member does not have CSIs', () => {
|
|
462
|
+
assert.deepEqual(members.getCsisForMember('oneWithoutParticipant'), []);
|
|
463
|
+
assert.deepEqual(members.getCsisForMember('oneWithoutDevices'), []);
|
|
464
|
+
assert.deepEqual(members.getCsisForMember('oneWithEmptyDevices'), []);
|
|
465
|
+
assert.deepEqual(members.getCsisForMember('oneWithDevicesWithoutCsis'), []);
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
it('returns empty array if mediaType and mediaContent do not match', () => {
|
|
469
|
+
assert.deepEqual(members.getCsisForMember('oneWithSomeCsis', 'audio', 'content'), []);
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
it('returns correct CSI values when there is a match', () => {
|
|
473
|
+
assert.deepEqual(members.getCsisForMember('oneWithSomeCsis', 'video', 'main'), [1001, 2001]);
|
|
474
|
+
});
|
|
475
|
+
});
|
|
314
476
|
});
|
|
315
477
|
});
|