feat: Support setting videoStabilizationMode (#2160)

* feat: Support setting `videoStabilizationMode`

* fix: Use `outputs`

* Format

* Set Video Stabilization Mode
This commit is contained in:
Marc Rousavy
2023-11-15 17:00:41 +01:00
committed by GitHub
parent e8ebc6ee9f
commit abf5538bb0
9 changed files with 53 additions and 100 deletions

View File

@@ -39,6 +39,8 @@ extension AVCaptureOutput {
let cameraOrientation = orientation.rotateBy(orientation: .landscapeLeft)
let degrees = cameraOrientation.toDegrees()
// TODO: Don't rotate the video output because it adds overhead. Instead just use EXIF flags for the .mp4 file if recording.
// Does that work when we flip the camera?
if connection.isVideoRotationAngleSupported(degrees) {
connection.videoRotationAngle = degrees
}