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

115
Views
Restrict video duration from file input with capture attribute

I'm using the following input code to allow mobile users to upload a video file into my webpage.

            <input
                type="file"
                capture
                id={'videoInput'}
                accept="video/*"
                onChange={handleChangeMediaFile}
            />

The only restriction I have is that the video should not be longer than 1 minute. I know that I can validate the video inside handleChangeMediaFile func and show a corresponding error to the user but that doesn't look like a very user-friendly solution to me.

Is it possible to split the video file that I receive in handleChangeMediaFile into multiple playable chunks and then upload them as separate videos? If that's impossible, is there a way to automatically trim the video down to 60 seconds if it exceeds the limit?

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!