Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda