YouTube video links embedded in Mastodon are playing perfectly, but the same are not playing in Piefed.

https://hear-me.social/@codewizard/116546338265386095

This is the link of a Mastodon post. If you open the link, you come across youtube links which play when the button is clicked. But youtube videos aren't playing in Piefed.

What's the problem with Piefed ??🤔🤔

10 points · 9 comments · view on lemmy.world

9 Comments

Jerry@feddit.online · 6 pts · 100d

I'll investigate this more tomorrow

Ulrich@feddit.org · 4 pts · 100d

Try Blorp

in_my_honest_opinion@piefed.social · 3 pts · 100d

Works fine for me on waterfox

Jerry@feddit.online · 2 pts · 100d (3 replies)

This should be fixed now. It was an nginx configuration change.

Test post here: https://feddit.online/post/1667899

MastKalandar@feddit.online · 2 pts · 100d

Thanks 😊😊👍

INeedMana@piefed.zip · 1 pts · 28d (1 reply)

Could you point me in the direction what change was needed to make it work? Was it CSP?

Jerry@feddit.online · 2 pts · 28d

YouTube requires a valid Referer header to allow embedded playback, and if Nginx is stripping it out, like mine did, the videos throw an error and refuse to play.

I fixed this by updating the referrer-Policy header. I updated the server {} block with this:

add_header Referrer-Policy "strict-origin-when-cross-origin" always;
mesamunefire@piefed.social · 1 pts · 100d

Im seeing it working on firefox mobile.

What error are you seeing?

FiniteBanjo@feddit.online · 1 pts · 100d

I think there is an issue with some video players that reveal your IP to the hosting instance?