From 3fcff3ea0deb2fcbf76a66cebada8faf09fbf7f8 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sun, 13 Oct 2019 17:50:30 +0700 Subject: [PATCH] rounding progress --- src/utils/player.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/player.ts b/src/utils/player.ts index 7e3c940a..5af87abd 100644 --- a/src/utils/player.ts +++ b/src/utils/player.ts @@ -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;