Support Odysee.com embeds

Hey Discourse team, Tom from Odysee here! We recently integrated with embedly and some users of your software said that odysee.com URLs now show a nice preview, but the player doesn’t work. What would it take to support this? We also support OpenGraph if that’s any easier. You can check out the iframely debugger for more detailed info

Here are some examples:

https:// odysee[dot]com/@veritasium:f/we’re-building-computers-wrong-(for:f (this one doesn’t look like it’s parsing nicely due to the ’ or ‘(’)

4 Likes

After reading: GitHub - discourse/onebox: A gem for turning URLs into website previews

It looks like odysee.com should work if you just whitelist us:

  1. The domain must be allowlisted
  2. The URL you’re oneboxing cannot be a root url (e.g. http://example.com won’t work, but http://example.com/page will)
  3. If the oneboxed URL responds with oEmbed and has a rich type: the html content must contain an <iframe> . Responses without an iframe will not be oneboxed.

Does this happen on a site by site basis, or somewhere else?

1 Like

Your og:video:type tag says video/mp4 but the URL that exists at og:video returns HTML?

Maybe the URL in the og:video tag could be

https://odysee.com/$/stream/turning-plastic-gloves-into-hot-sauce/f5036fb3221909f8c011b277eea19642ddeae1da

instead of

https://odysee.com/$/embed/turning-plastic-gloves-into-hot-sauce/

?

3 Likes

We’d want to keep the embed links because this renders our site and allows users to be authenticated if they are already signed in. I compared to youtube, and their video:type is “text/html”. We can try changing that if it would help.

Otherwise we don’t have any issues as is on Twitter/Facebook and embedly providers with the current configuration.

1 Like

Changing it would mean it works out of the box.

Otherwise you can try sending a PR adding support to it like the examples in discourse/lib/onebox/engine at main · discourse/discourse · GitHub

2 Likes

We’ll give it a shot, thank you!

3 Likes

Mic test:
tried with this link and it’s telling me I can’t post with this host (added 2 spaces):

On my preview here, it looks different, but doesn’t seem playable.The goal would be to make it playable right on the site.

We also have iframe share code, would that work somehow?

1 Like

and now it did…maybe you whitelisted. But yeah, no player. Why Is The Manhattan DA Sabotaging The Investigation Into Donald Trump?

Is there anything else to get the player embedded that we can try, or should we look at integrating into onebox?

1 Like

You changed the og:video:type from video/mp4 to text/html so it gets our standard html article onebox.

  • If you want to embed a video file, you need to return a video file on the og:video tag and set the correct value for og:video:type.

  • If you want to embed arbitrary HTML that contains a custom video player, you need to respect the onebox rules:

    • Your oembed must return an iframe (this appears to be ok)
    • The site must be allowed manually in each Discourse instance that wants to use it. Let’s test it:

Looks like it works, provided the site adds https://odysse.com to the allowed iframes site setting.

2 Likes

Wow, that’s great news - let me test here. So is it just a regular odysee link, or the iframe code?

1 Like

Just a regular link as you can see by checking my raw post at https://meta.discourse.org/raw/219765/10

Won’t work anymore as I removed odysse.com from the allowed iframes here on Meta after the test.

3 Likes

You are the man Rafael, thanks so much for your help! If you end up ever registering an odysee.com account, shoot me a message with your email/channel and we’ll get some credits over for the fast support.

4 Likes