Android

Why recording video stops your music, and what doesn't

By , developer of InspectCam · Published · Last updated

Your music stops because the camera app asked Android for the audio, and Android granted it. Nothing is broken. A camera app that never asks takes nothing away from your player, including while it records. What no app can do is keep the music out of the recording, because the microphone hears whatever the room hears.

You are listening to something. A podcast, a playlist, a radio stream. You open the camera to film something, and the sound dies.

Then you close the camera and it does not come back. You have to go and press play again.

This is one of those Android behaviours that feels like a fault in your phone and is actually a rule working exactly as designed. Once you know the rule, you can predict which apps will do it and which won't.

What actually stops the music

Android has one loudspeaker and many apps that want it. To stop them all talking at once, it runs a system called audio focus.

An app that wants to make noise asks for focus first. Android grants it, and tells whoever held it previously to get out of the way. A well-behaved music player receives that message and pauses itself. That is why your music stops so cleanly, and why it does not resume: it was asked to stop, and nobody has asked it to start again.

Most camera apps request focus the moment they open, because they intend to record audio and want a clear field. Some request it even in photo mode, where they will never record anything at all. From your side these look identical. Your music stops either way.

MOST CAMERA APPS Camera app ASKS FOR FOCUS Your music PAUSED Android hands the audio to whoever asked last, and tells the player to stand down. INSPECTCAM InspectCam NEVER ASKS Your music STILL PLAYING No request is made, so nothing tells the player to stop. It simply carries on.
The dashed line is the whole difference. Audio focus is a request, and an app that never makes one cannot displace anything.

Why recording is the harder case

Keeping music alive while the camera previews is one thing. Keeping it alive once recording starts is a stricter test, and plenty of apps pass the first and fail the second.

There is a second trap underneath it. When an app records video it has to choose an audio source, and the choice has consequences it does not advertise. Pick the one meant for voice calls and Android may pull a connected Bluetooth speaker onto a call-quality channel to get a microphone. Your music does not just pause at that point. It is gone, and the sound quality of everything else collapses with it.

The source meant for filming avoids that, because it is designed for a camera holding a scene rather than a phone held to an ear. It is a one-line decision inside an app, invisible from outside, and it decides whether your speaker keeps playing or drops into a phone call.

What InspectCam does

InspectCam does not request audio focus at any point. Not on launch, not when the preview opens, not when recording starts. The audio focus APIs are absent from the shipping build entirely, so there is no path by which it could take the audio away from something else.

The practical result, tested against a browser holding focus and playing continuously:

Audio behaviour, verified on device against the shipping build
What you're doingYour musicWhy
Opening the app Keeps playing No focus request is made at launch.
Live camera view on screen Keeps playing The preview needs the camera, not the speaker.
Recording video with sound Keeps playing The camera audio source is chosen explicitly, so nothing is dragged onto a call channel.
Music in the finished recording Yes, it's in there The microphone records whatever is audible in the room. See below.

Recording video with sound is in the free version. There is nothing to buy for this behaviour and nothing to switch on.

Some players stop themselves

Worth knowing before you blame the camera. A few apps pause when they lose the screen rather than when they lose audio focus, and no other app is involved in that decision. YouTube's free tier is the common one: press the home button with nothing else running and the sound stops, because background playback is something it charges for.

The test takes five seconds. Press home on its own, without opening a camera at all. If the audio dies there, nothing you open afterwards was the cause.

The part nobody mentions

Here is where most articles on this subject stop being honest, so this page will not.

Your music keeps playing. Your music also ends up in the video.

Those are not in tension. They are the same fact seen from two sides. The music is coming out of a speaker into a room, and the microphone is in that room. It records what it hears. We measured it: a test tone played through the phone while recording came back in the finished file at roughly twenty-seven times the level of the background noise. Not a faint trace. Clearly audible.

No app can fix this

This is not an app limitation, it is a room. A microphone that is open cannot be selective about which sounds in front of it are wanted. If you need clean narration, pause the music first, or use headphones so the sound never enters the room.

So the useful way to think about it: InspectCam will not interrupt what you are listening to. Whether you want that audio captured in the video is your decision, and if you don't, the fix is to stop the sound before you record rather than to look for an app that can separate it afterwards.

Bluetooth, and what we haven't tested

Everything above was measured with audio playing through the phone's own speaker. Bluetooth is a different path through the same system, and it is the case with the most to go wrong, because a badly chosen audio source can pull a paired speaker onto a call channel and silence it.

The code that guards against that is in place and confirmed in the shipping build. The behaviour itself has not been tested on a paired Bluetooth speaker. Until it has, this page will not claim it works, and this paragraph will stay here saying so.

That is the same rule the compatibility list follows: nothing gets stated as tested until somebody has actually tested it. If you have tried it with a car stereo or a speaker, tell us what happened and this section gets replaced with a result.

Questions people ask

Why does my music stop when I open the camera?

Because the camera app requested audio focus and Android granted it, which sends your music player a message telling it to pause. It is a deliberate system for stopping two apps making noise at once, not a fault. Your player stays paused afterwards because nothing tells it to resume.

Does InspectCam stop my music?

No. It never requests audio focus, so there is no mechanism by which it could. Music keeps playing when the app opens, while the live camera view is on screen, and while video is recording.

My music still stopped. Why?

Check whether the player stops on its own. Some apps pause when they lose the screen rather than when they lose audio focus, and YouTube's free tier is the usual example, because background playback is a paid feature there. Press the home button without opening any camera app and watch what happens. If the sound dies then, nothing you opened afterwards was responsible.

Will the music end up in my video?

Yes, if it is playing out loud in the same room. The microphone records what is audible around it. This is true of every app on every phone, because it is a property of open microphones rather than of software.

Can I record video with music playing and still get clean audio?

Not while the sound is in the room. Pause the music before recording, or listen on headphones so the audio never reaches the microphone. There is no setting in any app that separates a speaker from a microphone pointed at it.

Does this work with a Bluetooth speaker or a car stereo?

We have not tested it, so we are not claiming it. The code that protects against Bluetooth being pulled onto a call channel is in the shipping build, but confirming the behaviour needs a paired speaker and that test has not been run yet.

Why do camera apps request audio focus even for photos?

Usually because the request is made once when the camera opens rather than at the moment recording starts, which is simpler to write and covers both modes. The side effect is that your music stops for a photo that captures no audio at all.


Behaviour on your phone different from what's described here? Tell us the model. Audio routing varies more between manufacturers than most guides admit, and a report that contradicts this page is worth having.