Skip to content

Commit

Permalink
fix: sizing issue w/ bg video which made the (#244)
Browse files Browse the repository at this point in the history
blur image not show before either img or video got
dimensions via their url sources
  • Loading branch information
luwes authored Apr 20, 2024
1 parent 6d71742 commit bd0471c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/default-provider/app/background-video/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export default function Page() {
return (
<>
<section>
<BackgroundVideo src={countryClouds} disableTracking>
<BackgroundVideo
src={countryClouds}
disableTracking
style={{ aspectRatio: 1.9 }}
>
<h1>next-video</h1>
<p>
A React component for adding video to your Next.js application.
Expand Down
2 changes: 1 addition & 1 deletion examples/default-provider/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ footer .inner {
}

.mux-svg {
width: 2.2rem;
width: 2.5rem;
}

aside nav ul {
Expand Down
2 changes: 2 additions & 0 deletions src/components/players/background-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export const BackgroundPlayer = forwardRef((allProps: BackgroundPlayerProps, for
}
.next-video-bg-poster {
width: 100%;
height: 100%;
position: relative;
object-fit: cover;
pointer-events: none;
Expand Down

0 comments on commit bd0471c

Please sign in to comment.