Closed cdg720 closed 3 years ago
Hello @cdg720 ,
Audio device is not configurable from CallKit framework, but is configurable via AVAudioSession.
The reason why the speaker is enabled in the example is that I guess it is an incoming call and for incoming call default ringtone is played. Since it is a ringtone, it should be played loudly, so the user does not miss a call. CallKit (or iOS) configures AVAudioSession and set the appropriate audio route and category for the ringtone.
Since the example provides a sample code for the plugin usage, we do not configure AVAudioSession.
If you integrate a plugin to an app with real VoIP calls, it should not happen unless you select the speaker for a call. Any library that provides VoIP calls functionality, changes AVAudioSession configuration and routes once a call is answered.
Best regards, Yulia Grigorieva
thank you!
accepting the incoming call (audio call) in the example opens the callkit with speaker on. what parameter controls that?
it looks like this: