YouTube is one of the best places to listen to music but you might want to listen on your iPhone while using another app or even with the screen turned off to save power, just as you do with podcasts or music from the built-in Music app.
Since you reading this, you already know that the official Google YouTube app won't let you do this: the music stops as soon you exit the app or press your phone's sleep button. But there is a workaround using another app which we'll show you here.
The biggest issue is that these apps tend to disappear from the app store. Also, while Safari used to allow you to play audio from Youtube.com in the background, that no longer works.
If you have an Android phone, then check out our guide on how to listen to YouTube in the background on Android.
Play YouTube in the background in iOS
Step 1. Search the app store for an app called YTB Player and install it. It's free (but ad-supported).
If you can't find this app, there are others which work in the same way. One that's currently in the App Store - in the UK at least - is TubiFun - Fun Music Player. If you use TubiFun, follow the process described below to play music in the background.
Step 2. Launch the app and it will show you a list of the latest music.
Step 3. Of course, you'll probably have something specific in mind, so tap the magnifying glass icon at the top right and type your search.
Step 4. You can use the tabs at the top to search for either videos or playlists. And you can create a playlist of your own by tapping the green '+' icon to the right of any video.
Step 5. To listen to the audio in the background, start playing a video - wait until any advert has finished and the actual video is playing.
Now press the home button. The music should keep playing, but if it stops then swipe up from the bottom to bring up Control Center. Tap the play button to continue playing the audio from the YouTube video.
In iOS 10, which we're using here, you may have to swipe between tabs in the Control Center to see the playback controls. This isn't an issue in iOS 11 as everything is on one screen.
Step 6. You can now launch another app, such as Messages or Mail and the music will keep playing. Some games (those which allow you to keep listening to your own music) will still be usable without cutting off the audio from the YouTube video.
Step 7. You can listen to YouTube with the screen off, too. Press the sleep/wake button to turn your device off and the audio should continue to play. Again, if it doesn't press the power button again and tap the play button on the lock screen to restart the audio (you can also skip between songs in a playlist too).
Now when you turn off your iPhone or iPad, the audio will keep playing.
Step 8. If you want to, you can tap the menu button (top left) and sign in to your YouTube account to more easily access your channel subscriptions and playlists.
You can also download YouTube videos to your iPhone and certain apps let you play sound in the background.