Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pjsip enable loudspeaker on ios des not work

Tags:

ios

pjsip

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

like image 271
Alex Terente Avatar asked Nov 03 '22 23:11

Alex Terente


1 Answers

I have updated pjsip to version 2.0.1 and the code above is working with no problem.

like image 121
Alex Terente Avatar answered Nov 15 '22 07:11

Alex Terente