gotta use onID3 to get the duration of a streaming mp3. I've had isses with that though myself. I know that the ID3 tags in the the mp3 need to be v2 inorder to be read from flash. I made an mp3 player and no mater what i did, that duration property of the ID3 object returned would always be undefined. If anyone has some tips on which encoders that inject the duration property, please let me know because iTunes sure doesn't do it.
On 7/1/06, js <[EMAIL PROTECTED]> wrote:
If I may rephrase that first sentence: There is no way to get the actual duration of a *loading* mp3 through the Sound class. Regards js wrote: > Since mySound.duration reflects *loaded* duration - there is no way to > get the actual duration of a loaded mp3 through the Sound class. > > A work around and what I've been doing: Divide mySound.getBytesLoaded by > mySound.getBytesTotal to get a percentage of the song that is currently > loaded; and then take mySound.duration and divide that by the percentage > loaded. Provided that the duration property of mySound is accurately > representing the amount of ms loaded, I should arrive at an accurate > result. > > Unfortunately, both properties do not synchronize 100%, and the duration > value progressively gains accuracy as the mp3 loads, opposed to getting > a correct duration immediately. > > I would really like to find a more accurate way. Ideally I would like to > get the complete duration of a loaded mp3 through flash immediately upon > stream so the end-user doesn't see the progress bar jutting backwards > and the total duration value slowly increasing as the song > loads--without depending on external scripts or an xml playlist file...etc. > > Any help / insight appreciated, > Joseph Sorensen > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

