0
I’m developing a page without the use of back-end, however, I want to upload a video as background using this code:
<div class="test">
<video poster="img/videoposter.png" id="header-video" playsinline autoplay muted loop>
<source src="img/background-video.mp4" type="video/mp4">
</video>
</div>
But when the user is accessing via mobile/tablet, I want only the normal css/Less background to appear as the example:
.test {
background-color: black;
}
For that I used the code:
@media (max-width: 991px) {
#header-video {
display: none;
}
}
but I noticed that the mobile user keeps downloading the video to his device leaving the site heavier, how do I so that mobile users do not download the video?
http://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile
– Matheus