question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1

See original GitHub issue

Hi!

Thank you for your work 😃

Wavesurfer.js version:

3.2.0

Browser and operating system version(s):

LinuxMint, Opera 65.0, Firefox70.0.1

Code needed to reproduce the issue:

var wavesurfer = WaveSurfer.create({
    container: '#player-wrap-'+u.data.id,
    waveColor: '#94919C',
    progressColor: '#007DFF',
    height: 50,
    pixelRatio: 1,
    cursorColor: '#fff',
    normalize: true,
    responsive: true
});
// blob in webm format
// and checked with wavesurfer.load('audio.wav');
wavesurfer.loadBlob(u.data.blob);
wavesurfer.on('ready', function () {
    wavesurfer.play();
});
// audioprocess event returns correct data
// wavesurfer.on('audioprocess', updateTimer);

Result if seek

Выделение_140

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Dexmastercommented, May 26, 2020

It is reproducible on main page if you click exactly on 0 position or 1 pixel to the left of it. image

0reactions
r-becharacommented, Nov 25, 2021

The same problem happened to me and I solved converting the “position” variable to Number before calling toSeek.

const n = Number(position) toSeek(n)

Read more comments on GitHub >

github_iconTop Results From Across the Web

src/wavesurfer.js
'Error calling wavesurfer.seekTo, parameter must be a number between 0 and 1!' ); } ...
Read more >
Issues seeking location in audio using waveform.js library in ...
log() gives me the correct position, however, when I try to get the other tracks to seek to the same position it just...
Read more >
WaveSurfer - Tampermonkey - Source code - Greasy Fork
seekTo (0);; this.drawer.progress(0);; },; /**; * Set the playback volume. *; * @param {Number} newVolume A value between 0 and 1, 0 being...
Read more >
wavesurfer.min.js.map - Ugamusic
src/mediaelement-webaudio.js","webpack://WaveSurfer/./src/mediaelement.js" ... n * @param {number} quality=0.92 An optional value between 0 and 1.
Read more >
Oscilloscopes Remote Control and Automation Manual
Teledyne LeCroy provides many free resources to help you receive the greatest value from your instrument. Most of the software and documentation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found