Skip to content

Commit 71edf09

Browse files
committed
i give up
1 parent 984cf34 commit 71edf09

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

app/page.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
1-
'use client';
2-
31
import Image from "next/image";
4-
import { useEffect, useRef } from "react";
52

63
export default function Page() {
7-
const videoRef = useRef<HTMLVideoElement>(null);
8-
9-
useEffect(() => {
10-
const timer = setTimeout(() => {
11-
if (videoRef.current) {
12-
videoRef.current.muted = false;
13-
}
14-
}, 250);
15-
16-
return () => clearTimeout(timer);
17-
}, []);
18-
194
return (
205
<>
216
<div className="flex justify-center items-center min-h-screen bg-purple-200">
@@ -26,7 +11,7 @@ export default function Page() {
2611
width={500}
2712
height={500} />
2813
<div>
29-
<video ref={videoRef} loop autoPlay muted height="500" width="500">
14+
<video loop autoPlay muted height="500" width="500">
3015
<source src="/never-gonna-give-up.mp4" type="video/mp4" />
3116
</video>
3217
</div>

0 commit comments

Comments
 (0)