Open missphyrgames opened 2 weeks ago
Managed to get it working with this piece of code. I think it would be good if you could expose photoOutput
extension VideoContentViewModel {
struct MirrorTuner: AespaSessionTuning {
func tune<T>(_ session: T) throws where T : AespaCoreSessionRepresentable {
let output = session.avCaptureSession.outputs.first {
$0 as? AVCapturePhotoOutput != nil
}
if let photoOutput = output as? AVCapturePhotoOutput {
if let photoOutputConnection = photoOutput.connection(with: .video) {
photoOutputConnection.automaticallyAdjustsVideoMirroring = false
photoOutputConnection.isVideoMirrored = true
}
}
}
}
}
Hmm this doesn't quite work when I switch from the front camera to the back camera and then back to the front camera. It stops the mirroring on the photo output image
Hey again @enebin! I'd like to be able to mirror the front camera output but not the back camera (for the photo capture not the actual preview). With AVFoundation, I think you can do it using the AV connection. How can I do it using this library?