Skip to content

Instantly share code, notes, and snippets.

@embedly
Created March 11, 2010 21:09
Show Gist options
  • Save embedly/329652 to your computer and use it in GitHub Desktop.
Save embedly/329652 to your computer and use it in GitHub Desktop.
// Call API to get a video oEmbed JSON response
var url = escape('http://vimeo.com/9503416');
var api_url = 'http://api.embed.ly/v1/api/oembed?url=' + url + '&callback=?';
//jQuery JSON call
$.getJSON( api_url, function(json) {
var html = json.html;
$('#videodiv').html(html);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment