Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

getDuration not the greatest


The getDuration() function doesn't always work. I understand that it doesn't work until the file is buffered but it is hard to time that. I need it for a custom elapse/duration label area.

It would be great to have a listener for on('duration'). I see it in the JS Library file as onDuration and change:duration.

1 Community Answers

jherrieven

User  
0 rated :

Rather than waiting for the file to buffer "just enough" before calling getDuration(), you could add an on("meta") listener which reacts to the "duration" parameter (or equivalent) being present in the returned object.

James Herrieven

===================================================
Powered by Haiku
http://powered-by-haiku.co.uk/
---------------------------------------------------
Tatami for Online Video
http://dev.powered-by-haiku.co.uk/solutions/tatami/
---------------------------------------------------
skype: JamesHerrieven
email: james[at]haiku[dot]co[dot]uk
===================================================

This question has received the maximum number of answers.