fix(layout): set external-video/screen share initial states on all layouts

Only smart layout takes screen sharing/external video states in account
when populating its initial state. The others don't, and that causes
some weird issues when switching back-and-forth between layout types due
to their input states becoming inconsistent - ie having an active screen
sharing and transitioning from Smart -> Custom would mark it as false
(due to its absence from the initial state) and pollute its state for
subsequent layouts.

This commit guarantees those features are taken into account when
populating initial input states for Focus On*/Custom layouts.
This commit is contained in:
prlanzarin 2022-07-21 14:40:12 -03:00 committed by Ramón Souza
parent 495aa2be0c
commit 6f13961018
3 changed files with 18 additions and 0 deletions

View File

@ -179,6 +179,12 @@ const CustomLayout = (props) => {
cameraDock: {
numCameras: cameraDockInput.numCameras,
},
externalVideo: {
hasExternalVideo: input.externalVideo.hasExternalVideo,
},
screenShare: {
hasScreenShare: input.screenShare.hasScreenShare,
},
}, INITIAL_INPUT_STATE),
});
}

View File

@ -95,6 +95,12 @@ const PresentationFocusLayout = (props) => {
cameraDock: {
numCameras: cameraDockInput.numCameras,
},
externalVideo: {
hasExternalVideo: input.externalVideo.hasExternalVideo,
},
screenShare: {
hasScreenShare: input.screenShare.hasScreenShare,
},
}, INITIAL_INPUT_STATE),
});
} else {

View File

@ -128,6 +128,12 @@ const VideoFocusLayout = (props) => {
cameraDock: {
numCameras: cameraDockInput.numCameras,
},
externalVideo: {
hasExternalVideo: input.externalVideo.hasExternalVideo,
},
screenShare: {
hasScreenShare: input.screenShare.hasScreenShare,
},
},
INITIAL_INPUT_STATE,
),