Animated AVIF
Which feature do you want to detect? Support for animated AVIF images, a.k.a. AVIF image sequences.
Which browsers do support this feature? https://caniuse.com/avif
Although all major browsers support AVIF for still images, only Chrome supports animated AVIF. Per @jensimmons’s tweet, Safari will support animated AVIF in Safari 16.1 (scheduled for release in October 2022).
Until all browsers advertising AVIF support also support animations, this poses an interoperability problem where developers cannot rely on the browser to do format selection by using <picture> + <source>. A JavaScript feature test would help bridge this unfortunate gap.
How could it be implemented? There’s existing tests for animated image formats:
- Animated PNG: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/img/apng.js
- Animated WebP: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/img/webp-animation.js
I suspect we could follow these examples.
Additional context A feature test for (static) AVIF support was added in #2539.
Source: Modernizr/Modernizr