oEmbed
Last edited: December 12th, 2008 by Colin DevroeoEmbed is an open standard for embedding videos and/or images into a Web site using a URL to retrieve the proper data. For more information on oEmbed, please see the official Web site for the spec.
No Viddler API key is required to use this Web service.
End Point
URL: http://lab.viddler.com/services/oembed/
Arguments
url - The Viddler URL for a video. (e.g. http://www.viddler.com/explore/cdevroe/videos/424/)
type - (optional) Player type (i.e. simple = Simple Player or player = Full Player (default) )
ratio - (optional) (widescreen/fullscreen) – The web service will automatically determine aspect ratio if no included in request.
maxwidth - (optional) (default = 437) The maximum width desired for the video player.
maxheight - (optional) The maximum height desired for the video player.
width - (optional) Same as maxwidth.
height - (optional) Same as maxheight.
format - (optional) (default xml) XML, JSON, and HTML are supported.
Example call
http://lab.viddler.com/services/oembed/?url=http://www.viddler.com/explore/cdevroe/videos/424/&type=simple&format=json
Testing
Want to test out this Web service? We’ve built a quick form to do just that:http://lab.viddler.com/services/oembed/form.php
Example Response XML
<?xml version="1.0" encoding="UTF-8"?> <oembed> <version>1.0</version> <type>video</type> <width>437</width> <height>266</height> <title>iPhone macro lens demonstration</title> <url>http://www.viddler.com/explore/cdevroe/videos/424/</url> <author_name>cdevroe</author_name> <author_url>http://www.viddler.com/explore/cdevroe/</author_url> <provider>Viddler</provider> <provider_url>http://www.viddler.com/</provider_url> <thumbnail_url>http://cdn-ll-55.viddler.com/e2/thumbnail_2_1646c55.jpg</thumbnail_url> <thumbnail_width>500</thumbnail_width> <thumbnail_height>301</thumbnail_height> <html><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="266" id="viddlerplayer-1646c55"><param name="movie" value="http://www.viddler.com/simple/1646c55/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="wmode" value="transparent" /><embed src="http://www.viddler.com/simple/1646c55/" width="437" height="266" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" wmode="transparent" name="viddlerplayer-1646c55" ></embed></object></html> </oembed>
Example Response JSON
{"version":"1.0","type":"video","width":"500","height":301,"title":"iPhone macro lens demonstration","url":"http:\/\/www.viddler.com\/explore\/cdevroe\/videos\/424\/","author_name":"cdevroe","author_url":"http:\/\/www.viddler.com\/explore\/cdevroe\/","provider":"Viddler","provider_url":"http:\/\/www.viddler.com\/","thumbnail_url":"http:\/\/cdn-ll-55.viddler.com\/e2\/thumbnail_2_1646c55.jpg","thumbnail_width":"500","thumbnail_height":301,"html":"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\r\n\"500\" height=\"301\" id=\"viddlerplayer-1646c55\"><param name=\"movie\" value=\"http:\/\/www.viddler.com\/simple\/1646c55\/\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"wmode\" value=\"transparent\" \/><param name=\"allowFullScreen\" value=\"true\" \/><embed src=\"http:\/\/www.viddler.com\/simple\/1646c55\/\" width=\"500\" height=\"301\" type=\"application\/x-shockwave-flash\" allowScriptAccess=\"always\" allowFullScreen=\"true\" wmode=\"transparent\" name=\"viddlerplayer-1646c55\" ><\/embed><\/object>"}
Error Codes
All standard error codes for Viddler’s API are used for oEmbed.