audiojs
audiojs copied to clipboard
Odd Safari Song Duration Issue
Instead of the digits showing the length of the song, I'm seeing: "Infinity:NaNNaN" there instead. In Safari only. Chrome and Firefox are fine.
Does anyone have any ideas for how to fix this Safari issue? Would it be a mime type issue?
i have the same bug with Safari version 7.0.2
I've been looking all over, asked Kolber via Email this morning, and I've posted on Stackoverflow, but I just can't get an answer! Frustrating. I'm going to have to move on to another player it looks like. Here is my question on Stackoverflow if anyone comes by and happens to know what the issue is: http://stackoverflow.com/questions/22622889/changing-http-headers
This could be an encoding issue. Does it work in Safari with a plain audio tag without MediaElement.js?
Please post a link to the page.
This bug is still present at Safari 8.0 on OSX Yosemite. Anybody got an answer already?
If you change the content type to audio/mpeg it solves the problem, at least for me it did loading .mp3 files. May not be the best solution but it seems to be headers related.
Thank you, but already tried that one.
It seems like the audio file headers are returning Infinity as a value for "duration". Either fixing the file headers or handling Infinity.
Maybe a condition could help to avoid the "Infinity:NaNNaN" message
loadStarted: function() {
// Wait until element.duration exists before setting up the audio player.
if (!this.element.duration ) return false;
if(this.element.duration == Infinity){
...SOME MAGIC HERE...
}