fixed time display bug
This commit is contained in:
parent
eba267cb7f
commit
3ebf5cbcd3
|
@ -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);
|
||||||
};
|
};
|
||||||
|
|
|
@ -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}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue