I have trouble get this working:
this.getTime = function(val) {
    function getDuration(){
            self.player.api("getDuration", function(data){
                var d = data, c=val * d;
                return [c,d];
            });
        }
    return getDuration();
}
Obviously there is a delay for get duration value. Do I have to use some kind of timer?
 
    