Introducing oEmbed for EPiServerPosted on September 25, 2010 by Frederik Vig in ASP.NET, EPiServer
A couple of weeks back I added a new EPiServer plugin to EPiCode, oEmbed. The plugin is really simple, but does some cool things. Imagine your editors have some content on YouTube, Amazon, Flickr etc, and they’d like to add it to their EPiServer site. oEmbed makes this really easy, all the editors need to do is paste in the URL of the content they wish to show, could be from Amazon, Viddler or any other service that support oEmbed (here’s a list of supported services), and the plugin will automatically figure out the correct embed code for the content, doesn’t matter if it’s a Flash video or just plain HTML and CSS.
And the result. Pretty cool huh?
This works for a lot of popular services and makes it so much easier than manually copying/pasting the embed code. I encourage you to take a peek at the source code, especially the oEmbedResponse.cs class to see what you get back.
To get started simply download Geta.oEmbed.dll and add it to your sites bin folder (note that you need to unblock it). Then you need to register the dynamic content in episerver.config:
<dynamicContent> <controls> ... <add description="Displays an oEmbed object on the page" name="oEmbedPlugin" type="Geta.oEmbed.DynamicContent.oEmbedPlugin, Geta.oEmbed" /> </controls> </dynamicContent>
That’s it! You can now use oEmbed both as a dynamic content plugin and as a custom property.