Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update publish-alpha #3389

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/hms-whiteboard/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react-icons/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react-sdk/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions packages/roomkit-react/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { AnimatePresence } from 'framer-motion';
import { TrackWithPeerAndDimensions } from '@100mslive/react-sdk';
import { Box } from '../../../Layout';
// @ts-ignore: No implicit Any
Expand All @@ -10,37 +9,35 @@ export const Grid = React.forwardRef<HTMLDivElement, { tiles: TrackWithPeerAndDi
({ tiles, edgeToEdge }, ref) => {
const videoTileProps = useVideoTileContext();
return (
<AnimatePresence>
<Box
ref={ref}
css={{
flex: '1 1 0',
gap: '$4',
display: 'flex',
placeContent: 'center',
alignItems: 'center',
justifyContent: 'center',
flexFlow: 'row wrap',
minHeight: 0,
'@lg': { gap: edgeToEdge ? 0 : '$4' },
}}
>
{tiles?.map(tile => {
return (
<VideoTile
key={tile.track?.id || tile.peer?.id}
width={tile.width}
height={tile.height}
peerId={tile.peer?.id}
trackId={tile.track?.id}
rootCSS={{ padding: 0 }}
objectFit="contain"
{...videoTileProps}
/>
);
})}
</Box>
</AnimatePresence>
<Box
ref={ref}
css={{
flex: '1 1 0',
gap: '$4',
display: 'flex',
placeContent: 'center',
alignItems: 'center',
justifyContent: 'center',
flexFlow: 'row wrap',
minHeight: 0,
'@lg': { gap: edgeToEdge ? 0 : '$4' },
}}
>
{tiles?.map(tile => {
return (
<VideoTile
key={tile.track?.id || tile.peer?.id}
width={tile.width}
height={tile.height}
peerId={tile.peer?.id}
trackId={tile.track?.id}
rootCSS={{ padding: 0 }}
objectFit="contain"
{...videoTileProps}
/>
);
})}
</Box>
);
},
);
17 changes: 2 additions & 15 deletions packages/roomkit-react/src/VideoTile/StyledVideoTile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { motion } from 'framer-motion';
import { Box } from '../Layout';
import { styled } from '../Theme';
import { flexCenter } from '../utils';
Expand All @@ -7,18 +6,6 @@ export const Root = styled('div', {
padding: '0.75rem',
});

const MotionRoot = motion(Root);
MotionRoot.defaultProps = {
layout: true,
transition: {
type: 'spring',
stiffness: 300,
damping: 30,
mass: 1,
duration: 0.15,
},
};

const Container = styled('div', {
width: '100%',
height: '100%',
Expand Down Expand Up @@ -137,7 +124,7 @@ const AvatarContainer = styled(Box, {
});

interface VideoTileType {
Root: typeof MotionRoot;
Root: typeof Root;
Container: typeof Container;
Overlay: typeof Overlay;
Info: typeof Info;
Expand All @@ -148,7 +135,7 @@ interface VideoTileType {
}

export const StyledVideoTile: VideoTileType = {
Root: MotionRoot,
Root,
Container,
Overlay,
Info,
Expand Down
Loading
Loading