Add basic swipe functionality through videos

Still need to work on:
1. Progress meter
2. Pause on tap
3. App icon
4. Dark/light mode detection
5. Height not being centered
6. Slide numbers on the bottom color
This commit is contained in:
2022-12-15 16:32:28 +13:00
commit 9f02211d6a
74 changed files with 10344 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import {Dimensions, View} from 'react-native';
import {DocumentPickerResponse} from 'react-native-document-picker';
import Video from 'react-native-video';
import {backgroundColor} from './constants';
export default function Item({
slide,
value,
index,
}: {
slide: number;
value: DocumentPickerResponse;
index: number;
}) {
const height = Dimensions.get('screen').height;
return (
<View
style={{
height: '100%',
width: '100%',
justifyContent: 'center',
alignItems: 'center',
backgroundColor,
}}>
<Video
key={value.name}
paused={slide !== index}
style={{width: 200, height: height / 2}}
source={{uri: value.uri}}
/>
</View>
);
}