handtrack.js
handtrack.js copied to clipboard
Video hard coded set to 20px height?
Hi, in the source: https://github.com/victordibia/handtrack.js/blob/master/src/index.js you put this on line 84: video.style.height = "20px";
Why is that? This makes using the webcam impossible, no?
could you explain why this is there, please?
thanks!
Regards
Mario
That is a placeholder value that is preset before we attempt to start stream (IIRC).
On line 98, you can see that video.style.height is properly comptered based on other values ... and aims to maintain aspect ration of the webcam.
video.style.height =parseInt(video.style.width) * (video.videoHeight / video.videoWidth).toFixed(2) + "px";
Ensure you have set your video height and video width.