jsmediatags icon indicating copy to clipboard operation
jsmediatags copied to clipboard

Hotfix: add release-file to package.json so it is usable in svelte/typescript

Open uvulpos opened this issue 3 years ago • 2 comments

uvulpos avatar Sep 14 '22 12:09 uvulpos

Linked to https://github.com/aadsm/jsmediatags/issues/75

uvulpos avatar Sep 14 '22 12:09 uvulpos

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

Screenshot 2022-09-14 at 14 07 30
$: 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);
                }
            });
        }
    }

uvulpos avatar Sep 14 '22 14:09 uvulpos