Skip to content
Snippets Groups Projects
Commit f365c50f authored by Joao Siebel's avatar Joao Siebel
Browse files

Relax autoSwapLayout constraints

now it's possible to minimize the presentation even if there
is no webcam being shared.

close #8129
parent 5b3cb27c
No related branches found
No related tags found
No related merge requests found
......@@ -58,18 +58,7 @@ const toggleSwapLayout = () => {
swapLayout.tracker.changed();
};
export const shouldEnableSwapLayout = () => {
const { viewParticipantsWebcams } = Settings.dataSaving;
const usersVideo = VideoService.getAllWebcamUsers();
const poll = PollingService.mapPolls();
const { current_presentation: hasPresentation } = getPresentationInfo();
return usersVideo.length > 0 // prevent swap without any webcams
&& viewParticipantsWebcams // prevent swap when dataSaving for webcams is enabled
&& !poll.pollExists // prevent swap when there is a poll running
&& !shouldShowScreenshare() // and when there's screenshare
&& !shouldShowExternalVideo() // or there's an external video
};
export const shouldEnableSwapLayout = () => !shouldShowScreenshare() && !shouldShowExternalVideo();
export const getSwapLayout = () => {
swapLayout.tracker.depend();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment