Mf2 and Video by Jan BoddezJan Boddez (jan.boddez.net)
I ran into a bit of an issue lately, and it’s to do with the way X-Ray, or rather php-mf2 parses video elements in HTML (i.e., an h-entry). The unfortunate frog I’ll be dissecting is the page at https://beko.famkos.net/2021/05/03/head-tracking-for-x4-foundations-on-linux/. (Sorry!) Its source co...

Heh, sorry for making you jump the hoops @jan

The weird formatting is mostly because this is how Gutenberg wants to format videos. Hacking various sources into this is how I did it before Gutenberg, that would still not allow me to offer different formats (or subtitles). So this is basically a combination of both snippets with the hope that Gutenberg will eventually understand this.

I was delighted to see that Gutenberg would offer an additional CSS for videos now alas it’s added on the wrong tag and you picked exactly that test. Usually I put this manually on all sources. See https://beko.famkos.net/2021/05/15/playing-an-old-sound-box/ for example.

One thought on “

            • In reply to https://beko.famkos.net/2021/05/22/336175/.
              Having multiple sources is the proper approach, though. It’s why I filed an issue, too. The solution I’ll probably opt for is to just stop X-Ray from removing source elements, and maybe have all videos in a single source tag (so that browsers will just pick whichever one to display), but below previews only. Or show a single “poster” image, something I haven’t addressed in the article. That way, video post previews get exactly one thumbnail/video, and the article view itself will be complete again. (Not that anyone cares! I’m such an incredibly big nerd, writing about this.)