Have you ever wanted to listen to the audio track on a YouTube video, without actually watching it? Up to now, it's been next to impossible: turning off your iPhone screen stops the video playback entirely, whether you're using the native YouTube app or mobile YouTube (m.youtube.com).
Fortunately, Lifehacker.com reader "juansmith" figured out a workaround:
1.Start the video in the web app.
2. Press the home key once. This will exit Safari, and stop playback.
3. Double-tap the home key. This will bring up the dock (with all of your currently running programs).
4. Tap the dock with one finger and slide it to the right to reveal the background audio controls. There will be a single icon on the right side that corresponds to whichever program you last used with background audio – in this case, Safari.
5. Press the Play button. The audio from your YouTube video will resume playback, and you can then lock the phone (turn off the screen), switch to a different app, or do whatever you want, and it will continue playing in the background.
This should apply to any audio stream from Safari.