Giter Site home page Giter Site logo

fullstackenviormentss / jquery-oembed-all Goto Github PK

View Code? Open in Web Editor NEW

This project forked from starfishmod/jquery-oembed-all

0.0 2.0 0.0 666 KB

A fork with improvements of the jquery-oembed project

Home Page: http://starfishmod.github.com/jquery-oembed-all

CSS 14.11% JavaScript 85.89%

jquery-oembed-all's Introduction

This project is DEAD. My apologies for not annoucing this sooner - thank-you to all contributors. I believe the best fork out there is the one at https://github.com/nfl/jquery-oembed-all

Jquery-Oembed-All

This is a fork (with a lot of changes) of the jquery-oembed located at http://code.google.com/p/jquery-oembed/.

Instead of using oohembed or other such services it tries to embed the object natively without having to use some kind of local server. This project will happily use native oembed services when it can, however it also use other types of embedding whenever oembed is not possible.

Using the Open Graph protocol (http://ogp.me/) over Yahoo's YQL (http://developer.yahoo.com/yql/), as a fallback, will display some kind of information for a lot of pages. Sites like TED, Ifixit, Ars Technica, twitpic can use this service. However some sites like bandcamp stop YQL from working because of their robots.txt file. Over time I'll be removing the some providers that have been hardcoded and using OGP instead to provide a standard embed layout and reduce the file size.

This project tries to use embedding techniques in the following order of preference:

  • oEmbed - JSONP available - e.g. flickr, meetup etc
  • embedding (IFRAME/Object) based on URL information - e.g. youtube
  • oEmbed - JSONP not Available - use YQL to correct - e.g. Ustream, viddler
  • OGP over YQL - used as a fall back.
  • YQL Screenscape to get embedding details
  • YQL Screenscrape - e.g. pastie
  • JSONP Api lookups Source - With HTML and CSS built in this project - e.g. github, Myspace, Facebook

Quick Start

Add this to your javascript file.

$(function(){
   $("a.embed").oembed();
});

Add class="embed" to anchor tag which contains the URL you wish to embed.
Ex: <a href="http://www.youtube.com/watch?v=8mwKq7_JlS8" class="embed"></a>

Shortened Urls

This project now handles shortened url's using the JSONP service from http://longurl.org. e.g. http://bit.ly/oP77mm will first lengthen the URL to http://tinychat.com/omginternetparty and then embed as normal. This is experimental - so let me know of problems!

to use...

<a href="https://github.com/starfishmod/jquery-oembed-all" class="oembed">https://github.com/starfishmod/jquery-oembed-all</a>
  1. url
  2. options
$(".oembed").oembed(null,{
    embedMethod: 'auto',	// "auto", "append", "fill"	
    apikeys: {
      amazon : '<your amazon key>',
    }
});

Current 3rd party sources include:

####Video

####Audio

Photo

####Rich


####TODO:

Plus a lot more :) Feel free to submit

jquery-oembed-all's People

Contributors

abhishek77in avatar bryanjos avatar dariusj18 avatar dieterc avatar druiz avatar ganchiku avatar joerussbowman avatar kasperisager avatar mrclay avatar mrpck avatar real34 avatar rformato avatar starfishmod avatar tresni avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.