Yep exactly, the first set of variables is my canvas size and second the video size and I am doing this conversion, if you set the video input size to 1280x720 or whatever your camera is, the code works. The scaling also works with a smaller size but only in the clipped zone…
When the video input size to something smaller, e.g. 360x180, only this portion of the video is used as input. It is as if the clipped portion has been used rather than the scaled input.
The video DOM element has the correct size.