flutter_ringtone_player icon indicating copy to clipboard operation
flutter_ringtone_player copied to clipboard

Play sound on speaker even if headphone is connected

Open DVendy opened this issue 3 years ago • 2 comments

How to set the audio output to speaker even if the headphone is connected? thanks.

DVendy avatar Jun 16 '21 09:06 DVendy

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.

SPodjasek avatar Oct 25 '21 17:10 SPodjasek

That is only working on Android. On iOS it only plays in the headphones!

pjarnfelt avatar Apr 27 '22 14:04 pjarnfelt

This issue has stalled.

github-actions[bot] avatar Nov 09 '22 00:11 github-actions[bot]

This issue has been closed due to inactivity.

github-actions[bot] avatar Dec 10 '22 00:12 github-actions[bot]