From 30d9baf7667a5c39d2cec6477a58919126b5286e Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 19 Aug 2024 15:32:21 +0200 Subject: [PATCH] Remove AVAudioSession start and stop in call view --- Linphone/UI/Call/CallView.swift | 4 ---- Linphone/UI/Call/ViewModel/CallViewModel.swift | 16 ---------------- 2 files changed, 20 deletions(-) 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 {