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

285
Views
Why do the height and width settings in react-webcam become reversed?

I am using react-webcam configured as follows.

<Webcam
          audio={false}
          screenshotFormat="image/jpeg"
          videoConstraints={{
            facingMode: "environment",
            width: cameraSize.width,
            height: cameraSize.height,
          }}
          width={props.width + "px"}
          height={props.height + "px"}
  />

In chrome on desktop (regardless of screen aspect ratio), the size is set in videoConstraints, but in Android and iOS, the cameraSize.width and cameraSize.height values are set reversed when the camera is in portrait orientation. (It's okay if it's in landscape orientation.)

Example: cameraSize.width=768px, cameraSize.height=1920px, but actually width=1920px, height=768px.

What is the cause of this?

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!