diff options
-rw-r--r-- | ios/Frontend/Info.plist | 4 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | src/components/profile/ProfileBody.tsx | 19 |
3 files changed, 25 insertions, 1 deletions
diff --git a/ios/Frontend/Info.plist b/ios/Frontend/Info.plist index 0d75ca35..fa67d073 100644 --- a/ios/Frontend/Info.plist +++ b/ios/Frontend/Info.plist @@ -66,6 +66,8 @@ </array> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> + <key>NSMicrophoneUsageDescription</key> + <string>This lets you share video audio from your camera for a Moment post on your profile!</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> @@ -74,6 +76,8 @@ <array> <string>UIInterfaceOrientationPortrait</string> </array> + <key>NSCameraUsageDescription</key> + <string>This lets you share photos/videos from your camera for a Moment post on your profile!</string> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> </dict> diff --git a/package.json b/package.json index ea8c946a..bc524f94 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "react-native-haptic-feedback": "^1.11.0", "react-native-hyperlink": "^0.0.19", "react-native-image-crop-picker": "^0.36.0", + "react-native-image-picker": "^4.0.4", "react-native-image-resizer": "^1.4.4", "react-native-inappbrowser-reborn": "^3.5.0", "react-native-linear-gradient": "^2.5.6", @@ -105,4 +106,4 @@ "./node_modules/react-native-gesture-handler/jestSetup.js" ] } -}
\ No newline at end of file +} diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index c0ee508a..34cf1870 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -1,5 +1,7 @@ import React from 'react'; import {LayoutChangeEvent, Linking, StyleSheet, Text, View} from 'react-native'; +import {TouchableOpacity} from 'react-native-gesture-handler'; +import {launchCamera} from 'react-native-image-picker'; import {useDispatch, useSelector, useStore} from 'react-redux'; import {TAGG_DARK_BLUE, TOGGLE_BUTTON_TYPE} from '../../constants'; import { @@ -80,6 +82,23 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({ ); }}>{`${website}`}</Text> )} + <TouchableOpacity + onPress={() => { + launchCamera( + { + mediaType: 'video', + durationLimit: 60, + videoQuality: 'medium', + }, + (response) => { + console.log(response); + const file = response.assets[0].uri; + console.log(file); + }, + ); + }}> + <Text>foooo</Text> + </TouchableOpacity> {userXId && isBlocked && ( <View style={styles.toggleButtonContainer}> |