Skip to content

Commit 658dd6e

Browse files
committed
width error and seeker position issue solved on fullscreen
1 parent 5218edd commit 658dd6e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

VideoPlayer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,17 @@ export default class VideoPlayer extends Component {
196196
* @param {object} data The video meta data
197197
*/
198198
_onLoad( data = {} ) {
199+
//Karan - for handling of video play from state in full screen
199200
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
201205
state.loading = false;
202206
this.seekTo(this.props.initialTime);
203207
if (state.showControls) {
204208
this.setControlTimeout();
205209
}
206-
207-
// state.seekerFillWidth = this.props.seekerFillWidth
208-
// state.seekerOffset = this.props.seekerOffset
209-
// state.seekerPosition = this.props.seekerPosition
210-
211210
this.setState(state);
212211
} else {
213212
state.duration = data.duration;
@@ -251,12 +250,13 @@ export default class VideoPlayer extends Component {
251250
*/
252251

253252
//Karan - changes on ending video
254-
_onEnd(data = {}) {
253+
_onEnd() {
255254
let state = this.state;
256255
state.paused = true;
257256
state.loading = false;
258257
this.setState( state );
259258
this.setSeekerPosition( 0 );
259+
this.methods.toggleFullscreen();
260260
}
261261

262262
/**

0 commit comments

Comments
 (0)