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