I am using jplayer to play audio and video files in Ipad, But the issue is if i change video or audio url, sometimes i get duration NaN.
Please help me.
I am using jplayer to play audio and video files in Ipad, But the issue is if i change video or audio url, sometimes i get duration NaN.
Please help me.
The medata is available after onloadedmetadata
event has fired.
(c) https://stackoverflow.com/a/7275714/492641
Hope it helps.
Check your server has Range requests enabled.
From this page on the Jplayer site:
Your server must enable Range requests. This is easy to check for by seeing if your server's response includes the Accept-Ranges in its header. Most HTML5 browsers enable seeking to new file positions during a download, so the server must allow the new Range to be requested.
Failure to accept byte Range requests will cause problems on some HTML5 browsers. Often the duration cannot be read from the file as some formats require that the start and end of the file is read to know its duration. Chrome tends to be the browser that has most problems if the Range request is not enabled on the server, but all browsers will have some issue even if it is only that you have to wait for all the media to load before jumping close to the end.