mirror of
https://github.com/balzack/databag.git
synced 2025-04-22 09:35:16 +00:00
connecting remove audio topic asset
This commit is contained in:
parent
720e242c79
commit
8988a63634
@ -1,14 +1,14 @@
|
||||
import { Image, View, TextInput } from 'react-native';
|
||||
import { Image, View, TextInput, TouchableOpacity } from 'react-native';
|
||||
import audio from 'images/audio.png';
|
||||
import { styles } from './AudioFile.styled';
|
||||
|
||||
export function AudioFile({ path, remove, label, setLabel }) {
|
||||
return (
|
||||
<View style={styles.audio}>
|
||||
<TouchableOpacity style={styles.audio} onLongPress={remove}>
|
||||
<Image source={audio} resizeMode={'cover'} style={styles.image} />
|
||||
<TextInput style={ styles.input } value={ label } onChangeText={setLabel}
|
||||
multiline={true} autoCapitalize={'none'} placeholder="Audio Label" />
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,8 @@ export const styles = StyleSheet.create({
|
||||
backgroundColor: Colors.white,
|
||||
borderRadius: 4,
|
||||
marginRight: 16,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
},
|
||||
image: {
|
||||
width: 92,
|
||||
|
@ -19,7 +19,8 @@ export function useVideoFile() {
|
||||
},
|
||||
setNextPosition: () => {
|
||||
if (state.duration) {
|
||||
const position = (state.position + 1) % state.duration;
|
||||
const step = Math.floor(1 + state.duration / 20);
|
||||
const position = (state.position + step ) % state.duration;
|
||||
updateState({ position });
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user