Hi!
I have a page, and one part of this page (javascript) reads the duration of song. But what if user's javascript installed on computer doesn't support this? Do all javascript support this function?
Here it is:
//for some browser this function (like IE):
duration = document.sound.currentMedia.durationString;
//and for other this (like Firefox):
duration = document.embeds['sound'].GetDuration();
scale = document.embeds['sound'].GetTimeScale();
duration = Math.floor(duration*(1/scale));