# Unable to resize screen sharing canvases

**URL:** <https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150>\
**Category:** Web\
**Created:** [November 11, 2021, 8:02pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150 "2021-11-11T20:02:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitesh.gandhi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mitesh.gandhi/32/3954_2.png) [@mitesh.gandhi](https://devforum.zoom.us/u/mitesh.gandhi)\
**Post date:** [November 11, 2021, 8:02pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/1 "2021-11-11T20:02:38Z")

</div>

**Description**  
I am forcing to resize self screen sharing canvas and peer screen sharing canvas.  
by setting

```auto
   canvas.setAttribute('width', window.innerWidth);
   canvas.setAttribute('height', window.innerHeight);

```

The above code is not allowing me to update the screen sharing canvases it goes back to the original canvas width and height, are there any APIs to resize screen sharing canvases? or is there any other way I can accomplish this?

**Which Web Video SDK version?**  
SDK version : 1.1.5

**Video SDK Code Snippets**

```auto
    const canvas = document.getElementById('selfSharingCanvas')
    canvas.setAttribute('width', window.innerWidth);
    canvas.setAttribute('height', window.innerHeight);

```

**Device (please complete the following information):**

- OS: macOS Version 11.5.1, Ubuntu 20.04
- Browser: Chrome, Firefox
- Browser Version : Chrome Version 94.0.4606.61 (Official Build) (64-bit) and Firefox 94.0 (64 bit)  
.

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [November 12, 2021, 6:41am UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/2 "2021-11-12T06:41:32Z")

</div>

Hey @mitesh.gandhi

Thanks for your feedback.

We will add sharing dimension-related APIs in the next release.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![mitesh.gandhi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mitesh.gandhi/32/3954_2.png) [@mitesh.gandhi](https://devforum.zoom.us/u/mitesh.gandhi)\
**Post date:** [November 12, 2021, 12:29pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/3 "2021-11-12T12:29:14Z")

</div>

Hey @vic.yang ,

Thanks for letting us know.

When can we expect the next release for sharing dimension-related APIs ?

Thanks  
Mitesh

---

<div class="post-metadata">

**Author:** ![victor.aprea](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/victor.aprea/32/26777_2.png) [@victor.aprea](https://devforum.zoom.us/u/victor.aprea)\
**Post date:** [November 19, 2021, 3:14pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/4 "2021-11-19T15:14:44Z")

</div>

Did “the next release” mean 1.1.6, which is available as of 6 days ago, or does it mean 1.1.7? If it’s 1.1.6 can you point us in the right direction for this please?

---

<div class="post-metadata">

**Author:** ![simkin](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/simkin/32/31663_2.png) [@simkin](https://devforum.zoom.us/u/simkin)\
**Post date:** [November 23, 2021, 4:20am UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/5 "2021-11-23T04:20:04Z")

</div>

@mitesh.gandhi  
I am using the ‘zoom’ attribute to resize for screen sharing elements

i calculate the ratio of the incoming content to the div i want to display it in,  
and then i set that ratio ( r )

```auto
element.style['zoom'] = r;
element.style['-moz-transform'] = `scale(${r})`;

```

works for me in Chrome and Edge

---

<div class="post-metadata">

**Author:** ![mitesh.gandhi](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mitesh.gandhi/32/3954_2.png) [@mitesh.gandhi](https://devforum.zoom.us/u/mitesh.gandhi)\
**Post date:** [November 23, 2021, 12:56pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/6 "2021-11-23T12:56:12Z")

</div>

Hey @simkin,  
Thanks for the reply, I will try this out.

---

<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:** [November 23, 2021, 11:19pm UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/7 "2021-11-23T23:19:42Z")

</div>

Thanks @simkin , for sharing your approach.

@victor.aprea , @mitesh.gandhi , keep an eye on our changelog page for the next version: [https://marketplace.zoom.us/docs/changelog](https://marketplace.zoom.us/docs/changelog)

-Tommy

---

<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:** [December 24, 2021, 9:20am UTC](https://devforum.zoom.us/t/unable-to-resize-screen-sharing-canvases/60150/8 "2021-12-24T09:20:13Z")

</div>

Closed on December 24, 2021, 9:20am UTC

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