feat: improve video layout

This commit is contained in:
Jeremy Kahn 2022-11-15 22:02:18 -06:00
parent f5c0eb3f16
commit 373ea22d2c
2 changed files with 7 additions and 7 deletions

View File

@ -63,10 +63,10 @@ export const PeerVideo = ({
justifyContent: 'center', justifyContent: 'center',
mx: 'auto', mx: 'auto',
overflow: 'auto', overflow: 'auto',
py: 2, padding: 2,
...(selectedPeerStream ...(selectedPeerStream
? { ? {
height: 'calc(100% - 0.5em)', height: '100%',
} }
: { : {
width: `calc(${sizePercent}% - 1em)`, width: `calc(${sizePercent}% - 1em)`,

View File

@ -125,7 +125,7 @@ export const RoomVideoDisplay = ({ userId }: RoomVideoDisplayProps) => {
}} }}
> >
{selectedPeerStream && ( {selectedPeerStream && (
<Box sx={{ height: '85%' }}> <Box sx={{ height: '80%' }}>
<PeerVideo <PeerVideo
isSelectedVideo isSelectedVideo
numberOfVideos={numberOfVideos} numberOfVideos={numberOfVideos}
@ -139,8 +139,7 @@ export const RoomVideoDisplay = ({ userId }: RoomVideoDisplayProps) => {
)} )}
<Box <Box
sx={{ sx={{
alignContent: 'center', alignContent: 'space-around',
alignItems: 'center',
display: 'flex', display: 'flex',
flexDirection: 'row', flexDirection: 'row',
flexGrow: 1, flexGrow: 1,
@ -149,8 +148,9 @@ export const RoomVideoDisplay = ({ userId }: RoomVideoDisplayProps) => {
overflow: 'auto', overflow: 'auto',
width: '100%', width: '100%',
...(selectedPeerStream && { ...(selectedPeerStream && {
height: '15%', height: '20%',
maxHeight: '15%', maxHeight: '20%',
pt: '0.5em',
}), }),
}} }}
> >