Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

119
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda