3 ms·
From a linked article: > It would be great if web browsers would accept in an <img> tag all the video codecs they can play in a <video> tag, the only differenc
by imaginariet 5y ago
From a linked article:
> It would be great if web browsers would accept in an <img> tag all the video codecs they can play in a <video> tag, the only difference being that in an <img> tag, the video is autoplayed, muted, and looped. That way, new and masterful video codecs like VP9 and AV1 would automatically work for animations, and we can finally get rid of the ancient GIF format.
Of course, the typical rebuttal on HN will be "I hate autoplay, nothing should autoplay without an explicit click", which is why we'll be stuck with GIF for another 10 years.
- magicalhippo 5y agoThere are many valid reasons why autoplaying videos should be up to the user. I'm generally against autoplaying, but I do accept that in some cases it is a nice thing. So this proposal seems reasonable, if the browsers in addition get a separate option to disable this behavior. It's important though that javascripts can't override this behavior to prevent abuse (say by unmuting), so browsers would have to take some precaution against that.
- gardaani 5y agoSafari already accepts MP4 in an <img> tag and it is autoplayed, muted and looped [1]. Sadly, Chrome doesn't want to implement it [2]. [1] https://developer.apple.com/documentation/webkit/delivering_video_content_for_safari#3030249 https://developer.apple.com/documentation/webkit/delivering_... [2] https://bugs.chromium.org/p/chromium/issues/detail?id=791658#c36 https://bugs.chromium.org/p/chromium/issues/detail?id=791658...
- acdha 5y agoThis is a great example for the “Chrome is the new IE” debate: that’s a feature which would immediately make the web better but they held back support for a standard, hardware-accelerated format trying to force mainstream adoption of their own format which had limited tool support and never performed enough better than JPEG/PNG to be worth the trouble for most sites.
- pwdisswordfish8 5y agos/better/worse/
- acdha 5y agoYou think it's good that people keep using gigantic GIF files rather than smaller videos? There's no technical reason to prefer the GIF format — it burns data transfer, requires more CPU, and has terrible quality.
- pwdisswordfish8 5y agoI prefer <img> elements never to animate at all, regardless of format. Animations should use <video>.
- Zababa 5y ago> Of course, the typical rebuttal on HN will be "I hate autoplay, nothing should autoplay without an explicit click", which is why we'll be stuck with GIF for another 10 years. Why? If you believe nothing should autoplay GIFs are also part of the problem.
- chrismorgan 5y agoAbsolutely; I consider GIFs autoplaying to be a bug—unfortunately a bug that would be rather difficult to fix.
- idoubtit 5y agoIt's easy to fix with the right browser. For instance with the Chromium-based Vivaldi, I configured "Image Animation" to "Once", with the other possible values being "Loop" and "Never". You may define a shortcut key to change this setting on the fly.
- chrismorgan 5y agoThat doesn’t fix undesired animated image autoplay, it breaks animated images completely, since you can’t trigger playback on demand like you can with videos.
- rhdunn 5y agoI personally find animated gifs on things like YouTube community posts visually distracting, as my eyes will continually move to look at what is moving. That's also why I turn off things like the moving tile images on the Windows start menu.
- vbezhenar 5y agoAFAIK Autoplay works fine in modern browser for video tags, just without sound. Enabling it for images does not alter web in any meaningful way IMO.
- unwind 5y agoI hope most would be okay with it due to the forced (by the browser) muting, i.e. images may animate but they may not make sound, even if they are displaying what is in reality a video stream containing sound. At least I would be fine with that, and I can be quite annoyed with auto-playing video.
- deleted 5y ago[deleted]
- ThePadawan 5y agoI really can't understand why we now have both autoplaying video against the users' wishes and incredibly complicated configuration whether to allow autoplay [0]. [0] https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_...
- hulitu 5y agoBecause the ad industry pays for the browser.