-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: svg blur image aspect ratio (#259)
* fix: svg blur image aspect ratio * fix: video and poster expanding parent container * example: add fullscreen background video
- Loading branch information
Showing
11 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
examples/default-provider/app/(fullscreen)/background-video-fullscreen/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Metadata } from 'next'; | ||
import BackgroundVideo from 'next-video/background-video'; | ||
import countryClouds from '/videos/country-clouds.mp4?thumbnailTime=0'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'next-video - Background Video', | ||
}; | ||
|
||
export default function Page() { | ||
return ( | ||
<> | ||
<BackgroundVideo | ||
src={countryClouds} | ||
disableTracking | ||
maxResolution="720p" | ||
style={{ | ||
aspectRatio: 'auto', | ||
width: '100%', | ||
height: '100%' | ||
}} | ||
> | ||
<h1>next-video</h1> | ||
<p> | ||
A React component for adding video to your Next.js application. It extends both the | ||
video element and your Next app with features for automatic video optimization. | ||
</p> | ||
</BackgroundVideo> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Metadata } from 'next'; | ||
import { DM_Sans, JetBrains_Mono } from 'next/font/google'; | ||
import '../globals.css'; | ||
|
||
const dmSans = DM_Sans({ subsets: ['latin'], variable: '--sans' }); | ||
const jetBrainsMono = JetBrains_Mono({ subsets: ['latin'], variable: '--mono' }); | ||
|
||
export const metadata: Metadata = { | ||
title: 'next-video', | ||
description: | ||
'Next Video solves the hard problems with embedding, storing, streaming, and customizing video in your Next.js app.', | ||
}; | ||
|
||
export default function getLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="en" suppressHydrationWarning className={`${dmSans.variable} ${jetBrainsMono.variable}`}> | ||
<body style={{ | ||
display: 'block', | ||
margin: 0, | ||
height: '100vh', | ||
overflow: 'hidden', | ||
}}>{children}</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters