fix(multi-stream) only create local ss particpant with multi-stream enabled
This commit is contained in:
parent
57672ebea8
commit
ae6454c59c
|
@ -69,15 +69,23 @@ declare var APP: Object;
|
||||||
MiddlewareRegistry.register(store => next => action => {
|
MiddlewareRegistry.register(store => next => action => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case TRACK_ADDED: {
|
case TRACK_ADDED: {
|
||||||
|
const state = store.getState();
|
||||||
|
const { jitsiTrack, local } = action.track;
|
||||||
|
|
||||||
// The devices list needs to be refreshed when no initial video permissions
|
// The devices list needs to be refreshed when no initial video permissions
|
||||||
// were granted and a local video track is added by umuting the video.
|
// were granted and a local video track is added by umuting the video.
|
||||||
if (action.track.local) {
|
if (local) {
|
||||||
store.dispatch(getAvailableDevices());
|
store.dispatch(getAvailableDevices());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getSourceNameSignalingFeatureFlag(store.getState())
|
// The TRACK_ADDED action is dispatched when a presenter starts a screenshare. Do not create a local fake
|
||||||
&& action.track.jitsiTrack.videoType === VIDEO_TYPE.DESKTOP
|
// screenshare participant when multiple stream is not enabled.
|
||||||
&& !action.track.jitsiTrack.isMuted()
|
const skipCreateFakeScreenShareParticipant = local && !getMultipleVideoSupportFeatureFlag(state);
|
||||||
|
|
||||||
|
if (getSourceNameSignalingFeatureFlag(state)
|
||||||
|
&& jitsiTrack.getVideoType() === VIDEO_TYPE.DESKTOP
|
||||||
|
&& !jitsiTrack.isMuted()
|
||||||
|
&& !skipCreateFakeScreenShareParticipant
|
||||||
) {
|
) {
|
||||||
createFakeScreenShareParticipant(store, action);
|
createFakeScreenShareParticipant(store, action);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue