Can I get the maximum number before calling renderVideo API?

Description
Can I get the maximum number before calling renderVideo API?
After calling renderVideo API, the message “subscribe video counts greater than maximum size (1)” is displayed.
I want to get the part (1) before calling renderVideo API.
I think 1 is when “mediaStream.isSupportMultipleVideos() == false”.
How do I get 4 and 9?

Browser Console Error
subscribe video counts greater than maximum size (1)

Which Web Video SDK version?
1.5.5

Video SDK Code Snippets

            await mediaStream.renderVideo(
              videoRef.current as HTMLCanvasElement,
              user.userId,
              sp.width,
              sp.height,
              sp.left,
              sp.bottom,
              quality //VideoQuality.Video_90P
            );

Device (please complete the following information):

  • Device: Chromebook
  • OS: ChromeOS
  • Browser: Chrome
  • Browser Version [128.0.6613.161(Official Build)]

Hey @amd.yamamoto

Thanks for your feedback.

I think 1 is when “mediaStream.isSupportMultipleVideos() == false”.

That’s correct.

How do I get 4 and 9?

Typically, on mobile browsers or when SharedArrayBuffer is disabled, the maximum number is 4. However, on desktop browsers with SharedArrayBuffer enabled, the maximum number increases to 25.

Thanks
Vic

Thank you, Vic.

1 is ‘mediaStream.isSupportMultipleVideos() == false’.

4 for mobile browser or desktop browser with SharedArrayBuffer disabled.

25 is desktop with SharedArrayBuffer enabled.

Should I use this kind of decision to determine the number of screen displays?

Sincerely,
Hidekazu YAMAMOTO.

Hey @amd.yamamoto

To add, on low-performance devices (where navigator.hardwareConcurrency < 4), a maximum of 2 videos can be rendered.

Thanks
Vic

Hey Vic

Thank you for pointing this out.
I see that there is a pattern where the maximum is 2.
I will take this into consideration for the screen layout.

Thank you very much.
Hidekazu Yamamoto.