flutter_ringtone_player
flutter_ringtone_player copied to clipboard
Play sound on speaker even if headphone is connected
How to set the audio output to speaker even if the headphone is connected? thanks.
Have you tried with asAlarm
flag?
If that doesn't work, you would have to experiment with new Ringtone API method setAudioAttributes
in code below.
https://github.com/inway/flutter_ringtone_player/blob/4834f9e5aa09d9a47c28c059a621ac5576744150/android/src/main/java/io/inway/ringtone/player/FlutterRingtonePlayerPlugin.java#L110-L122
I don't believe this is in any way possible to implement on iOS.
That is only working on Android. On iOS it only plays in the headphones!
This issue has stalled.
This issue has been closed due to inactivity.