intanpalupidn / jquery-oembed

Automatically exported from code.google.com/p/jquery-oembed
0 stars 0 forks source link

Get meta and text information from oembeds #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Tried demo
2. Able to get media, but not other info
3.

What is the expected output? What do you see instead?

I am trying to get either the raw JSON or other info from the ombeds. For
example, instead of an embed link for a youtube video, I'd like to show the
thumbnail, the title, the link and the blurb.

What version of the product are you using? On what operating system?

Mac OS X, Firefox

Please provide any additional information below.

Original issue reported on code.google.com by alvarom...@gmail.com on 17 Jan 2010 at 9:28

GoogleCodeExporter commented 8 years ago
You can use a callback function like the one used in 
"flickr-callback-example.html".

Something like this:

 <script type="text/javascript">
    $(document).ready(function() {
        $(".oembed").oembed(null, null, function(container, oembed) {
            container
                .hide()
                .after("<table><tr><td>" + oembed.code + "</td><td>" 
+ oembed.code + "</tr></table>");
        });
    });
</script>

In the oembed variable you will find the information you want.

Original comment by rchamo...@gmail.com on 15 Mar 2010 at 10:28