The screen share stream not getting rendered on other participants' screens

Description
When I start the screen share then other participants are not able to see my screen at all, nothing gets rendered on the canvas and there are no errors getting logged in the console.

I have added a code snippet of the function which gets called in the ‘active-share-change’ event listener.
and I am using the canvas element to render the screen share stream.

<canvas id={screen-${participantData.userId}} className=‘screen-share-elem’ />

Here the participantData.userId is created by the zoom for each participant in the session.

I have added 2 screenshots as well where one is of the Chrome browser where the screen is shared and the second one is of the Safari browser where the canvas is completely blank.
Tried sharing from the Safari browser as well but the same issue.

Which Web Video SDK version?
I am using web version 1.3.0

Video SDK Code Snippets

handlePariticpantsScreen = (payload) => {
    try {
      const mediaStream = this.zoomClient.getMediaStream();

      if (payload.state === 'active') {
        mediaStream.startShareView(
          document.querySelector(`#screen-${payload.userId}`),
          payload.userId
        );
      } else if (payload.state === 'inactive') {
        mediaStream.stopShareView();
      }
    } catch (err) {
      console.dir(err);
    }
  };

Screenshots


Device (please complete the following information):

  • Device: Macbook Air (M1)
  • OS: macOS 12.4(Monterey)
  • Browser: Chrome
  • Browser Version: Version 103.0.5060.134 (Official Build) (arm64)

Additional context
Add any other context about the problem here.

This issue is resolved, Actually in the documentation, the payload.state of the active-share-change event is in small letters which is wrong. The payload.state is in the form of capital letter like ‘Active’ and ‘Inactive’.

I updated that and it resolved the issue.

1 Like

Thank you @vk-jangid ! Can you please share the link to the documentation you were referencing so I can put in a change request?

Gianni

This is the link where you can find the issue -

One more issue I found in the reference section where the startShareView is mentioned.
here if you the parameters of startShareView, the first parameter is userId and the second is canvas, but this is not the case. it’s actually in the opposite order, the first parameter is canvas and the second is userId.

This is one more issue in the documentation. these states come in the connection-change event listener.
but when the token is expired, the ‘Fail’ state comes which is not even mentioned here.

I think you need to rework the documentation so the users don’t get confused with the documentation.

Hey @vk-jangid,

Thank you for the feedback on the docs, I will update this right away! :slight_smile:

-Tommy

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