feat: Custom Orientation (#715)

* feat: Custom Orientation

* Update CameraView.swift

* Update CameraView.swift

* Try outputRotation approach

* whoops

* fix: Refactor `VideoCapture` instance

* Update orientation in didSetProps

* Update Orientation in iOS

* expose to objc

* Fix Orientation values

* format
This commit is contained in:
Marc Rousavy
2022-01-04 16:57:40 +01:00
committed by GitHub
parent dbfdf82c67
commit 48da1819fc
10 changed files with 164 additions and 51 deletions

View File

@@ -165,6 +165,13 @@ class CameraViewManager(reactContext: ReactApplicationContext) : SimpleViewManag
view.enableZoomGesture = enableZoomGesture
}
@ReactProp(name = "orientation")
fun setOrientation(view: CameraView, orientation: String) {
if (view.orientation != orientation)
addChangedPropToTransaction(view, "orientation")
view.orientation = orientation
}
companion object {
const val TAG = "CameraView"