diff --git a/src/components/Broadcast/VideoFeed/VideoFeed.tsx b/src/components/Broadcast/VideoFeed/VideoFeed.tsx index b6163d1..7de18c9 100644 --- a/src/components/Broadcast/VideoFeed/VideoFeed.tsx +++ b/src/components/Broadcast/VideoFeed/VideoFeed.tsx @@ -1,10 +1,9 @@ -import { VideoFeedFrame, BackgroundImage, BackgroundImageDiv } from "./styles"; +import { VideoFeedFrame, BackgroundImageDiv } from "./styles"; import bg from "../../../public/images/misc/bg-standin.jpg"; export default function VideoFeed() { - return - {/* */} + return ; } diff --git a/src/components/Broadcast/VideoFeed/styles.ts b/src/components/Broadcast/VideoFeed/styles.ts index da0aa2f..ee129da 100644 --- a/src/components/Broadcast/VideoFeed/styles.ts +++ b/src/components/Broadcast/VideoFeed/styles.ts @@ -11,27 +11,23 @@ export const VideoFeedFrame = styled.div` ${({ centered = false }) => centered && css` display: flex; - /* flex-direction: column; */ + flex-direction: column; align-items: center; justify-content: center; - /* > * { - left: 10px; - } */ + > div { + background-position: center; + } `} `; VideoFeedFrame.displayName = "VideoFeedFrame"; export const BackgroundImage = styled.img` height: 100%; + max-width: 100%; object-fit: contain; `; BackgroundImage.displayName = "BackgroundImage"; -/** - * A slight improvement to using a simple img in that we can resize the image - * (the video) to shrink slightly in the video feed frame if the browser window - * is too narrow. - */ type BackgroundImageDivProps = { src: string, } @@ -41,5 +37,6 @@ export const BackgroundImageDiv = styled.div` background-image: ${({ src }) => `url("${src}")`}; background-size: contain; background-repeat: no-repeat; + background-position: 0% 50%; `; BackgroundImageDiv.displayName = "BackgroundImageDiv"; diff --git a/src/routes/BroadcastRoute.tsx b/src/routes/BroadcastRoute.tsx index b23d109..7e519cc 100644 --- a/src/routes/BroadcastRoute.tsx +++ b/src/routes/BroadcastRoute.tsx @@ -14,7 +14,7 @@ export default function Broadcast() { }); return ( - +