Cancelling onMediaSeekRequest does not reset TimeSlider when paused
Current Behavior:
It seems both ways of canceling the onMediaSeekRequest from the Docs functionally work but the Thumb still moves to the seeked position.
When the player is playing this is not really a problem since the Thumb positions updates immediately after.
But when paused the TimeSlider indicates a position that does not correspond with the currentTime of the player.
Expected Behavior:
When canceling onMediaSeekRequest the TimeSlider should reset to the (actual) position before the cancelled seek.
Steps To Reproduce:
Code to reproduce looks something like this
<MediaPlayer […] onMediaSeekRequest={(time, nativeEvent) => nativeEvent.preventDefault((}>…</MediaPlayer>
With a paused player drag & drop the Thumb to any position.
Reproduction Link: [How to create a repro?][repro]
Sorry, the example Stackblitz examples are broken for me and do not load the media. (But this would probably be the example here)
Environment:
Example:
- Framework: React
- Meta Framework: Next.js
- Node: 20.12.1
- Device: older MacBook
- Browser: Chrome@latest -->
Anything Else?
Expected (when playing):
Buggy (when paused):
sidenote: it's not nice, but this workaround improves the behaviour :)
if (player.paused) {
void player.play().then(() => player.pause())
}