intanpalupidn / jquery-oembed

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

How do you pass maxwidth and maxheight #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.try to pass a maxwidth or maxheight (maxWidth/maxHeight)
2.same size embed gets returned

What is the expected output? What do you see instead?
I would have expected to be able to pass a url like
http://www.flickr.com/photos/14516334@N00/345009210/&maxwidth=100&maxheight=100
and for the image returned to be 100x100
I have tried sending maxWidth but nothing seems to work.. Am I missing
something simple or has this feature yet to be implemented?

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

Please provide any additional information below.
This is awsome!

Original issue reported on code.google.com by zerotwen...@googlemail.com on 30 Dec 2009 at 12:14

GoogleCodeExporter commented 8 years ago
You should give flickr explicit params in your call (which are all lowercase):
$('#whatever').oembed(null, {  flickr: {
                    maxheight:"500",
                    maxwidth:"500"                  
                }});

Original comment by oori.wes...@gmail.com on 2 Jan 2010 at 3:26

GoogleCodeExporter commented 8 years ago
..also:   flickr gives only specific sizes back, you must request a 
maxheight/width 
bigger then what you need, and resize it down yourself (css with/height)
you can see the "Available sizes" under the "all sizes" in the flickr photo.

Original comment by oori.wes...@gmail.com on 2 Jan 2010 at 4:19

GoogleCodeExporter commented 8 years ago
oori.westwind is right, but you can also specify a generic maxwidth and 
maxheight for 
all providers. 

    $(document).ready(function() {
        $(".oembed").oembed(null, { 
            embedMethod: "append", 
            maxWidth: 400, 
            maxHeight: 300 });
    });

See example "maxwidth-example.html" to see it working.

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

GoogleCodeExporter commented 8 years ago
Issue 11 has been merged into this issue.

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

GoogleCodeExporter commented 8 years ago
Is it possible to pass a variable in to maxWidth/maxHeight?

e.g.

$(document).ready(function() {
        $(".oembed").oembed(null, { 
            embedMethod: "append", 
            maxWidth: 100%, 
            maxHeight: 100% });
    });

Doesn't seem to work.

Original comment by oprey...@gmail.com on 15 Apr 2010 at 4:08