File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ export default class Video extends Component {
87
87
} ;
88
88
89
89
_hidePoster = ( ) => {
90
- this . setState ( { showPoster : false } ) ;
90
+ if ( this . state . showPoster ) {
91
+ this . setState ( { showPoster : false } ) ;
92
+ }
91
93
}
92
94
93
95
_onLoadStart = ( event ) => {
@@ -97,6 +99,10 @@ export default class Video extends Component {
97
99
} ;
98
100
99
101
_onLoad = ( event ) => {
102
+ // Need to hide poster here for windows as onReadyForDisplay is not implemented
103
+ if ( Platform . OS === 'windows' ) {
104
+ this . _hidePoster ( ) ;
105
+ }
100
106
if ( this . props . onLoad ) {
101
107
this . props . onLoad ( event . nativeEvent ) ;
102
108
}
@@ -163,9 +169,7 @@ export default class Video extends Component {
163
169
} ;
164
170
165
171
_onReadyForDisplay = ( event ) => {
166
- if ( this . state . showPoster ) {
167
- this . _hidePoster ( ) ;
168
- }
172
+ this . _hidePoster ( ) ;
169
173
if ( this . props . onReadyForDisplay ) {
170
174
this . props . onReadyForDisplay ( event . nativeEvent ) ;
171
175
}
You can’t perform that action at this time.
0 commit comments