bluefireteam / audioplayers

A Flutter package to play multiple audio files simultaneously (Android/iOS/web/Linux/Windows/macOS)
https://pub.dartlang.org/packages/audioplayers
MIT License
2k stars 845 forks source link

[iOS] Audio from AssetSource is not playing in iOS 17.1.1 if a call is active #1713

Open juskuc opened 11 months ago

juskuc commented 11 months ago

Checklist

Current bug behaviour

To start off - this is most likely not an issue on the library end, more-so a question of what I could be doing wrong. I've made sure to follow the troubleshooting guide before raising an issue here, but tldr: I am noticing that in iOS 17.1.1, I am unable to play any sounds during an active CallKit call - cannot play outgoing call sound, pick up, hang up sounds.

This is not observed on older versions of iOS or before entering a CallKit call - because everything works then. I've got two physical phones, one is an Iphone 15 Pro with latest iOS (17.1.1), the other one is an Iphone 11 with iOS 16.6.1, everything works perfectly on the 11, while on the 15, I can play sounds until I mark CallKit as having begun the call, then nothing, no sounds are played. Are there any work arounds/solutions to this issue or is this related to changes that Apple has made and there's nothing that can be done from the lib's end?

Expected behaviour

The audio from asset source is correctly played during an active callkit call.

Steps to reproduce

  1. Play sound from asset
  2. Observe sounds being played correctly
  3. Start an active callkit call
  4. Play sound from asset
  5. Sounds are not being played

Code sample

Code sample ```dart void main() { } ```

Affected platforms

iOS

Platform details

Platform: iOS 17.1.1 Iphone 15 Pro

AudioPlayers Version

^5.2.1

Build mode

debug

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

Full Logs ``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```

Related issues / more information

No response

Working on PR

sure

nicolasvahidzein commented 11 months ago

Share a code sample please.

Gustl22 commented 11 months ago

Unfortunately I don't know the reason for this. I also don't have any apple device to properly validate. See: https://github.com/bluefireteam/audioplayers/issues/1663#issuecomment-1781349698 Feel free to provide a solution.

But it makes sense to me that you cannot play anything during a call (?).

Tim-byte-afk commented 11 months ago

I faced this problem too