https://wiki.archlinux.org/index.php/Firefox#Hardware_video_...
In short: Firefox supports it under Wayland since version 75 (and for more formats since 76).
Not that I've really noticed this being an issue under X11.