-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
BaseReactPlayer types are not correct #1739
Labels
enhancement
Indicates new feature requests
Comments
yes, the types could use some refinements. if we look at the native video element currentTime should start at however |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm implementing a custom player in TypeScript and for this I have a class that extends
BaseReactPlayer<ReactPlayerProps>
. I initializeduration
,currentTime
andsecondsLoaded
tonull
, but I noticed that thegetDuration
,getCurrentTime
andgetSecondsLoaded
methods must return a number, so TypeScript complains about this since I'm initializing these values as null. I took a look at all the players that exist in react-player and noticed that if not all, then almost all players return null in these methods and not just numbers, so I assumed that the types are not correct. Am I missing something or are the types just not correct?The text was updated successfully, but these errors were encountered: