diff --git a/Linphone/UI/Call/CallView.swift b/Linphone/UI/Call/CallView.swift index c3904d19a..4df149dc0 100644 --- a/Linphone/UI/Call/CallView.swift +++ b/Linphone/UI/Call/CallView.swift @@ -212,15 +212,11 @@ struct CallView: View { } } .onAppear { - callViewModel.enableAVAudioSession() fullscreenVideo = false if geo.size.width < 350 || geo.size.height < 350 { buttonSize = 45.0 } } - .onDisappear { - callViewModel.disableAVAudioSession() - } } } diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index d7590d93a..6782337b0 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -89,22 +89,6 @@ class CallViewModel: ObservableObject { } } - func enableAVAudioSession() { - do { - try AVAudioSession.sharedInstance().setActive(true) - } catch _ { - - } - } - - func disableAVAudioSession() { - do { - try AVAudioSession.sharedInstance().setActive(false) - } catch _ { - - } - } - func resetCallView() { coreContext.doOnCoreQueue { core in if core.currentCall != nil && core.currentCall!.remoteAddress != nil {