Closed tgarm closed 3 years ago
Which OS ?
Android. The testing device runs Android 8.1
Sorry for the delay to answer, @tgarm
I think that you must specify blueToothA2DP
as one of your audio flags if your headset is bluetooth.
When the user will plug his BlueTooth headset, i guess that the sound will be switched to the headset (probably ;-) )
I agree that this area is a little messy in Flutter Sound. Someone should clean this.
For me, what fixed it was opening the recorder's audio session before the player's, if you use both.
I need Help for Using the API.
For instance:
Play audio to default device
In FlutterSoundPlayer.openAudioSession, the argument "device" can be set to airPlay, headset, speaker, etc. But there is no device as "default".
So, if the audio session started without headset, and when playing, user plug-in the headset, the sound is still playing on speakers, not the headset. (User normally expect the output to switch to headset immediately)
Is there anyway to solve it?