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

130
Visualizações
Vue Detect when a file start download in browser

I have an Mp4 file URL that I play in videojs player, in addition, I'm also giving the user the option to download the MP4 file by clicking on a download button inside the player, in order to do so I'm doing something like this:

  window.location.replace(this.src);

where this.src is the link to the MP4 file coming from AWS S3.

But when the user clicks the download button it could take several seconds until the download actually begins and I want to show a loader in order to prevent the user from clicking several times. How can I detect when the download is actually starting (so know when to stop showing the loader)? Is there any Chrome API to do so?

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