Post

Replies

Boosts

Views

Activity

Reply to Replacing AVCaptureVideoOrientation with AVCaptureDevice.RotationCoordinator
Hey @grb2007! I solved similar issue with the following solution. It seems to be working correctly. Looking forward to get some feedback on correctness. Hope that helps! private func getAngle(_ orientation: UIDeviceOrientation) -> CGFloat? { switch orientation { case .landscapeRight: return 45 case .portrait: return 90 case .portraitUpsideDown: return 180 default: return 0.0 } } Usage if let output = photoOutput.connection(with: .video), let angle = self.getAngle(self.orientation), output.isVideoRotationAngleSupported(angle) { output.videoRotationAngle = angle }
Apr ’24