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

119
Views
How to detect click on JS Player?

I'm trying to fire a function when my player is clicked, but it's not working

This is my player:

<div
              class="vadoo_player"
              vid="s89dafj89asdfu8duf"
              etype="responsive"
            >
              <script
                src="https://api.vadoo.tv/static/vadoo_player.min.js"
                id="player_script"
                vid="s89dafj89asdfu8duf"
              ></script>

<!-- Progress Bar -->
<div class="progress">
                <div class="progress-bar"></div>
              </div>

What I'm trying to do just for testing:

document.querySelector(".vadoo_player").addEventListener("click", () => {
  let progressBar = document.querySelector(".progress-bar");
  progressBar.style.width = "50%";
});

If I click on the video it doesn't work, but if I click on the progress or on the div area before the player loads, the function just works. I thought it would be because my progress bar is inside the video player's div , but even if I put it outside the behavior keep the same.

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!