aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
752 stars 128 forks source link

Not support Buffer format of data? #96

Closed TongDaDa closed 5 years ago

TongDaDa commented 6 years ago
 jsmediatags.read(bufferToArrayBuffer(SenTraAudioBuf), {
                            onSuccess: function (tags) {
                                console.log(tags);
                            },
                            onError: function (error) {
                                console.log(error);
                            }
                        })

I have an audio/MPEG format of data that through request the Google Audio Port, I want to read the information of the buffer of the mp3 file header. But It seems not support this format of data and alert me that was Error: No suitable file reader found for [object ArrayBuffer]

Finally, I think that every mp3 file needs to be converted to the Buffer data format at the end, Why doesn't it support this format.

aadsm commented 5 years ago

Yeah, that's a good point, I just never needed it, and no one has asked for it until now :) This should be super simple to implement and it will be a simple version of BlobFileReader. Would you like to implement this new ArrayBufferFileReader.js?

TongDaDa commented 5 years ago

@aadsm I do

aadsm commented 5 years ago

@TongDaDa Cool!! let me know if you need any help with it.

TongDaDa commented 5 years ago

@aadsm, hahaha, I am green hands, let me try it, If I need help, I'll call you in here.