It currently can't because of a WebKit bug, but you can with an older
version of WebKitGTK.
 
Which bug are you referring to? I tried with a minimal browser[1] in Debian bullseye with libwebkit and that plays video just fine.

1. https://lifeofpenguin.blogspot.com/2021/12/build-your-own-browser.html