-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.ios.js
42 lines (37 loc) · 986 Bytes
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {NativeModules} from "react-native";
const {IGImagePicker} = NativeModules;
const defaultOption = {
compressImageMaxWidth: 780,
compressImageMaxHeight: 780,
library: {
maxNumberOfItems: 10,
defaultMultipleSelection: false,
minNumberOfItems: 1
},
video: {
recordingTimeLimit: 60.0,
libraryTimeLimit: 60,
minimumTimeLimit: 3,
trimmerMaxDuration: 60,
trimmerMinDuration: 3
},
showsVideoTrimmer: true,
showsPhotoFilters: true,
usesFrontCamera: false,
cropWidth: null,
cropHeight: null
};
export const showImagePicker = (options = {}) => {
return IGImagePicker.showImagePicker({...defaultOption, ...options});
};
export const libraryPicker = (options = {}) => {
return IGImagePicker.libraryPicker({...defaultOption, ...options});
};
export const videoPicker = (options = {}) => {
return IGImagePicker.videoPicker({...defaultOption, ...options});
};
export default {
showImagePicker,
libraryPicker,
videoPicker
};