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

Seek forward and turn light mode off #979

Closed
denny7 opened this issue Jul 31, 2020 · 2 comments
Closed

Seek forward and turn light mode off #979

denny7 opened this issue Jul 31, 2020 · 2 comments

Comments

@denny7
Copy link

denny7 commented Jul 31, 2020

Hello,
I'm using react-player with custom controls and light mode. I display my controls before light mode is turned off. I would like to make video paused (turn light mode off and show current thumbnail) when user seeks to somewhere. I tried to change played and then call this.player.handleClickPreview() but it seems something set played to 0. What is more I need the duration of the video before light mode is turned off. How can I achieve that?

@cookpete
Copy link
Owner

For the duration, use the onDuration callback prop.

To seek to a certain time after turning light mode off, you basically want to start the video at a certain time. Support for this will depend on the type of URL you are playing, but there have been a few issues on this that may be useful:

@denny7
Copy link
Author

denny7 commented Sep 8, 2020

For the duration, use the onDuration callback prop.

It seems onDuration callback is called when light mode is turned off. I need the duration before that.

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

No branches or pull requests

2 participants