mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
rounding progress
This commit is contained in:
parent
f66825a9ea
commit
3fcff3ea0d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue