I use a video element as background. The source files have no sound, and to be sure I put attribute muted in there.
It starts playing automatically on Opera (for Android and Windows), MX5, Firefox(66) for Android and Firefox (82) for Windows. However, when I start the page in Firefox (81) for Android it doesn't start (until user event calls .play() ).
Is it true Firefox now blocks all videos be default (even without sound) or is this a bug and is there a way to work around it?
I mean, I could go back to gif instead, but they are so big in size.
<style>
.background {
width: 100vw;
position: fixed;
top: 0px;
left: 0px;
z-index: -9999;
}
</style>
<video id="background" class="background" autoplay loop muted playsinline>
<source src="vid/background_vp9.webm" type="video/webm">
<source src="vid/background.webm" type="video/webm">
<source src="vid/background.mp4" type="video/mp4">
<img class="background" src="img/background.png" alt="background">
</video>