Unable to resize screen sharing canvases

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

   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

    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)
1 Like

Hey @mitesh.gandhi

Thanks for your feedback.

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


1 Like

Hey @vic.yang ,

Thanks for letting us know.

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


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?

1 Like

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 )

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

works for me in Chrome and Edge

1 Like

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

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


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