diff --git a/NextcloudTalk/NCAudioController.m b/NextcloudTalk/NCAudioController.m index 669676720..de4a11eb8 100644 --- a/NextcloudTalk/NCAudioController.m +++ b/NextcloudTalk/NCAudioController.m @@ -131,14 +131,10 @@ - (void)disableAudioSession - (void)updateRouteInformation { AVAudioSession *audioSession = self.rtcAudioSession.session; - AVAudioSessionPortDescription *currentOutput = nil; + AVAudioSessionPortDescription *currentOutput = [audioSession.currentRoute.outputs firstObject]; self.numberOfAvailableInputs = audioSession.availableInputs.count; - if (audioSession.currentRoute.outputs.count > 0) { - currentOutput = audioSession.currentRoute.outputs[0]; - } - if ([_rtcAudioSession mode] == AVAudioSessionModeVideoChat || [currentOutput.portType isEqualToString:AVAudioSessionPortBuiltInSpeaker]) { self.isSpeakerActive = YES; } else {