is it possible to get the duration of a streaming mp3 in Flash
- by dubbeat
Hi,
I'm wondering if it is at all possible to get the total duration of an mp3 being streamed in flash?
At the moment I'm using the following code to estimate the lenght but it is always inaccurate
var loadTime:Number=_track.bytesLoaded / _track.bytesTotal;
var loadPercent:uint=Math.round(100 * loadTime);
estimatedLength=Math.ceil(_track.length / (loadTime));