Use ImageBackground for youtube videos instead of nested Images
This commit is contained in:
parent
49bcf185e6
commit
0210d6e1eb
1 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import React, {PureComponent} from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Image,
|
||||
ImageBackground,
|
||||
Linking,
|
||||
Platform,
|
||||
StyleSheet,
|
||||
|
|
@ -185,7 +186,7 @@ export default class PostBodyAdditionalContent extends PureComponent {
|
|||
{...this.responder}
|
||||
onPress={this.playYouTubeVideo}
|
||||
>
|
||||
<Image
|
||||
<ImageBackground
|
||||
style={[styles.image, {width, height}]}
|
||||
source={{uri: imgUrl}}
|
||||
resizeMode={'cover'}
|
||||
|
|
@ -197,7 +198,7 @@ export default class PostBodyAdditionalContent extends PureComponent {
|
|||
onPress={this.playYouTubeVideo}
|
||||
/>
|
||||
</TouchableWithoutFeedback>
|
||||
</Image>
|
||||
</ImageBackground>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue