Make sure to hide poster for Windows, even though onReadyForDisplay is not implemented
This commit is contained in:
parent
cb3e8c8281
commit
6ea65833fe
12
Video.js
12
Video.js
@ -87,7 +87,9 @@ export default class Video extends Component {
|
||||
};
|
||||
|
||||
_hidePoster = () => {
|
||||
this.setState({showPoster: false});
|
||||
if (this.state.showPoster) {
|
||||
this.setState({showPoster: false});
|
||||
}
|
||||
}
|
||||
|
||||
_onLoadStart = (event) => {
|
||||
@ -97,6 +99,10 @@ export default class Video extends Component {
|
||||
};
|
||||
|
||||
_onLoad = (event) => {
|
||||
// Need to hide poster here for windows as onReadyForDisplay is not implemented
|
||||
if (Platform.OS === 'windows') {
|
||||
this._hidePoster();
|
||||
}
|
||||
if (this.props.onLoad) {
|
||||
this.props.onLoad(event.nativeEvent);
|
||||
}
|
||||
@ -163,9 +169,7 @@ export default class Video extends Component {
|
||||
};
|
||||
|
||||
_onReadyForDisplay = (event) => {
|
||||
if (this.state.showPoster) {
|
||||
this._hidePoster();
|
||||
}
|
||||
this._hidePoster();
|
||||
if (this.props.onReadyForDisplay) {
|
||||
this.props.onReadyForDisplay(event.nativeEvent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user