PeerTube videos failing to embed via Gutenberg’s native embed block (oEmbed issue)

Hello,

I’m encountering an issue embedding PeerTube videos into WordPress using Gutenberg’s native « embed » block. For a while now, when attempting to embed a PeerTube URL directly into Gutenberg, instead of displaying the video preview, Gutenberg shows an error stating « Error details » followed by an empty text field and a small lock icon below it.

I’ve already tested:

Multiple WordPress installations hosted in different environments.

Different browsers (Firefox and Chrome).

My self-hosted PeerTube instance and videos from peer.tube; both exhibit the same error.

Embedding the same PeerTube video using the manual iframe embed code in a custom HTML block works perfectly. Therefore, it seems the issue specifically affects Gutenberg’s built-in oEmbed functionality.

Has anyone experienced the same problem or could provide guidance on how to resolve this? Is there a known compatibility issue between recent Gutenberg/WordPress versions and PeerTube’s oEmbed implementation?

Thank you for your help!

Hi,

Does it work if you use the iframe provided by peertube? (instead of using oembed)

yes it works well with the iframe code.

Can you share a wordpress page that use the oembed code so I see what’s the error?

Thanks, unfortunately wordpress sanitizes oembed output from peertube because it’s not in the internal whitelist: oEmbed – Advanced Administration Handbook | Developer.WordPress.org

I imagine that new security rules were introduced in the latest WordPress versions because embedding was working perfectly until recently. I’ll use iframe embedding for now as a workaround. I’ll check if it’s possible to request WordPress to whitelist PeerTube. Anyway, thank you for your help!

1 « J'aime »