oEmbed is an open format designed for embedding videos, images, sound and rich content to another website. I bump into oEmbed in an article of EPiServer oEmbed plugin and of course I have to test it right away. Here's how it basically works when you have oEmbed plugin installed into your content management system (example EPiServer CMS):
- User selects url he wants to embed into some page. Example http://www.youtube.com/watch?v=-UUx10KOWIE
- User inputs the URL into oEmbed plugin:
- CMS sends the request back to Youtube (back to URL where it came from) and asks how should I embed this URL? Request looks like this: http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-UUx10KOWIE&format=json
- Youtube respons using JSON or XML (default):
- From that response CMS/plugin knows how should it embed the URL.
- And here's how it looks: