aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/moments/Moment.tsx33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx
index a0f66cc5..6441bca3 100644
--- a/src/components/moments/Moment.tsx
+++ b/src/components/moments/Moment.tsx
@@ -55,28 +55,19 @@ const Moment: React.FC<MomentProps> = ({
*/
const navigateToVideoPicker = () => {
ImagePicker.openPicker({
- smartAlbums: [
- 'Favorites',
- 'RecentlyAdded',
- 'SelfPortraits',
- 'Screenshots',
- 'UserLibrary',
- ],
- width: 580,
- height: 580,
- cropping: false,
- cropperToolbarTitle: 'select a video',
mediaType: 'video',
})
.then(async (vid) => {
- if ('path' in vid) {
- let fileName = vid.filename || '';
- if (fileName.endsWith('.heic') || fileName.endsWith('.HEIC')) {
- fileName = fileName.split('.')[0] + '.jpg';
- }
- let presignedURL = await handlePresignedURL(fileName, title);
- console.log('presigned' + JSON.stringify(presignedURL));
- handleVideoUpload(vid, presignedURL);
+ if (vid.path) {
+ navigation.navigate('CaptionScreen', {
+ screenType,
+ title,
+ media: {
+ filename: `poc_${Math.random().toString(36).substring(7)}.mov`,
+ uri: vid.path,
+ isVideo: true,
+ },
+ });
}
})
.catch((err) => {
@@ -105,11 +96,11 @@ const Moment: React.FC<MomentProps> = ({
if (picture.path && picture.filename) {
navigation.navigate('CaptionScreen', {
screenType,
- title: title,
+ title,
media: {
filename: picture.filename,
uri: picture.path,
- type: 'image',
+ isVideo: false,
},
});
}