Search code examples
silverlightmp3

Read MP3 Tags with Silverlight


Does someone know a library that I can use to read MP3 tags in Silverlight 3? In WPF I was using taglib, but obviously I cannot reference it in Silverlight projects.


Solution

  • Taglib doesn't contain any unsafe code. Perhaps you can recompile it (with a few minor alterations maybe) to work in silverlight.

    Have you tried just using Taglib's code? There's a decent chance it'll work without too much hassle.

    Edit: Yes, I mean TagLib#. I just tried, and there are a few minor issues which were fixable in 15min. (You'll need to define ICloneable, remove a bunch of unnecessary Serialization constructors for exceptions, remove the last parameter on string.Split(char[],int) calls, that's about it.)

    Note that unless someone else has fixed it, there's a minor bug in Taglib#'s Id3v2 unsynchronization code. You can ignore it and fail to parse a few id3v2 tags, or you can use the same workaround I did: https://bugzilla.gnome.org/show_bug.cgi?id=593138#c4 - I know, I should submit a patch, but time and all...