styling media play button

This commit is contained in:
balzack 2025-01-19 08:29:43 -08:00
parent 97f359f2da
commit a006718174
4 changed files with 13 additions and 5 deletions

View File

@ -14,7 +14,11 @@ export const styles = StyleSheet.create({
},
control: {
position: 'absolute',
borderRadius: 8,
},
iconButton: {
backgroundColor: 'transparent',
borderRadius: 8,
},
button: {
position: 'absolute',

View File

@ -105,12 +105,12 @@ export function AudioAsset({ topicId, asset, loaded, show }: { topicId: string,
)}
{ status === 'playing' && (
<Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="pause" onPress={pause} />
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
</Surface>
)}
{ status === 'paused' && (
<Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="play" onPress={play} />
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
</Surface>
)}
{ state.loading && (

View File

@ -14,8 +14,12 @@ export const styles = StyleSheet.create({
},
control: {
position: 'absolute',
opacity: 0.6,
borderRadius: 8,
},
iconButton: {
backgroundColor: 'transparent',
opacity: 0.6
borderRadius: 8,
},
button: {
position: 'absolute',

View File

@ -117,12 +117,12 @@ export function VideoAsset({ topicId, asset, loaded, show }: { topicId: string,
)}
{ status === 'playing' && showControl && (
<Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="pause" onPress={pause} />
<IconButton style={styles.iconButton} size={64} icon="pause" onPress={pause} />
</Surface>
)}
{ status === 'paused' && showControl && (
<Surface elevation={2} style={styles.control}>
<IconButton size={64} icon="play" onPress={play} />
<IconButton style={styles.iconButton} size={64} icon="play" onPress={play} />
</Surface>
)}
{ state.loading && (