Hi all,
I am doing some work with videos right now, and I'm having trouble converting the seconds into a time format. For instance: the duration of the video returns a value of 1218.599 (seconds), but I want it to display it as 20:18. Is there a way to do this with javascript? If I just divide by sixty then I get the right amount of minutes, but the seconds are incorrect. Any help is appreciated!
I am doing some work with videos right now, and I'm having trouble converting the seconds into a time format. For instance: the duration of the video returns a value of 1218.599 (seconds), but I want it to display it as 20:18. Is there a way to do this with javascript? If I just divide by sixty then I get the right amount of minutes, but the seconds are incorrect. Any help is appreciated!