Closed strukturart closed 4 years ago
I am not sure if I understand exactly what you want. I assume you want to read from a File (which is also a Blob)
music-metadata-browser can read the Blob/file using parseBlob:
const musicMetadata = require('music-metadata-browser');
// No need for: fileURL = URL.createObjectURL(file)
musicMetadata.parseBlob(file).then(metadata => {
// do something with the metadata
});
I had writen an musicplayer app for the nokia8110(KaiOS) https://github.com/strukturart/audio It works but the filenames are not nice to read(12092019_podcast.mp3), so I wanted to read the metatags. Do you think I should do it with music-metadata-browser ?
I have no experience with Nokia apps. music-metadata-browser is designed for module based browser application. It's very complete, very robust, but larger then jsmediatags. With music-metadata-browser you need a module bundler like webpack. jsmediatags on the other hand has a pre-bundled distribution.
Thank you it works with music-metadata-browser.
Note that the musicmetadata.js you copied into your project is not the same as music-metadata-browser. Although it has common roots, it is a predecessor module of years back. Just like jsmediatags, it included the pre-bundled distribution you copied. If your project grows larger you want to use module bundler, which basically enables you to manage your dependencies via npm, and build your own distribution with everything you need. One of the many benefits is that it prevent duplicate dependencies. Copying files will also belong to the past.
Hello, I is possible to use URL.createObjectURL(file) to read out the metadata ?
Error message:
Error: No suitable file reader found for blob:app://{9d3f6e1c-7dd9-4875-9b12-19f78a862775}/8a4deaa3-afbf-4f42-8d38-d5010022fce6
Code snippet