mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 01:55:17 +00:00
styling video control icon
This commit is contained in:
parent
923c1bff73
commit
f3627ad2e8
@ -15,11 +15,11 @@ export const styles = StyleSheet.create({
|
||||
control: {
|
||||
position: 'absolute',
|
||||
backgroundColor: 'transparent',
|
||||
opacity: 0.6
|
||||
},
|
||||
button: {
|
||||
position: 'absolute',
|
||||
borderRadius: 13,
|
||||
backgroundColor: '#444444',
|
||||
borderRadius: 16,
|
||||
},
|
||||
blur: {
|
||||
position: 'absolute',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
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 { MediaAsset } from '../../conversation/Conversation';
|
||||
import { styles } from './VideoAsset.styled'
|
||||
@ -93,9 +93,9 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
|
||||
source={{ uri: state.thumbUrl }}
|
||||
onLoad={actions.loaded}
|
||||
/>
|
||||
<View style={styles.button}>
|
||||
<Surface elevation={2} style={styles.button}>
|
||||
<Icon size={32} source="play-circle-outline" />
|
||||
</View>
|
||||
</Surface>
|
||||
</Animated.View>
|
||||
</Pressable>
|
||||
)}
|
||||
@ -113,10 +113,14 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
|
||||
controls={false} resizeMode="contain" />
|
||||
)}
|
||||
{ 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 && (
|
||||
<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 && (
|
||||
<View style={styles.progress}>
|
||||
|
@ -15,7 +15,7 @@ export function useSettings() {
|
||||
profile: {} as Profile,
|
||||
profileSet: false,
|
||||
imageUrl: null,
|
||||
strings: display.state.strings,
|
||||
strings: {},
|
||||
all: false,
|
||||
password: '',
|
||||
confirm: '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user