I have an mp4 video file in my public folder and I'm trying to use it in a component. But it is not working and throw an error saying the video file is not found. 404. Am I doing it wrong?
GET http://localhost:3000/video.mp4 404 (Not Found)
My code:
const HomeSlider = () => {
return (
<div className='h-screen flex'>
<video
autoPlay
loop
muted
className='absolute w-auto min-w-full min-h-full max-w-none'
>
<source src='/video.mp4' type='video/mp4' />
Your browser does not support the video tag.
</video>
</div>
);
};
export default HomeSlider;