mirror of
https://github.com/balzack/databag.git
synced 2025-05-04 23:45:21 +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: {
|
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',
|
||||||
|
@ -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}>
|
||||||
|
@ -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: '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user