I need to get the length of an MP3 file.
I tried using the following code: myFile.id3.TLEN; yet it didn’t work.
I copied (and changed a bit) the code from the help files and got this thingy:
**
myFile.onID3 = function(){
for( var prop in myFile.id3 ){
trace( prop + " : "+ myFile.id3[prop] );
}
}
myFile.loadSound(run_url, false);**
The code shows me all the parameters I can get. Seems like my MP3 file used id3v1 which may not support time length, so using Winamp 5.3 (last update), I passed the information to id3v2.
so I got some more parameters. Here’s the output:
**
COMM :
TIT2 : MySong
TPE1 : Almonimus
TYER : 2006
TCON : Other
TPE2 : Almonimus
genre : Other
track : 0
comment :
year : 2006
album :
artist : Almonimus
songname : MySong**
Seems like I still don’t have the required parameters in the id3tag. I am aware that Winamp doesn’t support id3v2.4 very well, so I downloaded a demo of Tag&Rename 3.2, and as you can guess, even after opening the file and resaving it, I can’t get this parameter.
Can anyone help me please?