aadsm / JavaScript-ID3-Reader

ID3 tags reader in JavaScript (ID3v1, ID3v2 and AAC)

Home Page:http://www.aadsm.net/libraries/id3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support .m4a files

bryanjhv opened this issue · comments

I'm creating a Firefox OS app, and I need to read tags from at least MP3 (common) and M4A (I use this) music formats... Using this library, I can't read those tags, what I get is 'undefined'. I've tried using the Firefox browser and Firefox OS Simulator, none works...
Is M4A supported by this library? If true, how can I read the tags. I'm using FileAPIReader.
captura de pantalla de 2014-09-28 16 34 06
captura de pantalla de 2014-09-28 16 34 14

AAC has a different result structure than ID3, are you sure you're taking that into account? https://github.com/aadsm/JavaScript-ID3-Reader#documentation
Have you dumped the object that is returned by the getAllTags function?

How can I do that if I have a File array, with the files returned by navigator.getDeviceStorage('music')?

If the getAllTags function returns null then I don't know what could it be without debugging. AAC is supported, I have an example on this page: http://www.aadsm.net/libraries/id3/

Are you using a HEAD with XHR to load the file, isn't? What about File/FileReader support apart of URL only with getAllTags?

Sorry, forgot to answer this.
I'm using HEAD with XHR to know the length of the file.
FileReader uses the readAsBinaryString: https://github.com/aadsm/JavaScript-ID3-Reader/blob/master/src/filereader.js

Thanks! Now everything is working correctly. I was reading the file converting it to a Blob but the reader expects a File. Thanks again 😄