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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user