Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix draw wrong position while playing backward seeking #918

Merged
merged 2 commits into from
Jan 19, 2017

Conversation

candyan
Copy link

@candyan candyan commented Jan 12, 2017

while audio is playing, i seek to backward. the cursor is still in its original position. until playing to the original position. the cursor is return to normal.

@@ -183,16 +183,17 @@ var WaveSurfer = {
this.fireEvent('interaction', this.seekTo.bind(this, progress));

var paused = this.backend.isPaused();
// avoid draw wrong positon while playing backward seeking
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"positon" should be "position".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx, my mistake

@katspaugh
Copy link
Owner

I don't quite understand the issue that is being solved here. I don't see any problem with seeking backwards on the homepage.

@thijstriemstra
Copy link
Contributor

@candyan can you explain this PR in more detail?

@qwertycopter
Copy link

I can confirm this issue exists and candyan's edits fix it.
When playing audio and clicking back to a previous part of the waveform sometimes the cursor does not move back (although the correct audio will play)
I'm using the MediaElement backend and very long ogg files which might contribute to the problem (the browser does not download the whole ogg file but makes several 206 partial content requests)

@katspaugh
Copy link
Owner

Ah, so it's only for the MediaElement. Makes sense. I'll merge then.

@katspaugh katspaugh merged commit 5cf96c0 into katspaugh:master Jan 19, 2017
mspae pushed a commit to mspae/wavesurfer.js that referenced this pull request Feb 5, 2017
* fix draw wrong position while playing backward seeking

* fix spelling mistake
thijstriemstra pushed a commit that referenced this pull request Feb 6, 2017
* fixed wrong var reference causing the bottom half of the waves to not draw

* replaced loops of this.canvases with correct for loop or forEach where possible

* turned unnecessary let into const in multicanvas

* Only call media.load() if it exists (#875)

* When running code that uses Wavesurfer under PhantomJS (even if not explicitly testing the Wavesurfer code), the JS interpreter crashes because PhantomJS DOM `<audio>` elements don't have a `load()` method. This change skips that one line if the method doesn't exist.

* Apply correct normalize absmax calculation to drawBars() (#916)

* fix draw wrong position while playing backward seeking (#918)

* fix draw wrong position while playing backward seeking

* fix spelling mistake

* add getPlaybackRate (#936)

* added es6 method short notation for #f185d97c825a92bfb69be80091587a9a19f66594

* Updated render function for drawPeaks/getPeaks (#959)

* Updated the render function to call the new version of the getPeaks and drawPeaks calls which now require start and end parameters.  Fixes flat waveform drawing in minimap plugin.

* changed vars to const where possible in ported bugfix commits from master branch

* fixed split channel call to drawWave and drawPeaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants