How to oembed a player for Simplecast audio

Because they use the data from the Twitter Card.

I think we should properly support Twitter Cards with a type of player.

@nbianca, can you add that to your list? We should update our WhitelistedGenericOnebox to properly detect embeds in Twitter Cards

5 Likes

I let them know about the issue. I guess it’s a race to see who can fix it first. :wink:

1 Like

:slight_smile:

https://github.com/discourse/onebox/pull/390/files

9 Likes

Looking forward to trying this!

Does this work?

Should the above work @nbianca?

3 Likes

Simplecast are not providing twitter cards info anymore, so I had to implement an oembed onebox for them.

https://github.com/discourse/onebox/pull/403

6 Likes

FWIW, Simplecast recently went through a big change to a new 2.0 codebase. Lots changed. I did tell them recently that their stuff isn’t auto-embedding like they claim.

They say “Use this link to share via social media. It will automatically embed a player in WordPress, Medium, and many other popular sites.” with a link such as this:
https://tgd.simplecast.com/episodes/dan-blackman-and-robyn-kanner-the-power-7fe152f4

It doesn’t work on Wordpress.com or self-hosted Wordpress. Let’s test it again now here on Meta:

Edit: Looks like it’s working!

1 Like

Crossposting here from a later thread about this issue

It seems as though after working great, onebox isn’t working again on Simplecast. Any thoughts? Thanks.

Let’s see if the old link posted above still oneboxes

https://tgd.simplecast.com/episodes/dan-blackman-and-robyn-kanner-the-power-7fe152f4

Yes that link works fine @Seth_Godin

The link is substantially different from the one you posted which is

https://simplecast.com/s/19cdf3ea

compare with

https://tgd.simplecast.com/episodes/dan-blackman-and-robyn-kanner-the-power-7fe152f4

3 Likes

did some more digging. Here’s how Simplecast now offers people a way to share a link:

As you can see, the old model isn’t supported any more.

Not sure if this is on the onebox roadmap, but it’s clearly a change on their part. Thanks.

EDIT! Wait, this might do the trick… I add the word ‘embed’ to the url and get this:

3 Likes

Maybe we need to widen the URL patterns we look for here from this domain @nbianca?

2 Likes

Jumping in here! I migrated to the “new” simplecast in order to get the updated URL, like the one you posted from TGD, @codinghorror, but it still appears as a link rather than onebox

2 Likes

checking on this @codinghorror!!

1 Like

Sure @nbianca can take a look and see if the URL patterns can be broadened for better compatibility.

3 Likes

thank you @nbianca! lmk how i can help

I fixed this bug. :blush: To give a little bit more of a context of what happened here:

Last time I worked on this I added some logic that was a little bit more complicated than needed because Simplecast has a bug, and unfortunately this workaround introduced a bug. :slightly_frowning_face:

Usually, https://simplecast.com/oembed?url=URL should return a JSON with some information, but for specific links it does not work.

For example,

https://tgd.simplecast.com/episodes/dan-blackman-and-robyn-kanner-the-power-7fe152f4

https://simplecast.com/oembed?url=https://tgd.simplecast.com/episodes/dan-blackman-and-robyn-kanner-the-power-7fe152f4

Response:

Not Found


Let’s see if it works:

7 Likes

Awesome, thank you @nbianca :trophy:

5 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.