File tree 1 file changed +7
-7
lines changed 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -196,18 +196,17 @@ export default class VideoPlayer extends Component {
196
196
* @param {object } data The video meta data
197
197
*/
198
198
_onLoad ( data = { } ) {
199
+ //Karan - for handling of video play from state in full screen
199
200
let state = this . state ;
200
- if ( this . props . initialTime ) {
201
+ if ( this . props . VideoPlayerPrevState && this . props . initialTime ) {
202
+ state = this . props . VideoPlayerPrevState
203
+ state . resizeMode = 'contain' ;
204
+ state . isFullscreen = false
201
205
state . loading = false ;
202
206
this . seekTo ( this . props . initialTime ) ;
203
207
if ( state . showControls ) {
204
208
this . setControlTimeout ( ) ;
205
209
}
206
-
207
- // state.seekerFillWidth = this.props.seekerFillWidth
208
- // state.seekerOffset = this.props.seekerOffset
209
- // state.seekerPosition = this.props.seekerPosition
210
-
211
210
this . setState ( state ) ;
212
211
} else {
213
212
state . duration = data . duration ;
@@ -251,12 +250,13 @@ export default class VideoPlayer extends Component {
251
250
*/
252
251
253
252
//Karan - changes on ending video
254
- _onEnd ( data = { } ) {
253
+ _onEnd ( ) {
255
254
let state = this . state ;
256
255
state . paused = true ;
257
256
state . loading = false ;
258
257
this . setState ( state ) ;
259
258
this . setSeekerPosition ( 0 ) ;
259
+ this . methods . toggleFullscreen ( ) ;
260
260
}
261
261
262
262
/**
You can’t perform that action at this time.
0 commit comments