Check out this website!
The background video is functional on desktops. On smaller screens, an image is shown instead using CSS display property. However, what should be done for touch screens like iPads, which are not exactly small?
Here's the code I experimented with:
<video id="background" width="100%" height="100%" muted autoplay loop>
<source src="videos/video.mp4" type="video/mp4">
<source src="videos/video.ogg" type="video/ogg">
<img src="img/image.jpg">
Your browser does not support the video tag.
</video>
I included a fallback image in case the device or browser doesn't support the video format. But I suspect that touch screens do support video playback, just without autoplay.
Is there a solution to display a background image on devices that can't play background videos?
Your assistance would be greatly appreciated.