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

172
Views
Custom progress bar with range slider angular

i'm creating a custom progerssbar control for ngx-plyr, it is working but there's a bug where user sometimes need to click the progress bar 2-3 times in order to change the video time to be change. you can see it here https://bory-webspeech.netlify.app

here's how i manage to simulate the progress bar

 updateTime(e) {
    this.plyr.toArray().forEach((plyr) => {
      const lastTime = plyr.player.currentTime;
      try {
        plyr.player.pause();
        this.isPlayed = false;
        plyr.player.currentTime = parseFloat(e.target.value);
        this.time = e.target.value;

        this.remaining = this.parse(
          plyr.player.duration - this.time
        );
      } catch (error) {
        console.log(error);
      }
      plyr.player.on("canplay", () => {
        if (plyr.player.currentTime != lastTime) {
          setTimeout(function () {
            console.log('play');
            plyr.player.play();
          }, 250);
        } else {
          console.log('dont play');
          plyr.player.currentTime = parseFloat(e.target.value);
          this.time = e.target.value
        }
      });
    });
  }

where did i do wrong?

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!