Search Issue Tracker

Fixed in Unity 2019.2

Votes

7

Found in

2018.3.0f2

Issue ID

1115948

Regression

Yes

[iOS] Unity Player does not respect the "Mute Other Audio Sources" toggle in Player Settings

iOS

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 2Core functionality majorly impacted

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 (23)

  1. 49a337c02f37c44472cab5d95a0c4918?d=mm

    korypse

    Mar 09, 2019 15:05

    Fixed in 2018.3.8, YEHHHHHHHHHHHH§
    https://unity3d.com/es/unity/whats-new/2018.3.8

  2. F83aad3255c2eb97f46b87c02208c6dd?d=mm

    kilicbatuhan1205

    Feb 12, 2019 13:33

    Still not fixed.

  3. 49a337c02f37c44472cab5d95a0c4918?d=mm

    korypse

    Feb 11, 2019 12:46

    When you are going to fix this bug can you add this feature please ?

    https://feedback.unity3d.com/suggestions/ability-to-set-the-av-audio-session-category-on-ios

  4. 49a337c02f37c44472cab5d95a0c4918?d=mm

    korypse

    Feb 11, 2019 12:00

    It's not fixed.

  5. Bfd8bf8dbddfbc93d7f76401642ffcd0?d=mm

    eridgway

    Feb 11, 2019 06:51

    This isn't fixed. Building with latest version 2018.x on UCB.

  6. 43fc13076007389a0b4e5ae3fc9b90b7?d=mm

    mempicgames

    Feb 11, 2019 05:22

    It is not fixed!

  7. B4bfb0084a63b87528a54bde2afcdb4a?d=mm

    Wolar

    Jan 22, 2019 12:22

    As far I have tested it, adding [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]
    does not help at all. (It might help with resuming the app from background, but not when launching the app). There is actually some method called something like InitGraphics / InitRendering I don't really remember which call something internal inside the Unity and is cause of this problem. I don't think there is any possible workaround, only downgrade to older Unity or wait for fix.

  8. De9fb6299f2b42c82e9f853aba03515e?d=mm

    C-Gabriel

    Jan 21, 2019 20:09

    Sorry for the spam :s The browser was not loading and I thought it didn't work

  9. De9fb6299f2b42c82e9f853aba03515e?d=mm

    C-Gabriel

    Jan 21, 2019 20:07

    I have the very same issue. Where did you put [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; ? I've tried to put it in UnityAppController.mm both startUnity() and application:didFinishLaunchingWithOptions()

  10. De9fb6299f2b42c82e9f853aba03515e?d=mm

    C-Gabriel

    Jan 21, 2019 20:07

    I have the very same issue. Please check https://forum.unity.com/threads/app-disables-background-music.616450/ . Where did you put [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: nil]; ? I've tried to put it in UnityAppController.mm both startUnity() and application:didFinishLaunchingWithOptions()

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.