So you are trying to listen to music illegally through Youtube whilst doing other things, even though Youtube is designed to be a video streaming website, and that's HTC or Google's fault? If you were using a proper media player with proper media files you wouldn't have this issue.
Personally I use Last.FM to listen to music whilst doing other things and it works perfectly...
Ben