Video canvas object-fit cover instead of contain

The canvas in the sample app is displaying the video in center and leave space around it. It is like object-fit: contain; in css
I want to cover the video over the canvas area
You can get the idea here: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
How can I do that?