Focus screenshare tiles automatically
This commit is contained in:
parent
fe053a11f2
commit
5bd0ae7133
1 changed files with 11 additions and 2 deletions
13
src/Room.jsx
13
src/Room.jsx
|
@ -313,6 +313,12 @@ function InRoomView({
|
|||
setVideoInput,
|
||||
} = useMediaHandler(client);
|
||||
|
||||
useEffect(() => {
|
||||
if (screenshareFeeds.length > 0 && layout === "gallery") {
|
||||
toggleLayout();
|
||||
}
|
||||
}, [screenshareFeeds]);
|
||||
|
||||
const items = useMemo(() => {
|
||||
const participants = [];
|
||||
|
||||
|
@ -320,7 +326,10 @@ function InRoomView({
|
|||
participants.push({
|
||||
id: callFeed.userId,
|
||||
callFeed,
|
||||
isActiveSpeaker: callFeed.userId === activeSpeaker,
|
||||
isActiveSpeaker:
|
||||
screenshareFeeds.length === 0
|
||||
? callFeed.userId === activeSpeaker
|
||||
: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -328,7 +337,7 @@ function InRoomView({
|
|||
participants.push({
|
||||
id: callFeed.userId + "-screenshare",
|
||||
callFeed,
|
||||
isActiveSpeaker: callFeed.userId === activeSpeaker,
|
||||
isActiveSpeaker: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue