From 3c2914aca22f568ce176b7e6f766b97dc824d1f8 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Tue, 15 Jul 2025 21:58:17 +0300 Subject: [PATCH 1/2] fix: Player - TimeChanged & Seek time now has Math.max(0, x) Signed-off-by: Lachezar Lechev --- src/routes/Player/usePlayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/Player/usePlayer.js b/src/routes/Player/usePlayer.js index 05036f220..1e04af2cd 100644 --- a/src/routes/Player/usePlayer.js +++ b/src/routes/Player/usePlayer.js @@ -102,7 +102,7 @@ const usePlayer = (urlParams) => { args: { action: 'TimeChanged', args: { - time: Math.round(time), + time: Math.max(0, Math.round(time)), duration, device, } @@ -118,7 +118,7 @@ const usePlayer = (urlParams) => { args: { action: 'Seek', args: { - time: Math.round(time), + time: Math.max(0, Math.round(time)), duration, device, } From 20bbe12a8a951839ad4979882bdd61bad8810e50 Mon Sep 17 00:00:00 2001 From: Lachezar Lechev Date: Tue, 15 Jul 2025 22:04:57 +0300 Subject: [PATCH 2/2] fix: Player - TimeChanged & Seek duration now has Math.max(0, x) Signed-off-by: Lachezar Lechev --- src/routes/Player/usePlayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/Player/usePlayer.js b/src/routes/Player/usePlayer.js index 1e04af2cd..4ca2574ba 100644 --- a/src/routes/Player/usePlayer.js +++ b/src/routes/Player/usePlayer.js @@ -103,7 +103,7 @@ const usePlayer = (urlParams) => { action: 'TimeChanged', args: { time: Math.max(0, Math.round(time)), - duration, + duration: Math.max(0, Math.round(duration)), device, } } @@ -119,7 +119,7 @@ const usePlayer = (urlParams) => { action: 'Seek', args: { time: Math.max(0, Math.round(time)), - duration, + duration: Math.max(0, Math.round(duration)), device, } }