Skip to content

Commit 6ea6583

Browse files
committed
Make sure to hide poster for Windows, even though onReadyForDisplay is not implemented
1 parent cb3e8c8 commit 6ea6583

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Video.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ export default class Video extends Component {
8787
};
8888

8989
_hidePoster = () => {
90-
this.setState({showPoster: false});
90+
if (this.state.showPoster) {
91+
this.setState({showPoster: false});
92+
}
9193
}
9294

9395
_onLoadStart = (event) => {
@@ -97,6 +99,10 @@ export default class Video extends Component {
9799
};
98100

99101
_onLoad = (event) => {
102+
// Need to hide poster here for windows as onReadyForDisplay is not implemented
103+
if (Platform.OS === 'windows') {
104+
this._hidePoster();
105+
}
100106
if (this.props.onLoad) {
101107
this.props.onLoad(event.nativeEvent);
102108
}
@@ -163,9 +169,7 @@ export default class Video extends Component {
163169
};
164170

165171
_onReadyForDisplay = (event) => {
166-
if (this.state.showPoster) {
167-
this._hidePoster();
168-
}
172+
this._hidePoster();
169173
if (this.props.onReadyForDisplay) {
170174
this.props.onReadyForDisplay(event.nativeEvent);
171175
}

0 commit comments

Comments
 (0)