I have been working on a video calling application, for my usecase, I would like to show the video of a person in the call even though he has backgrounded my application.
In apple doc, it is specified that it can be achieved from iOS 16 using isMultitaskingCameraAccessEnabled
by checking isMultitaskingCameraAccessSupported
in AVCaptureSession object
Here is my code that I used but im unable to show video and in info.plist manifest screen, multiple window is enabled.
How do I show it like how zoom and whatsapp does.
class AVCaptureSessionHelper {
let captureSession = AVCaptureSession()
func startCapturingSession() {
captureSession.beginConfiguration()
if #available(iOS 16.0, *) {
if captureSession.isMultitaskingCameraAccessSupported {
captureSession.isMultitaskingCameraAccessEnabled = true
}
}
captureSession.commitConfiguration()
DispatchQueue.global(qos: .background).async {
self.captureSession.startRunning()
}
}
func stopCapturing() {
DispatchQueue.global(qos: .background).async {
self.captureSession.stopRunning()
}
}
}
But its not working. can someone help with this?