thumb seek size
This commit is contained in:
parent
7e11357873
commit
9b3986f22c
|
@ -13,7 +13,7 @@ import Animated, {
|
||||||
|
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import { useTheme } from '../../theme';
|
import { useTheme } from '../../theme';
|
||||||
import { AUDIO_BUTTON_HIT_SLOP } from './utils';
|
import { AUDIO_BUTTON_HIT_SLOP, THUMB_SEEK_SIZE } from './utils';
|
||||||
|
|
||||||
const DEFAULT_TIME_LABEL = '00:00';
|
const DEFAULT_TIME_LABEL = '00:00';
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ const Seek = ({ currentTime, duration, loaded = false, onChangeTime }: ISeek) =>
|
||||||
|
|
||||||
const onLayout = (event: LayoutChangeEvent) => {
|
const onLayout = (event: LayoutChangeEvent) => {
|
||||||
const { width } = event.nativeEvent.layout;
|
const { width } = event.nativeEvent.layout;
|
||||||
maxWidth.value = width - 12;
|
maxWidth.value = width - THUMB_SEEK_SIZE;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onGestureEvent = useAnimatedGestureHandler({
|
const onGestureEvent = useAnimatedGestureHandler({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { StyleSheet } from 'react-native';
|
import { StyleSheet } from 'react-native';
|
||||||
|
|
||||||
import sharedStyles from '../../views/Styles';
|
import sharedStyles from '../../views/Styles';
|
||||||
|
import { THUMB_SEEK_SIZE } from './utils';
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
audioContainer: {
|
audioContainer: {
|
||||||
|
@ -44,9 +45,9 @@ const styles = StyleSheet.create({
|
||||||
...sharedStyles.textRegular
|
...sharedStyles.textRegular
|
||||||
},
|
},
|
||||||
thumbSeek: {
|
thumbSeek: {
|
||||||
height: 12,
|
height: THUMB_SEEK_SIZE,
|
||||||
width: 12,
|
width: THUMB_SEEK_SIZE,
|
||||||
borderRadius: 6,
|
borderRadius: THUMB_SEEK_SIZE / 2,
|
||||||
position: 'absolute'
|
position: 'absolute'
|
||||||
},
|
},
|
||||||
containerPlaybackSpeed: {
|
containerPlaybackSpeed: {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export const AVAILABLE_SPEEDS = [1, 1.5, 2, 0.5];
|
export const AVAILABLE_SPEEDS = [1, 1.5, 2, 0.5];
|
||||||
|
|
||||||
export const AUDIO_BUTTON_HIT_SLOP = { top: 8, right: 8, bottom: 8, left: 8 };
|
export const AUDIO_BUTTON_HIT_SLOP = { top: 8, right: 8, bottom: 8, left: 8 };
|
||||||
|
|
||||||
|
export const THUMB_SEEK_SIZE = 12;
|
||||||
|
|
Loading…
Reference in New Issue