aadsm / jsmediatags

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

Support for .WAV files? #123

Closed chezzzer closed 4 years ago

chezzzer commented 4 years ago

I know this is possible because I have seen it on node applications, but this is the only browser id3 reader that is actually active that I could find.

Borewit commented 4 years ago

music-metadata has ID3 & WAVE support, and is very much alive. Strange that you could not find it.

chezzzer commented 4 years ago

I have used this before but I have had some problems with it and decided to use the browser instead of node, hence why I am asking for wav files on here. :D

Borewit commented 4 years ago

Works in the browser as well

aadsm commented 4 years ago

I was actually waiting for @Borewit‘s comment, didn’t disappoint 🤣. @ChezzerYT if that project doesn’t work for you let me know and maybe I can help.

chezzzer commented 4 years ago

@aadsm I am having trouble using it with walker (a file directory lister), when I run it thru a for each it seems to miss out a whole folder, I thought just use walker to output the file paths to an api, then use the browser to just get the id3 tags of the file paths (I can access them thru another web server), if you get what I mean 😂

chezzzer commented 4 years ago

I just want a browser only id3 reader, this already has the framework, it just doesn't support wav, and I need wav. I am going to be pinging a server with this js library, so again it needs to be only in the browser

Borewit commented 4 years ago

If you can choose between parsing audio files between either on the browser or on the Node.js (server) side, you better do it on the server side. The result parser result (the metadata) can then be be very easily transferred to the browser via JSON.

In the browser there is no such thing as direct file access. Never the less, if parsing on the browser side is what you need, music-metadata-browser is solely designed for browser usage (sorry for the predictable correction). Modules are initially a Node.js concept, and you need a module bundler like WebPack to convert this to a script which can be executed to the browser.

There are "pre-build" scripts, which are sometimes shipped via modules, like jsmediatags.min.js. Maybe that is what you mean with browser only. No need module bundler, you can directly import. Very simple.

Why use are "browser" modules & module bundlers used? Because it allows modularization, of the code, which becomes important if the complexity of the code grows with the number of dependencies. Mostly at the point where you want to share dependencies, because that does not fly with pre-build code. Dependencies are for example duplicated in each imported distribution.

chezzzer commented 4 years ago

I will use this, thank you :D