just_audio
just_audio copied to clipboard
How to maintain audio playback after unplugging headphones
Which API doesn't behave as documented, and how does it misbehave? I need to unplug the headphones and the audio can play normally. I have set the following attributes:
Minimal reproduction project
player = AudioPlayer(handleInterruptions: false);
To Reproduce (i.e. user steps, not code) 1.play a audio 2.unplug the headphones
Error messages It is valid on Android, but still stops playing audio on iOS
Expected behavior Don't stop this audio
Screenshots no
Desktop (please complete the following information):
- OS: [MacOS + 13.3.1]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6s]
Flutter SDK version
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E772610a darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (4 available)
[✓] HTTP Host Availability
Additional context
just_audio: ^0.9.31
That is not a valid bug report. Please edit it according to the instructions. Also note that the behaviour you're describing is the normal behaviour of the underlying native Apple library.