Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the onPause event propogation #336

Merged
merged 1 commit into from
Feb 22, 2018

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.

None yet

3 participants