Android - How can I make silent mode affect media volume too?

RealSilent may do the trick for you:

Battery-friendly background service that will automatically mute
the media volume on your phone when you change the ringer to silent.

Features:
- Ability to mute on silent mode, as well as vibrate.
- Ability to restore media volume to what it was before going to silent/vibrate.

There's a bug report for this issue, but it hasn't been acknowledged by Google.