You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm implementing a custom player in TypeScript and for this I have a class that extends BaseReactPlayer<ReactPlayerProps>. I initialize duration, currentTime and secondsLoaded to null, but I noticed that the getDuration, getCurrentTime and getSecondsLoaded 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:
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: