I believe this is a hack into something that works. Should restore the
original code.


On Wed, Jun 26, 2013 at 2:38 PM, William <notifications@github.com> wrote:

> In src/webaudio.js:
>
> > @@ -159,8 +160,7 @@ WaveSurfer.WebAudio = {
> >      },
> >
> >      getPlayedPercents: function () {
> > -        var duration = this.getDuration();
> > -        return duration > 0 ? this.getCurrentTime() / duration : 0;
> > +        return this.getCurrentTime() / this.getDuration();
>
> Unless you are 100% sure that this.getDuration never returns 0, this
> exposes you to a division-by-zero error. What problem did you encounter
> that caused by to make this change? Is there a way to handle it in your own
> code, outside this library?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/spanishdict/wavesurfer.js/pull/1/files#r4898840>
> .
>