I am having an issue with displaying a video background on my website. It works perfectly in Chrome, but when I switch to Safari, the video controls are showing up. Is there any way to hide these controls or a better method to implement a video background?
Here is the code I am using for the background video:
HTML
<video id='home-bg' src={require('../assets/leojaden-video-bg-2.mp4')} muted loop autoPlay playsinline/>
CSS
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
#home-bg {
position: absolute;
filter: brightness(80%);
top: 0;
left: 0;
height: 100vh;
width: 100vw;
object-fit: cover;
z-index: -1;
}
video::-webkit-media-controls {
display: none;
}
I am using Reactjs for this website, so a solution compatible with React would be greatly appreciated! :)