# Video canvas object-fit cover instead of contain

**URL:** <https://devforum.zoom.us/t/video-canvas-object-fit-cover-instead-of-contain/68633>\
**Category:** Web\
**Created:** [May 7, 2022, 4:44am UTC](https://devforum.zoom.us/t/video-canvas-object-fit-cover-instead-of-contain/68633 "2022-05-07T04:44:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanh.huynh](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@thanh.huynh](https://devforum.zoom.us/u/thanh.huynh)\
**Post date:** [May 7, 2022, 4:44am UTC](https://devforum.zoom.us/t/video-canvas-object-fit-cover-instead-of-contain/68633/1 "2022-05-07T04:44:59Z")

</div>

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](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)  
How can I do that?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 6, 2022, 2:45pm UTC](https://devforum.zoom.us/t/video-canvas-object-fit-cover-instead-of-contain/68633/2 "2022-06-06T14:45:41Z")

</div>

Closed on June 6, 2022, 2:45pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
