Floor seconds instead of rounding in the player UI

This commit is contained in:
Zoe Roux 2024-04-21 01:53:33 +02:00
parent fb4424fb6b
commit f15b92aae1
No known key found for this signature in database

View File

@ -208,7 +208,7 @@ export const toTimerString = (timer?: number, duration?: number) => {
return "??:??";
const h = Math.floor(timer / 3600);
const min = Math.floor((timer / 60) % 60);
const sec = Math.round(timer % 60);
const sec = Math.floor(timer % 60);
const fmt = (n: number) => n.toString().padStart(2, "0");
if (duration >= 3600) return `${fmt(h)}:${fmt(min)}:${fmt(sec)}`;