Skip to content

Commit

Permalink
perf use a higher quality webm video
Browse files Browse the repository at this point in the history
  • Loading branch information
Okysu committed Nov 8, 2023
1 parent 918271b commit d8a5ce1
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import RandomMessage from "@/components/random-message";
export default function Home() {
return (
<>
<BackgroundVideo src="./video/home_v.mp4" mobile="./video/home_v_m.mp4" />
<BackgroundVideo src="./video/home_v.webm" mobile="./video/home_v_m.webm" />
<div className="max-w-7xl mx-auto pt-36 px-6">
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center z-10">
Expand Down
2 changes: 1 addition & 1 deletion app/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const BackgroundVideo: React.FC<BackgroundVideoProps> = ({ src, mobile }) => {
return (
<>
<video ref={ref} className={styles.video} autoPlay muted={muted} loop>
<source src={video} type="video/mp4" />
<source src={video} type="video/webm" />
</video>
<button className={styles.muteButton} onClick={toggleMute}>
{muted ? "取消静音" : "使用静音"}
Expand Down
Binary file removed public/video/home_v.mp4
Binary file not shown.
Binary file added public/video/home_v.webm
Binary file not shown.
Binary file removed public/video/home_v_m.mp4
Binary file not shown.
Binary file added public/video/home_v_m.webm
Binary file not shown.

0 comments on commit d8a5ce1

Please sign in to comment.