Ramzi Osta
Ramzi Osta

Reputation: 63

video as background not loading

If I use the src from the web with src="http........" it works but it doesn't work if src is uploaded from my computer?

I tried this code:

 <video autoplay loop muted>
    <source src="../documents/Sent files/VID-20190106-WA0001.mp4" type="video/mp4"/> 
 </video>

and I also tried this code"

 <video autoplay loop playsinline muted src="../../documents/Sent files/VID-20190106-WA0001.mp4" type="video/mp4">
 </video>

but this works:

<video src="https://css-tricks-post-videos.s3.us-east- 
 1.amazonaws.com/708209935.mp4" autoplay loop playsinline muted></video>

Upvotes: 3

Views: 1027

Answers (1)

Samuel Mazahery
Samuel Mazahery

Reputation: 352

if html file and video file are in same directory you must set src without "../"

enter image description here

Upvotes: 2

Related Questions