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

156
Views
JS PWA Get full resolution camera stream

I am building a PWA that heavily focuses on image capture and need to access device's camera at a high resolution.

I have tried using navigator.mediaDevices.getUserMedia with a variety of constraints, however, it seems that only very low constraints can be met (e.g. my Android camera can capture something around 2000x3000+ px resolution, but the stream only supports up to ~320/480p). It also sort of ignores the aspect ratio and making the stream vertical full screen really scales and stretches the image.

With <input type="file" accept="image/*" capture="environment"/> I get much better results as it opens the native camera app. With that I am able to get a very high resolution image of 2000x3000+ px. However, with that I cannot customize nor process the stream (i.e. add an overlay, try detecting QR codes etc.).

Is there anything I'm missing? I would need to get a camera stream with resolution to at least match the full screen resolution of the device, however, I cannot find how to enforce that (using min in the constraints width and height throws an error that constraints couldn't be met).

Perhaps there is a library that wraps the getUserMedia functionality with a simple interface to provide full screen camera stream?

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!