1.0.0 • Published 6 years ago

dituhui-react-native-image-picker v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

dituhui-react-native-image-picker

dituhui product development kit.Photo taking pictures

Options

optioniOSAndroidInfo
titleOKOKSpecify null or empty string to remove the title
cancelButtonTitleOKOKSpecify null or empty string to remove this button (Android only)
takePhotoButtonTitleOKOKSpecify null or empty string to remove this button
chooseFromLibraryButtonTitleOKOKSpecify null or empty string to remove this button
customButtonsOKOKAn array containing objects with the name and title of buttons
cameraTypeOK-'front' or 'back'
mediaTypeOKOK'photo', 'video', or 'mixed' on iOS, 'photo' or 'video' on Android
maxWidthOKOKPhotos only
maxHeightOKOKPhotos only
qualityOKOK0 to 1, photos only
videoQualityOKOK'low', 'medium', or 'high' on iOS, 'low' or 'high' on Android
durationLimitOKOKMax video recording time, in seconds
rotation-OKPhotos only, 0 to 360 degrees of rotation
allowsEditingOK-bool - enables built in iOS functionality to resize the image after selection
noDataOKOKIf true, disables the base64 data field from being generated (greatly improves performance on large photos)
storageOptionsOKOKIf this key is provided, the image will be saved in your app's Documents directory on iOS, or your app's Pictures directory on Android (rather than a temporary directory)
storageOptions.skipBackupOK-If true, the photo will NOT be backed up to iCloud
storageOptions.pathOK-If set, will save the image at Documents/[path]/ rather than the root Documents
storageOptions.cameraRollOKOKIf true, the cropped photo will be saved to the iOS Camera Roll or Android DCIM folder.
storageOptions.waitUntilSavedOK-If true, will delay the response callback until after the photo/video was saved to the Camera Roll. If the photo or video was just taken, then the file name and timestamp fields are only provided in the response object when this AND cameraRoll are both true.
permissionDenied.title-OKTitle of explaining permissions dialog. By default Permission denied.
permissionDenied.text-OKMessage of explaining permissions dialog. By default To be able to take pictures with your camera and choose images from your library..
permissionDenied.reTryTitle-OKTitle of re-try button. By default re-try
permissionDenied.okTitle-OKTitle of ok button. By default I'm sure

The Response Object

keyiOSAndroidDescription
didCancelOKOKInforms you if the user cancelled the process
errorOKOKContains an error message, if there is one
customButtonOKOKIf the user tapped one of your custom buttons, contains the name of it
dataOKOKThe base64 encoded image data (photos only)
uriOKOKThe uri to the local file asset on the device (photo or video)
origURLOK-The URL of the original asset in photo library, if it exists
isVerticalOKOKWill be true if the image is vertically oriented
widthOKOKImage dimensions (photos only)
heightOKOKImage dimensions (photos only)
fileSizeOKOKThe file size (photos only)
type-OKThe file type (photos only)
fileNameOK (photos and videos)OK (photos)The file name
path-OKThe file path
latitudeOKOKLatitude metadata, if available
longitudeOKOKLongitude metadata, if available
timestampOKOKTimestamp metadata, if available, in ISO8601 UTC format
originalRotation-OKRotation degrees (photos only) See #109