# About video size in canvas in new version

**URL:** <https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822>\
**Category:** Web\
**Created:** [December 28, 2022, 9:30am UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822 "2022-12-28T09:30:12Z")\
**Posts on this page:** 6\
**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:** [December 28, 2022, 9:30am UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/1 "2022-12-28T09:30:12Z")

</div>

Hello,

Today, I tested the new web sdk version 1.5.5 (video-single.tsx)  
I used Chrome on Windows and Chrome on Android  
On Windows I have a fullscreen canvas (720P)  
On Android I turned on the video  
Here is the screenshot (Chrome on Windows):

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/e/1ec21b81189b0372ea9ba73d8ea173e08a537e2c.png)

You see:  
The black part is canvas that have size: (100% x 100%) =\> (462x767)  
The blue part is the wall of my room. That was captured by my phone camera  
The blue area is a horizontal rectangle  
In the previous version, I think it was vertical rectangle  
And I think vertical rectangle is better because it is a mobile phone camera  
But I also dont want to manual set the width and height in mediaStream.renderVideo function because the website run on different devices

So I think I need a new option parameter in the mediaStream.renderVideo. That I can choose how the video will be render.  
Sometimes I need it to fill the height and leave black left and right (to display mobile users video)  
Sometimes I need it to fill width and leave black on top and bottom like the screenshot above (to display pc users video)  
And sometimes I need it to fill both width and height and leave no black if possible (to display myself I think)

---

<div class="post-metadata">

**Author:** ![kellyjandrews](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kellyjandrews/32/51599_2.png) [@kellyjandrews](https://devforum.zoom.us/u/kellyjandrews)\
**Post date:** [December 28, 2022, 4:48pm UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/2 "2022-12-28T16:48:38Z")

</div>

Thanks, @thanh.huynh - we appreciate the feedback here. I’ll make sure we get this passed on to the team so we can find a proper resolution.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [December 28, 2022, 5:24pm UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/3 "2022-12-28T17:24:25Z")

</div>

Hey @thanh.huynh ,

I noticed you are setting the height and width to both `100%`. If you do this, the view can be stretched.

We suggest setting the width to `100%` and the height to `auto`.

Please let me know if that helps.

-Tommy

---

<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:** [December 29, 2022, 8:57am UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/4 "2022-12-29T08:57:41Z")

</div>

It doesn’t work  
If I set the height to auto, the sdk will set it to 0  
Screenshot:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/d/0d374d552659509cf0090a3bbab6ac0224202171.png)

---

<div class="post-metadata">

**Author:** ![freelancer.nak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/freelancer.nak/32/40968_2.png) [@freelancer.nak](https://devforum.zoom.us/u/freelancer.nak)\
**Post date:** [December 30, 2022, 12:44pm UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/5 "2022-12-30T12:44:26Z")

</div>

Here is the [session](https://youtu.be/t8IAvgRjpV4) regarding Zoom Video SDK Integration using ReactJS.

---

<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:** [January 29, 2023, 10:44pm UTC](https://devforum.zoom.us/t/about-video-size-in-canvas-in-new-version/80822/6 "2023-01-29T22:44:40Z")

</div>

Closed on January 29, 2023, 10:44pm UTC

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