About video size in canvas in new version


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):

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)

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.

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.


1 Like

It doesn’t work
If I set the height to auto, the sdk will set it to 0

Here is the session regarding Zoom Video SDK Integration using ReactJS.

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