Help and FAQs/Animoto Resources/Developer Resources

oEmbed API

Chris Korhonen
posted this on February 09, 2010 07:46 AM

Overview

oEmbed is an open standard for embedding content (including images and/or videos) into a website. You can use the URL of any Animoto video to obtain the embed code for that video.

Further information about oEmbed can be found on the oEmbed homepage.

Further information about oEmbed can be found on the oEmbed homepage.

API Endpoint

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/oembeds/create?format=(xml|json)

Animoto videos use the following URL scheme:

http://animoto.com/play/*

Discovery

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 URLs 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%2Fanimoto.com%2Fplay%2FJzwsBn5FRVxS0qoqcBP5zA" title="Video Title" />
<link rel="alternate" type="text/xml+oembed" href="http://animoto.com/services/oembed?format=xml&url=http%3A%2F%2Fanimoto.com%2Fplay%2FJzwsBn5FRVxS0qoqcBP5zA"  title="Video Title" />

Arguments

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: 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.
ssl Returns secured versions of all urls. This can be true or false.


Example Responses

These are sample responses. In addition to the attributes defined in the oEmbed spec, we also provide proprietary attributes defining a square icon to represent 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</thumbnail_url>
        <thumbnail_width>432</thumbnail_width>
        <thumbnail_height>240</thumbnail_height>
        <cache_age>2419200</cache_age>
        <title>Juno Groove</title>
        <html>
          &lt;object width=\"432\" height=\"240\"&gth;
            &lt;param name=\"movie\" value=\"http://static.anim....</embed&gth;
          </object>
        </html>
      </oembed>
    

JSON Response:

      {
        "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>&lth;/object>"
      }
    
 
Topic is closed for comments