Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Commit

Permalink
Fix video control not updating progress when manipulating progress ba…
Browse files Browse the repository at this point in the history
…r while media is not playing.

Summary:
Before:
{F111064415}

After:
{F111064417}

Reviewed By: larrylin28

Differential Revision: D5964756

fbshipit-source-id: 69e0b08
  • Loading branch information
macarran authored and facebook-github-bot committed Oct 4, 2017
1 parent 5daf7b3 commit cb32d97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Libraries/Video/VideoControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ const VideoControl = createReactClass({

_onClickProgress(progress) {
this.props.playerState.seekTo(this.state.duration * progress);

// If media is not playing, we will not be getting progress updates, so let's
// manually update the progress bar to reflect the most recent progress click.
if (this.state.playStatus !== 'playing') {
this.setState({currentTime: this.state.duration * progress});
}
},

render: function() {
Expand Down

0 comments on commit cb32d97

Please sign in to comment.