I did this for awhile and it works, but I gave up because there are a number of "gotchas".
You can move your iTunes library to the Time Capsule and treat it just the same as a directly connected external drive. Open Airport Utility and click the Disks tab. Check the box that says "enable file sharing". See this article for details of moving your iTunes library:
http://www.ilounge.com/index.php/articles/comments/moving-your-itunes-library-to-a-new-hard-drive/
If you do this, I suggest that you also move the iTunes database to the Time Capsule as described in that article however. The default is to store the database on your local startup drive. If you leave iTunes like this and start it up when the Time Capsule isn't available (if you're away from home for example) you can end up with a corrupt library. I found this especially problematic if you put the mac to sleep with iTunes running, then wake it up somewhere else.
The Time Capsule is really slow for a network disk though. It is certainly fast enough to stream video, but there is a lot of latency (delay when starting a movie or fast forwarding). And it sometimes pauses with the spinning ball (perhaps while Time Machine is doing a backup?).
Backing up your library is another pain. You cannot do this directly on the Time Capsule and can't use Time Machine for this. You need to run some backup software on your Mac (I used Carbon Copy). This is really slow, since all the data has to be written over the network.
Overall, I found it frustrating. I ended up getting a Mac Mini and dedicating it as an iTunes server. Put all my media on a big USB 3.0 external drive and the Mini just sits there and runs iTunes with home sharing 24/7. Really pleased with this setup.
Now my library has a lot of video. If you are only using music, the results might be more acceptable with the Time Capsule. But really, this is something that the Time Capsule was never intended to do.