I was following the WWDC demo and I was able to get the virtual camera running pretty easily. Now I am trying to convert this into a hardware camera and I am not finding any examples. In my ExtensionProvider.Swift file I am attempting the following
let session = AVCaptureSession()
session.sessionPreset = .hd1920x1080
session.startRunning()
guard let captureDevice = AVCaptureDevice.default(for: .video) else {
return
}
guard let deviceInput = try? AVCaptureDeviceInput(device: captureDevice) else {
return
}
session.addInput(deviceInput)
let deviceID = UUID() // replace this with your device UUID
I have my AVFoundation stuff but am I will changing my device ID (UUID) actually change the stream to originate from the hardware camera?