Environment
- react-player: 3.4.0
- React: 19.2.4
- TypeScript: 5.9.3
Description
The TS definitions for the onSeeked and onSeeking callbacks don't match the actual runtime values. onSeeked is typed as a React synthetic event, and onSeeking implies an event object, but at runtime:
<ReactPlayer
src="..."
onSeeked={(e) => {
// Runtime value is actually { time: number }
console.log(e) // { time: 59 }
e.currentTarget // TS thinks this exists, but it's undefined at runtime
e.time // Works at runtime, but TS throws an error
}}
onSeeking={(e) => {
// Runtime value is actually undefined
console.log(e) // undefined
}}
/>
Suggested Fix
Update onSeeked to { time: number } and remove the parameter for onSeeking.
Happy to open a PR for this if it helps.