JavaScript How can I get video duration by using vimeo javascript API? video duration using ffmpeg,get video duration using jquery,get

I am having a premium channel on vimeo. I am trying to put a list of videos and their duration on my website. They have an example by using the event listeners. But as I am interested in simple text output of video duration. So How can I do it ?

Answer:1

Use getDuration() from the Vimeo player javascript API:

player.getDuration().then(function(duration) {
    // duration = the duration of the video in seconds
}).catch(function(error) {
    // an error occurred
});

Source: https://github.com/vimeo/player.js/blob/master/README.md#getduration-promisenumber-error

Answer:2

I have spent many hours trying to figure out what is preventing the jQuery autocomplete function from working so would really appreciate any help. I am getting the following error in IE and a similar ...

I have spent many hours trying to figure out what is preventing the jQuery autocomplete function from working so would really appreciate any help. I am getting the following error in IE and a similar ...

I have the next chain of ajax calls: ajaxCall1().then(function(){ ajaxCall2(). then(function(){ ajaxCall3().then(function(){ .... }) }) }) As you can see I am not ...

I have the next chain of ajax calls: ajaxCall1().then(function(){ ajaxCall2(). then(function(){ ajaxCall3().then(function(){ .... }) }) }) As you can see I am not ...

need help with little thing. I've searched current question, but didn't find good example. I have two arrays with same count of objects: array1 = [{ id: 1, name: 'Johnny'}, { id: 2, name: 'Mike'}]; ...

need help with little thing. I've searched current question, but didn't find good example. I have two arrays with same count of objects: array1 = [{ id: 1, name: 'Johnny'}, { id: 2, name: 'Mike'}]; ...

  1. concat arrays into
  2. merging two arrays into one
  3. append into arrays

This function works on loading an external page inside of a div that passes a $_POST variable and click works on the first record on loading the same external page with $_POST variable from query. $(...

This function works on loading an external page inside of a div that passes a $_POST variable and click works on the first record on loading the same external page with $_POST variable from query. $(...