styling video control icon

This commit is contained in:
balzack 2025-01-18 20:40:36 -08:00
parent 923c1bff73
commit f3627ad2e8
3 changed files with 12 additions and 8 deletions

View File

@ -15,11 +15,11 @@ export const styles = StyleSheet.create({
control: { control: {
position: 'absolute', position: 'absolute',
backgroundColor: 'transparent', backgroundColor: 'transparent',
opacity: 0.6
}, },
button: { button: {
position: 'absolute', position: 'absolute',
borderRadius: 13, borderRadius: 16,
backgroundColor: '#444444',
}, },
blur: { blur: {
position: 'absolute', position: 'absolute',

View File

@ -1,6 +1,6 @@
import React, { useState, useEffect, useRef } from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { SafeAreaView, Share, Modal, Pressable, Animated, View, Image, useAnimatedValue } from 'react-native' import { SafeAreaView, Share, Modal, Pressable, Animated, View, Image, useAnimatedValue } from 'react-native'
import { Text, Icon, ProgressBar, IconButton } from 'react-native-paper' import { Text, Surface, Icon, ProgressBar, IconButton } from 'react-native-paper'
import { useVideoAsset } from './useVideoAsset.hook'; import { useVideoAsset } from './useVideoAsset.hook';
import { MediaAsset } from '../../conversation/Conversation'; import { MediaAsset } from '../../conversation/Conversation';
import { styles } from './VideoAsset.styled' import { styles } from './VideoAsset.styled'
@ -93,9 +93,9 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
source={{ uri: state.thumbUrl }} source={{ uri: state.thumbUrl }}
onLoad={actions.loaded} onLoad={actions.loaded}
/> />
<View style={styles.button}> <Surface elevation={2} style={styles.button}>
<Icon size={32} source="play-circle-outline" /> <Icon size={32} source="play-circle-outline" />
</View> </Surface>
</Animated.View> </Animated.View>
</Pressable> </Pressable>
)} )}
@ -113,10 +113,14 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
controls={false} resizeMode="contain" /> controls={false} resizeMode="contain" />
)} )}
{ status === 'playing' && showControl && ( { status === 'playing' && showControl && (
<IconButton style={styles.control} size={64} icon="pause" onPress={pause} /> <Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="pause" onPress={pause} />
</Surface>
)} )}
{ status === 'paused' && showControl && ( { status === 'paused' && showControl && (
<IconButton style={styles.control} size={64} icon="play" onPress={play} /> <Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="play" onPress={play} />
</Surface>
)} )}
{ state.loading && ( { state.loading && (
<View style={styles.progress}> <View style={styles.progress}>

View File

@ -15,7 +15,7 @@ export function useSettings() {
profile: {} as Profile, profile: {} as Profile,
profileSet: false, profileSet: false,
imageUrl: null, imageUrl: null,
strings: display.state.strings, strings: {},
all: false, all: false,
password: '', password: '',
confirm: '', confirm: '',