by imaginariet · 5y ago · 0 comments
> 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.
[1] https://developer.apple.com/documentation/webkit/delivering_...
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=791658...
Why? If you believe nothing should autoplay GIFs are also part of the problem.
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.
[0] https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_...
At least I would be fine with that, and I can be quite annoyed with auto-playing video.