1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

rounding progress

This commit is contained in:
Fedor Katurov 2019-10-13 17:50:30 +07:00
parent f66825a9ea
commit 3fcff3ea0d

View file

@ -13,7 +13,7 @@ export class PlayerClass {
public constructor() {
this.element.addEventListener('timeupdate', () => {
const { duration: total, currentTime: current } = this.element;
const progress = (current / total) * 100;
const progress = parseFloat(((current / total) * 100).toFixed(2));
this.current = current || 0;
this.total = total || 0;