Skip to content

Commit 70d6c3e

Browse files
authored
Merge pull request #608 from robintown/reduced-controls
Show a reduced set of controls when the window is narrow
2 parents 90e32af + fdc0272 commit 70d6c3e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/room/InCallView.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,16 @@ export function InCallView({
215215
// window is too small to show everyone
216216
const maximisedParticipant = useMemo(
217217
() =>
218-
fullscreenParticipant ?? (bounds.height <= 500 && bounds.width <= 500)
218+
fullscreenParticipant ?? (bounds.height <= 400 && bounds.width <= 400)
219219
? items.find((item) => item.focused) ??
220220
items.find((item) => item.callFeed) ??
221221
null
222222
: null,
223223
[fullscreenParticipant, bounds, items]
224224
);
225225

226+
const reducedControls = bounds.width <= 400;
227+
226228
const renderAvatar = useCallback(
227229
(roomMember: RoomMember, width: number, height: number) => {
228230
const avatarUrl = roomMember.user?.avatarUrl;
@@ -325,13 +327,13 @@ export function InCallView({
325327
<div className={styles.footer}>
326328
<MicButton muted={microphoneMuted} onPress={toggleMicrophoneMuted} />
327329
<VideoButton muted={localVideoMuted} onPress={toggleLocalVideoMuted} />
328-
{canScreenshare && !isSafari && !maximisedParticipant && (
330+
{canScreenshare && !isSafari && !reducedControls && (
329331
<ScreenshareButton
330332
enabled={isScreensharing}
331333
onPress={toggleScreensharing}
332334
/>
333335
)}
334-
{!maximisedParticipant && (
336+
{!reducedControls && (
335337
<OverflowMenu
336338
inCall
337339
roomIdOrAlias={roomIdOrAlias}

0 commit comments

Comments
 (0)