Focus screenshare tiles automatically
This commit is contained in:
13
src/Room.jsx
13
src/Room.jsx
@@ -313,6 +313,12 @@ function InRoomView({
|
|||||||
setVideoInput,
|
setVideoInput,
|
||||||
} = useMediaHandler(client);
|
} = useMediaHandler(client);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (screenshareFeeds.length > 0 && layout === "gallery") {
|
||||||
|
toggleLayout();
|
||||||
|
}
|
||||||
|
}, [screenshareFeeds]);
|
||||||
|
|
||||||
const items = useMemo(() => {
|
const items = useMemo(() => {
|
||||||
const participants = [];
|
const participants = [];
|
||||||
|
|
||||||
@@ -320,7 +326,10 @@ function InRoomView({
|
|||||||
participants.push({
|
participants.push({
|
||||||
id: callFeed.userId,
|
id: callFeed.userId,
|
||||||
callFeed,
|
callFeed,
|
||||||
isActiveSpeaker: callFeed.userId === activeSpeaker,
|
isActiveSpeaker:
|
||||||
|
screenshareFeeds.length === 0
|
||||||
|
? callFeed.userId === activeSpeaker
|
||||||
|
: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +337,7 @@ function InRoomView({
|
|||||||
participants.push({
|
participants.push({
|
||||||
id: callFeed.userId + "-screenshare",
|
id: callFeed.userId + "-screenshare",
|
||||||
callFeed,
|
callFeed,
|
||||||
isActiveSpeaker: callFeed.userId === activeSpeaker,
|
isActiveSpeaker: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user