fixed time display bug

This commit is contained in:
Rudis Muiznieks 2023-04-09 18:13:56 -05:00
parent eba267cb7f
commit 3ebf5cbcd3
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ var Player = /** @class */ (function () {
}; };
Player.prototype.timeToDisplayString = function (time) { Player.prototype.timeToDisplayString = function (time) {
var mins = Math.floor(time / 60); var mins = Math.floor(time / 60);
var secs = Math.round(time - mins * 60); var secs = Math.floor(time - mins * 60);
var secStr = secs < 10 ? "0".concat(secs) : secs.toString(); var secStr = secs < 10 ? "0".concat(secs) : secs.toString();
return "".concat(mins, ":").concat(secStr); return "".concat(mins, ":").concat(secStr);
}; };

View File

@ -265,7 +265,7 @@ class Player {
private timeToDisplayString(time: number): string { private timeToDisplayString(time: number): string {
const mins = Math.floor(time / 60); const mins = Math.floor(time / 60);
const secs = Math.round(time - mins * 60); const secs = Math.floor(time - mins * 60);
const secStr = secs < 10 ? `0${secs}` : secs.toString(); const secStr = secs < 10 ? `0${secs}` : secs.toString();
return `${mins}:${secStr}`; return `${mins}:${secStr}`;
} }