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

128
Views
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
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!