Search Issue Tracker
Fixed in 2019.2.X
Fixed in 2018.3.X, 2019.1.X
Votes
7
Found in
2018.3.0b1
2018.3.0f2
Issue ID
1115948
Regression
Yes
[iOS] Unity Player does not respect the "Mute Other Audio Sources" toggle in Player Settings
To reproduce:
1. Download attached project “AudioTest_20183f2.zip" and open in Unity
2. Open “SampleScene” scene
3. Make sure that "Mute Other Audio Sources" setting is unchecked
4. Build the project for iOS
5. Put some background Audio playing (in example Soundcloud playing from Safari)
6. Start the Built project on the Device
Expected results: Background and Built project Audio plays together
Actual results: Background Audio becomes Muted after the Game is opened
Notes:
- This issue does not appear on Android - Mono, and IL2CPP
- This issue appears only on iOS
- Could not check on Unity 2018.3.0a11 because Built project crashes on launch
- Workaround: If the AVAudioSession category is manually set to for example AVAudioSessionCategoryAmbient in native iOS code (tested with [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; ), the background audio will continue playing after the app is launched
Tested with:
- iPhone 7 Plus, iOS: 12.0 - Reproduced
- iPhone X, iOS: 11.3.1 - Reproduced
Reproduced on 2018.3.0b1, 2018.3.3f1, 2019.1.0a14 and 2019.2.0a1
Not reproduced on Unity 2018.2.20f1 and 2018.3.0a10
Regression on Unity 2018.3.0b1
Comments (20)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Animator window has a dropdown button that throws “MissingReferenceException” error on a new project when the previous project had a GameObject with an animation
- Terrain Layer settings remain when the Terrain Layer is removed
- Terrain Layer settings UI elements overlap when a new Terrain Layer is created
- Animator State name overflows outside the visual box when the State has a long name
- UI Document file remains marked as Dirty after Undoing made changes
Tbaggi
May 22, 2025 10:29
I've fixed it myself by setting AudioSessionAmbient in Start function of my AudioManager script. By calling, this function from an objective C script stored in Assets/Plugins/iOS folder.
#import <AVFoundation/AVFoundation.h>
extern "C" {
void SetAudioSessionAmbient()
{
AVAudioSession *session = [AVAudioSession sharedInstance];
NSError *error = nil;
// Ne pas interrompre la musique en fond
[session setCategory:AVAudioSessionCategoryAmbient error:&error];
if (error) {
NSLog(@"Erreur AVAudioSession (setCategory): %@", error.localizedDescription);
}
[session setActive:YES error:&error];
if (error) {
NSLog(@"Erreur AVAudioSession (setActive): %@", error.localizedDescription);
}
}
}
Start from AudioManager.cs
#if UNITY_IOS && !UNITY_EDITOR
[DllImport("__Internal")]
private static extern void SetAudioSessionAmbient();
#endif
public IEnumerator Start(){
// Optionnel : désactiver temporairement le son Unity pour éviter les conflits au lancement
AudioListener.pause = true;
// Attendre un court délai pour laisser Unity finir son initialisation audio
yield return new WaitForSeconds(0.5f);
#if UNITY_IOS && !UNITY_EDITOR
SetAudioSessionAmbient();
#endif
}
Tbaggi
May 22, 2025 09:25
Still not resolved in 2022.3.62f1.
Music from Apple Music for example stops when my game starts.
I have to press Play again on Apple Music to listen to my music while playing my game.
"Mute external audio sources" is unchecked and I'm using a PostProcessBuild script to edit UnityAppController.mm when I build to force music to play while playing but still, it stops everytime I start the app.
Kimseojin
Mar 07, 2024 15:21
계속 나오고 있다. 2022.3.20f1
Boboronko
Jan 08, 2024 14:38
This is not fixed on 2022.3.13f1. Both on Android and iOS external audio gets stopped when launching the app. The checkbox "mute eyternal audio sources" is unchecked ofc.
Please fix this for real.
jimbobs
Jul 29, 2022 09:56
This issue isn't fixed. I'm using Unity 2022.1.2
tbg10101_
Jun 30, 2020 13:57
Still happens in 2019.4.
Vismox
Oct 22, 2019 11:30
Faced audio muting other audio sources issues on the iOs platform with version 2018.2 and it was NOT fixed with newer 2018.3.8, as it is mentioned in Unity 2018.3.8 release notes!!! @Unity
Today I tried every version since 2018.3.14 up to newer 2019.2 and it all still has that bug!
Interesting, that version 2018.3.0f2 has this bug only partly. Only at the start of the app, it mutes other audio sources but, then you can turn on the music (Spotify or YotubeMusic or PlayMusic) and return to your app.
Unity doesn't support downgrading to version 2018.2 (where this bug is not present) but wants us to live agong with their bug.
VinceF
Oct 05, 2019 01:19
This bug is present in the latest build.
lostminds
Oct 01, 2019 17:19
I still have this problem. But only at startup of the unity app. In other words background audio is paused when the unity app starts on the device, but you can then switch out of it, resume the audio and switch back in to the unity app without it pausing again.
Either this is a new bug, or the fix in 2018.3 was only partial. I've submitted a new bug report abut this.
Annopolus
May 23, 2019 20:44
Can't understand... Korypse wrote Mar 9th that was fixed in 2018.3.8 (indeed, there is a notice in what's new), but the header of the issue says that it was fixed in 2019.2.
I'm using 2018.3.12 and the problem still exists :-(
Is anybody here who has it working? What version do you use?