Fixes bug where poster and video was displayed simultaneously
This commit is contained in:
parent
e28ae17579
commit
6d3936de0b
13
Video.js
13
Video.js
@ -308,15 +308,16 @@ export default class Video extends Component {
|
||||
};
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<RCTVideo ref={this._assignRoot} {...nativeProps} />
|
||||
{this.props.poster &&
|
||||
this.state.showPoster && (
|
||||
<View style={nativeProps.style}>
|
||||
<RCTVideo
|
||||
ref={this._assignRoot}
|
||||
{...nativeProps}
|
||||
style={StyleSheet.absoluteFill}
|
||||
/>
|
||||
{this.props.poster && this.state.showPoster && (
|
||||
<Image style={posterStyle} source={{ uri: this.props.poster }} />
|
||||
</View>
|
||||
)}
|
||||
</React.Fragment>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user