The size of the screen sharing is too small

Hi,

I’m having an issue where other users are having difficulty seeing what’s being shared on my screen since it appears to be too small.

I have 2 screens (1920x1080)
The rendering of my website is based on the user’s profile.
If it is mine, my website will contain two areas: Input area and video area. The video area takes up half of my screen (940x1050)
If the user is a guest, the website only contains a video area (fullscreen).

I opened my website on screen 1
I joined video session. I shared my screen 2 (1920x1080) entirely
On the guest computer, they were able to see my screen, but it was too small (940x528)

I tried to increase the size (setShareViewDimension), but it became blurry.

Video web sdk: 1.7.0
Browser: Chrome 112
OS: Windows

Hey @thanh.huynh

Thanks for your feedback.

Did you call the stream.updateSharingCanvasDimension method?

The resolution of sharing content depends on many facts, could you subscribe to the sharing statistic data to get real-time sharing resolution?
The related APIs are stream.subscribeShareStatisticData and share-statistic-data-change event.

Thanks
Vic

Hi,

In the video-single.tsx file, we have the useShare hook that return sharedContentDimension:

const { isRecieveSharing, isStartedShare, sharedContentDimension } = useShare(zmClient, mediaStream, shareRef);

And we have a useEffect that subscribe to sharedContentDimension that contain something like this:

useEffect(() => {
  if (isSharing && shareContainerRef.current) {
    const { width, height } = sharedContentDimension;
    console.log("sharedContentDimension", width, height);
    const { width: containerWidth, height: containerHeight } = containerDimension;
    const ratio = Math.min(containerWidth / width, containerHeight / height, 1);
    setShareViewDimension({
      width: Math.floor(width * ratio),
      height: Math.floor(height * ratio)
    });
  }
}, [isSharing, sharedContentDimension, containerDimension]);

So I console.log(sharedContentDimension) in the useEffect method. It gave me 940x528
I tried to increase the width and height in the setShareViewDimension method, but it became blurry

I think the size is equal to my canvas size on my screen.
I need to increase the size of my screen on the guest screen.
How can I do that?

Thanks

Hey @thanh.huynh

The sharedContentDimension needs to be applied to the canvas. We provide the stream.updateSharingCanvasDimension method to update the canvas.

Thanks
Vic

I increased the size parameters in the updateSharingCanvasDimension method, but it is still blurry

Hey @thanh.huynh

We checked our code and it‘s indeed an issue.

We will fix it in the next release. The release date is around the end of April.

Thanks
Vic

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