jquery-oembed


OEmbed plugin for jQuery

About

A simple jQuery plugin that uses OEmbed API to help displaying embedded content (such as photos or videos) in your website.

Quick explicit example

``` jquery-oembed explicit insert example

$(document).ready(function() { $("#container").oembed("http://www.flickr.com/photos/14516334@N00/345009210/"); });

```

In this example the div#container will display the photo from flickr.

Quick implicit example

``` jquery-oembed link replace example

$(document).ready(function() { $("a.oembed").oembed(); }); Flickr Image Vimeo Video

```

In this example the jquery plugin will embed the flickr photo and the vimeo video inside the links.

Configuring multiple providers example

``` jquery-oembed multiple providers example

$(document).ready(function() { $(".oembed").oembed(null, { embedMethod: "append", maxWidth: 1024, maxHeight: 768, vimeo: { autoplay: true, maxWidth: 200, maxHeight: 200} }); }); Vimeo Video Flickr Image

```

In this example the jquery plugin will append the flickr photo and the vimeo video after the links. For vimeo, we are giving a particular configuration.

Supported OEmbed providers

  • 5min
  • Amazon Product Images
  • Flickr
  • Google Video
  • Hulu
  • Imdb
  • Metacafe
  • Myspace Videos
  • Qik
  • Revision3
  • Screenr
  • Slideshare
  • Twitpic
  • Viddler
  • Vimeo
  • Wikipedia
  • WordPress
  • YouTube

This javascript plugin relays in 'jsonp', so only oEmbed providers that support callback methods are directly implemented.

Any other oEmbed provider uses oohembed.com service. Thank you oohembed.com!


This is my first public jQuery plugin. Any comments or improvements are really welcome.

Richard Chamorro

Avanzis

http://www.avanzis.com

Project Information

Labels:
jQuery javascript plugin