mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-31 05:31:07 +00:00
[Docs] Add capture target temp to readme
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# react-native-camera [](http://badge.fury.io/js/react-native-camera) [](https://gitter.im/lwansbrough/react-native-camera)
|
||||
|
||||
A camera module for React Native.
|
||||
A camera module for React Native.
|
||||

|
||||
|
||||
## Known Issues
|
||||
@@ -154,7 +154,7 @@ The type of capture that will be performed by the camera - either a still image
|
||||
|
||||
#### `captureTarget`
|
||||
|
||||
Values: `Camera.constants.CaptureTarget.cameraRoll` (default), `Camera.constants.CaptureTarget.disk`, ~~`Camera.constants.CaptureTarget.memory`~~ (deprecated),
|
||||
Values: `Camera.constants.CaptureTarget.cameraRoll` (default), `Camera.constants.CaptureTarget.disk`, `Camera.constants.CaptureTarget.temp`, ~~`Camera.constants.CaptureTarget.memory`~~ (deprecated),
|
||||
|
||||
This property allows you to specify the target output of the captured image data. By default the image binary is sent back as a base 64 encoded string. The disk output has been shown to improve capture response time, so that is the recommended value.
|
||||
|
||||
|
||||
@@ -256,9 +256,9 @@ public class RCTCameraModule extends ReactContextBaseJavaModule {
|
||||
File outputFile;
|
||||
|
||||
if (type == MEDIA_TYPE_IMAGE) {
|
||||
outputFile = File.createTempFile("IMG_" + timeStamp, "jpg", outputDir);
|
||||
outputFile = File.createTempFile("IMG_" + timeStamp, ".jpg", outputDir);
|
||||
} else if (type == MEDIA_TYPE_VIDEO) {
|
||||
outputFile = File.createTempFile("VID_" + timeStamp, "mp4", outputDir);
|
||||
outputFile = File.createTempFile("VID_" + timeStamp, ".mp4", outputDir);
|
||||
} else {
|
||||
Log.e(TAG, "Unsupported media type:" + type);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user