Subscribe video counts greater than maximum size (4)

When there are more than 5 users on the stage (in the room), we’re getting the error in the method “attachVideo”:

subscribe video counts greater than maximum size (4)

Client:

    const zmClient = ZoomVideo.createClient();
    await ZoomVideo.preloadDependentAssets(`${window.location.origin}/lib`);
    await zmClient.init("en-US", `${window.location.origin}/lib`, {
        webEndpoint: window?.webEndpoint ?? "zoom.us",
        stayAwake: true,
        patchJsMedia: true,
        leaveOnPageUnload: true,
        enforceVirtualBackground: true,
        enforceMultipleVideos: true,
    })

Zoom sessionId: “LbnScVdqQeO4ikNqnixUew==”

SharedArrayBuffer is disabled
Zoom Video SDK 1.11.10
React 17.0.2

Hi @sergey77,

I see you have enforceMultipleVideos set to true, but this only allows for 4 videos at max. To allow for gallery view with >4 videos, you’ll need to enable SharedArrayBuffer.

Thanks,
Rehema

Hi @rehema.zoom ,

Is there a way to render more than 4 videos with SharedArrayBuffer turned off?

In our case, enabled SharedArrayBuffe leads to multiple issues related to CORS

Hi @sergey77 ,

Unfortunately, over 4 videos cannot be rendered without SAB enabled. Is using serviceworkers, as described here, an option for you all?

Hey @sergey77

We have an exception where you can set {disableRenderLimits: true} in the enforceMultipleVideos attribute of the client.init method.

This allows you to render up to 25 videos simultaneously, but enabling this option may cause high CPU usage and video performance issues.

Thanks
Vic

Hi @rehema.zoom ,

Our app uses a lot of content (video, images, etc.) from various sources that are not related to us. At the moment, enabling
coi-serviceworker breaks the usage of third-party content sources in the app.

Is there a way to configure serviceworkers so that it only affects Zoom content? Or could you please advise how to resolve the issue with using video content and images from third-party sources (not related to the app) when using Cross-Origin Isolation or Credentialless Headers or Serviceworkers?

Hi @vic.yang ,
Thanks for a hint.

Actually, I don’t think we need support for as many as 25 videos simultaneously. If we use a maximum of 6-9 videos simultaneously, how critical is it for high CPU usage? If the usage of 6-9 videos simultaneously doesn’t create performance issues, then the solution of using {disableRenderLimits: true} works for us


The second question is if using a separate video-player-container for each video will somehow affect the performance? That is, is there a difference in using:

<video-player-container>
     <video-player  />
     <video-player  />
     <video-player  />
     <video-player  />
     <video-player  />
     <video-player  />
</video-player-container>

Or

<div>
      <video-player-container>
           <video-player  />
      </video-player-container>
      <video-player-container>
           <video-player  />
      </video-player-container>
      <video-player-container>
           <video-player  />
      </video-player-container>
      <video-player-container>
           <video-player  />
      </video-player-container>
      <video-player-container>
           <video-player  />
      </video-player-container>
      <video-player-container>
           <video-player  />
      </video-player-container>
</div>

Hey @sergey77

If we use a maximum of 6-9 videos simultaneously, how critical is it for high CPU usage?

It depends on the performance of different devices.

Our initial setting of 4 is conservative. On higher-performance devices (such as a MacBook Pro with an M1 chip), even with more than 10 videos, the video experience remains quite good. Due to the limited number of testing devices, we cannot provide a definitive answer.

The second question is if using a separate video-player-container for each video will somehow affect the performance?

The former is the recommended approach.

Thanks
Vic

Hi @vic.yang ,
Is there any development to improve performance when using more than 4 videos without SAB enabled? I read that there is a release planned for August:

1 Like

Hey @sergey77 ,

We are working on an improvement this fall to render more than 4 videos without SAB and with great performance. In the meantime, please use the {disableRenderLimits: true} in the enforceMultipleVideos attribute of the client.init method.

Best,
Tommy

1 Like

Hi @tommy , thanks for the response.
We’re looking forward to getting this update. This is really important to us

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