Search code examples
angulartypescriptmetadata

edit metadata of music file like lyrics, artist ,album and description mainly (add custom tags also if possible )


I used jsmediatags to access metadata ( as Brad suggested earlier in another question ) but now i want to edit these fields and let the user add some tags that are missing, as most of the time lyrics are not available in many music files.

jsmediatags.read(file, {
  onSuccess: (tag) => {
    tag.tags.lyrics ='my lyrics updated ... !'
    // also
    tag.tags.TXXX[0].description ='my another description...!'
    //but what do next ? what will be the proper way
    // i am getting some idea with ID3 but not clearly
  }
});

Solution

  • I am not 100% clear on what your question is here. It sounds like you want to be able to use this jsmediatags library to write/change/update data in the files you are reading from right now.

    I assume this is the project page for the library you are talking about: https://github.com/aadsm/jsmediatags

    If so, a quick look at their docs and code examples shows that the library is only for reading tags, not writing them. The description of the project is "Media Tags Reader (ID3, MP4, FLAC)" so I think this is the wrong project for what you want to do. You will need to find another project that allow you to write back to your files.