One of the functions for the vimeo API (with froogaloop) is getDuration().
I am trying to make a function that will return the duration, but somehow I am getting Object as result. The Vimeo API documentation doesn't specify how are you supposed to do this.
I believe this is incorrect:
function getDuration() {
return player.api('getDuration');
}
Here is an example:
/
One of the functions for the vimeo API (with froogaloop) is getDuration().
I am trying to make a function that will return the duration, but somehow I am getting Object as result. The Vimeo API documentation doesn't specify how are you supposed to do this.
I believe this is incorrect:
function getDuration() {
return player.api('getDuration');
}
Here is an example:
http://jsfiddle/SeBwt/
Share Improve this question edited Oct 15, 2013 at 21:47 Jarrod Dixon 15.8k9 gold badges61 silver badges72 bronze badges asked May 28, 2013 at 16:18 scroll_lockscroll_lock 1432 silver badges11 bronze badges 01 Answer
Reset to default 9getDuration()
accepts a callback function that gives you the duration of the media.
For example:
player.api('getDuration', function(dur) {
alert(dur);
});
Demo