Closed uvulpos closed 1 year ago
I wanted to use this library in svelte + typescript and these tips (from the issue) did not work out for me but this small change in the package.json of my local node module did. I don't even have to import it anymore since it is globally available anyway
$: fileUploadInput, updateMusicMetaData()
function updateMusicMetaData() {
if (fileUploadInput && fileUploadInput[0]) {
jsmediatags.read(fileUploadInput.item(0), {
onSuccess: function (tag) {
console.log(tag);
},
onError: function (error) {
console.log(error);
}
});
}
}
Linked to https://github.com/aadsm/jsmediatags/issues/75