I use this code to try to enable loudspeaker on iOS device.
pjmedia_aud_dev_route route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
pj_status_t status = pjsua_snd_set_setting(PJMEDIA_AUD_DEV_CAP_INPUT_ROUTE, &route, PJ_FALSE);
if (status != PJ_SUCCESS){
NSLog(@"Error enabling loudspeaker");
}
I know I can use kAudioSessionProperty_OverrideAudioRoute
but I want to enable it by pjsip because then I can pass PJMEDIA_AUD_DEV_ROUTE_BLUETOOTH
to route and enable bluetooth.
I use pjsip 1.8.5 on iOS 5.0
I have updated pjsip to version 2.0.1 and the code above is working with no problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With