import { MaterialIcons } from '@expo/vector-icons'; import { StyleSheet, Text, View } from 'react-native'; import { VideoPlayer } from '../Player.types'; import { Focussable } from './components/Focussable'; import { useTimeoutEffect } from './hooks/useTimeoutEffect'; type DelayViewProps = { player: VideoPlayer; onClose: () => void; }; export const AudioDelayView = ({ player, onClose }: DelayViewProps) => { const [delay, setDelay] = useTimeoutEffect(player.audioDelay, value => (player.audioDelay = value)); return ( Décalage audio setDelay(delay => delay - 50)}> {delay} ms setDelay(delay => delay + 50)}> setDelay(0)}> Réinitialiser ); }; const styles = StyleSheet.create({ container: { position: 'absolute', top: 80, right: 0, flex: 1, justifyContent: 'center', width: 300, gap: 5 }, part: { backgroundColor: 'rgba(12,12,12,0.8)', padding: 2, width: '100%', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', borderRadius: 3 } });