epiphyt / embed-privacy

Embed Privacy prevents loading of embedded external content and allows your site visitors to opt-in.
https://epiph.yt/en/embed-privacy/
GNU General Public License v2.0
19 stars 12 forks source link

Feature request: improve the styling of PeerTube videos (currently embedded at 560 × 315 pixels) #217

Open oldrup opened 5 months ago

oldrup commented 5 months ago

What feature are you requesting?

Hey 🙋‍♂️

Fun funsies, I tried to embed PeerTube videos, from two different instances.

I was surprised to see, that the embed works out of the box, and that Embed Privacy kicks in with the default overlay. So far, so good.

But the iframe width is set to 560 inline, height 315 (screenshot below)

The class is-provider-peertube is set somewhere up in the DOM, and with three experimental lines of CSS (screenshot) the video is shown in the full width of my containing column.

image

Not knowing the inner workings of Embed Privacy, would this be the best route for better support for PeerTube videos, or what do you recommend?

Why is this feature necessary?

Embed Privacy was built with extendability in mind. Federated content could need some help. Would be cool if, if built in support was easily achieved.

Are you expecing side-effects?

Hm. Not really. Just another embed source.

Code of Conduct

MatzeKitt commented 5 months ago

Can you give me the actual URL you’ve embedded?

Currently, it seems to me that the embed code of PeerTube just uses these dimensions. If so, it would be more part of the theme to change them (also to be responsive, etc.). I don’t think it’s a good idea if Embed Privacy changes something related to the embed dimensions – especially not for a single provider.

MatzeKitt commented 3 months ago

@oldrup Just a ping whether you can send me the URL you’ve embedded in the editor? 🙂

MatzeKitt commented 2 months ago

@oldrup Another *ping*

oldrup commented 2 months ago

Oh, yes, thank you for your patience with me :)

Here is a test page, with 4 different PeerTube embeds (url in the caption) and screenshots from rendering in 4 different themes (some videos played, some not).

https://test.oldrup.dev/ep/

So, WordPress just identifies it as a generic "Embed", and I'm not sure if Embed Privacy can change that, but maybe we can do something on the front end to render it just a little more consistent and pleasing?

Please let me know if I can provide any further info or testing. Will respond immediately this time, promise 😉

MatzeKitt commented 2 months ago

Thank you for clarification!

I also noticed in #180 that WordPress doesn’t properly recognize ActivityPub-based embeds as embed provider and will add it to my list for an improvement there.