peaks.js icon indicating copy to clipboard operation
peaks.js copied to clipboard

Safari issue: Playhead & Waveform creeping backward when you pause playback

Open timrwilliams opened this issue 12 years ago • 3 comments

When you try out the demo at http://waveform.prototyping.bbc.co.uk on Safari on OSX 10.9 the playhead behaves oddly creeping slowly backward from the time you hit pause, updating both waveform views as it goes.

It looks like there is an event loop in the form:

  1. Player captures a "waveform_seek" event and changes its playback position
  2. This causes a "timeupdate" which is captured in WaveformOverview
  3. WaveformOverview moves the playhead to the new time
  4. This emits a "waveform_seek" event based on playhead position for a slightly earlier time and the loop starts again at 1

Is this expected? It seems to behave properly in Chrome.

timrwilliams avatar Jan 21 '14 14:01 timrwilliams

I confirm this is a bug.

It behaves properly in Chrome, Firefox and Opera though. Have you successfully tried on another version of Safari (it is reported to be Version 7.0.1 (9537.73.11) on OSX 10.9)?

thom4parisot avatar Jan 21 '14 14:01 thom4parisot

Thanks Tom. Confirmed it works fine on Safari 6.1.1 on OSX 10.8.5. I don't have any combinations available to test unfortunately.

Do you think it is a bug in how Safari processes Javascript events in general or an Event Emitter thing?

timrwilliams avatar Jan 21 '14 14:01 timrwilliams

This has been fixed by #12, which I encountered accidentally by programmatically updating the time of the audio element. :-)

Thanks @timrwilliams for reporting the issue!

thom4parisot avatar Jan 28 '14 15:01 thom4parisot