Chocobozzz / PeerTube

ActivityPub-federated video streaming platform using P2P directly in your web browser
https://joinpeertube.org/
GNU Affero General Public License v3.0
13.13k stars 1.52k forks source link

Videos embed not generated when shared on Diaspora*, Facebook, (more?) #409

Closed gegeweb closed 6 years ago

gegeweb commented 6 years ago

When sharing videos on Diapora* network (or on FB) they aren't embedded in a player like on Mastodon or like video from YT.

Don't know how its works!

rigelk commented 6 years ago

@gegeweb PeerTube relies on websites to use oEmbeds to display the most accurate title, description, and image when sharing a video URL. It sounds like Disapora* uses oembeds. However They are the ones adding support for platform oembeds (we have our own oembed definition in server/middlewares/validators/oembed.ts). Maybe ours doesn't fit what they're expecting.

As for Facebook, they don't use oEmbeds but OGP. More detailed docs altogether about link previews: https://indieweb.org/link-preview#Facebook (I think we could clearly take note of some stuff from that page)

Chocobozzz commented 6 years ago

Most websites use domains whitelist for oembed...

gegeweb commented 6 years ago

For oembed and player integration (with or without whitelist) it is necessary to have an endpoint url that (I think) returns the player code. Now that I have my Diaspora pod* I tried to test by listing my Peertube instance in the white list. But I didn't find the "endpoint" url?

I open a ticket again? Did I miss something?

Chocobozzz commented 6 years ago

Maybe https://peertube.datagueule.tv/services/oembed?url=https://peertube.datagueule.tv/videos/watch/0b04f13d-1e18-4f1d-814e-4979aa7c9c44 ?

gegeweb commented 6 years ago

Yes, that's it! Thanks.

gegeweb commented 6 years ago

Whitelist an instance of Peertube on Diaspora works fine with the oembed endpoint. But… I don't know if we can do something on the Peertube side or if that's on te Diaspora side.

Before playing : capture

After playing start : capture2

Do I open an issue here or is that an issue with Diaspora?

Chocobozzz commented 6 years ago

I think it's a diaspora issue. Embed works fine on other websites (mastodon, twitter, blogs etc).

gegeweb commented 6 years ago

I think to, that is the height of the iframe I think. I added a comment on the diaspora* issue : https://github.com/diaspora/diaspora/issues/7792

gegeweb commented 6 years ago

I think author_url is missing in the json (see https://oembed.com/#section5) but everything else seems good. I've tried with a video form Dailymotion (in a iframe too), and it works… The only difference is author_url wich is present.