olivier-m / minislate

A wysiwyg experiment
http://olivier-m.github.io/minislate/
MIT License
73 stars 9 forks source link

OEmbed support #4

Open yohanboniface opened 9 years ago

yohanboniface commented 9 years ago

Just a quick summary of the options I see to have OEmbed support. The main issue is that oembed format doesn't necessarily means CORS support, and de facto the main providers (YouTube, Flickr, Vimeo, etc.) doesn't support CORS. Also, at least YouTube doesn't support jsonp (ugly) workaround. So this means that we can't request them directly from the client.

Here are the options I see:

For Ideasbox I've worked on option 2, because I need to have full control of my stack, but I'm not sure it's the best option to have upstream.

What I would suggest, is to provide both option 1 (Oembed dedicated proxy) and 4 (fake oembed), because:

Code for option 1 is ready on my side, just need to be cleaned a bit to be more generic and configurable; option 4 is not that much work (let's say we would support only iframe and img in a first iteration), so I can provide a PR for both scenarios if we decide to go this way.

Thoughts? :)