Skip to content

Conversation

yashatgit
Copy link
Contributor

If we pass an onPause handler to VideoPlayer, the event is not propagated and hence not able to extract relevant info from the event handler.

class VideoCaptureView extends Component {
  onVideoPause = event => {
    //can't access event.currentTarget.currentTime
  };
  render() {
    <VideoPlayer url={videoUrl} onPause={this.onVideoPause} />;
  }
}

@cookpete cookpete merged commit b604ded into cookpete:master Feb 22, 2018
@cookpete
Copy link
Owner

Keep in mind that not all players will pass an event to onPause (in fact I think it is only FilePlayer that does).

You can get the current time of any player at any time with the getCurrentTime method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants