Diego

Diego

Hello, I'm trying to get the with (and height) of a dynamically loaded video, to set the size of the jquery dialog correctrly, but I don't seem to be able to get the video info...
I use

var v_width = player1.api('getVideoWidth').toString();
var v_height = player1.api('getVideoHeight').toString();

But I get an object that I cant get a value of.... what is the correct usage?

Thanks!

Link: developer.vimeo.com/player/js-api

Diego

Diego

in the end, I think I will stay with

var screen_w = $(window).width();
var screen_h = $(window).height();
var mult_w = 80 * screen_w;
var mult_h = 80 * screen_h;
if (screen_w > 700) {
mult_w = 60 * screen_w;
mult_h = 60 * screen_h
}
var v_width = Math.floor(mult_w / 100); //player1.api('getVideoWidth').toString();
var v_height = Math.floor(mult_h / 100); // player1.api('getVideoHeight').toString();

$("#dialogVideo").dialog("option", "width", v_width);
$("#dialogVideo").dialog("option", "height", v_height);

This conversation is missing your voice. Please join Vimeo or log in.