Latest versions of react-native allow you to render inside the image tag. So you could put an Image
tag for the recordPlayer inside an Image
tag for the background. Try something like
renderRecordPlayer = _ => (
<Image style={styles.background}
source={...} >
<Image style={styles.recordPlayer}
source={...} />
</Image>
)
const styles = StyleSheet.create({
background: {
flex: 1,
width: null,
height: null,
// center the recordPlayer in the background Image
justifyContent: 'center',
alignItems: 'center',
resizeMode: 'cover', // make sure background covers all of screen
},
{
width: ...,
height: ...,
resizeMode: 'contain',
},
})
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments