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

212
Views
Ver video una vez y redirigir a otro sitio web

Se me asignó la tarea de permitir que un video solo se vea una vez usando el sitio web de WordPress y después de verlo una vez y finalizar el video, hacer que la URL del sitio web se redirija a otra página. El video no se reproduce, pero aún se redirige después de 1 minuto.

Aquí está mi código

 [videojs_video url="http://tecfa.unige.ch/guides/html/html5-video/videos/state-of-wikipedia-480x272.mp4" preload="auto" controls ="false" autoplay = "true" loop="true"] <script> setTimeout(function(){ window.location.href = 'https://www.tutorialspoint.com/javascript/'; }, 60000); </script> <p>Web page redirects after 1 minute.</p>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede usar el evento de ended para detectar si el video ha terminado de reproducirse:

 let myVideo = document.getElementById('my-video'); myVideo.addEventListener('ended', videoCompleted, false); function videoCompleted(e) { console.log('video has completed'); window.location.href = 'https://www.tutorialspoint.com/javascript/'; }
 <video controls src="https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_640_3MG.mp4" id="my-video"></video>

about 4 years ago · Juan Pablo Isaza Report
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!