Distrify's oEmbed API Documentation
oEmbed is an open standard for embedding content into a website. You can use the Distrify URL of any Video to get the embed code for the Video. To get started you can view an example response for a Distrify URL or read the rest of the documentation.
json response for http://distrify.com/oembed.json?url=
Distrify oEmbed Endpoint
The following URL schemes define what urls are supported by this endpoint.
The URL is to retrieve embedding information. This URL must be escaped to insure that Distrify retrieves the correct link. For example, this Distrify URL:
Should be sent as:
- The response format -- Accepted values: (xml, json)
- maxwidth (optional)
- This is the maximum width of the embed in pixels. maxwidth is used for scaling down embeds so they fit into a certain width. If the container for an embed is 500px you should pass maxwidth=500 in the query parameters. It is highly recommended that developers pass a maxwidth to Distrify. The smallest maxwidth that Distrify supports is 320.
- maxheight (optional)
- This is the maximum height of the embed in pixels. Functions the same as maxwidth, but for the height of the embed instead. It's noteworthy that maxwidth is preferred over maxheight.
To get an idea of how you can use Distrify's oEmbed API we recommend trying a few urls via json or xml. Here are a few example calls to get started
- The resource type. Distrify will always return a video type.
- The oEmbed version number. This is always 1.0.
- The HTML required to embed a video player. The HTML should have no padding or margins. The video player HTML is an iframe.
- The width in pixels required to display the iframe.
- The height in pixels required to display the iframe.
- A text title describing the resource. Typically this is the film title.
- The name of the resource provider (Distrify).
- The url of the resource provider (Distrify's homepage).
- A URL to a thumbnail image representing the resource. The thumbnail must respect any maxwidth and maxheight parameters. If this parameter is present, thumbnail_width and thumbnail_height will also be present.
- The width of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_height will also be present.
- The height of the optional thumbnail. If this parameter is present, thumbnail_url and thumbnail_width will also be present.
- 400 Bad Request
- Required url parameter is missing.
- Invalid URL format.
- Invalid maxheight parameter.
- Invalid maxwidth parameter.
- 401 Unauthorized
- The specified URL contains a private (non-public) resource. The consumer should provide a link directly to the resource instead of any embedding any extra information, and rely on the provider to provide access control.
- 404 Not Found
- The provider has no response for the requested url parameter
- 501 Not Implemented
- Not implemented for format: acceptable values are json or xml.