@webex/plugin-meetings 3.0.0-beta.170 → 3.0.0-beta.171
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 +0 -6
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/media/index.js +3 -3
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +22 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +529 -415
- package/dist/meeting/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/media/properties.d.ts +10 -3
- package/dist/types/meeting/index.d.ts +41 -9
- package/package.json +20 -20
- package/src/index.ts +2 -0
- package/src/media/index.ts +11 -5
- package/src/media/properties.ts +24 -5
- package/src/meeting/index.ts +210 -77
- package/src/reconnection-manager/index.ts +4 -1
- package/test/integration/spec/journey.js +9 -9
- package/test/unit/spec/media/index.ts +13 -3
- package/test/unit/spec/meeting/index.js +106 -15
|
@@ -17,6 +17,14 @@ describe('createMediaConnection', () => {
|
|
|
17
17
|
id: 'video track',
|
|
18
18
|
underlyingTrack: 'underlying video track',
|
|
19
19
|
};
|
|
20
|
+
const fakeShareVideoTrack = {
|
|
21
|
+
id: 'share video track',
|
|
22
|
+
underlyingTrack: 'underlying share video track',
|
|
23
|
+
};
|
|
24
|
+
const fakeShareAudioTrack = {
|
|
25
|
+
id: 'share audio track',
|
|
26
|
+
underlyingTrack: 'underlying share audio track',
|
|
27
|
+
};
|
|
20
28
|
|
|
21
29
|
afterEach(() => {
|
|
22
30
|
sinon.restore();
|
|
@@ -44,7 +52,8 @@ describe('createMediaConnection', () => {
|
|
|
44
52
|
},
|
|
45
53
|
audioTrack: fakeAudioTrack,
|
|
46
54
|
videoTrack: fakeVideoTrack,
|
|
47
|
-
|
|
55
|
+
shareVideoTrack: null,
|
|
56
|
+
shareAudioTrack: null,
|
|
48
57
|
},
|
|
49
58
|
remoteQualityLevel: 'HIGH',
|
|
50
59
|
enableRtx: ENABLE_RTX,
|
|
@@ -257,7 +266,8 @@ describe('createMediaConnection', () => {
|
|
|
257
266
|
},
|
|
258
267
|
audioTrack: fakeAudioTrack,
|
|
259
268
|
videoTrack: null,
|
|
260
|
-
|
|
269
|
+
shareVideoTrack: fakeShareVideoTrack,
|
|
270
|
+
shareAudioTrack: fakeShareAudioTrack,
|
|
261
271
|
},
|
|
262
272
|
remoteQualityLevel: 'HIGH',
|
|
263
273
|
enableRtx: ENABLE_RTX,
|
|
@@ -288,7 +298,7 @@ describe('createMediaConnection', () => {
|
|
|
288
298
|
localTracks: {
|
|
289
299
|
audio: fakeAudioTrack.underlyingTrack,
|
|
290
300
|
video: undefined,
|
|
291
|
-
screenShareVideo:
|
|
301
|
+
screenShareVideo: fakeShareVideoTrack.underlyingTrack,
|
|
292
302
|
},
|
|
293
303
|
direction: {
|
|
294
304
|
audio: 'sendrecv',
|
|
@@ -1707,6 +1707,7 @@ describe('plugin-meetings', () => {
|
|
|
1707
1707
|
audio: undefined,
|
|
1708
1708
|
video: undefined,
|
|
1709
1709
|
screenShareVideo: undefined,
|
|
1710
|
+
screenShareAudio: undefined,
|
|
1710
1711
|
},
|
|
1711
1712
|
direction: {
|
|
1712
1713
|
audio: 'sendrecv',
|
|
@@ -1735,6 +1736,7 @@ describe('plugin-meetings', () => {
|
|
|
1735
1736
|
audio: fakeMicrophoneTrack,
|
|
1736
1737
|
video: undefined,
|
|
1737
1738
|
screenShareVideo: undefined,
|
|
1739
|
+
screenShareAudio: undefined,
|
|
1738
1740
|
},
|
|
1739
1741
|
direction: {
|
|
1740
1742
|
audio: 'sendrecv',
|
|
@@ -1765,6 +1767,7 @@ describe('plugin-meetings', () => {
|
|
|
1765
1767
|
audio: fakeMicrophoneTrack,
|
|
1766
1768
|
video: undefined,
|
|
1767
1769
|
screenShareVideo: undefined,
|
|
1770
|
+
screenShareAudio: undefined,
|
|
1768
1771
|
},
|
|
1769
1772
|
direction: {
|
|
1770
1773
|
audio: 'sendrecv',
|
|
@@ -1793,6 +1796,7 @@ describe('plugin-meetings', () => {
|
|
|
1793
1796
|
audio: fakeMicrophoneTrack,
|
|
1794
1797
|
video: undefined,
|
|
1795
1798
|
screenShareVideo: undefined,
|
|
1799
|
+
screenShareAudio: undefined,
|
|
1796
1800
|
},
|
|
1797
1801
|
direction: {
|
|
1798
1802
|
audio: 'inactive',
|
|
@@ -1821,6 +1825,7 @@ describe('plugin-meetings', () => {
|
|
|
1821
1825
|
audio: undefined,
|
|
1822
1826
|
video: undefined,
|
|
1823
1827
|
screenShareVideo: undefined,
|
|
1828
|
+
screenShareAudio: undefined,
|
|
1824
1829
|
},
|
|
1825
1830
|
direction: {
|
|
1826
1831
|
audio: 'inactive',
|
|
@@ -2270,7 +2275,7 @@ describe('plugin-meetings', () => {
|
|
|
2270
2275
|
meeting.locusInfo.mediaShares = [{name: 'content', url: url1}];
|
|
2271
2276
|
meeting.locusInfo.self = {url: url1};
|
|
2272
2277
|
meeting.meetingRequest.changeMeetingFloor = sinon.stub().returns(Promise.resolve());
|
|
2273
|
-
meeting.mediaProperties.
|
|
2278
|
+
meeting.mediaProperties.shareVideoTrack = {};
|
|
2274
2279
|
meeting.mediaProperties.mediaDirection.sendShare = true;
|
|
2275
2280
|
meeting.state = 'JOINED';
|
|
2276
2281
|
});
|
|
@@ -2337,7 +2342,7 @@ describe('plugin-meetings', () => {
|
|
|
2337
2342
|
meeting.video = { enable: sinon.stub()};
|
|
2338
2343
|
meeting.mediaProperties.audioTrack = createFakeLocalTrack();
|
|
2339
2344
|
meeting.mediaProperties.videoTrack = createFakeLocalTrack();
|
|
2340
|
-
meeting.mediaProperties.
|
|
2345
|
+
meeting.mediaProperties.shareVideoTrack = createFakeLocalTrack();
|
|
2341
2346
|
meeting.mediaProperties.mediaDirection = {
|
|
2342
2347
|
sendAudio: true,
|
|
2343
2348
|
sendVideo: true,
|
|
@@ -2408,7 +2413,7 @@ describe('plugin-meetings', () => {
|
|
|
2408
2413
|
localTracks: {
|
|
2409
2414
|
audio: meeting.mediaProperties.audioTrack.underlyingTrack,
|
|
2410
2415
|
video: meeting.mediaProperties.videoTrack.underlyingTrack,
|
|
2411
|
-
screenShareVideo: meeting.mediaProperties.
|
|
2416
|
+
screenShareVideo: meeting.mediaProperties.shareVideoTrack.underlyingTrack,
|
|
2412
2417
|
},
|
|
2413
2418
|
direction: {
|
|
2414
2419
|
audio: 'inactive',
|
|
@@ -3624,6 +3629,7 @@ describe('plugin-meetings', () => {
|
|
|
3624
3629
|
describe('Local tracks publishing', () => {
|
|
3625
3630
|
let audioTrack;
|
|
3626
3631
|
let videoTrack;
|
|
3632
|
+
let audioShareTrack;
|
|
3627
3633
|
let videoShareTrack;
|
|
3628
3634
|
let createMuteStateStub;
|
|
3629
3635
|
let LocalDisplayTrackConstructorStub;
|
|
@@ -3646,6 +3652,12 @@ describe('plugin-meetings', () => {
|
|
|
3646
3652
|
on: sinon.stub(),
|
|
3647
3653
|
off: sinon.stub(),
|
|
3648
3654
|
};
|
|
3655
|
+
audioShareTrack = {
|
|
3656
|
+
id: 'share track',
|
|
3657
|
+
on: sinon.stub(),
|
|
3658
|
+
off: sinon.stub(),
|
|
3659
|
+
getSettings: sinon.stub(),
|
|
3660
|
+
}
|
|
3649
3661
|
videoShareTrack = {
|
|
3650
3662
|
id: 'share track',
|
|
3651
3663
|
on: sinon.stub(),
|
|
@@ -3734,7 +3746,18 @@ describe('plugin-meetings', () => {
|
|
|
3734
3746
|
meeting.mediaProperties.webrtcMediaConnection.publishTrack,
|
|
3735
3747
|
track
|
|
3736
3748
|
);
|
|
3737
|
-
assert.equal(meeting.mediaProperties.
|
|
3749
|
+
assert.equal(meeting.mediaProperties.shareVideoTrack, track);
|
|
3750
|
+
assert.equal(meeting.mediaProperties.mediaDirection.sendShare, true);
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
const checkScreenShareAudioPublished = (track) => {
|
|
3754
|
+
assert.calledOnce(meeting.requestScreenShareFloor);
|
|
3755
|
+
|
|
3756
|
+
assert.calledWith(
|
|
3757
|
+
meeting.mediaProperties.webrtcMediaConnection.publishTrack,
|
|
3758
|
+
track
|
|
3759
|
+
);
|
|
3760
|
+
assert.equal(meeting.mediaProperties.shareAudioTrack, track);
|
|
3738
3761
|
assert.equal(meeting.mediaProperties.mediaDirection.sendShare, true);
|
|
3739
3762
|
};
|
|
3740
3763
|
|
|
@@ -3744,6 +3767,31 @@ describe('plugin-meetings', () => {
|
|
|
3744
3767
|
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.publishTrack);
|
|
3745
3768
|
checkScreenShareVideoPublished(videoShareTrack);
|
|
3746
3769
|
});
|
|
3770
|
+
|
|
3771
|
+
it('requests screen share floor and publishes the screen share audio track', async () => {
|
|
3772
|
+
await meeting.publishTracks({screenShare: {audio: audioShareTrack}});
|
|
3773
|
+
|
|
3774
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.publishTrack);
|
|
3775
|
+
checkScreenShareAudioPublished(audioShareTrack);
|
|
3776
|
+
});
|
|
3777
|
+
|
|
3778
|
+
it('does not request screen share floor when publishing video share track if already sharing audio', async () => {
|
|
3779
|
+
await meeting.publishTracks({screenShare: {audio: audioShareTrack}});
|
|
3780
|
+
assert.calledOnce(meeting.requestScreenShareFloor);
|
|
3781
|
+
|
|
3782
|
+
meeting.requestScreenShareFloor.reset();
|
|
3783
|
+
await meeting.publishTracks({screenShare: {video: videoShareTrack}});
|
|
3784
|
+
assert.notCalled(meeting.requestScreenShareFloor);
|
|
3785
|
+
})
|
|
3786
|
+
|
|
3787
|
+
it('does not request screen share floor when publishing audio share track if already sharing video', async () => {
|
|
3788
|
+
await meeting.publishTracks({screenShare: {video: videoShareTrack}});
|
|
3789
|
+
assert.calledOnce(meeting.requestScreenShareFloor);
|
|
3790
|
+
|
|
3791
|
+
meeting.requestScreenShareFloor.reset();
|
|
3792
|
+
await meeting.publishTracks({screenShare: {audio: audioShareTrack}});
|
|
3793
|
+
assert.notCalled(meeting.requestScreenShareFloor);
|
|
3794
|
+
})
|
|
3747
3795
|
|
|
3748
3796
|
it('updates MuteState instance and publishes the track for main audio', async () => {
|
|
3749
3797
|
await meeting.publishTracks({microphone: audioTrack});
|
|
@@ -3765,13 +3813,15 @@ describe('plugin-meetings', () => {
|
|
|
3765
3813
|
camera: videoTrack,
|
|
3766
3814
|
screenShare: {
|
|
3767
3815
|
video: videoShareTrack,
|
|
3816
|
+
audio: audioShareTrack,
|
|
3768
3817
|
},
|
|
3769
3818
|
});
|
|
3770
3819
|
|
|
3771
|
-
assert.
|
|
3820
|
+
assert.callCount(meeting.mediaProperties.webrtcMediaConnection.publishTrack, 4);
|
|
3772
3821
|
checkAudioPublished(audioTrack);
|
|
3773
3822
|
checkVideoPublished(videoTrack);
|
|
3774
3823
|
checkScreenShareVideoPublished(videoShareTrack);
|
|
3824
|
+
checkScreenShareAudioPublished(audioShareTrack);
|
|
3775
3825
|
});
|
|
3776
3826
|
});
|
|
3777
3827
|
it('creates instance and publishes with annotation info', async () => {
|
|
@@ -3788,7 +3838,7 @@ describe('plugin-meetings', () => {
|
|
|
3788
3838
|
await meeting.publishTracks({
|
|
3789
3839
|
microphone: audioTrack,
|
|
3790
3840
|
camera: videoTrack,
|
|
3791
|
-
screenShare: {video: videoShareTrack},
|
|
3841
|
+
screenShare: {video: videoShareTrack, audio: audioShareTrack},
|
|
3792
3842
|
});
|
|
3793
3843
|
});
|
|
3794
3844
|
|
|
@@ -3812,7 +3862,8 @@ describe('plugin-meetings', () => {
|
|
|
3812
3862
|
assert.equal(meeting.mediaProperties.mediaDirection.sendVideo, 'fake value');
|
|
3813
3863
|
};
|
|
3814
3864
|
|
|
3815
|
-
|
|
3865
|
+
// share direction will remain true if only one of the two share tracks are unpublished
|
|
3866
|
+
const checkScreenShareVideoUnpublished = (shareDirection = true) => {
|
|
3816
3867
|
assert.calledWith(
|
|
3817
3868
|
meeting.mediaProperties.webrtcMediaConnection.unpublishTrack,
|
|
3818
3869
|
videoShareTrack
|
|
@@ -3820,24 +3871,38 @@ describe('plugin-meetings', () => {
|
|
|
3820
3871
|
|
|
3821
3872
|
assert.calledOnce(meeting.requestScreenShareFloor);
|
|
3822
3873
|
|
|
3823
|
-
assert.equal(meeting.mediaProperties.
|
|
3824
|
-
assert.equal(meeting.mediaProperties.mediaDirection.sendShare,
|
|
3874
|
+
assert.equal(meeting.mediaProperties.shareVideoTrack, null);
|
|
3875
|
+
assert.equal(meeting.mediaProperties.mediaDirection.sendShare, shareDirection);
|
|
3876
|
+
};
|
|
3877
|
+
|
|
3878
|
+
// share direction will remain true if only one of the two share tracks are unpublished
|
|
3879
|
+
const checkScreenShareAudioUnpublished = (shareDirection = true) => {
|
|
3880
|
+
assert.calledWith(
|
|
3881
|
+
meeting.mediaProperties.webrtcMediaConnection.unpublishTrack,
|
|
3882
|
+
audioShareTrack
|
|
3883
|
+
);
|
|
3884
|
+
|
|
3885
|
+
assert.calledOnce(meeting.requestScreenShareFloor);
|
|
3886
|
+
|
|
3887
|
+
assert.equal(meeting.mediaProperties.shareAudioTrack, null);
|
|
3888
|
+
assert.equal(meeting.mediaProperties.mediaDirection.sendShare, shareDirection);
|
|
3825
3889
|
};
|
|
3826
3890
|
|
|
3827
3891
|
it('fails if there is no media connection', async () => {
|
|
3828
3892
|
meeting.mediaProperties.webrtcMediaConnection = undefined;
|
|
3829
3893
|
await assert.isRejected(
|
|
3830
|
-
meeting.unpublishTracks([audioTrack, videoTrack, videoShareTrack])
|
|
3894
|
+
meeting.unpublishTracks([audioTrack, videoTrack, videoShareTrack, audioShareTrack])
|
|
3831
3895
|
);
|
|
3832
3896
|
});
|
|
3833
3897
|
|
|
3834
|
-
it('un-publishes the tracks correctly (all
|
|
3835
|
-
await meeting.unpublishTracks([audioTrack, videoTrack, videoShareTrack]);
|
|
3898
|
+
it('un-publishes the tracks correctly (all 4 together)', async () => {
|
|
3899
|
+
await meeting.unpublishTracks([audioTrack, videoTrack, videoShareTrack, audioShareTrack]);
|
|
3836
3900
|
|
|
3837
|
-
assert.
|
|
3901
|
+
assert.equal(meeting.mediaProperties.webrtcMediaConnection.unpublishTrack.callCount, 4);
|
|
3838
3902
|
checkAudioUnpublished();
|
|
3839
3903
|
checkVideoUnpublished();
|
|
3840
|
-
checkScreenShareVideoUnpublished();
|
|
3904
|
+
checkScreenShareVideoUnpublished(false);
|
|
3905
|
+
checkScreenShareAudioUnpublished(false);
|
|
3841
3906
|
});
|
|
3842
3907
|
|
|
3843
3908
|
it('un-publishes the audio track correctly', async () => {
|
|
@@ -3860,6 +3925,30 @@ describe('plugin-meetings', () => {
|
|
|
3860
3925
|
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.unpublishTrack);
|
|
3861
3926
|
checkScreenShareVideoUnpublished();
|
|
3862
3927
|
});
|
|
3928
|
+
|
|
3929
|
+
it('un-publishes the screen share audio track correctly', async () => {
|
|
3930
|
+
await meeting.unpublishTracks([audioShareTrack]);
|
|
3931
|
+
|
|
3932
|
+
assert.calledOnce(meeting.mediaProperties.webrtcMediaConnection.unpublishTrack);
|
|
3933
|
+
checkScreenShareAudioUnpublished();
|
|
3934
|
+
});
|
|
3935
|
+
|
|
3936
|
+
it('releases share floor and sets send direction to false when both screen share tracks are undefined', async () => {
|
|
3937
|
+
await meeting.unpublishTracks([videoShareTrack, audioShareTrack]);
|
|
3938
|
+
|
|
3939
|
+
assert.calledOnce(meeting.releaseScreenShareFloor);
|
|
3940
|
+
assert.equal(meeting.mediaProperties.mediaDirection.sendShare, false);
|
|
3941
|
+
});
|
|
3942
|
+
|
|
3943
|
+
it('does not release share floor when audio is released and video still exists', async () => {
|
|
3944
|
+
await meeting.unpublishTracks([audioShareTrack]);
|
|
3945
|
+
assert.notCalled(meeting.releaseScreenShareFloor);
|
|
3946
|
+
});
|
|
3947
|
+
|
|
3948
|
+
it('does not release share floor when video is released and audio still exists', async () => {
|
|
3949
|
+
await meeting.unpublishTracks([videoShareTrack]);
|
|
3950
|
+
assert.notCalled(meeting.releaseScreenShareFloor);
|
|
3951
|
+
});
|
|
3863
3952
|
});
|
|
3864
3953
|
});
|
|
3865
3954
|
});
|
|
@@ -3912,7 +4001,8 @@ describe('plugin-meetings', () => {
|
|
|
3912
4001
|
sandbox.stub(Media, 'stopTracks').returns(Promise.resolve());
|
|
3913
4002
|
sandbox.stub(meeting.mediaProperties, 'audioTrack').value(fakeMediaTrack());
|
|
3914
4003
|
sandbox.stub(meeting.mediaProperties, 'videoTrack').value(fakeMediaTrack());
|
|
3915
|
-
sandbox.stub(meeting.mediaProperties, '
|
|
4004
|
+
sandbox.stub(meeting.mediaProperties, 'shareVideoTrack').value(fakeMediaTrack());
|
|
4005
|
+
sandbox.stub(meeting.mediaProperties, 'shareAudioTrack').value(fakeMediaTrack());
|
|
3916
4006
|
sandbox.stub(meeting.mediaProperties, 'remoteAudioTrack').value(fakeMediaTrack());
|
|
3917
4007
|
sandbox.stub(meeting.mediaProperties, 'remoteVideoTrack').value(fakeMediaTrack());
|
|
3918
4008
|
sandbox.stub(meeting.mediaProperties, 'remoteShare').value(fakeMediaTrack());
|
|
@@ -5083,6 +5173,7 @@ describe('plugin-meetings', () => {
|
|
|
5083
5173
|
meeting.meetingRequest.changeMeetingFloor = sinon.stub().returns(Promise.resolve());
|
|
5084
5174
|
});
|
|
5085
5175
|
it('should call changeMeetingFloor()', async () => {
|
|
5176
|
+
meeting.screenShareFloorState = 'GRANTED';
|
|
5086
5177
|
const share = meeting.releaseScreenShareFloor();
|
|
5087
5178
|
|
|
5088
5179
|
assert.exists(share.then);
|