aws / amazon-chime-sdk-component-library-react

Amazon Chime React Component Library with integrations with the Amazon Chime SDK.
Apache License 2.0
268 stars 160 forks source link

How to control the number of videos received #856

Closed kodai305 closed 1 year ago

kodai305 commented 1 year ago

What we want to do

Where the default is to receive video for 25 people, we would like to set the number of people to a smaller number, such as 5.

The background is that it is difficult to test the behavior of more than 25 Attendees when video is enabled, and we want to operate with the number set to a smaller number.

What we tried

We tried to change the value of videoSubscriptionLimit but did not get the expected result.

The first thing we tried was to clone amazon-chime-sdk-js and try to build it. However, I got an error when I ran npm run build.

The second thing I tried was to directly edit the value of videoSubscriptionLimit in amazon-chime-sdk-js installed by npm and run it, but I did not see any change in behavior.

Questions and help needed

We would like to know how to control the video size we receive

Have you reviewed our existing documentation?

Reproduction steps

Originally set to a limit of 25 people and never could be changed.

Amazon Chime SDK React Components Library version

3.2.0

What browsers are you seeing the problem on?

chrome, all browser

Browser version

108.0.5359.98

Device Information

MacOS(OS X)

Meeting and Attendee ID Information.

No response

Browser console logs

none

Add any other context about the problem here.

No response

akshay-prabhu-github commented 1 year ago

There are couple of ways to achieve that.

  1. You can use the Priority-Based Downlink Policy and use the chooseRemoteVideoSources api to control the video tiles that you would want to subscribe to. (Reference Documentation: User Guide for Priority-based Downlink Policy)
  2. Secondly, you can use the AllHighestVideoBandwidthPolicy and use the chooseRemoteVideoSources api to control the video tiles that you want to subscribe to. (Reference Documentation: AllHighestVideoBandwidthPolicy)

Here is an example for a smaller grid that you might be looking for: Case 1: Small Grid Layout (up to 4 Videos) with Fixed Tile Size

kodai305 commented 1 year ago

Thank you for your reply. We would like to try the method we were introduced to.

I understand that if we can utilize "Priority", we can create a situation where the 25 person limit is effectively reduced.

However, we would like to provide the service after verifying how it would behave if the 25 person limit is actually exceeded. Is it possible to change this threshold? Because it is not easy to connect to a meeting with more than 25 people.

xuesichao commented 1 year ago

@kodai305 There're two thresholds on this:

Check here for details: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html#mtg-limits


And for the behavior when reaching the 25 video limit. check our FAQ:

What happens to the subsequent participants who try to turn on the local video when the maximum number of video senders is already reached? Once the limit of video senders is reached in a meeting, each subsequent participant that tries to turn on the local video will receive a Meeting Session status code of VideoCallSwitchToViewOnly = 10 which in turn triggers the observer 'videoSendDidBecomeUnavailable'.

kodai305 commented 1 year ago

which in turn triggers the observer 'videoSendDidBecomeUnavailable'.

Is the event named videoSendDidBecomeUnavailable available for the sender to receive? Can the recipient (who is not trying to turn on the video) receive it?

xuesichao commented 1 year ago

@kodai305 All attendees are subscribed to this event. But it is only triggered for attendees who try to open the video when the limit is reached.

Check use case 26 here.

kodai305 commented 1 year ago

All attendees are subscribed to this event. But it is only triggered for attendees who try to open the video when the limit is reached.

Thank you. If we can get the event, we will be able to achieve a lot of functions.

For example, I would like to realize a spotlight function. I would like to create a mechanism to dynamically turn on the camera if the target of the spotlight is the 26th person to turn on the camera.

So, I have one problem and would like to ask a question. When implementing the process to receive the event that the 26th person failed to turn on the camera, it is inefficient to have 25 people (browsers) actually participate in the meeting. This is because it cannot be implemented by one person. Is there any way to solve this problem?

devalevenkatesh commented 1 year ago

Hi @kodai305 , unfortunately I do not have a better suggestion yet and have requested information within team internally. Amazon Chime SDK though has a blog post on a tool which can automate participant join: https://aws.amazon.com/blogs/business-productivity/load-testing-applications-built-with-the-amazon-chime-sdk/

Suggest you to go through it and see whether it helps. Once I have more information, I will update the issue.

kodai305 commented 1 year ago

@devalevenkatesh Thank you for introducing me to your blog. We will try this ourselves.

If there is another way, please let me know!

ltrung commented 1 year ago

Closing the issue but feel free to reopen if you still need help