feat: Support setting videoStabilizationMode
(#2160)
* feat: Support setting `videoStabilizationMode` * fix: Use `outputs` * Format * Set Video Stabilization Mode
This commit is contained in:
@@ -41,6 +41,25 @@ enum VideoStabilizationMode: String, JSUnionValue {
|
||||
}
|
||||
}
|
||||
|
||||
func toAVCaptureVideoStabilizationMode() -> AVCaptureVideoStabilizationMode {
|
||||
switch self {
|
||||
case .off:
|
||||
return .off
|
||||
case .standard:
|
||||
return .standard
|
||||
case .cinematic:
|
||||
return .cinematic
|
||||
case .cinematicExtended:
|
||||
if #available(iOS 13.0, *) {
|
||||
return .cinematicExtended
|
||||
} else {
|
||||
return .cinematic
|
||||
}
|
||||
case .auto:
|
||||
return .auto
|
||||
}
|
||||
}
|
||||
|
||||
var jsValue: String {
|
||||
return rawValue
|
||||
}
|
||||
|
Reference in New Issue
Block a user