Skip to content

Commit

Permalink
fix: progress bar did not reach 100% when audio file is small (katspa…
Browse files Browse the repository at this point in the history
  • Loading branch information
a114711074 authored and thijstriemstra committed Nov 4, 2018
1 parent b6e333c commit 3644987
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wavesurfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ export default class WaveSurfer extends util.Observer {
this.backend.init();
this.fireEvent('backend-created', this.backend);

this.backend.on('finish', () => this.fireEvent('finish'));
this.backend.on('finish', () => {
this.drawer.progress(this.backend.getPlayedPercents());
this.fireEvent('finish');
});
this.backend.on('play', () => this.fireEvent('play'));
this.backend.on('pause', () => this.fireEvent('pause'));

Expand Down

0 comments on commit 3644987

Please sign in to comment.