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

177
Views
¿React Video Player onTimeUpdate ejecuta la función cuando el video se ve en algún porcentaje?

Estoy tratando de hacer algún disparador cuando el video visto %60 se ejecutaría alguna función.

Asigne el atributo onTimeUpdate en la etiqueta de video. <video onTimeUpdate={ onPlaying }/>

 const [currTime, setCurrTime] = useState(0); const onPlaying = () => { setCurrTime(videoRef.current.currentTime); console.log(Math.round(currTime)); }; useEffect(() => { if (Math.round(currTime) > 5) { console.log('Trigger'); } }, []);

Cuando paso currTime como segundo parámetro, funciona pero activa cada actualización. Quiero activar solo una vez cuando el video alcance un valor definido.

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!