Reputation: 585
I have a webpage which loads a video as a background. I want to prevent the video from loading on (at least some) mobile browsers. I have disabled displaying the video using the @media
tag, but I think that this doesn't prevent the browser from loading the video.
@media screen and (max-device-width: 800px) {
#bgvid {
display: none;
}
}
I'd like to know how to prevent the video from loading on mobile browsers. It would be especially great if it could be done without using JavaScript.
Upvotes: 0
Views: 90
Reputation: 585
Turned out that media tags were enough to prevent the loading of videos on mobile browsers (for devices that don't exceed the specified width).
Upvotes: 1