Chris Korhonen
posted this on February 09, 2010 07:46 am
oEmbed is an open standard for embedding content (including images and/or videos) into a website. You can use the Animoto URL of any video to easily obtain the embed code for that video.
Further information about oEmbed can be found on the oEmbed homepage.
You can use the API endpoint to request the embed code for a video from its URL. The response format can be either XML or JSON.
http://animoto.com/services/oembed?format=(xml|json)
Animoto videos use the following URL scheme:
http://animoto.com/play/*
Animoto supports the discovery of the oEmbed URL. Each video player page contains two link tags with the typesapplication/json+oembed and text/xml+oembed containing the URL's for JSON and XML oEmbed responses.
<link rel="alternate" type="application/json+oembed" href="http://animoto.com/services/oembed?format=json&url=http%3A%2F%2..." title="Video Title" />
<link rel="alternate" type="text/xml+oembed" href="http://animoto.com/services/oembed?format=xml&url=http%3A%2F%2F..." title="Video Title" />
All arguments should be sent as query parameters and should be URL-encoded.
| url | The Animoto URL for the video. This should conform to our URL scheme: http://animoto.com/play/* |
| format | The desired format of the oEmbed response. This can be JSON or XML. |
| maxwidth | The maximum desired width of the embed. |
| maxheight | The maximum desired height of the embed. |
These are sample responses. In addition to the attributes defined in the oEmbed spec, we also provide proprietary attributes defining a square icon representing the video content.
XML Response:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
<version>1.0</version>
<type>video</type>
<provider_name>Animoto Productions</provider_name>
<provider_url>http://animoto.com/</provider_url>
<width>432</width>
<height>240</height>
<author_name>Chris Korhonen</author_name>
<author_url>http://animoto.com/play/JzwsBn5FRVxS0qoqcBP5zA</author_url>
<thumbnail_url>http://s3-p.animoto.com/Video/Jzws....5zA/cover_432x240.jpg</thu...>
<thumbnail_width>432</thumbnail_width>
<thumbnail_height>240</thumbnail_height>
<cache_age>2419200</cache_age>
<title>Juno Groove</title>
<html>
<object width=\"432\" height=\"240\">h;
<param name=\"movie\" value=\"http://static.anim....</embed>h;
</object>
</html>
</oembed>
{
"version": "1.0",
"type": "video",
"provider_name": "Animoto Productions",
"provider_url": "http://animoto.com/",
"width": 432,
"height": 240,
"thumbnail_url": "http://s3-p.animoto.com/Video/JzwsBn5FRVxS0qoqcBP5zA/cover_432x240.jpg",
"thumbnail_width": 432,
"thumbnail_height": 240,
"author_name": "Chris Korhonen",
"author_url" : "http://animoto.com/play/JzwsBn5FRVxS0qoqcBP5zA",
"cache_age": 2419200,
"title": "Juno Groove",
"html":
"<object width=\"432\" heig.....</embed><h;/object>"
}