diff --git a/README.md b/README.md index 0a28177d..13107a24 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Using CameraView is extremely simple: app:cameraEngine="camera1|camera2" app:cameraPreview="glSurface|surface|texture" app:cameraPreviewFrameRate="@integer/preview_frame_rate" + app:cameraPreviewFrameRateExact="false|true" app:cameraFacing="back|front" app:cameraHdr="on|off" app:cameraFlash="on|auto|torch|off" diff --git a/docs/_docs/controls.md b/docs/_docs/controls.md index 1321bce8..7e87b06e 100644 --- a/docs/_docs/controls.md +++ b/docs/_docs/controls.md @@ -29,7 +29,8 @@ or `CameraOptions.supports(Control)` to see if it is supported. app:cameraVideoMaxSize="0" app:cameraVideoMaxDuration="0" app:cameraVideoBitRate="0" - app:cameraPreviewFrameRate="30"/> + app:cameraPreviewFrameRate="30" + app:cameraPreviewFrameRateExact="false|true"/> ``` ### APIs @@ -180,6 +181,16 @@ float min = options.getPreviewFrameRateMinValue(); float max = options.getPreviewFrameRateMaxValue(); ``` +##### cameraPreviewFrameRateExact +Controls the behavior of `cameraPreviewFrameRate`. If this option is set to `true`, the narrowest +range containing the new preview fps will be used. If this option is set to `false` the broadest +range containing the new preview fps will be used. + +```java +cameraView.setPreviewFrameRateExact(true); +cameraView.setPreviewFrameRageExact(false); +``` + ### Zoom There are two ways to control the zoom value: