fix preview and recording orientation fix
- add onCameraConfigurationChanged to CameraSessionDelegate to notify CameraView when configuration changes - when orientatin change update CameraView.PreviewView.videoPreviewLayer.connection orientation value
This commit is contained in:
		| @@ -303,6 +303,15 @@ public final class CameraView: UIView, CameraSessionDelegate { | ||||
|     } | ||||
|     onInitialized([:]) | ||||
|   } | ||||
|    | ||||
|   func onCameraConfigurationChanged(_ configuration: CameraConfiguration?, _ difference: CameraConfiguration.Difference?) { | ||||
|     guard let configuration, let difference else { return } | ||||
|      | ||||
|     if difference.orientationChanged, let connection = previewView.videoPreviewLayer.connection { | ||||
|       let videoPreviewLayer = previewView.videoPreviewLayer | ||||
|       connection.setOrientation(configuration.orientation) | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   func onCameraStarted() { | ||||
|     ReactLogger.log(level: .info, message: "Camera started!") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user