Cloud Recording with shared screen

I am using @zoom/videosdk :1.10.8 in react.js

I want to build screenRecording which record audio of all participant and share screen by host ( screen is shared by host throughout of meeting and i have enabled the recording from only host side), but whenever any participant shared their video in the meeting host screen share is got turned off.

But i want to host can shared screen throught the meeting (because i want to record their screen) and participant can also share their screen anytime in the meeting
how can i achieve this functionality.

Hey @anish

Thanks for your feedback.

Are you looking to support multiple sharing screens simultaneously in the session?

By default, Video SDK only allows one person to share their screen at the same time. However, the host can enable multiple individuals to share their screens by using stream.setSharePrivilege(SharePrivilege.MultipleShare) method.

On the viewing side, however, only one person’s shared content can be viewed at a time, and you can switch between shared views using stream.switchShareView method.

Thanks
Vic

Hello @vic.yang,

I appreciate your timely reply. I’ve implemented stream.setSharePrivilege(3) on the host side to enable multiple users to share their screens simultaneously. However, when I attempt to use stream.switchShareView(userId), I encounter an “INVALID_OPERATION” error. Could you please advise on what might be causing this issue?

Thanks
Anish

Hey @anish

You need to call stream.startShareView first to render the shared content. If you need to switch, then you call stream.switchShareView to perform the switch.

Thanks
Vic

He @vic.yang
Thanks again for your response. The Actual Scenario is we want to record meeting with all participant audio and screen share of host (generally recording is started only from host side), for that first i am starting screen share from host side using this " stream.startShareScreen(document.querySelector(“#” + ZOOMMEDIA.SCREEN_SHARE_VIDEO)) " method as mention in doc after that i am starting recording . This is working fine. But other participants are not able to share their screen (non-host participant) according to doc one time only participants can share their screen, then i used “stream.setSharePrivilege(3)” , after that multiple participant are able to shared screen at same time. but none of their screen is visible (it is coming blank), show after that i used stream.switchShareView(userId) it showing invalid opertion. Only two particpant has joined meeting and shared screen simultaneously but none of them screen share is visible.

Hey @anish

Thank you for sharing your actual usage scenario.

Allow me to provide a brief explanation of how to call Video SDK methods to align with your scenario:

  1. On the host’s end, your implementation is correct, you can use the startShareScreen method to begin screen sharing:

    stream.startShareScreen(document.querySelector('#' + ZOOMMEDIA.SCREEN_SHARE_VIDEO))
    
  2. Since the default screen sharing setting allows only one user to share their screen at a time, which doesn’t fit your scenario, the host can enable multi-user screen sharing by calling the following method:

    stream.setSharePrivilege(3);
    
  3. Other participants can render the shared content by using stream.startShareView(canvas, userId), but there are some limitations:

    • If the current user is already sharing their screen with others, they cannot render others’ shared content as a receiver.
    • Only one shared content can be viewed at a time. You can switch between different shared content using stream.switchShareView(userId).

We’re working on improving these two limitations, and these features will be supported in future versions.

Thanks
Vic