audiojs icon indicating copy to clipboard operation
audiojs copied to clipboard

Odd Safari Song Duration Issue

Open Preeminent opened this issue 11 years ago • 8 comments
trafficstars

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.

Preeminent avatar Mar 06 '14 03:03 Preeminent

Does anyone have any ideas for how to fix this Safari issue? Would it be a mime type issue?

Preeminent avatar Mar 12 '14 01:03 Preeminent

i have the same bug with Safari version 7.0.2

devsigner avatar Mar 21 '14 23:03 devsigner

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

Preeminent avatar Mar 25 '14 00:03 Preeminent

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.

kenmcd avatar Mar 25 '14 03:03 kenmcd

This bug is still present at Safari 8.0 on OSX Yosemite. Anybody got an answer already?

voicecode-bv avatar Oct 29 '14 10:10 voicecode-bv

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.

paulocarvalhodesign avatar Jan 05 '15 11:01 paulocarvalhodesign

Thank you, but already tried that one.

voicecode-bv avatar Jan 06 '15 10:01 voicecode-bv

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... }

vichido avatar May 12 '15 18:05 vichido