Reputation: 21
In my website, I wanted to add a background video for my container. The location of my video is found here: File Path of Project
The way to access the video is <video src="videos/video-2.mp4" autoPlay loop muted />
.
But, I thought it would be <video src="/public/videos/video-2.mp4" autoPlay loop muted />
.
I was wondering why the first file navigation works, while the second file navigation does not work. How does the computer know to search in the public folder, but when I try to specify to look in the public folder then it does not work?
Upvotes: 1
Views: 35
Reputation: 11
The public folder is somewhere the computer looks for resource files by default. It cannot be named anything other than "public". That's why the computer doesn't really need you to include it in the navigation path. Hope this helps!
Upvotes: 1