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

268
Vistas
Call load() from react-howler

I want to call load() with set timeout ,how add to my code

It offer from library

Docs:

load()

When preload is true this is automatically called. When setting preload to false, you can call load() manually before playing sounds (useful for lazy loading large files on slow networks). If you attempt to play a sound that's not loading or loaded with preload react-howler will automatically call load().

And there is my code

  <ReactHowler
          src={Audio}
          preload={false}
          playing={isplaying ? false : true}
        />
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

For a fully controlled example (in a class-based component) take a look at the official examples

The trick is to get a ref to the howler component, then you can call load on it. So the following should work:

const howlerRef = useRef(null);

const myLoadFunc = ()=>{
  if(howlerRef.current) {
    howlerRef.current.load();
  }
}

return (
  <>
    <ReactHowler
          src={Audio}
          preload={false}
          playing={isplaying ? false : true}
          ref={howlerRef}
        />
    <button onClick={myLoadFunc}>start loading</button>
  </>
)
about 4 years ago · Juan Pablo Isaza Denunciar
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