I want media query support in video source elements
#182
aarongustafson
started this conversation in
Wants
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
pictureelement lets you provide different images to the user based on a media query attached to asourceelement. It's a great way to save user bandwidth when your image differs at different viewports (for example, serving a wide image on desktop and a square one on mobile). However, attaching a media query to avideosourcedoes not do the same thing, it just plays whicheversourceis specified first. We are using muted, autoplay videos more and more and right now we have to render an emptydivtag then fill with avideovia JavaScript after page load.Here’s an example published from the <cite>New York Times</cite> and another on Glitch.
It would be amazing to not have to script this at all and just let the
videoelement work it out for us.https://webwewant.fyi/wants/8/
Beta Was this translation helpful? Give feedback.
All reactions