I’m trying to put a video as a background video on my website. I’ve researched a lot and it is not working and I don’t know why.
On my html I have:
<video id="bgVideo" controls preload="true" autoplay loop muted>
<source src="../images/Home_Page.mp4" type="video/mp4" >
<source src="../images/Home_Page.ogv" type="video/ogg" >
<source src="../images/Home_Page.webm" type="video/webm" >
</video>
<script src="scripts/html5ext.js" type="text/javascript"></script>
And on my CSS I have:
body
{
background: url("../images/Home_Page.png") no-repeat fixed center;
}
video#bgVideo {
position: fixed;
right: 0;
bottom: 0;
width: auto;
min-width: 100%;
height: auto;
min-height: 100%;
z-index: -100;
background-size: cover;
}
However, the video is not playing and the background stays white. Any suggestions to solve this problem??
Thank you so much