I am building a video chatting app via the Linphone SDK.
There is an issue that when someone "receives" a video call, the loud speaker is off by default, so users need to use the phone speaker, the one used for phone call, rather than the loud speaker. However, at the same time, the one who gives the call has the loud speaker on by default.
LinphoneManager.getInstance().routeAudioToSpeaker();
I thought this is the code for which Linphone turns on loud speaker, but actually it's not.
How do I turn on loud speaker when users receive video calls by default?
LinphoneCore
has two handy method for that:
Just create helper functions inside LinphoneManager
:
public void enableVoice() {
getLc().muteMic(false);
getLc().enableSpeaker(true);
}
public void disableVoice() {
getLc().muteMic(true);
getLc().enableSpeaker(false);
}
If you don't have an access to LinphoneManager
, then the functions above should call:
LinphoneManager.getLc().{method_call};