My initial plan was to have an mp4 video play whenever someone visits my website. However, after finishing the coding, microsoft edge is the only browser that will play the video successfully(in other browsers it wont even begin to play). I am pretty sure chrome is a able to play mp4 videos, but i cant seem to find the problem.
The code:
HTML
<video id="vid" [muted]="false" autoplay plays-inline class="vid">
<source src="/Video/video.mp4" type="video/mp4">
</video>
CSS
.vid {
display: block;
position: absolute;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
object-fit: fill;
}
I have tried many things, but couldnt get it to work. If anyone has any idea of what could be causing the problem you would help me really much!
Thank you for your time