File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 1- 'use client' ;
2-
31import Image from "next/image" ;
4- import { useEffect , useRef } from "react" ;
52
63export 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 >
You can’t perform that action at this time.
0 commit comments