oEmbed makes embedding third party videos and images a breeze
Flickr, Viddler, Qik, Pownce and Revision3 are the first services to support oEmbed, an easy way to allow embeding media from a certain URL in a third party site.
From the oEmbed site:
oEmbed is a format for allowing an embedded representation of a URL on third party sites. The simple API allows a website to display embedded content (such as photos or videos) when a user posts a link to that resource, without having to parse the resource directly.
This means that if you for example find a nice photo on flickr, you can take the URL and easily turn it into embed-able data:
Original URL: http://flickr.com/photos/codepo8/2475016321/
oEmbed URL: http://flickr.com/services/oembed?url=http://flickr.com/photos/codepo8/2475016321/
Result:
-
<oembed>
-
<version>1.0</version>
-
<type>photo</type>
-
<title>? too much myspace error</title>
-
<author_name>codepo8</author_name>
-
<author_url>http://www.flickr.com/photos/codepo8/</author_url>
-
<cache_age>3600</cache_age>
-
<provider_name>Flickr</provider_name>
-
<provider_url>http://www.flickr.com/</provider_url>
-
<width>500</width>
-
<height>375</height>
-
<url>
-
http://farm4.static.flickr.com/3128/2475016321_982666ec95.jpg
-
</url>
-
</oembed>
You can define the output format and the maximum width and height with URL parameters:
oEmbed URL:
Result:
-
{
-
version: '1.0',
-
type: 'photo',
-
title: '? too much myspace error',
-
author_name: 'codepo8',
-
author_url: 'http://www.flickr.com/photos/codepo8/',
-
cache_age: '3600',
-
provider_name: 'Flickr',
-
provider_url: 'http://www.flickr.com/',
-
width: '100',
-
height: '75',
-
url: 'http://farm4.static.flickr.com/3128/2475016321_982666ec95_t.jpg'
-
}
Supported formats for responses so far are photo, video, link and rich.
Source: Ajaxian
Original Article: http://feeds.feedburner.com/~r/ajaxian/~3/286763082/oembed-makes-embedding-third-party-videos-and-images-a-breeze