Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

115
Views
React slider with audio ontimeupdate

In the event ontimeupdate I pass the value of currentTime to the Slider and it works correctly, the bar advances and covers the range of audio duration.

But the problem is that it is not a fluid movement, it makes little jumps. I have the step property of the Slider set to 0.01 but it seems to be detected only when dragging, but not automatic movement.

In Angular I have a similar application with mat-slider and I do not have this problem that arises in React.

audioEl.current.ontimeupdate = () =>{
   setCurrentTime(audioEl.current.currentTime)                
   setSliderValue(audioEl.current.currentTime);   
} 

const handleChange = (event, newValue) => {
    setSliderValue(newValue);
    setCurrentTime(newValue)
    audioEl.current.currentTime = newValue;
};

<Slider aria-label="Current time" step={0.01} value={sliderValue} onChange={handleChange} min={0} max={duration}/>

Thanks! :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!