Disable background camera for PIP

This commit is contained in:
QuentinArguillere 2024-02-13 17:36:51 +01:00
parent b9dadb51f4
commit 98da1d956f

View file

@ -209,13 +209,13 @@ extension ProviderDelegate: CXProviderDelegate {
if (UIApplication.shared.applicationState != .active) {
CallManager.instance().backgroundContextCall = call
CallManager.instance().backgroundContextCameraIsEnabled = call?.params?.videoEnabled == true || call?.callLog?.wasConference() == true
if #available(iOS 16.0, *) {
/*if #available(iOS 16.0, *) {
if (call?.cameraEnabled == true) {
call?.cameraEnabled = AVCaptureSession().isMultitaskingCameraAccessSupported
}
} else {
call?.cameraEnabled = false // Disable camera while app is not on foreground
}
}*/
}
CallManager.instance().callkitAudioSessionActivated = false
CallManager.instance().lc?.configureAudioSession()