This isn't a broken phone. When an app starts recording, it can tell iOS to stop other audio. Some apps do; some are built to share. Check another app is not holding the microphone (a call or voice recorder), and use headphones if you want clean voice.
Help / My music stops when I start recording. What can I do?
Troubleshooting
My music stops when I start recording. What can I do?
Short answerThe camera app is taking over your phone's audio. Start the music first, then use a camera app that's built to let other audio keep playing. Music Wide Selfie is designed to do this.
About Music Wide Selfie
An iPhone camera app in development for people who film themselves. Not released yet; one email when it is.
One email when the app is ready. Nothing else.