How to point to video file with...

User 2807230 Photo


Guest
2 posts

I put the below code in the HTML element but I'm not getting any output. Can someone tell me if I am pointing to the video wrong perhaps? It is located in the Resources tool under Project Folder/Videos and is called PanelLightsBG.mp4. Thanks in advance.

<doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>SCWD</title>
<style>
video#bgvid{
min-width:100%;
min-height:100%;
width:auto;
height:auto;
background: (PanelLightsBG.mp4) no-repeat;
background-size: cover;
}
</style>
</head>
<body>
<video id="bgvidd" autoplay poster ="PanelLightsBG.mp4" <source src="Project Folder\Videos\PanelLightsBG.mp4" type="video/mp4" />
</video>
</body>
</html>
</doctype>
User 103173 Photo


VP of Software Development
0 posts

Your slashes look reversed to me. It should be a forward slash. Also, file case does make a difference, so "Videos" and "videos" are two different things.

Also be aware that not all browsers can play MP4 videos (especially Windows) nor all mobile devices. You should use a video service like YouTube or Vimeo so that all browsers (and devices) can play the video.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 2807230 Photo


Guest
2 posts

Yes. The slashes do look backwards. Thank you for responding! I will try using youtube and see what happens.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.