shobhitsharma / embedo

Embeds third party content to DOM with perks 🧙‍♀️ (7kb gzip / standalone)
https://shobhitsharma.github.io/embedo
MIT License
348 stars 32 forks source link

Support for oembed discovery? #9

Closed mindplay-dk closed 3 years ago

mindplay-dk commented 6 years ago

It appears there's no support for oembed discovery?

For example, flickr URLs do not appear to be supported - although flickr provides <link rel="alternative"> tags on their pages with oembed (in JSON and XML formats) discoverable.

Is this "by design"?

shobhitsharma commented 6 years ago

@mindplay-dk Yes, Flickr allows oembed extraction via json/xml from their oembed API (see this example)

https://www.flickr.com/services/oembed?url=[PHOTO_URL_HERE]&format=json

OR, alternatively its also possible to generate embed component if I hook in their SDK to embedo base class.

https://embedr.flickr.com/assets/client-code.js

I'll add support over the weekend, and possibly write a function so plugins can be created using existing embedo internals.

mindplay-dk commented 6 years ago

Meanwhile, I think we're now leaning towards server-side embed expansions, for performance reasons - to avoid the extra HTTP hit on the client-side. Not sure yet. If we do decide on client-side embed expansion, this does look like a nice library :-)

shobhitsharma commented 3 years ago

Duplicate https://github.com/shobhitsharma/embedo/issues/24