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

@@ -185,6 +185,14 @@ public final class CameraView: UIView, CameraSessionDelegate {
config.codeScanner = .disabled
}
// Video Stabilization
if let jsVideoStabilizationMode = videoStabilizationMode as? String {
let videoStabilizationMode = try VideoStabilizationMode(jsValue: jsVideoStabilizationMode)
config.videoStabilizationMode = videoStabilizationMode
} else {
config.videoStabilizationMode = .off
}
// Orientation
if let jsOrientation = orientation as? String {
let orientation = try Orientation(jsValue: jsOrientation)