jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

Duration is NaN #64

Closed smukkejohan closed 11 years ago

smukkejohan commented 12 years ago

Occasionally when loading in new media the duration will be set to NaN (not a number) and thus seeking breaks.

colvint commented 12 years ago

I'm seeing this issue as well. Seems to occur most often in Chrome (16.0.912.63). Have also seen in Safari (Version 5.1.2 (7534.52.7)). In my case, I'm using jPlayer to play mp3 files from the Twilio API. There are multiple files within the same page but we've tested with just one and also got NaN for duration.

Screenshot: https://skitch.com/colvint/gw1sw/provider-dashboard

Let me know what other debug info might be helpful and I'll be happy to post it.

dunkfordyce commented 12 years ago

I am having this issue but only on iOS so far. I should mention that this is with mp3 files.

dmelo commented 12 years ago

I had a problem like this weeks ago. In my case it was due to the GET request of the music. When the header of the request doesn't have the "Content-Length", the jplayer is not able to estimate the music duration.

dunkfordyce commented 12 years ago

@dmelo thanks for the tip but the content length header is set.

dunkfordyce commented 12 years ago

My problem is because Im not allowing partial byte range requests on the server to the mp3 - this seems to stop iOS from being able to calculate the length properly (presumably because it thinks its a stream )

happyworm commented 11 years ago

This has been fixed some time ago now... No matter what, the times will always show a number, or failing that, zero.