bulky-wall-61623
09/08/2025, 8:30 PMtall-airline-16756
09/08/2025, 8:30 PMtall-airline-16756
09/08/2025, 8:31 PMbulky-wall-61623
09/08/2025, 8:32 PMtall-airline-16756
09/08/2025, 8:32 PMAudioSession API. Here's a simple way to get it done:
1. Start the Audio Session:
await AudioSession.startAudioSession();
2. Get Available Audio Outputs:
const outputs = await AudioSession.getAudioOutputs();
This will give you options like 'speaker', 'earpiece', 'headset', or 'bluetooth'.
3. Select Audio Output:
await AudioSession.selectAudioOutput('speaker');
Just swap out 'speaker' for 'earpiece' or any other option you want to use.
Also, on iOS, you can show the native route picker so users can pick AirPlay, Bluetooth, or other routes themselves:
await AudioSession.showAudioRoutePicker();
If you want me to walk you through it more or need some specific examples, just give me a shout—I’m happy to help!bulky-wall-61623
09/08/2025, 8:39 PMtall-airline-16756
09/08/2025, 8:39 PMbulky-wall-61623
09/08/2025, 8:53 PM