Closed sksurendrakmr closed 2 years ago
Resolved the issue. All we have to do is apply the css properties in video tag. As under the hood, react-webcam rendering a video tag to enable the camera.
.video {
height:'100vh';
width:'100%';
position:'fixed';
bottom:0;
top:0;
left:0;
objectFit:'cover';
}
can you help share the javascript code sample? @sksurendrakmr
where did you apply the css to connect with Javascript or React code? @sksurendrakmr
Video (Webcam) not taking full parent dimension height and has some ratio restriction in mobile screen
I have tried setting 1.) <BarcodeScannerComponent height="100vh" width="100%" ....../> 2.) <BarcodeScannerComponent height="100vh" width="100vw" ...../>
So Need to pass some style property to webcam component but right now we don't have any way to pass style property and overwrite some of CSS styles in webcam
with default height and width![image](https://user-images.githubusercontent.com/65896570/139257369-45494113-40b7-45f7-91f4-b7e9247d2c8d.png)
with height 100vh![image](https://user-images.githubusercontent.com/65896570/139257516-dadd0ca6-a679-4d11-b4c5-e2b286782bed.png)