Your SlideShare is downloading. ×
oEmbed - One API to rule them all
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

oEmbed - One API to rule them all

1,632
views

Published on

The use of oEmbed in Citysearch Australia.

The use of oEmbed in Citysearch Australia.

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,632
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. oEmbedOne API to rule them all Tyrell Perera
  • 2. A bit of background info…• Citysearch editors use video content eg: Movie reviews• Copy-pasting embed HTML • Makes media content hard to index, re-use and error prone • We wanted to add a video module to our new CMS
  • 3. The challenge
  • 4. oEmbed• A open web service specification – Allows third party content providers (ie: Citysearch) to – request media content meta-data (including iFrame HTML) using the media URL – from the original content provider (ie: YouTube)
  • 5. How?• Original content provider creates the REST/JSON service adhering to the oEmbed specification• Makes the service discoverable by including the end-points in the <HEAD> of their existing (X)HTML documents
  • 6. Service Discovery<link rel="alternate" type="application/json+oembed"href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3DxnUSbL3Ke90&amp;format=json" title="The Online Gamer: Bloopers –3"> <link rel="alternate" type="text/xml+oembed"href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3DxnUSbL3Ke90&amp;format=xml" title="The Online Gamer: Bloopers -3">
  • 7. A subset of providers withoEmbed services
  • 8. Third party consumers• Invoke the service by passing the URL and response type as mandatory parameters• There can be optional parameters too – Video width and height for instance
  • 9. A quick example
  • 10. Figuring out which providerto talk to ...• We used a JQuery plugin  • jquery-oembed.js• Uses jsonp • Asynchronous • Cross-domain calls
  • 11. Example
  • 12. Solved!!
  • 13. Minor bumps on the road• Most of the video content from YouTube• YouTubes oEmbed service doesnt support jsonp callbacks  • Jquery-oembed uses Embed.ly === $$$$• We wrote a service wrapper for YouTube• Patched jquery-oembed.js to use our end- point instead 
  • 14. References• oEmbed: http://oembed.com/• Jquery oEmbed plugin: https://code.google.com/p/jquery-oembed/
  • 15. Questions?