You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case: I'm writing a PWA to manage a local library of music. I use jsmediatags to read tags client-side across multiple formats. As a user edits their library in the PWA, I'd like to offer the ability to write those changes back to the files on disk. Some client-side JS libraries like node-id3 support writing ID3 tags, but I would like to support as many tags as possible. Again, this is a PWA, so I can't use a server-side API to use taglib to get me updated bytes that I would then write back to local disk.
Proposal: rename the tag and file readers to indicate they support read/write. I suppose each reader would have their own way of "writing", each subclass implementing canWriteFile() and write(). Like, Xhr would send an OPTIONS request, Array/ArrayBuffer would update the in-memory arrays, Blob would create a new Blob with the updated tag data, and although I don't know Node or React files, I assume they have API's for opening the file in read-write mode. The tag readers probably remain unchanged, as they all can use the super class implementation of write(), which would create a byte array of UTF-16 or whatever the tag reader currently uses to read the tags.
The text was updated successfully, but these errors were encountered:
My use case: I'm writing a PWA to manage a local library of music. I use
jsmediatags
to read tags client-side across multiple formats. As a user edits their library in the PWA, I'd like to offer the ability to write those changes back to the files on disk. Some client-side JS libraries likenode-id3
support writing ID3 tags, but I would like to support as many tags as possible. Again, this is a PWA, so I can't use a server-side API to usetaglib
to get me updated bytes that I would then write back to local disk.Proposal: rename the tag and file readers to indicate they support read/write. I suppose each reader would have their own way of "writing", each subclass implementing
canWriteFile()
andwrite()
. Like, Xhr would send an OPTIONS request, Array/ArrayBuffer would update the in-memory arrays, Blob would create a new Blob with the updated tag data, and although I don't know Node or React files, I assume they have API's for opening the file in read-write mode. The tag readers probably remain unchanged, as they all can use the super class implementation ofwrite()
, which would create a byte array of UTF-16 or whatever the tag reader currently uses to read the tags.The text was updated successfully, but these errors were encountered: