Direct call provides the following functions so you can know the audio type, but is there no corresponding function for group call? I don’t see it in the documentation
func didAudioDeviceChange(_ call: DirectCall, session: AVAudioSession, previousRoute: AVAudioSessionRouteDescription, reason: AVAudioSession.RouteChangeReason) {
guard !call.isEnded else { return }
guard let output = session.currentRoute.outputs.first else { return }
if output.portType.rawValue == "Receiver" {
speakerButton.setImage(UIImage(named: "ic_call_speaker_off"), for: .normal)
} else if output.portType.rawValue == "Speaker"{
....
} else {
....
}
print("[QuickStart] Audio Route has been changed to \(output.portType.rawValue)")
}
Can’t Group Called use didAudioDeviceChange function provided by Direct call delegate?
I want to change the image to match the changed audio output.
If not, can you tell me how to access it?