audio_session icon indicating copy to clipboard operation
audio_session copied to clipboard

Add convenience methods to switch between speaker and headphone

Open ryanheise opened this issue 4 years ago • 2 comments

Some information for the Android side:

https://stackoverflow.com/questions/22770321/android-switching-audio-between-bluetooth-and-phone-speaker-is-inconsistent

ryanheise avatar Aug 20 '21 12:08 ryanheise

Hi @ryanheise any where you able to find out how to do this?

I have similar issue on iOS.

I thought following would change it . But it is giving me an error. I am also seeing only the speaker option so I assume there must be a different way to do this.

await AVAudioSession().overrideOutputAudioPort(AVAudioSessionPortOverride.speaker);

wijesijp avatar Nov 02 '21 08:11 wijesijp

I think there are several answers on StackOverflow for how to do this and I would encourage those interested in this feature to first do a search on StackOverflow. Please share below what you find as I will collect the ideas and techniques that you share and ultimately consider making them into a convenience method.

ryanheise avatar Nov 02 '21 08:11 ryanheise

Closing in favour of #39 .

ryanheise avatar May 30 '23 12:05 ryanheise