3 ms·
The <video> element does have some usages which are underutilized, though: short, perhaps looping video, which can be used instead of animated GIFs. The <video
by timw4mail 5y ago
The <video> element does have some usages which are underutilized, though: short, perhaps looping video, which can be used instead of animated GIFs.
The <video> element is very capable, but the amount of combinations of possible video files has greatly increased. When it was developed, the biggest complexities were codec compatibility, and fallbacks.
While it would be possible to have the ability to select different video sizes/quality rates based on HTML elements and attributes, it is likely impractical to handle, say, adaptive video streaming (where the quality of the video is based on the connection), purely in HTML.
I'm no fan of Javascript for everything, but handling video is a scenario where there's generally a need, due to the complexities of video streaming.
- d2wa 5y ago> The <video> element does have some usages which are underutilized, though: short, perhaps looping video, which can be used instead of animated GIFs. But then you still want to serve a small video file (320px wide) for mobile and a larger one for desktop (600px wide). > While it would be possible to have the ability to select different video sizes/quality rates based on HTML elements and attributes, it is likely impractical to handle, say, adaptive video streaming (where the quality of the video is based on the connection), purely in HTML. Adaptive streaming where the quality changes over time as you watch is only needed for longer videos. You don’t need that for a short one minute video or a GIF equivalent. Just picking a resolution appropriate to the screen size would be enough.
- atom_arranger 5y agoI think it would be better if browsers implemented allowing video formats for src and srcset, just treat them the same as gif files. Safari does this (at least the src), but nobody can really use it since Chrome doesn’t. There’s a huge thread somewhere of devs arguing that Chrome should implement. I would fall on the implement side. If we want to replace gifs with better formats browsers should make it easy. https://bugs.chromium.org/p/chromium/issues/detail?id=791658 https://bugs.chromium.org/p/chromium/issues/detail?id=791658 https://github.com/whatwg/html/issues/7141 https://github.com/whatwg/html/issues/7141