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


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
Tatami for Online Video
skype: JamesHerrieven
email: james[at]haiku[dot]co[dot]uk

This question has received the maximum number of answers.