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

171
Views
How To Set Portrait Or Full Height To A Video Element

I have a project to capture an ID card with a camera and there's an additional guideline for that ID card, so I have to call a custom camera from my Angular.

When I use input with the capture attribute:

<input
  #inputCamera
  type="file"
  capture="environment"
  [accept]="state.model.allowedExtension"
  (change)="handleChange($event)"
  hidden
/>

I can't custom it to look like this:

enter image description here

So, I decide to make my own with thirdparty. But the problem is that video element always in landscape position, so it will looks like this:

enter image description here

So, how to make it full portrait position from that video element? Because I've been try with css but it's only working on style, when I try to capture an image, it still landscape position.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

have you tried passing constraints to getUserMedia?

navigator.mediaDevices.getUserMedia({
  video: { width: 720, height: 1280 }
})
.then(function(stream) {
  /* use the stream */
})
.catch(function(err) {
  /* handle the error */
});
about 4 years ago · Santiago Gelvez Report
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!