bensonruan / webcam-easy

javascript access webcam stream and take photo
https://bensonruan.com/how-to-access-webcam-and-take-photo-with-javascript
MIT License
241 stars 110 forks source link

width and height of video element are not consistant with the canvas element #15

Open bmabir17 opened 3 years ago

bmabir17 commented 3 years ago

After the image is captured from the video element and drawn into canvas the width and height of the canvas should have been the same as the video element according to this. But that is not the case. Screenshot_2021-01-24-13-40-00-328_com android chrome-COLLAGE

deadlyedge commented 3 years ago

you could download the JS file 'webcam-easy.js' and edit it from 'scrollHight' to 'videoHight' and so to 'scrollWidth'. remember to delete the word 'export default' from the top of the file. I'm not familiar with javascript, I just tried and so far so good.