Merge pull request #975 from Stremio/fix/player-negative-number-from-stremio-video
Some checks failed
Build / build (push) Has been cancelled

fix: Player - TimeChanged & Seek time & duration now have Math.max(0, x)
This commit is contained in:
Timothy Z. 2025-08-07 12:24:55 +03:00 committed by GitHub
commit 665cf7dd2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,8 +102,8 @@ const usePlayer = (urlParams) => {
args: { args: {
action: 'TimeChanged', action: 'TimeChanged',
args: { args: {
time: Math.round(time), time: Math.max(0, Math.round(time)),
duration, duration: Math.max(0, Math.round(duration)),
device, device,
} }
} }
@ -118,8 +118,8 @@ const usePlayer = (urlParams) => {
args: { args: {
action: 'Seek', action: 'Seek',
args: { args: {
time: Math.round(time), time: Math.max(0, Math.round(time)),
duration, duration: Math.max(0, Math.round(duration)),
device, device,
} }
} }