I am trying to read the ID3 tags of an music file. Currently i have a Dataview object with the last 128 bits of an audio file in it (because the ID3 tags are at the last 128 bits in a audio file). So at this point i don't know how i go further, how can i read the different part (title, album etc.) from the audio file? (Please dont answer with external scripts or library)
window.onload = function(){
file = $("file");
reader = new FileReader();
reader.onload = function(){
length = reader.result.byteLength
dv = new DataView(reader.result, length-128, 128);
}
file.onchange = function(e){
reader.readAsArrayBuffer(e.target.files[0]);
}
}
Please check the structure of ID3 tag format (https://en.wikipedia.org/wiki/ID3#Layout) , this is the format for v1:
String.fromCharCode.