News for hackers. Stuff that matters.
Re:AVIF support enabled by default in Firefox 86 by ehsankia on Sunday January 10, 2021 @12:17AM (#25710602)
Maybe this is a stupid request, but I'd like <img> (or maybe the newer <picture> tag) to take a video but with autoplay=true, loop=true, muted=true and controls=false when given a video source
Re:AVIF support enabled by default in Firefox 86 by gardaani on Sunday January 10, 2021 @03:20AM (#25712269)
Safari already supports playing MP4 in <img> tags [1]. I think that's how "animated GIF" type of animations should be handled in the Web.

It's silly that there are video formats with excellent compression but image formats want to reinvent it (such as animated PNG, animated WebP, animated AVIF...). It just adds extra complexity to image formats.

[1] https://developer.apple.com/documentation/webkit/delivering_...

Re:AVIF support enabled by default in Firefox 86 by ehsankia on Sunday January 10, 2021 @05:43PM (#25721010)
Ah, that seems exactly like I was asking for, unfortunately in the 3 years since Safari added it, I can't find much pick up on it. I found this on Chromium but with not much progress. It seems their code path doesn't quite let img decode a video, I assumed it would be as easy as creating a fake <video muted loop autoplay> but it's probably much more messy.

https://bugs.chromium.org/p/chromium/issues/detail?id=791658

Re:AVIF support enabled by default in Firefox 86 by BlueTemplar on Sunday January 10, 2021 @12:39PM (#25717111)
It's the other way around for "animated AVIF". It's 2 generations better than H.264 used in MP4, and (basically) not patent-encumbered.